PHP 클래스 The_SEO_Framework\Transients

Generates, stores and deletes common transients.
부터: 2.7.1
상속: extends Sitemaps
파일 보기 프로젝트 열기: sybrew/the-seo-framework

보호된 프로퍼티들

프로퍼티 타입 설명
$auto_description_transient The Automatic Description transient name.
$ld_json_transient The LD+Json script transient name.
$sitemap_transient The sitemap transient name.
$theme_doing_it_right_transient The Theme is doing the Title right transient name

공개 메소드들

메소드 설명
delete_auto_description_frontpage_transient ( string $old_option ) : string Delete transient for the automatic description for blog on save request.
delete_auto_description_transient ( mixed $page_id, string $taxonomy = '', string $type = null ) : boolean Delete transient for the automatic description on requests.
delete_auto_description_transients_term ( integer $term_id, integer $tt_id, string $taxonomy, mixed $deleted_term = '' ) Delete transient on term save/deletion.
delete_front_ld_json_transient ( ) : boolean Flushes the home page LD+Json transient.
delete_ld_json_transient ( mixed $page_id, string $taxonomy = '', string | null $type = null ) : boolean Delete transient for the LD+Json scripts on requests.
delete_sitemap_transient ( ) : boolean Delete transient for sitemap on requests.
delete_sitemap_transient_permalink_updated ( ) : boolean Checks whether the permalink structure is updated.
delete_theme_dir_transient ( string | object $value = null, array | object | null $options = null ) : boolean Delete transient for the Theme doing it Right bool on special requests.
delete_transients_author ( integer $user_id ) Delete transient on profile save.
delete_transients_post ( integer $post_id ) : boolean | null Delete transient on post save.
generate_cache_key ( integer | string | boolean $page_id, string $taxonomy = '', string $type = null ) : string Generate transient key based on query vars.
generate_front_page_cache_key ( string $type = '' ) : string Returns the front page partial transient key.
get_transient ( string $transient ) : mixed | boolean Get the value of the transient.
set_theme_dir_transient ( $dir = null ) Sets transient for Theme doing it Right.
set_transient ( string $transient, string $value, integer $expiration = '' ) Set the value of the transient.
setup_auto_description_transient ( integer | string | boolean $page_id, string $taxonomy = '', strgin $type = null ) Setup vars for transients which require $page_id.
setup_ld_json_transient ( integer | string | boolean $page_id, string $taxonomy = '', string | null $type = null ) Setup vars for transients which require $page_id.
setup_transient_names ( ) Setup vars for general site transients.

보호된 메소드들

메소드 설명
__construct ( ) Constructor, load parent constructor and set up caches.
add_cache_key_suffix ( $key = '' ) : string Adds cache key suffix based on blog id and locale.
generate_taxonomial_cache_key ( integer $page_id = '', string $taxonomy = '' ) : string Generates Cache key for taxonomial archives.

메소드 상세

__construct() 보호된 메소드

Constructor, load parent constructor and set up caches.
protected __construct ( )

add_cache_key_suffix() 보호된 메소드

Adds cache key suffix based on blog id and locale.
부터: 2.7.0
부터: 2.7.1 $locale is now static. $key may now be empty.
protected add_cache_key_suffix ( $key = '' ) : string
리턴 string the cache key.

delete_auto_description_frontpage_transient() 공개 메소드

Returns old option, since that's passed for sanitation within WP Core.
부터: 2.3.3
public delete_auto_description_frontpage_transient ( string $old_option ) : string
$old_option string The previous blog description option.
리턴 string Previous option.

delete_auto_description_transient() 공개 메소드

Delete transient for the automatic description on requests.
부터: 2.3.3
public delete_auto_description_transient ( mixed $page_id, string $taxonomy = '', string $type = null ) : boolean
$page_id mixed The page ID or identifier.
$taxonomy string The tt name.
$type string The Post Type
리턴 boolean true

delete_auto_description_transients_term() 공개 메소드

Delete transient on term save/deletion.
부터: 2.3.3
public delete_auto_description_transients_term ( integer $term_id, integer $tt_id, string $taxonomy, mixed $deleted_term = '' )
$term_id integer The Term ID
$tt_id integer The Term Taxonomy ID.
$taxonomy string The Taxonomy type.
$deleted_term mixed Copy of the already-deleted term. Unused.

delete_front_ld_json_transient() 공개 메소드

Flushes the home page LD+Json transient.
부터: 2.6.0
public delete_front_ld_json_transient ( ) : boolean
리턴 boolean Whether it's flushed on current call.

delete_ld_json_transient() 공개 메소드

Delete transient for the LD+Json scripts on requests.
부터: 2.4.2
public delete_ld_json_transient ( mixed $page_id, string $taxonomy = '', string | null $type = null ) : boolean
$page_id mixed The page ID or identifier.
$taxonomy string The tt name.
$type string | null The post type.
리턴 boolean true

delete_sitemap_transient() 공개 메소드

Also ping search engines.
부터: 2.2.9
public delete_sitemap_transient ( ) : boolean
리턴 boolean true

delete_theme_dir_transient() 공개 메소드

Delete transient for the Theme doing it Right bool on special requests.
부터: 2.5.2
부터: 2.7.0
public delete_theme_dir_transient ( string | object $value = null, array | object | null $options = null ) : boolean
$value string | object The theme directory stylesheet location, or either WP_Theme/WP_Upgrader instance.
$options array | object | null If set, the update options array or the Old theme WP_Theme instance.
리턴 boolean True on success, false on failure.

delete_transients_author() 공개 메소드

Delete transient on profile save.
부터: 2.6.4
public delete_transients_author ( integer $user_id )
$user_id integer The User ID that has been updated.

delete_transients_post() 공개 메소드

Delete transient on post save.
부터: 2.2.9
public delete_transients_post ( integer $post_id ) : boolean | null
$post_id integer The Post ID that has been updated.
리턴 boolean | null True when sitemap is flushed. False on revision. Null when sitemaps are deactivated.

generate_cache_key() 공개 메소드

Generate transient key based on query vars.
부터: 2.3.3
부터: 2.6.0 Refactored.
public generate_cache_key ( integer | string | boolean $page_id, string $taxonomy = '', string $type = null ) : string
$page_id integer | string | boolean the Taxonomy or Post ID.
$taxonomy string The Taxonomy name.
$type string The Post Type
리턴 string The generated page id key.

generate_front_page_cache_key() 공개 메소드

Returns the front page partial transient key.
public generate_front_page_cache_key ( string $type = '' ) : string
$type string
리턴 string the front page transient key.

generate_taxonomial_cache_key() 보호된 메소드

Generates Cache key for taxonomial archives.
부터: 2.6.0
protected generate_taxonomial_cache_key ( integer $page_id = '', string $taxonomy = '' ) : string
$page_id integer The taxonomy or page ID.
$taxonomy string The taxonomy name.
리턴 string The Taxonomial Archive cache key.

get_transient() 공개 메소드

If the transient does not exists, does not have a value or has expired, or transients have been disabled through a constant, then the transient will be false.
부터: 2.6.0
public get_transient ( string $transient ) : mixed | boolean
$transient string Transient name. Expected to not be SQL-escaped.
리턴 mixed | boolean Value of the transient. False on failure or non existing transient.

set_theme_dir_transient() 공개 메소드

Sets transient for Theme doing it Right.
부터: 2.5.2
부터: 2.7.0 Will always set "doing it wrong" transient, even if it was "doing it right" earlier.
public set_theme_dir_transient ( $dir = null )

set_transient() 공개 메소드

. Prevents setting of transients when they're disabled.
부터: 2.6.0
public set_transient ( string $transient, string $value, integer $expiration = '' )
$transient string Transient name. Expected to not be SQL-escaped.
$value string Transient value. Expected to not be SQL-escaped.
$expiration integer Optional Transient expiration date, optional. Expected to not be SQL-escaped.

setup_auto_description_transient() 공개 메소드

Setup vars for transients which require $page_id.
부터: 2.3.3
public setup_auto_description_transient ( integer | string | boolean $page_id, string $taxonomy = '', strgin $type = null )
$page_id integer | string | boolean the Taxonomy or Post ID. If false it will generate for the blog page.
$taxonomy string The taxonomy name.
$type strgin The Post Type

setup_ld_json_transient() 공개 메소드

Setup vars for transients which require $page_id.
부터: 2.3.3
public setup_ld_json_transient ( integer | string | boolean $page_id, string $taxonomy = '', string | null $type = null )
$page_id integer | string | boolean the Taxonomy or Post ID. If false it will generate for the blog page.
$taxonomy string The taxonomy name.
$type string | null The post type.

setup_transient_names() 공개 메소드

Setup vars for general site transients.
부터: 2.3.3
부터: 2.7.1 Added locale suffix.

프로퍼티 상세

$auto_description_transient 보호되어 있는 프로퍼티

The Automatic Description transient name.
부터: 2.3.3
protected $auto_description_transient

$ld_json_transient 보호되어 있는 프로퍼티

The LD+Json script transient name.
부터: 2.3.3
protected $ld_json_transient

$sitemap_transient 보호되어 있는 프로퍼티

The sitemap transient name.
부터: 2.2.9
protected $sitemap_transient

$theme_doing_it_right_transient 보호되어 있는 프로퍼티

The Theme is doing the Title right transient name
부터: 2.5.2
protected $theme_doing_it_right_transient