Skip to content

Instantly share code, notes, and snippets.

@tommcfarlin
Created August 18, 2016 11:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tommcfarlin/75ffaf38091f2b50439d22bfece2717c to your computer and use it in GitHub Desktop.
Save tommcfarlin/75ffaf38091f2b50439d22bfece2717c to your computer and use it in GitHub Desktop.
[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