PHP 클래스 WPSEO_OpenGraph, wordpress-seo

파일 보기 프로젝트 열기: yoast/wordpress-seo 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$options array Options for the OpenGraph Settings

공개 메소드들

메소드 설명
__construct ( ) Class constructor.
add_opengraph_namespace ( string $input ) : string Filter for the namespace, adding the OpenGraph namespace.
article_author_facebook ( ) : boolean Outputs the authors FB page.
category ( ) : boolean; Output the article category as an article:section tag.
description ( boolean $echo = true ) : string Output the OpenGraph description, specific OG description first, if not, grab the meta description.
facebook_filter ( array $meta_tags ) : array Filter the Facebook plugins metadata
image ( string | boolean $image = false ) Create new WPSEO_OpenGraph_Image class and get the images to set the og:image
image_output ( string $image ) Fallback method for plugins using image_output
locale ( boolean $echo = true ) : string Output the locale, doing some conversions to make sure the proper Facebook locale is outputted.
og_tag ( string $property, string $content ) : boolean Internal function to output FB tags. This also adds an output filter to each bit of output based on the property.
og_title ( boolean $echo = true ) : string | boolean Outputs the SEO title as OpenGraph title.
opengraph ( ) Main OpenGraph output.
publish_date ( ) : boolean; Output the article publish and last modification date
site_name ( ) Output the site name straight from the blog info.
site_owner ( ) : boolean Outputs the site owner
tags ( ) : boolean Output the article tags as article:tag tags.
type ( boolean $echo = true ) : string Output the OpenGraph type.
url ( ) : boolean Outputs the canonical URL as OpenGraph URL, which consolidates likes and shares.
website_facebook ( ) : boolean Outputs the websites FB page.

메소드 상세

__construct() 공개 메소드

Class constructor.
public __construct ( )

add_opengraph_namespace() 공개 메소드

Filter for the namespace, adding the OpenGraph namespace.
public add_opengraph_namespace ( string $input ) : string
$input string The input namespace string.
리턴 string

article_author_facebook() 공개 메소드

Outputs the authors FB page.

category() 공개 메소드

Output the article category as an article:section tag.
public category ( ) : boolean;
리턴 boolean;

description() 공개 메소드

Output the OpenGraph description, specific OG description first, if not, grab the meta description.
public description ( boolean $echo = true ) : string
$echo boolean Whether to echo or return the description.
리턴 string $ogdesc

facebook_filter() 공개 메소드

Filter the Facebook plugins metadata
public facebook_filter ( array $meta_tags ) : array
$meta_tags array the array to fix.
리턴 array $meta_tags

image() 공개 메소드

Create new WPSEO_OpenGraph_Image class and get the images to set the og:image
public image ( string | boolean $image = false )
$image string | boolean Optional image URL.

image_output() 공개 메소드

Fallback method for plugins using image_output
public image_output ( string $image )
$image string Image URL.

locale() 공개 메소드

Last update/compare with FB list done on 2015-03-16 by Rarst
또한 보기: http://www.facebook.com/translations/FacebookLocales.xml for the list of supported locales
public locale ( boolean $echo = true ) : string
$echo boolean Whether to echo or return the locale.
리턴 string $locale

og_tag() 공개 메소드

Internal function to output FB tags. This also adds an output filter to each bit of output based on the property.
public og_tag ( string $property, string $content ) : boolean
$property string Property attribute value.
$content string Content attribute value.
리턴 boolean

og_title() 공개 메소드

Outputs the SEO title as OpenGraph title.
public og_title ( boolean $echo = true ) : string | boolean
$echo boolean Whether or not to echo the output.
리턴 string | boolean

opengraph() 공개 메소드

Main OpenGraph output.
public opengraph ( )

publish_date() 공개 메소드

Output the article publish and last modification date
public publish_date ( ) : boolean;
리턴 boolean;

site_name() 공개 메소드

Output the site name straight from the blog info.
public site_name ( )

site_owner() 공개 메소드

Outputs the site owner
public site_owner ( ) : boolean
리턴 boolean

tags() 공개 메소드

Output the article tags as article:tag tags.
public tags ( ) : boolean
리턴 boolean

type() 공개 메소드

Output the OpenGraph type.
public type ( boolean $echo = true ) : string
$echo boolean Whether to echo or return the type.
리턴 string $type

url() 공개 메소드

Outputs the canonical URL as OpenGraph URL, which consolidates likes and shares.
public url ( ) : boolean
리턴 boolean

프로퍼티 상세

$options 공개적으로 프로퍼티

Options for the OpenGraph Settings
public array $options
리턴 array