Files
Testing/tbb/wp-content/plugins/wordpress-seo/admin/statistics/class-statistics-integration.php
sean 0e8a8b3028
Some checks are pending
deploy-testing / deploy (push) Waiting to run
Initial testing snapshot
2026-11-17 16:15:01 -05:00

32 lines
613 B
PHP

<?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Statistics
*/
/**
* Class WPSEO_Statistic_Integration.
*/
class WPSEO_Statistic_Integration implements WPSEO_WordPress_Integration {
/**
* Adds hooks to clear the cache.
*
* @return void
*/
public function register_hooks() {
add_action( 'wp_insert_post', array( $this, 'clear_cache' ) );
add_action( 'delete_post', array( $this, 'clear_cache' ) );
}
/**
* Clears the dashboard widget items cache.
*
* @return void
*/
public function clear_cache() {
delete_transient( WPSEO_Statistics_Service::CACHE_TRANSIENT_KEY );
}
}