PHP Класс WP_Spider_Cache_UI

С версии: 2.0.0
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( ) The main constructor
admin_enqueue ( ) Enqueue assets
admin_menu ( ) Add the top-level admin menu
ajax_flush_group ( ) Delete all cache keys in a cache group
ajax_get_instance ( ) Attempt to output the server cache contents
ajax_get_item ( ) Attempt to get a cached item
ajax_remove_item ( ) Delete a single cache key in a specific group
clean_post ( integer $post_id ) Clean a post's cached URLs
clean_url ( string $url = '' ) : boolean Clear a cached URL
clear_group ( string $group = '' ) : integer Clear all of the items in a cache group
do_item ( string $key, string $group ) Output the contents of a cached item into a textarea
do_rows ( string $server = '' ) Output the cache server contents in a table
help ( ) Help text
init ( ) : WP_Spider_Cache_UI Initialize the protected singleton
load ( ) Check for actions
map_meta_cap ( array $caps = [], string $cap = '' ) Map manage_cache capability
notice ( ) Maybe output a notice to the user that action has taken place
page ( ) Output the WordPress admin page
retrieve_keys ( string $server, integer $port = 11211 ) : array Get all cache keys on a server
set_blog_ids ( ) Check for network activation and init to add menu item.

Приватные методы

Метод Описание
bulk_actions ( ) : string Return the bulk actions dropdown
check_nonce ( string $nonce = '' ) Helper function to check nonce and avoid caching the request
do_row ( array $values = [], string $nonce = '' ) Output a table row based on values
get_admin_type ( ) : string Get the type of admin request this is
get_cache_key_links ( integer $blog_id, string $group = '', array $keys = [] ) Output contents of cache group keys
get_flush_group_link ( integer $blog_id, string $group, string $nonce ) Output a link used to flush an entire cache group
get_keymaps ( string $server = '' ) : array Get the map of cache groups $ keys
get_no_results_row ( ) : string Returns a table row used to show no results were found
get_refreshing_results_row ( ) : string Returns a table row used to show results are loading
get_servers ( ) : array Return list of servers, if function exists
maybe_clear_cache_group ( boolean $redirect = true ) Maybe clear a cache group, based on user request
maybe_clear_user_cache ( boolean $redirect = true ) Maybe clear a user's entire cache, based on user request
sanitize_key ( string $key = '' ) : string Sanitize a user submitted cache group or key value

Описание методов

__construct() публичный Метод

The main constructor
С версии: 2.0.0
public __construct ( )

admin_enqueue() публичный Метод

Enqueue assets
С версии: 2.0.0
public admin_enqueue ( )

admin_menu() публичный Метод

Add the top-level admin menu
С версии: 2.0.0
public admin_menu ( )

ajax_flush_group() публичный Метод

Delete all cache keys in a cache group
С версии: 2.0.0
public ajax_flush_group ( )

ajax_get_instance() публичный Метод

Attempt to output the server cache contents
С версии: 2.0.0
public ajax_get_instance ( )

ajax_get_item() публичный Метод

Attempt to get a cached item
С версии: 2.0.0
public ajax_get_item ( )

ajax_remove_item() публичный Метод

Delete a single cache key in a specific group
С версии: 2.0.0
public ajax_remove_item ( )

clean_post() публичный статический Метод

Clean a post's cached URLs
С версии: 2.3.0
public static clean_post ( integer $post_id )
$post_id integer

clean_url() публичный статический Метод

Clear a cached URL
С версии: 2.3.0
public static clean_url ( string $url = '' ) : boolean
$url string
Результат boolean

clear_group() публичный Метод

Clear all of the items in a cache group
С версии: 2.0.0
public clear_group ( string $group = '' ) : integer
$group string
Результат integer

do_item() публичный Метод

Output the contents of a cached item into a textarea
С версии: 2.0.0
public do_item ( string $key, string $group )
$key string
$group string

do_rows() публичный Метод

Output the cache server contents in a table
С версии: 2.0.0
public do_rows ( string $server = '' )
$server string

help() публичный Метод

Help text
С версии: 2.1.0
public help ( )

init() публичный статический Метод

Initialize the protected singleton
С версии: 2.2.0
public static init ( ) : WP_Spider_Cache_UI
Результат WP_Spider_Cache_UI

load() публичный Метод

Check for actions
С версии: 2.0.0
public load ( )

map_meta_cap() публичный Метод

Map manage_cache capability
С версии: 2.3.0
public map_meta_cap ( array $caps = [], string $cap = '' )
$caps array
$cap string

notice() публичный Метод

Maybe output a notice to the user that action has taken place
С версии: 2.0.0
public notice ( )

page() публичный Метод

Output the WordPress admin page
С версии: 2.0.0
public page ( )

retrieve_keys() публичный Метод

Get all cache keys on a server
С версии: 2.0.0
public retrieve_keys ( string $server, integer $port = 11211 ) : array
$server string
$port integer
Результат array

set_blog_ids() публичный Метод

Check for network activation and init to add menu item.
С версии: 2.2.0
public set_blog_ids ( )