register_meta_args

register_meta_args

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.5.2

apply_filters('register_meta_args') is found 1 times:

  • /wp-includes/meta.php line 1453
    	 * @param string $object_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
    	 *                            or any other object type with an associated meta table.
    	 * @param string $meta_key    Meta key.
    	 */
    	$args = apply_filters( 'register_meta_args', $args, $defaults, $object_type, $meta_key );
    	unset( $defaults['default'] );
    	$args = wp_parse_args( $args, $defaults );
    
    	// Require an item schema when registering array meta.
    	if ( false !== $args['show_in_rest'] && 'array' === $args['type'] ) {
    		if ( ! is_array( $args['show_in_rest'] ) || ! isset( $args['show_in_rest']['schema']['items'] ) ) {