Changes in trunk/wp-admin/plugin-editor.php [17183:15132]
- File:
-
- 1 edited
-
trunk/wp-admin/plugin-editor.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/plugin-editor.php
r17183 r15132 10 10 require_once('./admin.php'); 11 11 12 if ( is_multisite() && ! is_network_admin() ) {13 wp_redirect( network_admin_url( 'plugin-editor.php' ) );14 exit();15 }16 17 12 if ( !current_user_can('edit_plugins') ) 18 13 wp_die( __('You do not have sufficient permissions to edit plugins for this site.') ); … … 73 68 exit; 74 69 } 75 wp_redirect( self_admin_url("plugin-editor.php?file=$file&a=te&scrollto=$scrollto"));76 } else { 77 wp_redirect( self_admin_url("plugin-editor.php?file=$file&scrollto=$scrollto"));70 wp_redirect("plugin-editor.php?file=$file&a=te&scrollto=$scrollto"); 71 } else { 72 wp_redirect("plugin-editor.php?file=$file&scrollto=$scrollto"); 78 73 } 79 74 exit; … … 90 85 wp_die( $error ); 91 86 92 if ( ( ! empty( $_GET['networkwide'] ) && ! is_plugin_active_for_network($file) ) ||! is_plugin_active($file) )87 if ( ! is_plugin_active($file) ) 93 88 activate_plugin($file, "plugin-editor.php?file=$file&phperror=1", ! empty( $_GET['networkwide'] ) ); // we'll override this later if the plugin can be included without fatal error 94 89 95 wp_redirect( self_admin_url("plugin-editor.php?file=$file&a=te&scrollto=$scrollto"));90 wp_redirect("plugin-editor.php?file=$file&a=te&scrollto=$scrollto"); 96 91 exit; 97 92 } … … 117 112 '<p>' . __('Choose a plugin to edit from the menu in the upper right and click the Select button. Click once on any file name to load it in the editor, and make your changes. Don’t forget to save your changes (Update File) when you’re finished.') . '</p>' . 118 113 '<p>' . __('The Documentation menu below the editor lists the PHP functions recognized in the plugin file. Clicking Lookup takes you to a web page about that particular function.') . '</p>' . 119 '<p>' . __('If you want to make changes but don’t want them to be overwritten when the plugin is updated, you may be ready to think about writing your own plugin. For information on how to edit plugins, write your own from scratch, or just better understand their anatomy, check out the links below.') . '</p>' . 120 ( is_network_admin() ? '<p>' . __('Any edits to files from this screen will be reflected on all sites in the network.') . '</p>' : '' ) . 114 '<p>' . __('If you want to make changes but don’t want them to be overwritten when the plugin is updated, you may be ready to think about writing your own plugin. For information on how to edit a plugin or start from scratch, check out the links below.') . '</p>' . 121 115 '<p><strong>' . __('For more information:') . '</strong></p>' . 122 116 '<p>' . __('<a href="http://codex.wordpress.org/Plugins_Editor_SubPanel" target="_blank">Documentation on Editing Plugins</a>') . '</p>' . 123 '<p>' . __('<a href="http://codex.wordpress.org/Writing_a_Plugin" target="_blank">Documentation on Writing Plugins</a>') . '</p>' .124 117 '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' 125 118 ); 126 119 127 require_once( ABSPATH . 'wp-admin/admin-header.php');120 require_once('./admin-header.php'); 128 121 129 122 update_recently_edited(WP_PLUGIN_DIR . '/' . $file); … … 144 137 } 145 138 146 $content = esc_textarea( $content );139 $content = htmlspecialchars( $content ); 147 140 ?> 148 141 <?php if (isset($_GET['a'])) : ?> … … 193 186 ?> 194 187 </select> 195 < ?php submit_button( __( 'Select' ), 'button', 'Submit', false ); ?>188 <input type="submit" name="Submit" value="<?php esc_attr_e('Select') ?>" class="button" /> 196 189 </form> 197 190 </div> … … 237 230 <p class="submit"> 238 231 <?php 239 if ( isset($_GET['phperror']) ) { 240 echo "<input type='hidden' name='phperror' value='1' />"; 241 submit_button( __( 'Update File and Attempt to Reactivate' ), 'primary', 'submit', false, array( 'tabindex' => '2' ) ); 242 } else { 243 submit_button( __( 'Update File' ), 'primary', 'submit', false, array( 'tabindex' => '2' ) ); 244 } 232 if ( isset($_GET['phperror']) ) 233 echo "<input type='hidden' name='phperror' value='1' /><input type='submit' name='submit' class='button-primary' value='" . esc_attr__('Update File and Attempt to Reactivate') . "' tabindex='2' />"; 234 else 235 echo "<input type='submit' name='submit' class='button-primary' value='" . esc_attr__('Update File') . "' tabindex='2' />"; 245 236 ?> 246 237 </p> … … 262 253 break; 263 254 } 264 include( ABSPATH . "wp-admin/admin-footer.php");255 include("./admin-footer.php");
Note: See TracChangeset
for help on using the changeset viewer.