quick_edit_enabled_for_taxonomy
Filters whether Quick Edit should be enabled for the given taxonomy.
Использование
add_filter( 'quick_edit_enabled_for_taxonomy', 'wp_kama_quick_edit_enabled_for_taxonomy_filter', 10, 2 ); /** * Function for `quick_edit_enabled_for_taxonomy` filter-hook. * * @param bool $enable Whether to enable the Quick Edit functionality. * @param string $taxonomy Taxonomy name. * * @return bool */ function wp_kama_quick_edit_enabled_for_taxonomy_filter( $enable, $taxonomy ){ // filter... return $enable; }
- $enable(true|false)
- Whether to enable the Quick Edit functionality.
По умолчанию: true - $taxonomy(строка)
- Taxonomy name.
Список изменений
С версии 6.4.0 | Введена. |
Где вызывается хук
quick_edit_enabled_for_taxonomy
wp-admin/includes/class-wp-terms-list-table.php 503
$quick_edit_enabled = apply_filters( 'quick_edit_enabled_for_taxonomy', true, $taxonomy );
wp-admin/includes/class-wp-terms-list-table.php 430
$quick_edit_enabled = apply_filters( 'quick_edit_enabled_for_taxonomy', true, $taxonomy );