PHP Class The_SEO_Framework\Render

Puts all data into HTML valid meta tags.
Since: 2.7.1
Inheritance: extends Admin_Init
ファイルを表示 Open project: sybrew/the-seo-framework

Protected Properties

Property Type Description
$title_doing_it_wrong Theme title doing it wrong boolean.

Public Methods

Method Description
article_modified_time ( ) : string Renders Article Modified Time meta tag.
article_published_time ( ) : string Renders Article Publishing Time meta tag.
bing_site_output ( ) : string Renders Bing Site Verification Code meta tag.
canonical ( ) : string Renders Canonical URL meta tag.
description_from_cache ( $social = false ) : string Cache description in static variable Must be called inside the loop
facebook_app_id ( ) : string Renders Facebook App ID meta tag.
facebook_author ( ) : string Renders Facebook Author meta tag.
facebook_publisher ( ) : string Renders Facebook Publisher meta tag.
get_image_from_cache ( ) : string Caches current Image URL in static variable.
google_site_output ( ) : string Renders Google Site Verification Code meta tag.
ld_json ( ) : string Renders LD+JSON Schema.org scripts.
og_description ( ) : string Renders og:description meta tag
og_image ( ) : string Renders Open Graph image meta tag.
og_locale ( ) : string Renders the OG locale meta tag.
og_sitename ( ) : string Renders Open Graph sitename meta tag.
og_title ( ) : string Renders the Open Graph title meta tag.
og_type ( ) : string Renders the Open Graph type meta tag.
og_url ( ) : string Renders Open Graph URL meta tag.
paged_urls ( ) : string Renders Prev/Next Paged URL meta tags.
pint_site_output ( ) : string Renders Pinterest Site Verification code meta tag.
render_woocommerce_product_og_image ( ) : string Renders WooCommerce Product Gallery OG images.
robots ( ) : string Renders Robots meta tags.
shortlink ( ) : string Renders Shortlink meta tag
the_description ( ) : string Renders the description meta tag.
the_home_url_from_cache ( boolean $force_slash = false ) : string Cache home URL in static variable
the_url_from_cache ( string $url = '', integer $post_id = null, boolean $paged = false, boolean $from_option = true, boolean $paged_plural = true ) : string Cache current URL in static variable Must be called inside the loop
title_from_cache ( string $title = '', string $sep = '', string $seplocation = '', boolean $meta = false ) : string Cache current Title in static variable Must be called inside the loop
twitter_card ( ) : string Renders the Twitter Card type meta tag.
twitter_creator ( ) : string Renders The Twitter Creator meta tag.
twitter_description ( ) : string Renders Twitter Description meta tag.
twitter_image ( ) : string Renders Twitter Image meta tag.
twitter_site ( ) : string Renders the Twitter Site meta tag.
twitter_title ( ) : string Renders Twitter Title meta tag.
use_facebook_tags ( ) : boolean Determines whether we can use Facebook tags.
use_googleplus_tags ( ) : boolean Determines whether we can use Google+ tags.
use_og_tags ( ) : boolean Determines whether we can use Open Graph tags.
use_twitter_tags ( ) : boolean Determines whether we can use Twitter tags.
yandex_site_output ( ) : string Renders Yandex Site Verification code meta tag.

Protected Methods

Method Description
__construct ( ) Constructor, load parent constructor

Method Details

__construct() protected method

Constructor, load parent constructor
protected __construct ( )

article_modified_time() public method

Also renders the Open Graph Updated Time meta tag if Open Graph tags are enabled.
Since: 2.2.2
Since: 2.7.0 Listens to $this->get_the_real_ID() instead of WordPress Core ID determination.
public article_modified_time ( ) : string
return string The Article Modified Time meta tag, and optionally the Open Graph Updated Time.

article_published_time() public method

Renders Article Publishing Time meta tag.
Since: 2.2.2
public article_published_time ( ) : string
return string The Article Publishing Time meta tag.

bing_site_output() public method

Renders Bing Site Verification Code meta tag.
Since: 2.2.4
public bing_site_output ( ) : string
return string The Bing Site Verification Code meta tag.

canonical() public method

Renders Canonical URL meta tag.
Since: 2.0.6
public canonical ( ) : string
return string The Canonical URL meta tag.

description_from_cache() public method

Cache description in static variable Must be called inside the loop
Since: 2.2.2
public description_from_cache ( $social = false ) : string
return string The description

facebook_app_id() public method

Renders Facebook App ID meta tag.
Since: 2.2.2
public facebook_app_id ( ) : string
return string The Facebook App ID meta tag.

facebook_author() public method

Renders Facebook Author meta tag.
Since: 2.2.2
public facebook_author ( ) : string
return string The Facebook Author meta tag.

facebook_publisher() public method

Renders Facebook Publisher meta tag.
Since: 2.2.2
public facebook_publisher ( ) : string
return string The Facebook Publisher meta tag.

get_image_from_cache() public method

Must be called inside the loop.
Since: 2.2.2
Since: 2.7.0 $get_id parameter has been added.
public get_image_from_cache ( ) : string
return string The image URL.

google_site_output() public method

Renders Google Site Verification Code meta tag.
Since: 2.2.4
public google_site_output ( ) : string
return string The Google Site Verification code meta tag.

ld_json() public method

Renders LD+JSON Schema.org scripts.
Since: 1.2.0
public ld_json ( ) : string
return string The LD+json Schema.org scripts.

og_description() public method

Renders og:description meta tag
Since: 1.3.0
public og_description ( ) : string
return string The Open Graph description meta tag.

og_image() public method

Renders Open Graph image meta tag.
Since: 1.3.0
Since: 2.6.0 Added WooCommerce gallery images.
Since: 2.7.0 Added image dimensions if found.
public og_image ( ) : string
return string The Open Graph image meta tag.

og_locale() public method

Renders the OG locale meta tag.
Since: 1.0.0
public og_locale ( ) : string
return string The Open Graph locale meta tag.

og_sitename() public method

Renders Open Graph sitename meta tag.
Since: 1.3.0
public og_sitename ( ) : string
return string The Open Graph sitename meta tag.

og_title() public method

Renders the Open Graph title meta tag.
Since: 2.0.3
public og_title ( ) : string
return string The Open Graph title meta tag.

og_type() public method

Renders the Open Graph type meta tag.
Since: 1.1.0
public og_type ( ) : string
return string The Open Graph type meta tag.

og_url() public method

Renders Open Graph URL meta tag.
Since: 1.3.0
public og_url ( ) : string
return string The Open Graph URL meta tag.

paged_urls() public method

Renders Prev/Next Paged URL meta tags.
Since: 2.2.2
public paged_urls ( ) : string
return string The Prev/Next Paged URL meta tags.

pint_site_output() public method

Renders Pinterest Site Verification code meta tag.
Since: 2.5.2
public pint_site_output ( ) : string
return string The Pinterest Site Verification code meta tag.

render_woocommerce_product_og_image() public method

Renders WooCommerce Product Gallery OG images.
Since: 2.6.0
Since: 2.7.0 Added image dimensions if found.
public render_woocommerce_product_og_image ( ) : string
return string The rendered OG Image.

robots() public method

Returns early if blog isn't public. WordPress Core will then output the meta tags.
Since: 2.0.0
public robots ( ) : string
return string The Robots meta tags.

the_description() public method

Renders the description meta tag.
Since: 1.3.0
public the_description ( ) : string
return string The description meta tag.

the_home_url_from_cache() public method

Cache home URL in static variable
Since: 2.5.0
public the_home_url_from_cache ( boolean $force_slash = false ) : string
$force_slash boolean Force slash
return string The url

the_url_from_cache() public method

Cache current URL in static variable Must be called inside the loop
Since: 2.2.2
public the_url_from_cache ( string $url = '', integer $post_id = null, boolean $paged = false, boolean $from_option = true, boolean $paged_plural = true ) : string
$url string the url
$post_id integer the page id, if empty it will fetch the requested ID, else the page uri
$paged boolean Return current page URL with pagination
$from_option boolean Get the canonical uri option
$paged_plural boolean Whether to allow pagination on second or later pages.
return string The url

title_from_cache() public method

Cache current Title in static variable Must be called inside the loop
Since: 2.2.2
public title_from_cache ( string $title = '', string $sep = '', string $seplocation = '', boolean $meta = false ) : string
$title string The Title to return
$sep string The Title sepeartor
$seplocation string The Title sepeartor location ( accepts 'left' or 'right' )
$meta boolean Ignore theme doing it wrong.
return string The title

twitter_card() public method

Renders the Twitter Card type meta tag.
Since: 2.2.2
public twitter_card ( ) : string
return string The Twitter Card meta tag.

twitter_creator() public method

If no Twitter Site is found, it will render the Twitter Site ID meta tag.
Since: 2.2.2
public twitter_creator ( ) : string
return string The Twitter Creator or Twitter Site ID meta tag.

twitter_description() public method

Renders Twitter Description meta tag.
Since: 2.2.2
public twitter_description ( ) : string
return string The Twitter Descritpion meta tag.

twitter_image() public method

Renders Twitter Image meta tag.
Since: 2.2.2
public twitter_image ( ) : string
return string The Twitter Image meta tag.

twitter_site() public method

Renders the Twitter Site meta tag.
Since: 2.2.2
public twitter_site ( ) : string
return string The Twitter Site meta tag.

twitter_title() public method

Renders Twitter Title meta tag.
Since: 2.2.2
public twitter_title ( ) : string
return string The Twitter Title meta tag.

use_facebook_tags() public method

Determines whether we can use Facebook tags.
Since: 2.6.0
public use_facebook_tags ( ) : boolean
return boolean

use_googleplus_tags() public method

Determines whether we can use Google+ tags.
Since: 2.6.0
public use_googleplus_tags ( ) : boolean
return boolean

use_og_tags() public method

Determines whether we can use Open Graph tags.
Since: 2.6.0
public use_og_tags ( ) : boolean
return boolean

use_twitter_tags() public method

Determines whether we can use Twitter tags.
Since: 2.6.0
public use_twitter_tags ( ) : boolean
return boolean

yandex_site_output() public method

Renders Yandex Site Verification code meta tag.
Since: 2.6.0
public yandex_site_output ( ) : string
return string The Yandex Site Verification code meta tag.

Property Details

$title_doing_it_wrong protected_oe property

Theme title doing it wrong boolean.
Since: 2.4.0
protected $title_doing_it_wrong