Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




convert_to_screen [ WordPress Function ]

convert_to_screen ( $hook_name )
Parameters:
  • (string) $hook_name The hook name (also known as the hook suffix) used to determine the screen.
Returns:
  • (WP_Screen) Screen object.
Defined at:



Convert a screen string to a screen object

Source


<?php
function convert_to_screen$hook_name ) {
    if ( ! 
class_exists'WP_Screen' ) ) {
        
_doing_it_wrong'convert_to_screen(), add_meta_box()'__"Likely direct inclusion of wp-admin/includes/template.php in order to use add_meta_box(). This is very wrong. Hook the add_meta_box() call into the add_meta_boxes action instead." ), '3.3' );
        return (object) array( 
'id' => '_invalid''base' => '_are_belong_to_us' );
    }

    return 
WP_Screen::get$hook_name );
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics