mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-04 09:10:06 +00:00
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: https://develop.svn.wordpress.org/trunk@19428 602fd350-edb4-49c9-b593-d223f7449a82
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