unregister_post_meta( string $post_type, string $meta_key )

Unregisters a meta key for posts.

Description Description

Parameters Parameters


(string) (Required) Post type the meta key is currently registered for. Pass an empty string if the meta key is registered across all existing post types.


(string) (Required) The meta key to unregister.

Top ↑

Return Return

(bool) True on success, false if the meta key was not previously registered.

Top ↑

Source Source

File: wp-includes/post.php

function unregister_post_meta( $post_type, $meta_key ) {
	return unregister_meta_key( 'post', $meta_key, $post_type );

Top ↑

Changelog Changelog

Version Description
4.9.8 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.