A WordPress-centric search engine for devs and theme authors



post_custom_meta_box ›

Since2.6.0
Deprecatedn/a
post_custom_meta_box ( $post )
Parameters:
  • (object) $post
    Required: Yes
Defined at:
Codex:

Display custom fields form fields.



Source

function post_custom_meta_box( $post ) {
?>
<div id="postcustomstuff">
<div id="ajax-response"></div>
<?php
$metadata = has_meta( $post->ID );
foreach ( $metadata as $key => $value ) {
	if ( is_protected_meta( $metadata[ $key ]['meta_key'], 'post' ) || ! current_user_can( 'edit_post_meta', $post->ID, $metadata[ $key ]['meta_key'] ) ) {
		unset( $metadata[ $key ] );
	}
}