WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/28/2010 07:00:16 PM (12 years ago)
Author:
ryan
Message:

Send user back to main custom header page after cropping and setting image. Add support for a custom image div callback for greather theme flexibility. Props dphiffer. see #11855

File:
1 edited

Legend:

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

    r12733 r12890  
    12991299 *
    13001300 * @param callback $header_callback Call on 'wp_head' action.
    1301  * @param callback $admin_header_callback Call on administration panels.
    1302  */
    1303 function add_custom_image_header($header_callback, $admin_header_callback) {
     1301 * @param callback $admin_header_callback Call on custom header administration screen.
     1302 * @param callback $admin_image_div_callback Output a custom header image div on the custom header administration screen. Optional.
     1303 */
     1304function add_custom_image_header($header_callback, $admin_header_callback, $admin_image_div_callback = '') {
    13041305    if ( ! empty($header_callback) )
    13051306        add_action('wp_head', $header_callback);
     
    13081309        return;
    13091310    require_once(ABSPATH . 'wp-admin/custom-header.php');
    1310     $GLOBALS['custom_image_header'] =& new Custom_Image_Header($admin_header_callback);
     1311    $GLOBALS['custom_image_header'] =& new Custom_Image_Header($admin_header_callback, $admin_image_div_callback);
    13111312    add_action('admin_menu', array(&$GLOBALS['custom_image_header'], 'init'));
    13121313}
Note: See TracChangeset for help on using the changeset viewer.