src/PostType/PostType.php
protected function registerStatus()
    {
        if (empty($this->status)) {
            return;
        }

        foreach ($this->status as $key => $args) {
            register_post_status($key, $args);
        }

        Metabox::make('themosis_publish', $this->slug)
            ->setTitle(__('Publish'))
            ->setContext('side')
            ->setPriority('core')
            ->setCallback(function ($args) {
                echo view('_themosisPublishMetabox', [
                    'statuses' => $this->status,
                    '__post' => $args['post']
                ]);
            })
            ->set();
    }
protected function registerStatus()
    {
        if (empty($this->status)) {
            return;
        }

        foreach ($this->status as $key => $args) {
            register_post_status($key, $args);
        }

        Metabox::make('themosis_publish', $this->slug)
            ->setTitle(__('Publish'))
            ->setContext('side')
            ->setPriority('core')
            ->setCallback(function ($args) {
                echo view('_themosisPublishMetabox', [
                    'statuses' => $this->status,
                    '__post' => $args['post']
                ]);
            })
            ->set();
    }
protected function registerStatus ( ) { if ( empty ( $ this -> status ) ) { return ; } foreach ( $ this -> status as $ key => $ args ) { register_post_status ( $ key , $ args ) ; } Metabox :: make ( 'themosis_publish' , $ this -> slug ) -> setTitle ( __ ( 'Publish' ) ) -> setContext ( 'side' ) -> setPriority ( 'core' ) -> setCallback ( function ( $ args ) { echo view ( '_themosisPublishMetabox' , [ 'statuses' => $ this -> status , '__post' => $ args [ 'post' ] ] ) ; } ) -> set ( ) ; }
Register the custom status if any.
Register the custom status if any .