WordPress как на ладони
WordPress Meetup #4. Встречаемся в Москве wordpress jino
функция не описана

unregister_meta_key() WP 4.6.0

Unregisters a meta key from the list of registered keys.

Хуков нет.

Возвращает

true/false. True if successful. False if the meta key was not registered.

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

unregister_meta_key( $object_type, $meta_key );
$object_type(строка) (обязательный)
The type of object.
$meta_key(строка) (обязательный)
The meta key.

Код unregister meta key: wp-includes/meta.php VER 4.9.7

<?php
function unregister_meta_key( $object_type, $meta_key ) {
	global $wp_meta_keys;

	if ( ! registered_meta_key_exists( $object_type, $meta_key ) ) {
		return false;
	}

	$args = $wp_meta_keys[ $object_type ][ $meta_key ];

	if ( isset( $args['sanitize_callback'] ) && is_callable( $args['sanitize_callback'] ) ) {
		remove_filter( "sanitize_{$object_type}_meta_{$meta_key}", $args['sanitize_callback'] );
	}

	if ( isset( $args['auth_callback'] ) && is_callable( $args['auth_callback'] ) ) {
		remove_filter( "auth_{$object_type}_meta_{$meta_key}", $args['auth_callback'] );
	}

	unset( $wp_meta_keys[ $object_type ][ $meta_key ] );

	// Do some clean up
	if ( empty( $wp_meta_keys[ $object_type ] ) ) {
		unset( $wp_meta_keys[ $object_type ] );
	}

	return true;
}