Changeset 37747 for trunk/src/wp-admin/options-permalink.php
- Timestamp:
- 06/19/2016 12:01:11 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/options-permalink.php
r36142 r37747 83 83 $permalink_structure = $blog_prefix . $permalink_structure; 84 84 } 85 86 $permalink_structure = sanitize_option( 'permalink_structure', $permalink_structure ); 87 85 88 $wp_rewrite->set_permalink_structure( $permalink_structure ); 86 89 } … … 99 102 $wp_rewrite->set_tag_base( $tag_base ); 100 103 } 104 105 $message = __( 'Permalink structure updated.' ); 106 107 if ( $iis7_permalinks ) { 108 if ( $permalink_structure && ! $usingpi && ! $writable ) { 109 $message = __( 'You should update your web.config now.' ); 110 } elseif ( $permalink_structure && ! $usingpi && $writable ) { 111 $message = __( 'Permalink structure updated. Remove write access on web.config file now!' ); 112 } 113 } elseif ( ! $is_nginx && $permalink_structure && ! $usingpi && ! $writable && $update_required ) { 114 $message = __( 'You should update your .htaccess now.' ); 115 } 116 117 if ( ! get_settings_errors() ) { 118 add_settings_error( 'general', 'settings_updated', $message, 'updated' ); 119 } 120 121 set_transient( 'settings_errors', get_settings_errors(), 30 ); 101 122 102 123 wp_redirect( admin_url( 'options-permalink.php?settings-updated=true' ) ); … … 126 147 } 127 148 128 if ( $wp_rewrite->using_index_permalinks() ) 129 $usingpi = true; 130 else 131 $usingpi = false; 149 $usingpi = $wp_rewrite->using_index_permalinks(); 132 150 133 151 flush_rewrite_rules(); 134 152 135 153 require( ABSPATH . 'wp-admin/admin-header.php' ); 136 137 if ( ! empty( $_GET['settings-updated'] ) ) : ?>138 <div id="message" class="updated notice is-dismissible"><p><?php139 if ( ! is_multisite() ) {140 if ( $iis7_permalinks ) {141 if ( $permalink_structure && ! $usingpi && ! $writable ) {142 _e('You should update your web.config now.');143 } elseif ( $permalink_structure && ! $usingpi && $writable ) {144 _e('Permalink structure updated. Remove write access on web.config file now!');145 } else {146 _e('Permalink structure updated.');147 }148 } elseif ( $is_nginx ) {149 _e('Permalink structure updated.');150 } else {151 if ( $permalink_structure && ! $usingpi && ! $writable && $update_required ) {152 _e('You should update your .htaccess now.');153 } else {154 _e('Permalink structure updated.');155 }156 }157 } else {158 _e('Permalink structure updated.');159 }160 154 ?> 161 </p></div>162 <?php endif; ?>163 164 155 <div class="wrap"> 165 156 <h1><?php echo esc_html( $title ); ?></h1>
Note: See TracChangeset
for help on using the changeset viewer.