Make WordPress Core

Changeset 38846


Ignore:
Timestamp:
10/20/2016 08:33:38 PM (8 years ago)
Author:
davidakennedy
Message:

Twenty Fifteen, Twenty Seventeen: Add documentation to filters in themes.

Documents a missing one Twenty Fifteen and all four missing ones in Twenty Seventeen.

Props brainstormforce.

Fixes #38382.

Location:
trunk/src/wp-content/themes
Files:
5 edited

Legend:

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

    r38093 r38846  
    119119
    120120    // Setup the WordPress core custom background feature.
     121
     122    /**
     123     * Filter Twenty Fifteen custom-header support arguments.
     124     *
     125     * @since Twenty Fifteen 1.0
     126     *
     127     * @param array $args {
     128     *     An array of custom-header support arguments.
     129     *
     130     *     @type string $default-color          Default color of the header.
     131     *     @type string $default-attachment     Default attachment of the header.
     132     * }
     133     */
    121134    add_theme_support( 'custom-background', apply_filters( 'twentyfifteen_custom_background_args', array(
    122135        'default-color'      => $default_color,
  • trunk/src/wp-content/themes/twentyseventeen/functions.php

    r38833 r38846  
    118118    }
    119119
     120    /**
     121     * Filter Twenty Seventeen content width of the theme.
     122     *
     123     * @since Twenty Seventeen 1.0
     124     *
     125     * @param $content_width integer
     126     */
    120127    $GLOBALS['content_width'] = apply_filters( 'twentyseventeen_content_width', $content_width );
    121128}
  • trunk/src/wp-content/themes/twentyseventeen/inc/color-patterns.php

    r38833 r38846  
    1313function twentyseventeen_custom_colors_css() {
    1414    $hue = get_theme_mod( 'colorscheme_hue', 250 );
     15
     16    /**
     17     * Filter Twenty Seventeen default saturation level.
     18     *
     19     * @since Twenty Seventeen 1.0
     20     *
     21     * @param $saturation integer
     22     */
    1523    $saturation = apply_filters( 'twentyseventeen_custom_colors_saturation', 50 );
    1624    $reduced_saturation = ( .8 * $saturation ) . '%';
  • trunk/src/wp-content/themes/twentyseventeen/inc/custom-header.php

    r38833 r38846  
    1616 */
    1717function twentyseventeen_custom_header_setup() {
     18
     19    /**
     20     * Filter Twenty Seventeen custom-header support arguments.
     21     *
     22     * @since Twenty Seventeen 1.0
     23     *
     24     * @param array $args {
     25     *     An array of custom-header support arguments.
     26     *
     27     *     @type string $default-image          Default image of the header.
     28     *     @type string $default_text_color     Default color of the header text.
     29     *     @type int    $width                  Width in pixels of the custom header image. Default 954.
     30     *     @type int    $height                 Height in pixels of the custom header image. Default 1300.
     31     *     @type string $wp-head-callback       Callback function used to styles the header image and text
     32     *                                          displayed on the blog.
     33     *     @type string $flex-height            Flex support for height of header.
     34     * }
     35     */
    1836    add_theme_support( 'custom-header', apply_filters( 'twentyseventeen_custom_header_args', array(
    1937        'default-image'      => get_parent_theme_file_uri( '/assets/images/header.jpg' ),
  • trunk/src/wp-content/themes/twentyseventeen/inc/icon-functions.php

    r38833 r38846  
    196196    );
    197197
     198    /**
     199     * Filter Twenty Seventeen social links icons.
     200     *
     201     * @since Twenty Seventeen 1.0
     202     *
     203     * @param array $social_links_icons
     204     */
    198205    return apply_filters( 'twentyseventeen_social_links_icons', $social_links_icons );
    199206}
Note: See TracChangeset for help on using the changeset viewer.