Make WordPress Core


Ignore:
Timestamp:
11/14/2013 04:52:06 AM (11 years ago)
Author:
lancewillett
Message:

Twenty Fourteen: first pass at adding help text to to "Help" tab for edit.php and themes.php screens. Props obenland for starter patch, see #25837.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfourteen/inc/customizer.php

    r26135 r26153  
    322322}
    323323add_action( 'wp_enqueue_scripts', 'twentyfourteen_customizer_styles' );
     324
     325/**
     326 * Adds contextual help to the Themes and Post edit screens.
     327 *
     328 * @since Twenty Fourteen 1.0
     329 *
     330 * @return void
     331 */
     332function twentyfourteen_contextual_help() {
     333    get_current_screen()->add_help_tab( array(
     334        'id'      => 'twentyfourteen',
     335        'title'   => __( 'Twenty Fourteen', 'twentyfourteen' ),
     336        'content' =>
     337            '<ul>' .
     338                '<li>' . sprintf( _x( 'The home page features your choice of up to 6 posts prominently displayed in a grid or slider, controlled by the <a href="%1$s">"featured" tag</a>; you can change the tag and layout in <a href="%2$s">Appearance > Customize</a>. If no posts match the tag, <a href="%3$s">"sticky" posts</a> will be displayed instead.', '1: Link to posts with "featured" tag; 2: Link to Customizer; 3: Link to sticky posts.', 'twentyfourteen' ), admin_url( '/edit.php?tag=featured' ), admin_url( 'customize.php' ), admin_url( '/edit.php?show_sticky=1' ) ). '</li>' .
     339                '<li>' . sprintf( _x( 'Enhance your site design by using <a href="%s">Featured Images</a> for posts you&rsquo;d like to stand out (also known as post thumbnails). This allows you to associate an image with your post without inserting it. Twenty Fourteen uses featured images for posts and pages&mdash;above the title&mdash;and in the Featured Content area on the home page.', 'Link to How-to article.', 'twentyfourteen' ), 'http://codex.wordpress.org/Post_Thumbnails#Setting_a_Post_Thumbnail' ) . '</li>' .
     340            '</ul>',
     341    ) );
     342}
     343add_action( 'admin_head-themes.php', 'twentyfourteen_contextual_help' );
     344add_action( 'admin_head-edit.php',   'twentyfourteen_contextual_help' );
Note: See TracChangeset for help on using the changeset viewer.