src/Metabox/Resources/Transformers/MetaboxTransformer.php
protected function getScreen($screen)
    {
        if (is_string($screen) && function_exists('convert_to_screen')) {
            $screen = convert_to_screen($screen);
        }

        if ($screen instanceof \WP_Screen) {
            return [
                'id' => $screen->id,
                'post_type' => $screen->post_type
            ];
        }

        // Screen is still a string.
        return [
            'id' => $screen,
            'post_type' => $screen
        ];
    }
protected function getScreen($screen)
    {
        if (is_string($screen) && function_exists('convert_to_screen')) {
            $screen = convert_to_screen($screen);
        }

        if ($screen instanceof \WP_Screen) {
            return [
                'id' => $screen->id,
                'post_type' => $screen->post_type
            ];
        }

        // Screen is still a string.
        return [
            'id' => $screen,
            'post_type' => $screen
        ];
    }
protected function getScreen ( $ screen ) { if ( is_string ( $ screen ) && function_exists ( 'convert_to_screen' ) ) { $ screen = convert_to_screen ( $ screen ) ; } if ( $ screen instanceof \ WP_Screen ) { return [ 'id' => $ screen -> id , 'post_type' => $ screen -> post_type ] ; } // Screen is still a string. return [ 'id' => $ screen , 'post_type' => $ screen ] ; }
Get the metabox screen data.

@param $screen

@return array
Get the metabox screen data .