Make WordPress Core

Ticket #25837: 25837.diff

File 25837.diff, 1.5 KB (added by obenland, 11 years ago)
  • 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 * @global $typenow
     331 * @return void
     332 */
     333function twentyfourteen_contextual_help() {
     334        global $typenow;
     335
     336        if ( empty( $typenow ) || 'post' == $typenow ) {
     337                get_current_screen()->add_help_tab( array(
     338                        'id'      => 'twentyfourteen',
     339                        'title'   => __( 'Title', 'twentyfourteen' ),
     340                        'content' =>
     341                                '<ul>' .
     342                                        '<li>' . sprintf( _x( 'Easily feature all posts with the <a href="%1$s">"featured" tag</a> or a tag of your choice; if no posts match the tag, <a href="%2$s">"sticky" posts</a> will be displayed instead.', '1: Link to posts with "featured" tag; 2: Link to sticky posts.', 'twentyfourteen' ), admin_url( '/edit.php?tag=featured' ), admin_url( '/edit.php?show_sticky=1' ) ). '</li>' .
     343                                        '<li>' . sprintf( _x( 'Enhance your design with <a href="%s">Featured Images</a>', 'Link to How-to article.', 'twentyfourteen' ), '[link to how-to article]' ) . '</li>' .
     344                                '</ul>'
     345                ) );
     346        }
     347}
     348add_action( 'load-themes.php', 'twentyfourteen_contextual_help' );
     349add_action( 'load-edit.php',   'twentyfourteen_contextual_help' );