| 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. |
| | 3 | Hi! 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. |