Make WordPress Core


Ignore:
Timestamp:
05/29/2024 07:41:03 PM (3 months ago)
Author:
karmatosed
Message:

Twenty Seventeen: Updates docblock for function.

The new function twentyseventeen_should_show_featured_image was missing documentation for the custom filter. This brings that in.

Props poena.
Fixes #39281.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyseventeen/functions.php

    r58206 r58237  
    691691
    692692/**
    693  * If a regular post or page, and not the front page, show the featured image below the header.
    694  * Using get_queried_object_id() here since the $post global may not be set before a call to the_post().
     693 * Show the featured image below the header on single posts and pages, unless the
     694 * page is the front page.
     695 *
     696 * Use the filter `twentyseventeen_should_show_featured_image` in a child theme or
     697 * plugin to change when the image is shown. This example prevents the image
     698 * from showing:
     699 *
     700 *     add_filter(
     701 *         'twentyseventeen_should_show_featured_image',
     702 *         '__return_false'
     703 *     );
    695704 *
    696705 * @since Twenty Seventeen 3.7
Note: See TracChangeset for help on using the changeset viewer.