Move convert_to_screen() back to template.php to avoid fatal errors with plugins and themes that direct include template.php into the front end. Flag this bad behavior with _doing_it_wrong(). Props nacin. fixes #19342
git-svn-id: http://svn.automattic.com/wordpress/trunk@19428 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -107,18 +107,6 @@ function get_hidden_meta_boxes( $screen ) {
|
||||
return apply_filters( 'hidden_meta_boxes', $hidden, $screen, $use_defaults );
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a screen string to a screen object
|
||||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param string $hook_name The hook name (also known as the hook suffix) used to determine the screen.
|
||||
* @return WP_Screen Screen object.
|
||||
*/
|
||||
function convert_to_screen( $hook_name ) {
|
||||
return WP_Screen::get( $hook_name );
|
||||
}
|
||||
|
||||
/**
|
||||
* Add contextual help text for a page.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user