Redaguojam mu.php ir įgalinam temų bei įskiepių redagavimą iš administratoriaus darbastalio


Atnaujinta!

Problemos sprendimas Less filters įskiepio pagalba.

Šaltinis

1. Search for the term “unset( $submenu[‘themes.php’][10]” in mu.php, you will find only one search result. At that place, you ned to make changes. We have provided below the before and after changes code. We need to comment two lines which are actually there to remove plugin editor and theme editor.

Before Changes

unset( $submenu['plugins.php'][15] ); // always remove the plugin editor
unset( $submenu['themes.php'][10] );  // always remove the themes editor

After Changes

/* unset( $submenu['plugins.php'][15] ); */ // always remove the plugin
/* unset( $submenu['themes.php'][10] ); */ // always remove the themes

2. After removing this check, you should be able to see the theme editor and plugin editor option but still those pages will not accessible. To remove that barrier, you need to make below changes in mu.php only.

Search for the term “if ( strpos( $_SERVER[‘PHP_SELF’], ‘user-new.php’” in mu.php and then see below the before and after code for the same line (search result)

Before Changes

$pages = array( 'theme-editor.php', 'plugin-editor.php' );
foreach( $pages as $page ) {
    if ( strpos( $_SERVER['PHP_SELF'], $page ) ) {
        wp_die( __('Page disabled by the administrator') );

After Changes

$pages = array( 'theme-editor.php', 'plugin-editor.php' );
  foreach( $pages as $page ) {
     if ( strpos( $_SERVER['PHP_SELF'], $page )&& !is_site_admin() ) {
         wp_die( __('Page disabled by the administrator') );

Now you can check in your WordPress MU dashboard; the theme editor and plugin editor should work properly in your MU installation.

Reklama

Parašykite komentarą

Įveskite savo duomenis žemiau arba prisijunkite per socialinį tinklą:

WordPress.com Logo

Jūs komentuojate naudodamiesi savo WordPress.com paskyra. Atsijungti / Keisti )

Twitter picture

Jūs komentuojate naudodamiesi savo Twitter paskyra. Atsijungti / Keisti )

Facebook photo

Jūs komentuojate naudodamiesi savo Facebook paskyra. Atsijungti / Keisti )

Google+ photo

Jūs komentuojate naudodamiesi savo Google+ paskyra. Atsijungti / Keisti )

Connecting to %s

%d bloggers like this: