register_post_type_args filter-hookWP 4.4.0

Filters the arguments for registering a post type.

Usage

add_filter( 'register_post_type_args', 'wp_kama_register_post_type_args_filter', 10, 2 );

/**
 * Function for `register_post_type_args` filter-hook.
 * 
 * @param array  $args      Array of arguments for registering a post type. See the register_post_type() function for accepted arguments.
 * @param string $post_type Post type key.
 *
 * @return array
 */
function wp_kama_register_post_type_args_filter( $args, $post_type ){

	// filter...
	return $args;
}
$args(array)
Array of arguments for registering a post type. See the register_post_type() function for accepted arguments.
$post_type(string)
Post type key.

Changelog

Since 4.4.0 Introduced.

Where the hook is called

WP_Post_Type::set_props()
register_post_type_args
wp-includes/class-wp-post-type.php 441
$args = apply_filters( 'register_post_type_args', $args, $this->name );

Where the hook is used in WordPress

Usage not found.