| @@ -46,24 +46,26 @@ | ||
| 46 | 46 | public function __construct() { |
| 47 | 47 | |
| 48 | 48 | add_action( 'init', [ $this, 'init' ] ); |
| 49 | 49 | |
| 50 | - add_action( 'deleted_term_relationships', [ __CLASS__, 'invalidate' ] ); | |
| 50 | + add_action( 'deleted_term_relationships', [ self::class, 'invalidate' ] ); | |
| 51 | 51 | |
| 52 | - add_action( 'update_option', [ __CLASS__, 'clear_on_option_update' ] ); | |
| 52 | + add_action( 'update_option', [ self::class, 'clear_on_option_update' ] ); | |
| 53 | 53 | |
| 54 | - add_action( 'edited_terms', [ __CLASS__, 'invalidate_helper' ], 10, 2 ); | |
| 55 | - add_action( 'clean_term_cache', [ __CLASS__, 'invalidate_helper' ], 10, 2 ); | |
| 56 | - add_action( 'clean_object_term_cache', [ __CLASS__, 'invalidate_helper' ], 10, 2 ); | |
| 54 | + add_action( 'edited_terms', [ self::class, 'invalidate_helper' ], 10, 2 ); | |
| 55 | + add_action( 'clean_term_cache', [ self::class, 'invalidate_helper' ], 10, 2 ); | |
| 56 | + add_action( 'clean_object_term_cache', [ self::class, 'invalidate_helper' ], 10, 2 ); | |
| 57 | 57 | |
| 58 | - add_action( 'user_register', [ __CLASS__, 'invalidate_author' ] ); | |
| 59 | - add_action( 'delete_user', [ __CLASS__, 'invalidate_author' ] ); | |
| 58 | + add_action( 'user_register', [ self::class, 'invalidate_author' ] ); | |
| 59 | + add_action( 'delete_user', [ self::class, 'invalidate_author' ] ); | |
| 60 | 60 | |
| 61 | - add_action( 'shutdown', [ __CLASS__, 'clear_queued' ] ); | |
| 61 | + add_action( 'shutdown', [ self::class, 'clear_queued' ] ); | |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | /** |
| 65 | 65 | * Setup context for static calls. |
| 66 | + * | |
| 67 | + * @return void | |
| 66 | 68 | */ |
| 67 | 69 | public function init() { |
| 68 | 70 | |
| 69 | 71 | self::$is_enabled = $this->is_enabled(); |
| @@ -293,8 +295,10 @@ | ||
| 293 | 295 | } |
| 294 | 296 | |
| 295 | 297 | /** |
| 296 | 298 | * Invalidate storage for cache types queued to clear. |
| 299 | + * | |
| 300 | + * @return void | |
| 297 | 301 | */ |
| 298 | 302 | public static function clear_queued() { |
| 299 | 303 | |
| 300 | 304 | if ( self::$clear_all ) { |
| @@ -319,8 +323,10 @@ | ||
| 319 | 323 | * @since 3.2 |
| 320 | 324 | * |
| 321 | 325 | * @param string $option Option name. |
| 322 | 326 | * @param string $type Sitemap type. |
| 327 | + * | |
| 328 | + * @return void | |
| 323 | 329 | */ |
| 324 | 330 | public static function register_clear_on_option_update( $option, $type = '' ) { |
| 325 | 331 | |
| 326 | 332 | self::$cache_clear[ $option ] = $type; |