Make WordPress Core

Ticket #25837: 25837.1.diff

File 25837.1.diff, 1.6 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 * @param WP_Screen $current_screen An object of the current admin page.
     331 * @return void
     332 */
     333function twentyfourteen_contextual_help( $current_screen ) {
     334        if ( 'themes' == $current_screen->id || 'edit-post' == $current_screen->id ) {
     335                $current_screen->add_help_tab( array(
     336                        'id'      => 'twentyfourteen',
     337                        'title'   => __( 'Title', 'twentyfourteen' ),
     338                        'content' =>
     339                                '<ul>' .
     340                                        '<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>' .
     341                                        '<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>' .
     342                                '</ul>',
     343                ) );
     344        }
     345}
     346add_action( 'current_screen', 'twentyfourteen_contextual_help' );