Merge lp:~davidc3/resource-centre/jp-exclude-from-rss into lp:resource-centre

Proposed by David Callé on 2018-11-20
Status: Merged
Merged at revision: 111
Proposed branch: lp:~davidc3/resource-centre/jp-exclude-from-rss
Merge into: lp:resource-centre
Diff against target: 11 lines (+1/-0)
1 file modified
functions/rss.php (+1/-0)
To merge this branch: bzr merge lp:~davidc3/resource-centre/jp-exclude-from-rss
Reviewer Review Type Date Requested Status
Anthony Dillon 2018-11-20 Approve on 2019-01-16
David Callé Needs Fixing on 2018-11-20
Review via email:

Commit message

Exclude lang:jp tagged posts from the main RSS feed

Description of the change

Filtering out posts containing the "lang:jp" tag, so the future Japanese blog can be derived on tag basis from without impacting the english RSS feed. A matching change will be made on to filter out these posts from being displayed.

To post a comment you must log in.
David Callé (davidc3) wrote :

I was able to test and got tag exclusion working using `tag__not_in`.

Anthony Dillon (ya-bo-ng) wrote :

The blog loads the data via the built-in WordPress Rest API. The content is not loaded from the RSS although I guess it should be hidden from that too for people using the RSS.

I have applied your branch (and updated the tag id) to [our testing enviroment](

I created an article with the tag `lang:jp`.

This article is still [visible in the API](

A similar approach may be to add a condition to [ code base]( Keeping all the logic in one place, [example PR](

With that this branch is good.

review: Approve
David Callé (davidc3) wrote :

Thanks for testing, doing the same filtering as the custom snapcraft tag was the intended plan of action.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'functions/rss.php'
2--- functions/rss.php 2017-03-02 16:07:24 +0000
3+++ functions/rss.php 2018-11-20 10:49:17 +0000
4@@ -6,6 +6,7 @@
5 function myFeedExcluder($query) {
6 if ($query->is_feed) {
7 $query->set('cat','-1554,-1551,-1552,-1553,-344,-347,-346,-345');
8+ $query->set('tag__not_in','3184');
9 }
10 return $query;
11 }


People subscribed via source and target branches