WordPress.org

Make WordPress Core

Changeset 11908


Ignore:
Timestamp:
09/10/09 01:21:03 (6 years ago)
Author:
azaozz
Message:

Don't show "Change Permalinks" button when editing the page set as "Front page", props simonwheatley, fixes #10760

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/post.php

    r11871 r11908  
    987987    if ( false === strpos($permalink, '%postname%') && false === strpos($permalink, '%pagename%') ) { 
    988988        $return = '<strong>' . __('Permalink:') . "</strong>\n" . '<span id="sample-permalink">' . $permalink . "</span>\n"; 
    989         if ( current_user_can( 'manage_options' ) ) 
     989        if ( current_user_can( 'manage_options' ) && !( 'page' == get_option('show_on_front') && $id == get_option('page_on_front') ) ) 
    990990            $return .= '<span id="change-permalinks"><a href="options-permalink.php" class="button" target="_blank">' . __('Change Permalinks') . "</a></span>\n"; 
    991991        if ( isset($view_post) ) 
Note: See TracChangeset for help on using the changeset viewer.