WordPress.org

Make WordPress Core

Ticket #25189: 25189.diff

File 25189.diff, 539 bytes (added by trepmal, 6 years ago)
  • wp-admin/includes/template.php

     
    535535<?php
    536536
    537537        foreach ( $keys as $key ) {
    538                 if ( is_protected_meta( $key, 'post' ) )
     538                $post = get_post();
     539                if ( is_protected_meta( $key, 'post' ) || ! current_user_can( 'edit_post_meta', $post->ID, $key ) )
    539540                        continue;
    540541                echo "\n<option value='" . esc_attr($key) . "'>" . esc_html($key) . "</option>";
    541542        }