Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #31374, comment 1


Ignore:
Timestamp:
02/19/2015 06:56:46 AM (11 years ago)
Author:
philiparthurmoore
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #31374, comment 1

    initial v1  
    1 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:
     1[Changing my comment since the original was wrong.]
    22
    3 {{{
    4 /**
    5  * Flush out the transients used in twentyfourteen_categorized_blog.
    6  *
    7  * @since Twenty Fourteen 1.0
    8  */
    9 function twentyfourteen_category_transient_flusher() {
    10         // Like, beat it. Dig?
    11         delete_transient( 'twentyfourteen_category_count' );
    12 }
    13 add_action( 'edit_category', 'twentyfourteen_category_transient_flusher' );
    14 add_action( 'save_post',     'twentyfourteen_category_transient_flusher' );
    15 }}}
    16 
    17 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.
     3Hi! Just a note about why `twentyfourteen_categorized_blog` doesn't have a `function_exists` around it. If I recall correctly there was discussion about a related issue [https://github.com/Automattic/_s/pull/534#issuecomment-47533828 elsewhere]. The reasoning there was that the function is so specific that it doesn't need to be overridden. Reasoning may have changed since then. I'm sure others can provide better context but I wanted to chime in about why that doesn't have a function check around it.