Make WordPress Core

Ticket #25837: 25837.2.diff

File 25837.2.diff, 2.0 KB (added by lancewillett, 11 years ago)

Working from obenland's .1 patch, proper actions and better title and text

  • wp-content/themes/twentyfourteen/inc/customizer.php

     
    321321        wp_add_inline_style( 'twentyfourteen-style', $css );
    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' );