WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How can I rename the Administrator Panel Post ? (5 posts)

  1. tripdragon
    Member
    Posted 3 years ago #

    How can I hook or whatever I need to perform this edit without hacking root files?

    :Line 82 wp-admin/menu.php
    $menu[5] = array( __('Posts')

    to

    $menu[5] = array( __('Blog Posts')

    It seems to work just fine. Not sure how an upgrade would fare. But simple is best. I refuse to install a plug just to do this.

  2. David Sader
    Member
    Posted 3 years ago #

    How can I hook or whatever I need to perform this edit without hacking root files?

    Create a wp-content/mu-plugins folder for "must use" plugins that are always active and drop the following into a php file in your mu-plugins folder:

    <?php
    function ds_posts_menu_renamed() {
    global $menu;
    	unset($menu[5]);
    	$menu[5] = array( __('Blog Posts'), 'edit_posts', 'edit.php', '', 'open-if-no-js menu-top menu-icon-post', 'menu-posts', 'div' );
    }
    add_action('_admin_menu','ds_posts_menu_renamed');
    ?>

    Not sure how an upgrade would fare.

    Any edits to core files will be overwritten during any upgrade.

    But simple is best. I refuse to install a plug just to do this.

    The contents of the folder mu-plugins folder are not overwritten during a one-click upgrade. "mu-plugins" is the place for little snips you want loaded as if there were part of the core files, but not necessarily a full-fledged plugin.

  3. tripdragon
    Member
    Posted 3 years ago #

    AWESOMEEE!!!! Learned two things now. Thank you!

  4. Aldi
    Member
    Posted 2 years ago #

    @David Sader

    $menu[5] = array( __('Blog Posts'), 'edit_posts', 'edit.php', '', 'open-if-no-js menu-top menu-icon-post', 'menu-posts', 'div' );

    Thanks for the tips! Just wondering but could you tell us what the parameters in the code above represent, please? Cheers!

  5. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic