Changeset 19428
- Timestamp:
- 11/23/2011 09:29:33 PM (9 years ago)
- Location:
- trunk/wp-admin/includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/screen.php
r19418 r19428 106 106 107 107 return apply_filters( 'hidden_meta_boxes', $hidden, $screen, $use_defaults ); 108 }109 110 /**111 * Convert a screen string to a screen object112 *113 * @since 3.0.0114 *115 * @param string $hook_name The hook name (also known as the hook suffix) used to determine the screen.116 * @return WP_Screen Screen object.117 */118 function convert_to_screen( $hook_name ) {119 return WP_Screen::get( $hook_name );120 108 } 121 109 -
trunk/wp-admin/includes/template.php
r19419 r19428 1797 1797 1798 1798 add_action( 'admin_enqueue_scripts', array( 'WP_Internal_Pointers', 'enqueue_scripts' ) ); 1799 1800 /** 1801 * Convert a screen string to a screen object 1802 * 1803 * @since 3.0.0 1804 * 1805 * @param string $hook_name The hook name (also known as the hook suffix) used to determine the screen. 1806 * @return WP_Screen Screen object. 1807 */ 1808 function convert_to_screen( $hook_name ) { 1809 if ( ! is_admin() ) { 1810 _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' ); 1811 return (object) array( 'id' => '_invalid', 'base' => '_are_belong_to_us' ); 1812 } 1813 1814 return WP_Screen::get( $hook_name ); 1815 }
Note: See TracChangeset
for help on using the changeset viewer.