Make WordPress Core

Changeset 60519


Ignore:
Timestamp:
07/28/2025 07:16:52 PM (13 months ago)
Author:
SergeyBiryukov
Message:

Twenty Fourteen: Use third-person singular verbs for function descriptions.

Reference: PHP Documentation Standards: Documenting Tips.

Props vladimiraus, mukesh27, SergeyBiryukov.
See #63692.

Location:
trunk/src/wp-content/themes/twentyfourteen
Files:
8 edited

Legend:

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

    r60453 r60519  
    33 * Twenty Fourteen functions and definitions
    44 *
    5  * Set up the theme and provides some helper functions, which are used in the
     5 * Sets up the theme and provides some helper functions, which are used in the
    66 * theme as custom template tags. Others are attached to action and filter
    77 * hooks in WordPress to change core functionality.
     
    224224
    225225/**
    226  * Adjust content_width value for image attachment template.
     226 * Adjusts content_width value for image attachment template.
    227227 *
    228228 * @since Twenty Fourteen 1.0
     
    265265
    266266/**
    267  * Register three Twenty Fourteen widget areas.
     267 * Registers three Twenty Fourteen widget areas.
    268268 *
    269269 * @since Twenty Fourteen 1.0
     
    311311if ( ! function_exists( 'twentyfourteen_font_url' ) ) :
    312312        /**
    313          * Register Lato font for Twenty Fourteen.
     313         * Registers Lato font for Twenty Fourteen.
    314314         *
    315315         * @since Twenty Fourteen 1.0
     
    333333
    334334/**
    335  * Enqueue scripts and styles for the front end.
     335 * Enqueues scripts and styles for the front end.
    336336 *
    337337 * @since Twenty Fourteen 1.0
     
    402402
    403403/**
    404  * Enqueue font stylesheet to admin screen for custom header display.
     404 * Enqueues font stylesheet to admin screen for custom header display.
    405405 *
    406406 * @since Twenty Fourteen 1.0
     
    413413
    414414/**
    415  * Add preconnect for Google Fonts.
     415 * Adds preconnect for Google Fonts.
    416416 *
    417417 * @since Twenty Fourteen 1.9
     
    439439
    440440/**
    441  * Enqueue styles for the block-based editor.
     441 * Enqueues styles for the block-based editor.
    442442 *
    443443 * @since Twenty Fourteen 2.3
     
    454454if ( ! function_exists( 'twentyfourteen_the_attached_image' ) ) :
    455455        /**
    456          * Print the attached image with a link to the next attached image.
     456         * Prints the attached image with a link to the next attached image.
    457457         *
    458458         * @since Twenty Fourteen 1.0
     
    522522if ( ! function_exists( 'twentyfourteen_list_authors' ) ) :
    523523        /**
    524          * Print a list of all site contributors who published at least one post.
     524         * Prints a list of all site contributors who published at least one post.
    525525         *
    526526         * @since Twenty Fourteen 1.0
     
    584584
    585585/**
    586  * Extend the default WordPress body classes.
     586 * Extends the default WordPress body classes.
    587587 *
    588588 * Adds body classes to denote:
     
    641641
    642642/**
    643  * Extend the default WordPress post classes.
     643 * Extends the default WordPress post classes.
    644644 *
    645645 * Adds a post class to denote:
     
    661661
    662662/**
    663  * Create a nicely formatted and more specific title element text for output
     663 * Creates a nicely formatted and more specific title element text for output
    664664 * in head of document, based on current view.
    665665 *
     
    730730
    731731/**
    732  * Register block patterns and pattern categories.
     732 * Registers block patterns and pattern categories.
    733733 *
    734734 * @since Twenty Fourteen 4.1
     
    751751
    752752/**
    753  * Add an `is_customize_preview` function if it is missing.
     753 * Adds an `is_customize_preview` function if it is missing.
    754754 *
    755755 * Enables installing Twenty Fourteen in WordPress versions before 4.0.0 when the
  • trunk/src/wp-content/themes/twentyfourteen/inc/back-compat.php

    r51155 r60519  
    1313
    1414/**
    15  * Prevent switching to Twenty Fourteen on old versions of WordPress.
     15 * Prevents switching to Twenty Fourteen on old versions of WordPress.
    1616 *
    1717 * Switches to the default theme.
     
    2727
    2828/**
    29  * Add message for unsuccessful theme switch.
     29 * Adds message for unsuccessful theme switch.
    3030 *
    3131 * Prints an update nag after an unsuccessful attempt to switch to
     
    4646
    4747/**
    48  * Prevent the Customizer from being loaded on WordPress versions prior to 3.6.
     48 * Prevents the Customizer from being loaded on WordPress versions prior to 3.6.
    4949 *
    5050 * @since Twenty Fourteen 1.0
     
    6666
    6767/**
    68  * Prevent the Theme Preview from being loaded on WordPress versions prior to 3.4.
     68 * Prevents the Theme Preview from being loaded on WordPress versions prior to 3.4.
    6969 *
    7070 * @since Twenty Fourteen 1.0
  • trunk/src/wp-content/themes/twentyfourteen/inc/custom-header.php

    r59832 r60519  
    11<?php
    22/**
    3  * Implement Custom Header functionality for Twenty Fourteen
     3 * Implements Custom Header functionality for Twenty Fourteen
    44 *
    55 * @package WordPress
     
    99
    1010/**
    11  * Set up the WordPress core custom header settings.
     11 * Sets up the WordPress core custom header settings.
    1212 *
    1313 * @since Twenty Fourteen 1.0
     
    5656if ( ! function_exists( 'twentyfourteen_header_style' ) ) :
    5757        /**
    58          * Styles the header image and text displayed on the blog
     58         * Styles the header image and text displayed on the blog.
    5959         *
    6060         * @see twentyfourteen_custom_header_setup().
     
    9696if ( ! function_exists( 'twentyfourteen_admin_header_style' ) ) :
    9797        /**
    98          * Style the header image displayed on the Appearance > Header screen.
     98         * Styles the header image displayed on the Appearance > Header screen.
    9999         *
    100100         * @see twentyfourteen_custom_header_setup()
     
    134134if ( ! function_exists( 'twentyfourteen_admin_header_image' ) ) :
    135135        /**
    136          * Create the custom header image markup displayed on the Appearance > Header screen.
     136         * Creates the custom header image markup displayed on the Appearance > Header screen.
    137137         *
    138138         * @see twentyfourteen_custom_header_setup()
     
    155155if ( ! function_exists( 'twentyfourteen_header_image' ) ) :
    156156        /**
    157          * Create the custom header image markup displayed.
     157         * Creates the custom header image markup displayed.
    158158         *
    159159         * @see twentyfourteen_custom_header_setup()
  • trunk/src/wp-content/themes/twentyfourteen/inc/customizer.php

    r60159 r60519  
    99
    1010/**
    11  * Implement Customizer additions and adjustments.
     11 * Implements Customizer additions and adjustments.
    1212 *
    1313 * @since Twenty Fourteen 1.0
     
    9696
    9797/**
    98  * Render the site title for the selective refresh partial.
     98 * Renders the site title for the selective refresh partial.
    9999 *
    100100 * @since Twenty Fourteen 1.7
     
    109109
    110110/**
    111  * Render the site tagline for the selective refresh partial.
     111 * Renders the site tagline for the selective refresh partial.
    112112 *
    113113 * @since Twenty Fourteen 1.7
     
    122122
    123123/**
    124  * Sanitize the Featured Content layout value.
     124 * Sanitizes the Featured Content layout value.
    125125 *
    126126 * @since Twenty Fourteen 1.0
     
    138138
    139139/**
    140  * Bind JS handlers to make Customizer preview reload changes asynchronously.
     140 * Binds JS handlers to make Customizer preview reload changes asynchronously.
    141141 *
    142142 * @since Twenty Fourteen 1.0
     
    148148
    149149/**
    150  * Add contextual help to the Themes and Post edit screens.
     150 * Adds contextual help to the Themes and Post edit screens.
    151151 *
    152152 * @since Twenty Fourteen 1.0
  • trunk/src/wp-content/themes/twentyfourteen/inc/featured-content.php

    r59210 r60519  
    2929
    3030        /**
    31          * Instantiate.
     31         * Instantiates.
    3232         *
    3333         * All custom functionality will be hooked into the "init" action.
     
    4040
    4141        /**
    42          * Conditionally hook into WordPress.
     42         * Conditionally hooks into WordPress.
    4343         *
    4444         * Theme must declare that they support this module by adding
     
    9090
    9191        /**
    92          * Hide "featured" tag from the front end.
     92         * Hides "featured" tag from the front end.
    9393         *
    9494         * Has to run on wp_loaded so that the preview filters of the Customizer
     
    105105
    106106        /**
    107          * Get featured posts.
     107         * Gets featured posts.
    108108         *
    109109         * @since Twenty Fourteen 1.0
     
    130130
    131131        /**
    132          * Get featured post IDs
     132         * Gets featured post IDs.
    133133         *
    134134         * This function will return the an array containing the
     
    180180
    181181        /**
    182          * Return an array with IDs of posts marked as sticky.
     182         * Returns an array with IDs of posts marked as sticky.
    183183         *
    184184         * @since Twenty Fourteen 1.0
     
    191191
    192192        /**
    193          * Delete featured content IDs transient.
     193         * Deletes featured content IDs transient.
    194194         *
    195195         * Hooks in the "save_post" action.
     
    204204
    205205        /**
    206          * Exclude featured posts from the home page blog query.
    207          *
    208          * Filter the home page posts, and remove any featured post ID's from it.
     206         * Excludes featured posts from the home page blog query.
     207         *
     208         * Filters the home page posts, and removes any featured post ID's from it.
    209209         * Hooked onto the 'pre_get_posts' action, this changes the parameters of
    210210         * the query before it gets any posts.
     
    246246
    247247        /**
    248          * Reset tag option when the saved tag is deleted.
     248         * Resets tag option when the saved tag is deleted.
    249249         *
    250250         * It's important to mention that the transient needs to be deleted,
     
    273273
    274274        /**
    275          * Hide featured tag from displaying when global terms are queried from the front end.
     275         * Hides featured tag from displaying when global terms are queried from the front end.
    276276         *
    277277         * Hooks into the "get_terms" filter.
     
    319319
    320320        /**
    321          * Hide featured tag from display when terms associated with a post object
     321         * Hides featured tag from display when terms associated with a post object
    322322         * are queried from the front end.
    323323         *
     
    361361
    362362        /**
    363          * Register custom setting on the Settings -> Reading screen.
     363         * Registers custom setting on the Settings -> Reading screen.
    364364         *
    365365         * @since Twenty Fourteen 1.0
     
    370370
    371371        /**
    372          * Add settings to the Customizer.
     372         * Adds settings to the Customizer.
    373373         *
    374374         * @since Twenty Fourteen 1.0
     
    431431
    432432        /**
    433          * Enqueue the tag suggestion script.
     433         * Enqueues the tag suggestion script.
    434434         *
    435435         * @since Twenty Fourteen 1.0
     
    440440
    441441        /**
    442          * Get featured content settings.
    443          *
    444          * Get all settings recognized by this module. This function
     442         * Gets featured content settings.
     443         *
     444         * Gets all settings recognized by this module. This function
    445445         * will return all settings whether or not they have been stored
    446446         * in the database yet. This ensures that all keys are available
     
    476476
    477477        /**
    478          * Validate featured content settings.
    479          *
    480          * Make sure that all user supplied content is in an expected
     478         * Validates featured content settings.
     479         *
     480         * Makes sure that all user supplied content is in an expected
    481481         * format before saving to the database. This function will also
    482482         * delete the transient set in Featured_Content::get_featured_content().
  • trunk/src/wp-content/themes/twentyfourteen/inc/template-tags.php

    r59851 r60519  
    1010if ( ! function_exists( 'twentyfourteen_paging_nav' ) ) :
    1111        /**
    12          * Display navigation to next/previous set of posts when applicable.
     12         * Displays navigation to next/previous set of posts when applicable.
    1313         *
    1414         * @since Twenty Fourteen 1.0
     
    7575if ( ! function_exists( 'twentyfourteen_post_nav' ) ) :
    7676        /**
    77          * Display navigation to next/previous post when applicable.
     77         * Displays navigation to next/previous post when applicable.
    7878         *
    7979         * @since Twenty Fourteen 1.0
     
    113113if ( ! function_exists( 'twentyfourteen_posted_on' ) ) :
    114114        /**
    115          * Print HTML with meta information for the current post-date/time and author.
     115         * Prints HTML with meta information for the current post-date/time and author.
    116116         *
    117117         * @since Twenty Fourteen 1.0
     
    135135
    136136/**
    137  * Find out if blog has more than one category.
     137 * Finds out if blog has more than one category.
    138138 *
    139139 * @since Twenty Fourteen 1.0
     
    167167
    168168/**
    169  * Flush out the transients used in twentyfourteen_categorized_blog.
     169 * Flushes out the transients used in twentyfourteen_categorized_blog.
    170170 *
    171171 * @since Twenty Fourteen 1.0
     
    180180if ( ! function_exists( 'twentyfourteen_post_thumbnail' ) ) :
    181181        /**
    182          * Display an optional post thumbnail.
     182         * Displays an optional post thumbnail.
    183183         *
    184184         * Wraps the post thumbnail in an anchor element on index
     
    247247if ( ! function_exists( 'wp_body_open' ) ) :
    248248        /**
    249          * Fire the wp_body_open action.
     249         * Fires the wp_body_open action.
    250250         *
    251251         * Added for backward compatibility to support pre-5.2.0 WordPress versions.
  • trunk/src/wp-content/themes/twentyfourteen/inc/widgets.php

    r59158 r60519  
    4646
    4747        /**
    48          * Enqueue scripts.
     48         * Enqueues scripts.
    4949         *
    5050         * @since Twenty Fourteen 1.7
     
    6363
    6464        /**
    65          * Output the HTML for this widget.
     65         * Outputs the HTML for this widget.
    6666         *
    6767         * @since Twenty Fourteen 1.0
     
    257257
    258258        /**
    259          * Deal with the settings when they are saved by the admin.
     259         * Deals with the settings when they are saved by the admin.
    260260         *
    261261         * Here is where any validation should happen.
     
    281281
    282282        /**
    283          * Display the form for this widget on the Widgets page of the Admin area.
     283         * Displays the form for this widget on the Widgets page of the Admin area.
    284284         *
    285285         * @since Twenty Fourteen 1.0
  • trunk/src/wp-content/themes/twentyfourteen/js/functions.js

    r55861 r60519  
    9696
    9797        /**
    98          * Add or remove ARIA attributes.
     98         * Adds or removes ARIA attributes.
    9999         *
    100100         * Uses jQuery's width() function to determine the size of the window and add
Note: See TracChangeset for help on using the changeset viewer.