PHP 클래스 The_SEO_Framework\Generate_Title

Generates title SEO data based on content.
부터: 2.7.1
상속: extends Generate_Description
파일 보기 프로젝트 열기: sybrew/the-seo-framework

공개 메소드들

메소드 설명
add_title_additions ( ) : boolean Determines whether to add or remove title additions.
add_title_pagination ( string $title ) : string Adds title pagination, if paginated.
add_title_protection ( $title, $id ) : string Adds title protection prefixes.
build_title ( string $title = '', string $seplocation = '', array $args = [] ) : string Builds the title based on input and query status.
build_title_doingitwrong ( string $title = '', string $sep = '', string $seplocation = '', array $args = [] ) : string Builds the title based on input and query status for themes that are doing it wrong.
do_title_pre_filter ( string $title, array $args, boolean $escape = true ) : string Filters the title prior to output.
do_title_pro_filter ( string $title, array $args, boolean $escape = true ) : string Filters the title prior to output.
escape_title ( string $title = '', boolean $trim = true ) : string Escapes and beautifies title.
generate_home_title ( boolean $get_custom_field = true, string $seplocation = '', string $deprecated = '', boolean $escape = true, boolean $get_option = true ) : array Generate the title based on conditions for the home page.
generate_title ( array $args = [], boolean $escape = true ) : string Generate the title based on query conditions.
get_custom_field_title ( string $title = '', integer $id = '', string $taxonomy = '' ) : string Returns custom field title.
get_home_title_seplocation ( string $seplocation = '' ) : string Gets Title Seplocation for the homepage.
get_the_404_title ( string $title = '' ) : string Returns 404 title.
get_the_real_archive_title ( object $term = null, array $args = [] ) : string Gets the archive Title, including filter. Also works in admin.
get_the_search_title ( string $title = '', boolean $escape = true ) : string Returns search title.
get_title_separator ( ) : string Gets Title Separator.
get_title_seplocation ( string $seplocation = '', boolean $home = false ) : string Gets Title Seplocation.
home_page_add_title_tagline ( ) : boolean Determines whether to add home page tagline.
parse_title_args ( array $args = [], array $defaults = [], boolean $get_defaults = false ) : array Parse and sanitize title args.
post_title_from_ID ( integer $id, string $title = '' ) : string Returns Post Title from ID.
process_title_additions ( string $title = '', string $blogname = '', string $seplocation = '' ) : string Adds the title additions to the title.
reparse_title_args ( array $args = [] ) : array Reparses title args.
single_term_title ( $prefix = '', $display = true, $term = null ) : string Fetches single term title.
title ( string $title = '', string $sep = '', string $seplocation = '', array $args = [] ) : string Gets the title. Main function.
title_for_home ( string $home_title = '', boolean $get_custom_field = true, boolean $escape = false, boolean $get_option = true ) : string Gets the title for the static home page.
title_for_terms ( array $args = [], boolean $escape = false ) : string Gets the title for Category, Tag or Taxonomy
title_from_custom_field ( string $title = '', boolean $escape = false, integer $id = null, string $taxonomy = null ) : string Gets the title from custom field
title_from_special_fields ( ) : string Fetches title from special fields, like other plugins with special queries.
untitled ( ) : string Returns untitled title.
use_archive_prefix ( object $term = null, array $args = [] ) : boolean Determines whether to use a title prefix or not.

보호된 메소드들

메소드 설명
__construct ( ) Constructor, load parent constructor
build_title_notagline ( array $args = [] ) : string Builds the title based on input, without tagline.
get_notagline_title ( array $args = [] ) : string Build the title based on input, without tagline.

메소드 상세

__construct() 보호된 메소드

Constructor, load parent constructor
protected __construct ( )

add_title_additions() 공개 메소드

Determines whether to add or remove title additions.
부터: 2.4.3 Applies filters the_seo_framework_add_blogname_to_title : boolean
부터: 2.6.0:
public add_title_additions ( ) : boolean
리턴 boolean True when additions are allowed.

add_title_pagination() 공개 메소드

Adds title pagination, if paginated.
부터: 2.6.0
public add_title_pagination ( string $title ) : string
$title string The current Title.
리턴 string Title with maybe pagination added.

add_title_protection() 공개 메소드

Adds title protection prefixes.
부터: 2.6.0
public add_title_protection ( $title, $id ) : string
$title The current Title.
$id The page ID.
리턴 string $title with possible affixes.

build_title() 공개 메소드

Builds the title based on input and query status.
부터: 2.4.0
public build_title ( string $title = '', string $seplocation = '', array $args = [] ) : string
$title string The Title to return
$seplocation string The Title sepeartor location ( accepts 'left' or 'right' )
$args array : accepted args : { @param int term_id The Taxonomy Term ID @param string taxonomy The Taxonomy name @param bool page_on_front Page on front condition for example generation @param bool placeholder Generate placeholder, ignoring options. @param bool get_custom_field Do not fetch custom title when false. @param bool is_front_page Fetch front page title. }
리턴 string $title Title

build_title_doingitwrong() 공개 메소드

Pretty much a duplicate of build_title but contains different variables. Keep this in mind.
부터: 2.4.0
public build_title_doingitwrong ( string $title = '', string $sep = '', string $seplocation = '', array $args = [] ) : string
$title string The Title to return
$sep string The Title sepeartor
$seplocation string The Title sepeartor location ( accepts 'left' or 'right' )
$args array : accepted args : { @param int term_id The Taxonomy Term ID @param string taxonomy The Taxonomy name @param bool placeholder Generate placeholder, ignoring options. @param bool get_custom_field Do not fetch custom title when false. }
리턴 string $title Title

build_title_notagline() 보호된 메소드

Builds the title based on input, without tagline.
부터: 2.4.0
protected build_title_notagline ( array $args = [] ) : string
$args array : accepted args : { @param int term_id The Taxonomy Term ID @param bool placeholder Generate placeholder, ignoring options. @param bool page_on_front Page on front condition for example generation }
리턴 string Title without tagline.

do_title_pre_filter() 공개 메소드

Filters the title prior to output.
부터: 2.6.0
public do_title_pre_filter ( string $title, array $args, boolean $escape = true ) : string
$title string The current title.
$args array The title args.
$escape boolean Whether to escape the title.
리턴 string $title

do_title_pro_filter() 공개 메소드

Filters the title prior to output.
부터: 2.6.0
public do_title_pro_filter ( string $title, array $args, boolean $escape = true ) : string
$title string The current title.
$args array The title args.
$escape boolean Whether to escape the title.
리턴 string $title

escape_title() 공개 메소드

Escapes and beautifies title.
부터: 2.5.2
public escape_title ( string $title = '', boolean $trim = true ) : string
$title string The title to escape and beautify.
$trim boolean Whether to trim the title from whitespaces.
리턴 string Escaped and beautified title.

generate_home_title() 공개 메소드

Generate the title based on conditions for the home page.
부터: 2.3.4
public generate_home_title ( boolean $get_custom_field = true, string $seplocation = '', string $deprecated = '', boolean $escape = true, boolean $get_option = true ) : array
$get_custom_field boolean Fetch Title from Custom Fields.
$seplocation string The separator location
$deprecated string Deprecated: The Home Page separator location
$escape boolean Parse Title through saninitation calls.
$get_option boolean Whether to fetch the SEO Settings option.
리턴 array { 'title' => (string) $title : The Generated Title 'blogname' => (string) $blogname : The Generated Blogname 'add_tagline' => (bool) $add_tagline : Whether to add the tagline 'seplocation' => (string) $seplocation : The Separator Location }

generate_title() 공개 메소드

Generate the title based on query conditions.
부터: 2.3.4
public generate_title ( array $args = [], boolean $escape = true ) : string
$args array The Title Args.
$escape boolean Parse Title through saninitation calls.
리턴 string $title The Generated Title.

get_custom_field_title() 공개 메소드

Returns custom field title.
부터: 2.6.0
public get_custom_field_title ( string $title = '', integer $id = '', string $taxonomy = '' ) : string
$title string The current title.
$id integer The post or TT ID.
$taxonomy string The TT name.
리턴 string $title The custom field title.

get_home_title_seplocation() 공개 메소드

Gets Title Seplocation for the homepage.
부터: 2.6.0
public get_home_title_seplocation ( string $seplocation = '' ) : string
$seplocation string The current seplocation.
리턴 string The Seplocation for the homepage.

get_notagline_title() 보호된 메소드

Note: Not escaped.
부터: 2.6.0
protected get_notagline_title ( array $args = [] ) : string
$args array : accepted args : { @param int term_id The Taxonomy Term ID @param bool placeholder Generate placeholder, ignoring options. @param bool page_on_front Page on front condition for example generation }
리턴 string Title without tagline.

get_the_404_title() 공개 메소드

Returns 404 title.
부터: 2.6.0
부터: 2.5.2: Applies filters string the_seo_framework_404_title
public get_the_404_title ( string $title = '' ) : string
$title string The current Title
리턴 string 404 Title

get_the_real_archive_title() 공개 메소드

Gets the archive Title, including filter. Also works in admin.
부터: 2.6.0
public get_the_real_archive_title ( object $term = null, array $args = [] ) : string
$term object The Term object.
$args array The Title arguments.
리턴 string The Archive Title, not escaped.

get_the_search_title() 공개 메소드

Returns search title.
부터: 2.6.0
public get_the_search_title ( string $title = '', boolean $escape = true ) : string
$title string the current title.
$escape boolean Whether to escape attributes from query.
리턴 string Search Title

get_title_separator() 공개 메소드

Gets Title Separator.
부터: 2.6.0
부터: 2.3.9: Applies filters the_seo_framework_title_separator
public get_title_separator ( ) : string
리턴 string The Separator, unescaped.

get_title_seplocation() 공개 메소드

Gets Title Seplocation.
부터: 2.3.9 Applies filters the_seo_framework_title_seplocation : string the title location. Applies filters the_seo_framework_title_seplocation_front : string the home page title location.
부터: 2.6.0:
public get_title_seplocation ( string $seplocation = '', boolean $home = false ) : string
$seplocation string The current seplocation.
$home boolean The home seplocation.
리턴 string The Seplocation

home_page_add_title_tagline() 공개 메소드

Determines whether to add home page tagline.
부터: 2.6.0

parse_title_args() 공개 메소드

Parse and sanitize title args.
부터: 2.4.0
public parse_title_args ( array $args = [], array $defaults = [], boolean $get_defaults = false ) : array
$args array required The passed arguments.
$defaults array The default arguments.
$get_defaults boolean Return the default arguments. Ignoring $args.
리턴 array $args parsed args.

post_title_from_ID() 공개 메소드

Returns Post Title from ID.
부터: 2.6.0
public post_title_from_ID ( integer $id, string $title = '' ) : string
$id integer The Post ID.
$title string Optional. The current/fallback Title.
리턴 string Post Title

process_title_additions() 공개 메소드

Adds the title additions to the title.
부터: 2.6.0
public process_title_additions ( string $title = '', string $blogname = '', string $seplocation = '' ) : string
$title string The tite.
$blogname string The blogname.
$seplocation string The separator location.
리턴 string Title with possible additions.

reparse_title_args() 공개 메소드

Reparses title args.
부터: 2.6.0
public reparse_title_args ( array $args = [] ) : array
$args array required The passed arguments.
리턴 array $args parsed args.

single_term_title() 공개 메소드

Fetches single term title.
부터: 2.6.0
public single_term_title ( $prefix = '', $display = true, $term = null ) : string
리턴 string Single term title.

title() 공개 메소드

Always use this function for the title unless you're absolutely sure what you're doing. This function is used for all these: Taxonomies and Terms, Posts, Pages, Blog, front page, front-end, back-end.
부터: 1.0.0 Params required wp_title filter :
부터: 2.4.0:
public title ( string $title = '', string $sep = '', string $seplocation = '', array $args = [] ) : string
$title string The Title to return
$sep string The Title sepeartor
$seplocation string The Title sepeartor location ( accepts 'left' or 'right' )
$args array : accepted args : { @param int term_id The Taxonomy Term ID when taxonomy is also filled in. Else post ID. @param string taxonomy The Taxonomy name. @param bool page_on_front Page on front condition for example generation. @param bool placeholder Generate placeholder, ignoring options. @param bool notagline Generate title without tagline. @param bool meta Ignore doing_it_wrong. Used in og:title/twitter:title @param bool get_custom_field Do not fetch custom title when false. @param bool description_title Fetch title for description. @param bool is_front_page Fetch front page title. }
리턴 string $title Title

title_for_home() 공개 메소드

Essentially falling back to the blogname. Not to be confused with $blogname.
부터: 2.2.8
public title_for_home ( string $home_title = '', boolean $get_custom_field = true, boolean $escape = false, boolean $get_option = true ) : string
$home_title string The fallback title.
$get_custom_field boolean Fetch Title from InPost Custom Fields.
$escape boolean Parse Title through saninitation calls.
$get_option boolean Whether to fetch the SEO Settings option.
리턴 string The Title.

title_for_terms() 공개 메소드

Gets the title for Category, Tag or Taxonomy
부터: 2.2.8
public title_for_terms ( array $args = [], boolean $escape = false ) : string
$args array The Title arguments.
$escape boolean Parse Title through saninitation calls.
리턴 string The Title.

title_from_custom_field() 공개 메소드

Gets the title from custom field
부터: 2.2.8
public title_from_custom_field ( string $title = '', boolean $escape = false, integer $id = null, string $taxonomy = null ) : string
$title string the fallback title.
$escape boolean Parse Title through saninitation calls.
$id integer The Post ID.
$taxonomy string The term name.
리턴 string The Title.

title_from_special_fields() 공개 메소드

Used before and has priority over custom fields. Front end only.
부터: 2.5.2
public title_from_special_fields ( ) : string
리턴 string $title Title from Special Field.

untitled() 공개 메소드

Returns untitled title.
부터: 2.6.0
public untitled ( ) : string
리턴 string Untitled. Not escaped.

use_archive_prefix() 공개 메소드

Determines whether to use a title prefix or not.
부터: 2.6.0
public use_archive_prefix ( object $term = null, array $args = [] ) : boolean
$term object The Term object.
$args array The title arguments.
리턴 boolean