X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/f9001779751f83dc8a10e478bfecb4d8dd5f964c..9c2096d803812dacbdf6cf8efe90053e39f00b96:/wp-admin/includes/meta-boxes.php diff --git a/wp-admin/includes/meta-boxes.php b/wp-admin/includes/meta-boxes.php index a84ac16f..ddb3e9d4 100644 --- a/wp-admin/includes/meta-boxes.php +++ b/wp-admin/includes/meta-boxes.php @@ -138,8 +138,8 @@ echo esc_html( $visibility_trans ); ?> />
- -ID)); ?> tabindex="4" />
+ +ID ) ); ?> tabindex="4" />
/>

@@ -155,7 +155,7 @@ echo esc_html( $visibility_trans ); ?> ID ) { if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date @@ -248,7 +248,6 @@ function post_format_meta_box( $post, $box ) { $post_format = get_post_format( $post->ID ); if ( !$post_format ) $post_format = '0'; - $post_format_display = get_post_format_string( $post_format ); // Add in the current one if it isn't there yet, in case the current theme doesn't support it if ( $post_format && !in_array( $post_format, $post_formats[0] ) ) $post_formats[0][] = $post_format; @@ -426,7 +425,11 @@ function post_custom_meta_box($post) {
ID); -list_meta($metadata); +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 ] ); +} +list_meta( $metadata ); meta_form(); ?>

use in your theme.'); ?>

@@ -507,7 +510,7 @@ function post_comment_meta_box($post) { */ function post_slug_meta_box($post) { ?> - + post_type); if ( $post_type_object->hierarchical ) { - $pages = wp_dropdown_pages(array('post_type' => $post->post_type, 'exclude_tree' => $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('(no parent)'), 'sort_column'=> 'menu_order, post_title', 'echo' => 0)); + $dropdown_args = array( + 'post_type' => $post->post_type, + 'exclude_tree' => $post->ID, + 'selected' => $post->post_parent, + 'name' => 'parent_id', + 'show_option_none' => __('(no parent)'), + 'sort_column' => 'menu_order, post_title', + 'echo' => 0, + ); + + $dropdown_args = apply_filters( 'page_attributes_dropdown_pages_args', $dropdown_args, $post ); + $pages = wp_dropdown_pages( $dropdown_args ); if ( ! empty($pages) ) { ?>