WordPress.org

Make WordPress Core

Ticket #14435: 14435.patch

File 14435.patch, 2.4 KB (added by PeteMall, 5 years ago)

Adds plugin and theme editor to the network admin screen.

  • wp-admin/theme-editor.php

     
    9393 
    9494default: 
    9595 
    96         require_once('./admin-header.php'); 
     96        require_once(ABSPATH . 'wp-admin/admin-header.php'); 
    9797 
    9898        update_recently_edited($file); 
    9999 
     
    254254break; 
    255255} 
    256256 
    257 include("./admin-footer.php"); 
     257include(ABSPATH . "wp-admin/admin-footer.php"); 
  • wp-admin/network/plugin-editor.php

     
     1<?php 
     2 
     3require_once( './admin.php' ); 
     4 
     5require( '../plugin-editor.php' ); 
  • wp-admin/network/menu.php

     
    1818$compat = array(); 
    1919$submenu = array(); 
    2020 
     21$submenu['plugins.php'][5]  = array( __('Plugins'), 'manage_network_plugins', 'plugins.php' );  
     22$submenu['plugins.php'][15] = array( _x('Editor', 'plugin editor'), 'manage_network_plugins', 'plugin-editor.php' ); 
     23 
     24$submenu['themes.php'][5]  = array( __('Themes'), 'manage_network_themes', 'themes.php' );  
     25$submenu['themes.php'][15] = array( _x('Editor', 'plugin editor'), 'manage_network_themes', 'theme-editor.php' ); 
     26 
    2127require_once(ABSPATH . 'wp-admin/includes/menu.php'); 
    2228 
    2329?> 
     30 No newline at end of file 
  • wp-admin/network/theme-editor.php

     
     1<?php 
     2 
     3require_once( './admin.php' ); 
     4 
     5require( '../theme-editor.php' ); 
     6 No newline at end of file 
  • wp-admin/plugin-editor.php

     
    117117                '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' 
    118118        ); 
    119119 
    120         require_once('./admin-header.php'); 
     120        require_once(ABSPATH . 'wp-admin/admin-header.php'); 
    121121 
    122122        update_recently_edited(WP_PLUGIN_DIR . '/' . $file); 
    123123 
     
    252252<?php 
    253253        break; 
    254254} 
    255 include("./admin-footer.php"); 
     255include(ABSPATH . "wp-admin/admin-footer.php");