Skip to content

Instantly share code, notes, and snippets.

@shawnsandy
Created June 14, 2012 14:13
Show Gist options
  • Save shawnsandy/2930579 to your computer and use it in GitHub Desktop.
Save shawnsandy/2930579 to your computer and use it in GitHub Desktop.
<?php
/*
Plugin Name: custom-adminbar-post-menu
Plugin URI: http://mysite.com
Description: Adds menu list of post by status to your admin bar, quickly jump to and and from post easily from the admin menu.
Author: me
Author URI: http://mysite.com
Version: 0.1
*/
/**
* Customize your Adminbar Post Menus
* edit the $post_type_array to match your custom post types;
*/
function apm_menus() {
//create an post_type array(post_type, menu_title);
$post_types = array('post' => 'Posts', 'page' => 'Pages');
//load and run the class
$apmmenus = AdminbarPostMenus::add_menus()->set_post_types($post_types)->nodes();
}
// run the function on init;
add_action('init', 'apm_menus');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment