GithubHelp home page GithubHelp logo

wordpressdev / wordpress-custom-menu-separator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tommcfarlin/wordpress-custom-menu-separator

0.0 2.0 0.0 71 KB

A simple plugin for demonstrating how to add a custom menu separator in the WordPress administration menu.

Home Page: http://tommcfarlin.com/add-a-separator-to-the-wordpress-menu/

wordpress-custom-menu-separator's Introduction

WordPress Custom Menu Separator

A simple plugin for adding a custom menu separator in the WordPress administration menu. The blog post associated with this plugin can be found on my blog.

Default Menu Structure

By default, WordPress populates its administration menu with the following array. Note that the indexes of the array are reserved for default menu items and should not be used to insert custom menu items.

Array
(
    [2] => Array
        (
            [0] => Dashboard
            [1] => read
            [2] => index.php
            [3] => 
            [4] => menu-top menu-top-first menu-icon-dashboard menu-top-last
            [5] => menu-dashboard
            [6] => div
        )

    [4] => Array
        (
            [0] => 
            [1] => read
            [2] => separator1
            [3] => 
            [4] => wp-menu-separator
        )

    [5] => Array
        (
            [0] => Posts
            [1] => edit_posts
            [2] => edit.php
            [3] => 
            [4] => open-if-no-js menu-top menu-icon-post menu-top-first
            [5] => menu-posts
            [6] => div
        )

    [10] => Array
        (
            [0] => Media
            [1] => upload_files
            [2] => upload.php
            [3] => 
            [4] => menu-top menu-icon-media
            [5] => menu-media
            [6] => div
        )

    [15] => Array
        (
            [0] => Links
            [1] => manage_links
            [2] => link-manager.php
            [3] => 
            [4] => menu-top menu-icon-links
            [5] => menu-links
            [6] => div
        )

    [20] => Array
        (
            [0] => Pages
            [1] => edit_pages
            [2] => edit.php?post_type=page
            [3] => 
            [4] => menu-top menu-icon-page
            [5] => menu-pages
            [6] => div
        )

    [25] => Array
        (
            [0] => Comments <span class='awaiting-mod count-0'><span class='pending-count'>0</span></span>
            [1] => edit_posts
            [2] => edit-comments.php
            [3] => 
            [4] => menu-top menu-icon-comments menu-top-last menu-top-last
            [5] => menu-comments
            [6] => div
        )

    [57] => Array
        (
            [0] => 
            [1] => read
            [2] => separator57
            [3] => 
            [4] => wp-menu-separator
        )

    [59] => Array
        (
            [0] => 
            [1] => read
            [2] => separator2
            [3] => 
            [4] => wp-menu-separator
        )

    [60] => Array
        (
            [0] => Appearance
            [1] => switch_themes
            [2] => themes.php
            [3] => 
            [4] => menu-top menu-icon-appearance menu-top-first
            [5] => menu-appearance
            [6] => div
        )

    [65] => Array
        (
            [0] => Plugins <span class='update-plugins count-0'><span class='plugin-count'>0</span></span>
            [1] => activate_plugins
            [2] => plugins.php
            [3] => 
            [4] => menu-top menu-icon-plugins
            [5] => menu-plugins
            [6] => div
        )

    [70] => Array
        (
            [0] => Users
            [1] => list_users
            [2] => users.php
            [3] => 
            [4] => menu-top menu-icon-users
            [5] => menu-users
            [6] => div
        )

    [75] => Array
        (
            [0] => Tools
            [1] => edit_posts
            [2] => tools.php
            [3] => 
            [4] => menu-top menu-icon-tools
            [5] => menu-tools
            [6] => div
        )

    [80] => Array
        (
            [0] => Settings
            [1] => manage_options
            [2] => options-general.php
            [3] => 
            [4] => menu-top menu-icon-settings menu-top-last
            [5] => menu-settings
            [6] => div
        )

)

Installation

  1. Download (or pull) the plugin
  2. Install it using the WordPress Plugin's administration page or my dropping it into your /plugins/ directory
  3. Activate it on the Plugin's listing page

You should notice a new separator appear above the 'Settings' menu. This can be changed by editing Line 81 of plugin.php

Changelog

1.1 22 March 2013

  • Updating the hooks to play nicely with WordPress 3.5

wordpress-custom-menu-separator's People

Contributors

tommcfarlin avatar

Watchers

James Cloos avatar Rafique avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.