Changeset 20218 for trunk/wp-includes/theme.php
- Timestamp:
- 03/19/2012 09:14:41 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/theme.php
r20214 r20218 1084 1084 1085 1085 /** 1086 * Add callbacks for image header display.1087 *1088 * @since 2.1.01089 * @deprecated 3.4.01090 * @deprecated Use add_theme_support('custom-header', $args)1091 * @see add_theme_support()1092 *1093 * @param callback $header_callback Call on 'wp_head' action.1094 * @param callback $admin_header_callback Call on custom header administration screen.1095 * @param callback $admin_image_div_callback Output a custom header image div on the custom header administration screen. Optional.1096 */1097 function add_custom_image_header( $header_callback, $admin_header_callback, $admin_image_div_callback = '' ) {1098 # _deprecated_function( __FUNCTION__, '3.4', 'add_theme_support(\'custom-header\', $args)' );1099 return add_theme_support( 'custom-header', array(1100 'callback' => $header_callback,1101 'admin-header-callback' => $admin_header_callback,1102 'admin-image-div-callback' => $admin_image_div_callback,1103 ) );1104 }1105 1106 /**1107 * Remove image header support.1108 *1109 * @since 3.1.01110 * @deprecated 3.4.01111 * @deprecated Use remove_theme_support('custom-header')1112 * @see remove_theme_support()1113 *1114 * @return bool Whether support was removed.1115 */1116 function remove_custom_image_header() {1117 # _deprecated_function( __FUNCTION__, '3.4', 'remove_theme_support(\'custom-header\')' );1118 return remove_theme_support( 'custom-header' );1119 }1120 1121 /**1122 1086 * Register a selection of default headers to be displayed by the custom header admin UI. 1123 1087 * … … 1194 1158 function background_color() { 1195 1159 echo get_background_color(); 1196 }1197 1198 /**1199 * Add callbacks for background image display.1200 *1201 * The parameter $header_callback callback will be required to display the1202 * content for the 'wp_head' action. The parameter $admin_header_callback1203 * callback will be added to Custom_Background class and that will be added1204 * to the 'admin_menu' action.1205 *1206 * @since 3.0.01207 * @uses Custom_Background Sets up for $admin_header_callback for administration panel display.1208 *1209 * @param callback $header_callback Call on 'wp_head' action.1210 * @param callback $admin_header_callback Call on custom background administration screen.1211 * @param callback $admin_image_div_callback Output a custom background image div on the custom background administration screen. Optional.1212 */1213 function add_custom_background( $header_callback = '', $admin_header_callback = '', $admin_image_div_callback = '' ) {1214 # _deprecated_function( __FUNCTION__, '3.4', 'add_theme_support(\'custom-background\', $args)' );1215 return add_theme_support( 'custom-background', array(1216 'callback' => $header_callback,1217 'admin-header-callback' => $admin_header_callback,1218 'admin-image-div-callback' => $admin_image_div_callback,1219 ) );1220 }1221 1222 /**1223 * Remove custom background support.1224 *1225 * @since 3.1.01226 * @see add_custom_background()1227 *1228 * @return bool Whether support was removed.1229 */1230 function remove_custom_background() {1231 # _deprecated_function( __FUNCTION__, '3.4', 'remove_theme_support(\'custom-background\')' );1232 return remove_theme_support( 'custom-background' );1233 1160 } 1234 1161 … … 1503 1430 $custom_background = new Custom_Background( $args[0]['admin-header-callback'], $args[0]['admin-image-div-callback'] ); 1504 1431 } 1505 } 1432 } 1506 1433 } 1507 1434 add_action( 'wp_loaded', '_custom_header_background_just_in_time' );
Note: See TracChangeset
for help on using the changeset viewer.