[wp-trac] [WordPress Trac] #31374: Missed "if ( ! function_exists(" around function twentyfourteen_post_thumbnail
WordPress Trac
noreply at wordpress.org
Thu Feb 19 06:50:44 UTC 2015
#31374: Missed "if ( ! function_exists(" around function
twentyfourteen_post_thumbnail
----------------------------+------------------------------
Reporter: WordPressor.ru | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bundled Theme | Version: 4.1
Severity: normal | Resolution:
Keywords: | Focuses: template
----------------------------+------------------------------
Comment (by philiparthurmoore):
Hi! Just a note about why `twentyfourteen_categorized_blog` doesn't have a
`function_exists` around it. You will see below that the code that uses
this function is as follows:
{{{
/**
* Flush out the transients used in twentyfourteen_categorized_blog.
*
* @since Twenty Fourteen 1.0
*/
function twentyfourteen_category_transient_flusher() {
// Like, beat it. Dig?
delete_transient( 'twentyfourteen_category_count' );
}
add_action( 'edit_category', 'twentyfourteen_category_transient_flusher'
);
add_action( 'save_post', 'twentyfourteen_category_transient_flusher'
);
}}}
Making that function pluggable is somewhat redundant. If someone doesn't
want to use it then he can remove the action from `save_post` and
`edit_category`, thus there's no need for the function check.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31374#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list