WordPress.org

Make WordPress Core

Changeset 18858


Ignore:
Timestamp:
10/01/11 18:07:41 (3 years ago)
Author:
nacin
Message:

Deprecate secreen_options(), screen_layout(). see #18785.

Location:
trunk/wp-admin/includes
Files:
2 edited

Legend:

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

    r18632 r18858  
    704704 
    705705/** 
    706  * @since 2.7 
     706 * @since 2.7.0 
    707707 * @deprecated 3.3 
    708  * @deprecated Use wp_editor(). 
     708 * @deprecated Use wp_editor() 
    709709 * @see wp_editor() 
    710710 */ 
     
    715715} 
    716716 
    717 // see WP_Editor for the next 4 
     717/** 
     718 * @deprecated 3.3.0 
     719 * @deprecated Use wp_editor() 
     720 * @see wp_editor() 
     721 */ 
    718722function wp_preload_dialogs() { 
    719     _deprecated_function( __FUNCTION__, '3.3' ); 
    720 } 
    721  
     723    _deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' ); 
     724} 
     725 
     726/** 
     727 * @deprecated 3.3.0 
     728 * @deprecated Use wp_editor() 
     729 * @see wp_editor() 
     730 */ 
    722731function wp_print_editor_js() { 
    723     _deprecated_function( __FUNCTION__, '3.3' ); 
    724 } 
    725  
     732    _deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' ); 
     733} 
     734 
     735/** 
     736 * @deprecated 3.3.0 
     737 * @deprecated Use wp_editor() 
     738 * @see wp_editor() 
     739 */ 
    726740function wp_quicktags() { 
    727     _deprecated_function( __FUNCTION__, '3.3' ); 
    728 } 
    729  
     741    _deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' ); 
     742} 
     743 
     744/** 
     745 * @deprecated 3.3.0 
     746 * @deprecated Use wp_editor() 
     747 * @see wp_editor() 
     748 */ 
    730749function wp_fullscreen_html() { 
    731     _deprecated_function( __FUNCTION__, '3.3' ); 
    732 } 
    733  
     750    _deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' ); 
     751} 
     752 
     753/** 
     754 * Returns the screen layout options. 
     755 * 
     756 * @since unknown 
     757 * @deprecated 3.3.0 
     758 * @deprecated Use $current_screen->render_screen_layout() 
     759 * @see WP_Screen::render_screen_layout() 
     760 */ 
     761function screen_layout( $screen ) { 
     762    _deprecated_function( __FUNCTION__, '3.3', '$current_screen->render_screen_layout()' ); 
     763 
     764    $current_screen = get_current_screen(); 
     765 
     766    if ( ! $current_screen ) 
     767        return ''; 
     768 
     769    ob_start(); 
     770    $current_screen->render_screen_layout(); 
     771    return ob_get_clean(); 
     772} 
     773 
     774/** 
     775 * Returns the screen's per-page options. 
     776 * 
     777 * @since unknown 
     778 * @deprecated 3.3.0 
     779 * @deprecated Use $current_screen->render_per_page_options() 
     780 * @see WP_Screen::render_per_page_options() 
     781 */ 
     782function screen_options( $screen ) { 
     783    _deprecated_function( __FUNCTION__, '3.3', '$current_screen->render_per_page_options()' ); 
     784 
     785    $current_screen = get_current_screen(); 
     786 
     787    if ( ! $current_screen ) 
     788        return ''; 
     789 
     790    ob_start(); 
     791    $current_screen->render_per_page_options(); 
     792    return ob_get_clean(); 
     793} 
  • trunk/wp-admin/includes/screen.php

    r18857 r18858  
    267267 
    268268/** 
    269  * Returns the screen layout options. 
    270  * 
    271  * @todo: deprecate? 
    272  */ 
    273 function screen_layout($screen) { 
    274     $current_screen = get_current_screen(); 
    275  
    276     if ( ! $current_screen ) 
    277         return ''; 
    278  
    279     ob_start(); 
    280     $current_screen->render_screen_layout(); 
    281     $screen_layout = ob_get_clean(); 
    282  
    283     return $screen_layout; 
    284 } 
    285  
    286 /** 
    287269 * Register and configure an admin screen option 
    288270 * 
     
    300282 
    301283    return $current_screen->add_option( $option, $args ); 
    302 } 
    303  
    304  
    305 /** 
    306  * Returns the screen's per-page options. 
    307  * 
    308  * @todo: deprecate? 
    309  */ 
    310 function screen_options($screen) { 
    311     $current_screen = get_current_screen(); 
    312  
    313     if ( ! $current_screen ) 
    314         return ''; 
    315  
    316     ob_start(); 
    317     $current_screen->render_per_page_options(); 
    318     $per_page_options = ob_get_clean(); 
    319  
    320     return $per_page_options; 
    321284} 
    322285 
Note: See TracChangeset for help on using the changeset viewer.