Yoast\WP\SEO\Helpers\Schema
Image_Helper::simple_image_object() public Yoast 1.0
If we can't find $url in our database, we output a simple ImageObject.
{} Это метод класса: Image_Helper{}
Хуков нет.
Возвращает
Массив. $data Schema ImageObject array.
Использование
$Image_Helper = new Image_Helper(); $Image_Helper->simple_image_object( $schema_id, $url, $caption );
- $schema_id(строка) (обязательный)
- The @id to use for the returned image.
- $url(строка) (обязательный)
- The image URL.
- $caption(строка)
- A caption, if set.
По умолчанию: ''
Код Image_Helper::simple_image_object() Image Helper::simple image object Yoast 15.6.2
public function simple_image_object( $schema_id, $url, $caption = '' ) {
$data = $this->generate_object( $schema_id );
$data['url'] = $url;
if ( ! empty( $caption ) ) {
$data['caption'] = $this->html->smart_strip_tags( $caption );
}
return $data;
}