Make WordPress Core


Ignore:
Timestamp:
07/20/2011 10:04:35 PM (13 years ago)
Author:
ryan
Message:

Introduce register_meta(), get_metadata_by_mid(), and *_post_meta capabilities. fixes #17850

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/meta-boxes.php

    r18106 r18445  
    426426<?php
    427427$metadata = has_meta($post->ID);
    428 list_meta($metadata);
     428foreach ( $metadata as $key => $value ) {
     429    if ( is_protected_meta( $metadata[ $key ][ 'meta_key' ], 'post' ) || ! current_user_can( 'edit_post_meta', $post->ID, $metadata[ $key ][ 'meta_key' ] ) )
     430        unset( $metadata[ $key ] );
     431}
     432list_meta( $metadata );
    429433meta_form(); ?>
    430434</div>
Note: See TracChangeset for help on using the changeset viewer.