Make WordPress Core

Changeset 15019


Ignore:
Timestamp:
05/28/2010 12:27:53 AM (14 years ago)
Author:
nacin
Message:

Custom header and background help. props jane, see #13467.

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/custom-background.php

    r15016 r15019  
    3535
    3636    /**
     37     * Holds the page menu hook.
     38     *
     39     * @var string
     40     * @since 3.0.0
     41     * @access private
     42     */
     43    var $page = '';
     44
     45    /**
    3746     * PHP4 Constructor - Register administration header callback.
    3847     *
     
    5665            return;
    5766
    58         $page = add_theme_page(__('Background'), __('Background'), 'edit_theme_options', 'custom-background', array(&$this, 'admin_page'));
     67        $this->page = $page = add_theme_page(__('Background'), __('Background'), 'edit_theme_options', 'custom-background', array(&$this, 'admin_page'));
    5968
    6069        add_action("load-$page", array(&$this, 'admin_load'));
     
    7281     */
    7382    function admin_load() {
     83        add_contextual_help( $this->page, '<p>' . __( 'You can set a custom image header for your site. Simply upload the image and crop it, and the new header will go live immediately. ' ) . '</p>' .
     84        '<p>' . __( 'If you want to discard your custom header and go back to the default included in your theme, click on the buttons to remove the custom image and restore the original header image. ' ) . '</p>' .
     85        '<p>' . __( 'Some themes comes with additional header images bundled. If you see multiple images displayed, select the one you&#8217;d like and click the Save Changes button. ' ) . '</p>' .
     86        '<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
     87        '<p>' . __( '<a href="http://codex.wordpress.org/" target="_blank">Documentation</a>' ) . '</p>' .
     88        '<p>' . __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>' );
    7489        wp_enqueue_script('custom-background');
    7590        wp_enqueue_style('farbtastic');
  • trunk/wp-admin/custom-header.php

    r14924 r15019  
    4444
    4545    /**
     46     * Holds the page menu hook.
     47     *
     48     * @var string
     49     * @since 3.0.0
     50     * @access private
     51     */
     52    var $page = '';
     53
     54    /**
    4655     * PHP4 Constructor - Register administration header callback.
    4756     *
     
    6574            return;
    6675
    67         $page = add_theme_page(__('Header'), __('Header'), 'edit_theme_options', 'custom-header', array(&$this, 'admin_page'));
     76        $this->page = $page = add_theme_page(__('Header'), __('Header'), 'edit_theme_options', 'custom-header', array(&$this, 'admin_page'));
    6877
    6978        add_action("admin_print_scripts-$page", array(&$this, 'js_includes'));
    7079        add_action("admin_print_styles-$page", array(&$this, 'css_includes'));
     80        add_action("admin_head-$page", array(&$this, 'help') );
    7181        add_action("admin_head-$page", array(&$this, 'take_action'), 50);
    7282        add_action("admin_head-$page", array(&$this, 'js'), 50);
    7383        add_action("admin_head-$page", $this->admin_header_callback, 51);
     84    }
     85
     86    /**
     87     * Adds contextual help.
     88     *
     89     * @since 3.0.0
     90     */
     91    function help() {
     92        add_contextual_help( $this->page, '<p>' . __( 'You can set a custom image header for your site. Simply upload the image and crop it, and the new header will go live immediately. ' ) . '</p>' .
     93        '<p>' . __( 'If you want to discard your custom header and go back to the default included in your theme, click on the buttons to remove the custom image and restore the original header image. ' ) . '</p>' .
     94        '<p>' . __( 'Some themes comes with additional header images bundled. If you see multiple images displayed, select the one you&#8217;d like and click the Save Changes button. ' ) . '</p>' .
     95        '<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
     96        '<p>' . __( '<a href="http://codex.wordpress.org/" target="_blank">Documentation</a>' ) . '</p>' .
     97        '<p>' . __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>' );
    7498    }
    7599
Note: See TracChangeset for help on using the changeset viewer.