Don't show Change Permalinks button when user doesn't have permission, props johnbillion, fixes #10072
git-svn-id: https://develop.svn.wordpress.org/trunk@11534 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b84bf875ee
commit
4876c3ce71
@ -977,6 +977,7 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
|
||||
|
||||
if ( false === strpos($permalink, '%postname%') && false === strpos($permalink, '%pagename%') ) {
|
||||
$return = '<strong>' . __('Permalink:') . "</strong>\n" . '<span id="sample-permalink">' . $permalink . "</span>\n";
|
||||
if ( current_user_can( 'manage_options' ) )
|
||||
$return .= '<span id="change-permalinks"><a href="options-permalink.php" class="button" target="_blank">' . __('Change Permalinks') . "</a></span>\n";
|
||||
if ( isset($view_post) )
|
||||
$return .= "<span id='view-post-btn'><a href='$permalink' class='button' target='_blank'>$view_post</a></span>\n";
|
||||
|
Loading…
Reference in New Issue
Block a user