Skip to content

Instantly share code, notes, and snippets.

View firoz2456's full-sized avatar
🏠

Firoz firoz2456

🏠
View GitHub Profile
add_action( 'admin_menu', array( $this, 'add_admin_pages' ) );
function add_admin_pages() {
add_submenu_page(
'edit.php',
__( 'Drafts for Friends', 'draftsforfriends' ),
__( 'Drafts for Friends', 'draftsforfriends' ),
'edit_posts',
'drafts-for-friends',
array( $this, 'output_existing_menu_sub_admin_page' )
);
public function get_drafts() {
global $current_user;
$my_drafts = $this->get_users_drafts($current_user->ID);
$my_scheduled = $this->get_users_future($current_user->ID);
$pending = $this->get_users_pending($current_user->ID);
}
/**