quick_edit_enabled_for_post_type хук-фильтрWP 6.4.0

Filters whether Quick Edit should be enabled for the given post type.

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

add_filter( 'quick_edit_enabled_for_post_type', 'wp_kama_quick_edit_enabled_for_post_type_filter', 10, 2 );

/**
 * Function for `quick_edit_enabled_for_post_type` filter-hook.
 * 
 * @param bool   $enable    Whether to enable the Quick Edit functionality.
 * @param string $post_type Post type name.
 *
 * @return bool
 */
function wp_kama_quick_edit_enabled_for_post_type_filter( $enable, $post_type ){

	// filter...
	return $enable;
}
$enable(true|false)
Whether to enable the Quick Edit functionality.
По умолчанию: true
$post_type(строка)
Post type name.

Список изменений

С версии 6.4.0 Введена.

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

WP_Posts_List_Table::handle_row_actions()
quick_edit_enabled_for_post_type
WP_Posts_List_Table::column_title()
quick_edit_enabled_for_post_type
wp-admin/includes/class-wp-posts-list-table.php 1491
$quick_edit_enabled = apply_filters( 'quick_edit_enabled_for_post_type', true, $post->post_type );
wp-admin/includes/class-wp-posts-list-table.php 1172
$quick_edit_enabled = apply_filters( 'quick_edit_enabled_for_post_type', true, $post->post_type );

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

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