Papi_Entry_Type::setup PHP Method

setup() public method

Setup entry type.
public setup ( )
    public function setup()
    {
        add_action('in_admin_header', [$this, 'add_help_tabs']);
        add_filter('screen_options_show_screen', function () {
            return $this->show_screen_options;
        });
        // @codeCoverageIgnoreStart
        if (!method_exists($this, 'register')) {
            return;
        }
        // @codeCoverageIgnoreEnd
        $this->register();
        foreach ($this->get_boxes() as $box) {
            new Papi_Admin_Meta_Box($box);
        }
    }

Usage Example

Beispiel #1
0
 /**
  * Preboot all types and setup the current type if any.
  */
 public function admin_init()
 {
     // Preload all page types.
     foreach (papi_get_post_types() as $post_type) {
         papi_get_all_entry_types(['args' => $post_type]);
     }
     if (!$this->setup_papi()) {
         return;
     }
     // Setup entry type.
     $this->entry_type->setup();
 }
All Usage Examples Of Papi_Entry_Type::setup