wp_terms_checklist_args
Filter HookDescription
Filters the taxonomy terms checklist arguments.Hook Information
File Location |
wp-admin/includes/template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 102 |
Hook Parameters
Type | Name | Description |
---|---|---|
array|string
|
$args
|
An array or string of arguments. |
int
|
$post_id
|
The post ID. |
Usage Examples
Basic Usage
<?php
// Hook into wp_terms_checklist_args
add_filter('wp_terms_checklist_args', 'my_custom_filter', 10, 2);
function my_custom_filter($args, $post_id) {
// Your custom filtering logic here
return $args;
}
Source Code Context
wp-admin/includes/template.php:102
- How this hook is used in WordPress core
<?php
97 * @see wp_terms_checklist()
98 *
99 * @param array|string $args An array or string of arguments.
100 * @param int $post_id The post ID.
101 */
102 $params = apply_filters( 'wp_terms_checklist_args', $args, $post_id );
103
104 $parsed_args = wp_parse_args( $params, $defaults );
105
106 if ( empty( $parsed_args['walker'] ) || ! ( $parsed_args['walker'] instanceof Walker ) ) {
107 $walker = new Walker_Category_Checklist();
PHP Documentation
<?php
/**
* Filters the taxonomy terms checklist arguments.
*
* @since 3.4.0
*
* @see wp_terms_checklist()
*
* @param array|string $args An array or string of arguments.
* @param int $post_id The post ID.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-admin/includes/template.php
Related Hooks
Related hooks will be displayed here in future updates.