wpseo_image_attribute_containing_id хук-фильтрYoast 1.0

Filter wpseo_image_attribute_containing_id Allows filtering what attribute will be used to extract image IDs from.

Defaults to "class", which is where WP natively stores the image IDs, in a wp-image-<ID> format.

Использование

add_filter( 'wpseo_image_attribute_containing_id', 'wp_kama_wpseo_image_attribute_containing_id_filter' );

/**
 * Function for `wpseo_image_attribute_containing_id` filter-hook.
 * 
 * @param string $string The attribute to be used to extract image IDs from.
 *
 * @return string
 */
function wp_kama_wpseo_image_attribute_containing_id_filter( $string ){

	// filter...
	return $string;
}
$string(строка)
The attribute to be used to extract image IDs from.

Где вызывается хук

Image_Content_Extractor::gather_images_wp()
wpseo_image_attribute_containing_id
Image_Content_Extractor::gather_images_domdocument()
wpseo_image_attribute_containing_id
yoast/src/images/Application/image-content-extractor.php 89
$attribute = \apply_filters( 'wpseo_image_attribute_containing_id', 'class' );
yoast/src/images/Application/image-content-extractor.php 119
$attribute = \apply_filters( 'wpseo_image_attribute_containing_id', 'class' );

Где используется хук в Yoast SEO

Использование не найдено.