PHP 클래스 WPSEO_OpenGraph_Image, wordpress-seo

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

보호된 프로퍼티들

프로퍼티 타입 설명
$dimensions array Holds image dimensions, if determined.

공개 메소드들

메소드 설명
__construct ( array $options, string | boolean $image = false ) Constructor
get_dimensions ( ) : array Return the dimensions array.
get_images ( ) : array Return the images array

비공개 메소드들

메소드 설명
add_image ( string $img ) : boolean Display an OpenGraph image tag
check_featured_image_size ( array $img_data ) : boolean Check size of featured image. If image is too small, return false, else return true
get_attachment_page_image ( integer $post_id ) : boolean If this is an attachment page, call add_image with the attachment and return true
get_content_images ( object $post ) Filter: 'wpseo_pre_analysis_post_content' - Allow filtering the content before analysis
get_default_image ( ) Get default image and call add_image
get_featured_image ( integer $post_id ) : boolean If there is a featured image, check image size. If image size is correct, call add_image and return true
get_front_page_image ( ) If the frontpage image exists, call add_image
get_opengraph_image_post ( integer $post_id ) : boolean If opengraph-image is set, call add_image and return true.
get_opengraph_image_taxonomy ( ) Check if taxonomy has an image and add this image
get_posts_page_image ( ) Get the images of the posts page.
get_relative_path ( array $img ) : boolean | string Get the relative path of the image
get_singular_image ( ) Get the images of the singular post.
set_images ( ) Check if page is front page or singular and call the corresponding functions. If not, call get_default_image.

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( array $options, string | boolean $image = false )
$options array Options set.
$image string | boolean Optional image URL.

get_dimensions() 공개 메소드

Return the dimensions array.
public get_dimensions ( ) : array
리턴 array

get_images() 공개 메소드

Return the images array
public get_images ( ) : array
리턴 array

프로퍼티 상세

$dimensions 보호되어 있는 프로퍼티

Holds image dimensions, if determined.
protected array $dimensions
리턴 array