#26830 closed defect (bug) (invalid)
Featured Content Tag (JetPack installed) gets nulled by updating Settings -> Reading
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.8 |
Component: | Bundled Theme | Keywords: | has-patch |
Focuses: | Cc: |
Description
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_optionsreading?. 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.
Attachments (1)
Change History (4)
#1
@
11 years ago
If it's because of JetPack then you should report this bug with them so they can fix it. You can report it to https://github.com/Automattic/jetpack/issues.
But I don't know JetPack that good but this is also a feature of Twenty Fourteen. Not sure if you use that as your theme. But they could easily conflict with each other.
If you send in a contribution then you need to create a patch for it. In this case your addition would be in the wrong place since it isn't core functionality so it should not be in core and it then should use the filters. That can be in JetPack or in Twenty Fourteen.
These links are part of our handbook. They describe how to create a patch and our coding standard. You will also find some other useful information.
http://make.wordpress.org/core/handbook/working-with-patches/patches-with-command-line/
http://make.wordpress.org/core/handbook/coding-standards/php/
/wp-admin/options.php