| 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 | */ |
| 333 | function 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 | } |
| 348 | add_action( 'load-themes.php', 'twentyfourteen_contextual_help' ); |
| 349 | add_action( 'load-edit.php', 'twentyfourteen_contextual_help' ); |