PHP Класс The_SEO_Framework\Generate_Ldjson

Generates SEO data based on content
С версии: 2.7.1
Наследование: extends Generate_Image
Показать файл Открыть проект

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

Метод Описание
enable_ld_json_breadcrumbs ( ) : boolean Determines if breadcrumbs scripts are enabled.
enable_ld_json_knowledge ( ) : boolean Determines if Knowledge Graph Script is enabled.
enable_ld_json_searchbox ( ) : boolean Determines if searchbox script is enabled.
enable_ld_json_sitename ( ) : boolean Determines if sitename script is enabled.
ld_json_breadcrumb_first ( string | null $item_type = null ) : string Return home page item for LD Json Breadcrumbs.
ld_json_breadcrumb_last ( string $item_type = null, integer $pos = null, integer $post_id = null ) : string Return current page item for LD Json Breadcrumbs.
ld_json_breadcrumbs ( ) : escaped Generate LD+Json breadcrumb helper.
ld_json_breadcrumbs_page ( ) : string Generate page breadcrumb.
ld_json_breadcrumbs_post ( ) : string Generate post breadcrumb.
ld_json_knowledge ( ) : string Return LD+Json Knowledge Graph helper.
ld_json_name ( ) : string Generate Site Name LD+Json script.
ld_json_search ( ) : escaped Generate LD+Json search helper.
make_breadcrumb ( array $item, boolean $comma = true ) : string Builds a breadcrumb.
render_ld_json_scripts ( ) : string Render the LD+Json scripts.
schema_blog_name ( ) : string Returns json encoded blogname.
schema_breadcrumblist ( ) : string Returns 'BreadcrumbList' json encoded type name.
schema_context ( ) : string Returns http://schema.org json encoded context URL.
schema_home_url ( ) : string Returns json encoded home url.
schema_image ( integer | string $id, boolean $singular = false ) Returns 'image' json encoded value.
schema_listitem ( ) : string Returns 'ListItem' json encoded type name.
schema_type ( ) : string Returns 'WebSite' json encoded type name.

Защищенные методы

Метод Описание
__construct ( ) Constructor, load parent constructor
build_breadcrumb_trees ( $kittens, array $previous_tree = [] ) : trees Build breadcrumb trees.

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

__construct() защищенный Метод

Constructor, load parent constructor
protected __construct ( )

build_breadcrumb_trees() защищенный Метод

Build breadcrumb trees.
С версии: 2.6.0
protected build_breadcrumb_trees ( $kittens, array $previous_tree = [] ) : trees
$previous_tree array A previous set tree to compare to, if set.
Результат trees in order.

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

Determines if breadcrumbs scripts are enabled.
С версии: 2.6.0
public enable_ld_json_breadcrumbs ( ) : boolean
Результат boolean

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

Determines if Knowledge Graph Script is enabled.
С версии: 2.6.5
public enable_ld_json_knowledge ( ) : boolean
Результат boolean

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

Determines if sitename script is enabled.
С версии: 2.6.0
public enable_ld_json_sitename ( ) : boolean
Результат boolean

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

Return home page item for LD Json Breadcrumbs.
С версии: 2.4.2
public ld_json_breadcrumb_first ( string | null $item_type = null ) : string
$item_type string | null the breadcrumb item type.
Результат string Home Breadcrumb item

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

Return current page item for LD Json Breadcrumbs.
С версии: 2.4.2
public ld_json_breadcrumb_last ( string $item_type = null, integer $pos = null, integer $post_id = null ) : string
$item_type string the breadcrumb item type.
$pos integer Last known position.
$post_id integer The current Post ID
Результат string Last Breadcrumb item

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

Generate LD+Json breadcrumb helper.
С версии: 2.4.2
public ld_json_breadcrumbs ( ) : escaped
Результат escaped LD+json search helper string.

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

Generate page breadcrumb.
С версии: 2.6.0
public ld_json_breadcrumbs_page ( ) : string
Результат string $output The breadcrumb script.

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

Generate post breadcrumb.
С версии: 2.6.0
public ld_json_breadcrumbs_post ( ) : string
Результат string $output The breadcrumb script.

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

Return LD+Json Knowledge Graph helper.
С версии: 2.2.8
public ld_json_knowledge ( ) : string
Результат string LD+json Knowledge Graph helper.

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

Generate Site Name LD+Json script.
С версии: 2.6.0
public ld_json_name ( ) : string
Результат string The LD+JSon Site Name script.

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

Builds a breadcrumb.
С версии: 2.6.0
public make_breadcrumb ( array $item, boolean $comma = true ) : string
$item array : { 'type', 'pos', 'id', 'name' }
$comma boolean Whether to add a trailing comma.
Результат string The LD+Json breadcrumb.

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

Render the LD+Json scripts.
С версии: 2.6.0
public render_ld_json_scripts ( ) : string
Результат string The LD+Json scripts.

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

Returns json encoded blogname.
С версии: 2.6.0
public schema_blog_name ( ) : string
Результат string The json encoded blogname.

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

Returns 'BreadcrumbList' json encoded type name.
С версии: 2.6.0
public schema_breadcrumblist ( ) : string
Результат string The json encoded 'BreadcrumbList'.

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

Returns http://schema.org json encoded context URL.
С версии: 2.6.0
public schema_context ( ) : string
Результат string The json encoded context url.

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

Returns json encoded home url.
С версии: 2.6.0
public schema_home_url ( ) : string
Результат string The json encoded home url.

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

Returns 'image' json encoded value.
С версии: 2.7.0
public schema_image ( integer | string $id, boolean $singular = false )
$id integer | string The page, post, product or term ID.
$singular boolean Whether the ID is singular.

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

Returns 'ListItem' json encoded type name.
С версии: 2.6.0
public schema_listitem ( ) : string
Результат string The json encoded 'ListItem'.

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

Returns 'WebSite' json encoded type name.
С версии: 2.6.0
public schema_type ( ) : string
Результат string The json encoded type name.