Guest User

Untitled

a guest
Nov 21st, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. <?php add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $position ); ?>
  2.  
  3. function create_post_type() {
  4. register_post_type( 'client_posttype',
  5. array(
  6. 'labels' => array(
  7. 'name' => __( 'Clients' ),
  8. 'singular_name' => __( 'Client' )
  9. ),
  10. 'public' => true,
  11. 'has_archive' => true,
  12. )
  13. );
  14. }
  15. add_action( 'init', 'create_post_type' );
  16.  
  17. class options_page {
  18.  
  19. function __construct() {
  20. add_action( 'admin_menu', array( $this, 'admin_menu' ) );
  21. }
  22.  
  23. function admin_menu() {
  24. add_menu_page( 'Clients', 'Clients Page', 'edit_posts', 'clients_page', 'my_clients', '', 24);
  25. }
  26.  
  27. function settings_page() {
  28. echo 'This is the page content';
  29. }
  30. }
  31.  
  32. new options_page;
Add Comment
Please, Sign In to add comment