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

Filter: wpseo_bulk_editor_post_context Allows add-ons to supply extra context shown alongside a post in the bulk editor table (e.g. a product short description for WooCommerce products).

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

add_filter( 'wpseo_bulk_editor_post_context', 'wp_kama_wpseo_bulk_editor_post_context_filter', 10, 3 );

/**
 * Function for `wpseo_bulk_editor_post_context` filter-hook.
 * 
 * @param array $context      The context data, empty by default.
 * @param int                   $post_id      The post ID.
 * @param string                $content_type The post type.
 *
 * @return array
 */
function wp_kama_wpseo_bulk_editor_post_context_filter( $context, $post_id, $content_type ){
	// filter...
	return $context;
}
$context(array<string, string>)
The context data, empty by default.
$post_id(int)
The post ID.
$content_type(строка)
The post type.

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

В файле: /src/bulk-editor/infrastructure/posts/post-context-trait.php
wpseo_bulk_editor_post_context
yoast/src/bulk-editor/infrastructure/posts/post-context-trait.php 32
$context = \apply_filters( 'wpseo_bulk_editor_post_context', [], $post_id, $content_type );

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

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