Don't show Change Permalinks button when user doesn't have permission, props johnbillion, fixes #10072

git-svn-id: http://svn.automattic.com/wordpress/trunk@11534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2009-06-08 21:42:35 +00:00
parent 71b4ed94f2
commit d8b86813c6
1 changed files with 2 additions and 1 deletions

View File

@ -977,7 +977,8 @@ 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";
$return .= '<span id="change-permalinks"><a href="options-permalink.php" class="button" target="_blank">' . __('Change Permalinks') . "</a></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";