| 1 |
<?php |
| 2 |
/** |
| 3 |
* The admin-specific functionality of the module. |
| 4 |
* |
| 5 |
* @link https://codesupply.co |
| 6 |
* @since 1.0.0 |
| 7 |
* |
| 8 |
* @package Powerkit |
| 9 |
* @subpackage Modules/Admin |
| 10 |
*/ |
| 11 |
|
| 12 |
/** |
| 13 |
* The admin-specific functionality of the module. |
| 14 |
*/ |
| 15 |
class Powerkit_Twitter_Admin extends Powerkit_Module_Admin { |
| 16 |
|
| 17 |
/** |
| 18 |
* Initialize |
| 19 |
*/ |
| 20 |
public function initialize() { |
| 21 |
add_filter( 'powerkit_reset_cache', array( $this, 'register_reset_cache' ) ); |
| 22 |
add_filter( 'powerkit_ajax_reset_cache', array( $this, 'register_reset_cache' ) ); |
| 23 |
} |
| 24 |
|
| 25 |
/** |
| 26 |
* Register Reset Cache |
| 27 |
* |
| 28 |
* @since 1.0.0 |
| 29 |
* @param array $list Change list reset cache. |
| 30 |
* @access private |
| 31 |
*/ |
| 32 |
public function register_reset_cache( $list ) { |
| 33 |
$slug = powerkit_get_page_slug( $this->slug ); |
| 34 |
|
| 35 |
$list[ $slug ] = array( |
| 36 |
'powerkit_twitter_data', |
| 37 |
'powerkit_twitter_block_cache', |
| 38 |
'powerkit_twitter_shortcode_cache', |
| 39 |
'powerkit_twitter_widget_cache', |
| 40 |
); |
| 41 |
|
| 42 |
return $list; |
| 43 |
} |
| 44 |
|
| 45 |
} |
| 46 |
|