Skip to content

Instantly share code, notes, and snippets.

@tommcfarlin
Created August 18, 2016 11:51
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
[WordPress]
<?php
/**
* Hooks the submenu page functionality into the admin_menu hook of WordPress
* so we can customize it for Scheduled posts.
*/
public function init() {
add_action(
'admin_menu',
array( $this, 'add_submenu_page' )
);
add_action(
'admin_enqueue_scripts',
array( $this, 'admin_enqueue_scripts' )
);
add_action(
'admin_enqueue_scripts',
array( $this, 'admin_enqueue_styles' )
);
add_filter(
'parent_file',
array( $this, 'highlight_scheduled_submenu' )
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment