Make WordPress Core


Ignore:
Timestamp:
11/23/2011 09:29:33 PM (14 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/screen.php

    r19418 r19428  
    106106
    107107    return apply_filters( 'hidden_meta_boxes', $hidden, $screen, $use_defaults );
    108 }
    109 
    110 /**
    111  * Convert a screen string to a screen object
    112  *
    113  * @since 3.0.0
    114  *
    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 );
    120108}
    121109
Note: See TracChangeset for help on using the changeset viewer.