From d8b86813c6f22ab102d8f77e704c3c5dd0c8715b Mon Sep 17 00:00:00 2001 From: azaozz Date: Mon, 8 Jun 2009 21:42:35 +0000 Subject: [PATCH] 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 --- wp-admin/includes/post.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 2df3aa7a98..c7acf91563 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -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 = '' . __('Permalink:') . "\n" . '' . $permalink . "\n"; - $return .= '' . __('Change Permalinks') . "\n"; + if ( current_user_can( 'manage_options' ) ) + $return .= '' . __('Change Permalinks') . "\n"; if ( isset($view_post) ) $return .= "$view_post\n";