Make WordPress Core


Ignore:
Timestamp:
03/21/2012 03:36:17 AM (12 years ago)
Author:
nacin
Message:

Callbacks for custom headers and custom backgrounds registered through add_theme_support() are now wp-head-callback, admin-head-callback, and admin-preview-callback. see #19910.

File:
1 edited

Legend:

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

    r20220 r20231  
    29912991 * @see add_theme_support()
    29922992 *
    2993  * @param callback $callback Call on 'wp_head' action.
    2994  * @param callback $admin_header_callback Call on custom header administration screen.
    2995  * @param callback $admin_image_div_callback Output a custom header image div on the custom header administration screen. Optional.
    2996  */
    2997 function add_custom_image_header( $callback, $admin_header_callback, $admin_image_div_callback = '' ) {
     2993 * @param callback $wp_head_callback Call on 'wp_head' action.
     2994 * @param callback $admin_head_callback Call on custom header administration screen.
     2995 * @param callback $admin_preview_callback Output a custom header image div on the custom header administration screen. Optional.
     2996 */
     2997function add_custom_image_header( $wp_head_callback = '', $admin_head_callback = '', $admin_preview_callback = '' ) {
    29982998    _deprecated_function( __FUNCTION__, '3.4', 'add_theme_support( \'custom-header\', $args )' );
    29992999    return add_theme_support( 'custom-header', array(
    3000         'callback' => $callback,
    3001         'admin-header-callback' => $admin_header_callback,
    3002         'admin-image-div-callback' => $admin_image_div_callback,
     3000        'wp-head-callback' => $wp_head_callback,
     3001        'admin-head-callback' => $admin_head_callback,
     3002        'admin-preview-callback' => $admin_preview_callback,
    30033003    ) );
    30043004}
     
    30223022 * Add callbacks for background image display.
    30233023 *
    3024  * The parameter $header_callback callback will be required to display the
    3025  * content for the 'wp_head' action. The parameter $admin_header_callback
    3026  * callback will be added to Custom_Background class and that will be added
    3027  * to the 'admin_menu' action.
    3028  *
    30293024 * @since 3.0.0
    3030  * @uses Custom_Background Sets up for $admin_header_callback for administration panel display.
    3031  *
    3032  * @param callback $callback Call on 'wp_head' action.
    3033  * @param callback $admin_header_callback Call on custom background administration screen.
    3034  * @param callback $admin_image_div_callback Output a custom background image div on the custom background administration screen. Optional.
    3035  */
    3036 function add_custom_background( $callback = '', $admin_header_callback = '', $admin_image_div_callback = '' ) {
     3025 * @deprecated 3.4.0
     3026 * @deprecated Use add_theme_support('custom-background, $args)
     3027 * @see add_theme_support()
     3028 *
     3029 * @param callback $wp_head_callback Call on 'wp_head' action.
     3030 * @param callback $admin_head_callback Call on custom background administration screen.
     3031 * @param callback $admin_preview_callback Output a custom background image div on the custom background administration screen. Optional.
     3032 */
     3033function add_custom_background( $wp_head_callback = '', $admin_head_callback = '', $admin_preview_callback = '' ) {
    30373034    _deprecated_function( __FUNCTION__, '3.4', 'add_theme_support( \'custom-background\', $args )' );
    30383035
    30393036    return add_theme_support( 'custom-background', array(
    3040         'callback' => $callback,
    3041         'admin-header-callback' => $admin_header_callback,
    3042         'admin-image-div-callback' => $admin_image_div_callback,
     3037        'wp-head-callback' => $wp_head_callback,
     3038        'admin-head-callback' => $admin_head_callback,
     3039        'admin-preview-callback' => $admin_preview_callback,
    30433040    ) );
    30443041}
Note: See TracChangeset for help on using the changeset viewer.