[wp-trac] [WordPress Trac] #26830: Featured Content Tag (JetPack installed) gets nulled by updating Settings -> Reading
WordPress Trac
noreply at wordpress.org
Tue Jan 14 11:51:57 UTC 2014
#26830: Featured Content Tag (JetPack installed) gets nulled by updating Settings
-> Reading
--------------------------+-----------------------------
Reporter: wasxxm | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords: has-patch
--------------------------+-----------------------------
With the jetpack installed, you can set the tag for Featured Content in
Appearance -> Customize (Featured Content enabled in theme). Try to set
tag to something different than "featured" like "featured2". Then go to
Settings -> Reading and hit 'Save Changes'. Go back to the featured
content section and you will see the featured content tag has reverted to
the default 'featured' tag.
After investigation it, I found out that the problem lies in /wp-
admin/options.php. On line 128:
{{{
$whitelist_options = apply_filters( 'whitelist_options',
$whitelist_options );
}}}
The filter somehow adds 'featured-content' to the array of
$whitelist_options['reading']. I searched jetpack installation for
anything which might be adding featured-content option to the whitelist
but there is none.
One possible patch is to add this after line 128:
{{{
if(($key = array_search('featured-content',
$whitelist_options['reading'])) !== false) {
unset($whitelist_options['reading'][$key]);
}
}}}
I hope this helps.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/26830>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list