Yoast\WP\SEO\Services\Importing\Aioseo
Aioseo_Social_Images_Provider_Service::get_first_image_in_content()
Retrieves the url of the first image in content.
Метод класса: Aioseo_Social_Images_Provider_Service{}
Хуков нет.
Возвращает
Строку
. The url of the first image in content.
Использование
$Aioseo_Social_Images_Provider_Service = new Aioseo_Social_Images_Provider_Service(); $Aioseo_Social_Images_Provider_Service->get_first_image_in_content( $post_id );
- $post_id(int) (обязательный)
- The post id to extract the image from.
Код Aioseo_Social_Images_Provider_Service::get_first_image_in_content() Aioseo Social Images Provider Service::get first image in content Yoast 24.4
public function get_first_image_in_content( $post_id ) { $image = $this->image->get_gallery_image( $post_id ); if ( ! $image ) { $image = $this->image->get_post_content_image( $post_id ); } return $image; }