WordPress.org

Make WordPress Core

Ticket #10072: 10072.patch

File 10072.patch, 948 bytes (added by johnbillion, 5 years ago)
  • wp-admin/includes/post.php

     
    977977 
    978978        if ( false === strpos($permalink, '%postname%') && false === strpos($permalink, '%pagename%') ) { 
    979979                $return = '<strong>' . __('Permalink:') . "</strong>\n" . '<span id="sample-permalink">' . $permalink . "</span>\n"; 
    980                 $return .= '<span id="change-permalinks"><a href="options-permalink.php" class="button" target="_blank">' . __('Change Permalinks') . "</a></span>\n"; 
     980                if ( current_user_can( 'manage_options' ) ) 
     981                        $return .= '<span id="change-permalinks"><a href="options-permalink.php" class="button" target="_blank">' . __('Change Permalinks') . "</a></span>\n"; 
    981982                if ( isset($view_post) ) 
    982983                        $return .= "<span id='view-post-btn'><a href='$permalink' class='button' target='_blank'>$view_post</a></span>\n"; 
    983984