Don’t nag to Change Permalinks if permalink structure is defined. Props demetris. fixes #13918

git-svn-id: https://develop.svn.wordpress.org/trunk@16651 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2010-12-01 17:16:22 +00:00
parent c8c8bf146d
commit ca60ed1d07
1 changed files with 1 additions and 1 deletions

View File

@ -1117,7 +1117,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' ) && !( 'page' == get_option('show_on_front') && $id == get_option('page_on_front') ) )
if ( '' == get_option( 'permalink_structure' ) && current_user_can( 'manage_options' ) && !( 'page' == get_option('show_on_front') && $id == get_option('page_on_front') ) )
$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";