메소드 | 설명 | |
---|---|---|
are_valid_title_formats ( array $title_formats ) : boolean | Checks if a given format conforms to predefined SEO title templates. | |
get_allowed_tokens ( ) : array | Returns tokens that are currently supported for each page type. | |
get_custom_title ( string $default_title = '' ) : string | Used to modify the default title with custom SEO title. | |
get_custom_title_formats ( ) : array | Retrieves custom title formats from site option. | |
get_date_for_title ( ) : string | Returns the value that should be used as a replacement for the date token, depending on the archive path specified. | |
get_page_type ( ) : string | boolean | Returns page type for current page. We need this helper in order to determine what user defined title format should be used for custom title. | |
get_token_value ( string $token_name ) : string | Returns string value for given token. | |
is_conflicted_theme ( ) : boolean | Checks if current theme is defining custom title that won't work nicely with our custom SEO title override. | |
update_title_formats ( array $new_formats ) : array | Combines the previous values of title formats, stored as array in site options, with the new values that are provided. |
public static are_valid_title_formats ( array $title_formats ) : boolean | ||
$title_formats | array | Template of SEO title to check. |
리턴 | boolean | True if the formats are valid, false otherwise. |
public static get_allowed_tokens ( ) : array | ||
리턴 | array | Array of allowed token strings. |
public static get_custom_title ( string $default_title = '' ) : string | ||
$default_title | string | Default title for current page. |
리턴 | string | Custom title with replaced tokens or default title. |
public static get_custom_title_formats ( ) : array | ||
리턴 | array | Array of custom title formats, or empty array. |
public static get_date_for_title ( ) : string | ||
리턴 | string | Token replacement for a given date, or empty string if no date is specified. |
public static get_page_type ( ) : string | boolean | ||
리턴 | string | boolean | Type of current page or false if unsupported. |
public static get_token_value ( string $token_name ) : string | ||
$token_name | string | The token name value that should be replaced. |
리턴 | string | Token replacement for current site, or empty string for unknown token name. |
public static is_conflicted_theme ( ) : boolean | ||
리턴 | boolean | True if current theme sets custom title, false otherwise. |
public static update_title_formats ( array $new_formats ) : array | ||
$new_formats | array | Array containing new title formats. |
리턴 | array | $result Array of updated title formats, or empty array if no update was performed. |