Twenty Twenty: Use third-person singular verbs for function descriptions.
Reference: [https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#documenting-tips PHP Documentation Standards: Documenting Tips]. Props vladimiraus, mukesh27, SergeyBiryukov. See #63692. Built from https://develop.svn.wordpress.org/trunk@60536 git-svn-id: http://core.svn.wordpress.org/trunk@59872 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -49,7 +49,7 @@ _twentyTwentyColor.prototype.setAccentColorsArray = function() {
|
||||
} ),
|
||||
item,
|
||||
/**
|
||||
* Get a score for this color in contrast to its background color and surrounding text.
|
||||
* Gets a score for this color in contrast to its background color and surrounding text.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
*
|
||||
@@ -110,7 +110,7 @@ _twentyTwentyColor.prototype.setAccentColorsArray = function() {
|
||||
};
|
||||
|
||||
/**
|
||||
* Get accessible text-color.
|
||||
* Gets accessible text-color.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
*
|
||||
@@ -121,7 +121,7 @@ _twentyTwentyColor.prototype.getTextColor = function() {
|
||||
};
|
||||
|
||||
/**
|
||||
* Get accessible color for the defined accent-hue and background-color.
|
||||
* Gets accessible color for the defined accent-hue and background-color.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
*
|
||||
@@ -141,7 +141,7 @@ _twentyTwentyColor.prototype.getAccentColor = function() {
|
||||
};
|
||||
|
||||
/**
|
||||
* Return a new instance of the _twentyTwentyColor object.
|
||||
* Returns a new instance of the _twentyTwentyColor object.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
*
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
( function( $, api, _ ) {
|
||||
/**
|
||||
* Return a value for our partial refresh.
|
||||
* Returns a value for our partial refresh.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
*
|
||||
@@ -31,7 +31,7 @@
|
||||
api.selectiveRefresh.partialConstructor.cover_fixed = api.selectiveRefresh.Partial.extend( {
|
||||
|
||||
/**
|
||||
* Override the refresh method.
|
||||
* Overrides the refresh method.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
*
|
||||
@@ -65,7 +65,7 @@
|
||||
attrs: {},
|
||||
|
||||
/**
|
||||
* Override the refresh method.
|
||||
* Overrides the refresh method.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
*
|
||||
@@ -151,7 +151,7 @@
|
||||
} );
|
||||
|
||||
/**
|
||||
* Add styles to elements in the preview pane.
|
||||
* Adds styles to elements in the preview pane.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
*
|
||||
|
||||
@@ -16,7 +16,7 @@ if ( ! class_exists( 'TwentyTwenty_Customize' ) ) {
|
||||
class TwentyTwenty_Customize {
|
||||
|
||||
/**
|
||||
* Register customizer options.
|
||||
* Registers customizer options.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
*
|
||||
@@ -26,7 +26,7 @@ if ( ! class_exists( 'TwentyTwenty_Customize' ) ) {
|
||||
|
||||
/**
|
||||
* Site Title & Description.
|
||||
* */
|
||||
*/
|
||||
$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
|
||||
$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
|
||||
|
||||
@@ -439,7 +439,7 @@ if ( ! class_exists( 'TwentyTwenty_Customize' ) ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sanitize select.
|
||||
* Sanitizes a select input.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
*
|
||||
@@ -454,7 +454,7 @@ if ( ! class_exists( 'TwentyTwenty_Customize' ) ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sanitize boolean for checkbox.
|
||||
* Sanitizes a boolean for checkbox.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
*
|
||||
@@ -476,7 +476,7 @@ if ( ! class_exists( 'TwentyTwenty_Customize' ) ) {
|
||||
* */
|
||||
if ( ! function_exists( 'twentytwenty_customize_partial_blogname' ) ) {
|
||||
/**
|
||||
* Render the site title for the selective refresh partial.
|
||||
* Renders the site title for the selective refresh partial.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
*/
|
||||
@@ -487,7 +487,7 @@ if ( ! function_exists( 'twentytwenty_customize_partial_blogname' ) ) {
|
||||
|
||||
if ( ! function_exists( 'twentytwenty_customize_partial_blogdescription' ) ) {
|
||||
/**
|
||||
* Render the site description for the selective refresh partial.
|
||||
* Renders the site description for the selective refresh partial.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
*/
|
||||
@@ -498,7 +498,7 @@ if ( ! function_exists( 'twentytwenty_customize_partial_blogdescription' ) ) {
|
||||
|
||||
if ( ! function_exists( 'twentytwenty_customize_partial_site_logo' ) ) {
|
||||
/**
|
||||
* Render the site logo for the selective refresh partial.
|
||||
* Renders the site logo for the selective refresh partial.
|
||||
*
|
||||
* Doing it this way so we don't have issues with `render_callback`'s arguments.
|
||||
*
|
||||
|
||||
@@ -18,9 +18,9 @@ if ( ! class_exists( 'TwentyTwenty_Non_Latin_Languages' ) ) {
|
||||
class TwentyTwenty_Non_Latin_Languages {
|
||||
|
||||
/**
|
||||
* Get custom CSS.
|
||||
* Gets custom CSS.
|
||||
*
|
||||
* Return CSS for non-latin language, if available, or null
|
||||
* Returns CSS for non-latin language, if available, or null.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
*
|
||||
|
||||
@@ -17,7 +17,7 @@ if ( class_exists( 'WP_Customize_Control' ) ) {
|
||||
*/
|
||||
class TwentyTwenty_Separator_Control extends WP_Customize_Control {
|
||||
/**
|
||||
* Render the hr.
|
||||
* Renders the hr.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
*/
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
if ( ! class_exists( 'TwentyTwenty_SVG_Icons' ) ) {
|
||||
/**
|
||||
* SVG ICONS CLASS
|
||||
* Retrieve the SVG code for the specified icon. Based on a solution in Twenty Nineteen.
|
||||
* Retrieves the SVG code for the specified icon. Based on a solution in Twenty Nineteen.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
*/
|
||||
class TwentyTwenty_SVG_Icons {
|
||||
/**
|
||||
* GET SVG CODE
|
||||
* Get the SVG code for the specified icon
|
||||
* Gets the SVG code for the specified icon.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
*
|
||||
@@ -120,7 +120,7 @@ if ( ! class_exists( 'TwentyTwenty_SVG_Icons' ) ) {
|
||||
|
||||
/**
|
||||
* ICON STORAGE
|
||||
* Store the code for all SVGs in an array.
|
||||
* Stores the code for all SVGs in an array.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
* @var array
|
||||
|
||||
@@ -176,7 +176,7 @@ require get_template_directory() . '/classes/class-twentytwenty-non-latin-langua
|
||||
require get_template_directory() . '/inc/custom-css.php';
|
||||
|
||||
/**
|
||||
* Register block patterns and pattern categories.
|
||||
* Registers block patterns and pattern categories.
|
||||
*
|
||||
* @since Twenty Twenty 2.8
|
||||
*/
|
||||
@@ -187,7 +187,7 @@ function twentytwenty_register_block_patterns() {
|
||||
add_action( 'init', 'twentytwenty_register_block_patterns' );
|
||||
|
||||
/**
|
||||
* Register and Enqueue Styles.
|
||||
* Registers and Enqueues Styles.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
* @since Twenty Twenty 2.6 Enqueue the CSS file for the variable font.
|
||||
@@ -215,7 +215,7 @@ function twentytwenty_register_styles() {
|
||||
add_action( 'wp_enqueue_scripts', 'twentytwenty_register_styles' );
|
||||
|
||||
/**
|
||||
* Register and Enqueue Scripts.
|
||||
* Registers and Enqueues Scripts.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
*/
|
||||
@@ -240,7 +240,7 @@ function twentytwenty_register_scripts() {
|
||||
add_action( 'wp_enqueue_scripts', 'twentytwenty_register_scripts' );
|
||||
|
||||
/**
|
||||
* Fix skip link focus in IE11.
|
||||
* Fixes skip link focus in IE11.
|
||||
*
|
||||
* This does not enqueue the script because it is tiny and because it is only for IE11,
|
||||
* thus it does not warrant having an entire dedicated blocking script being loaded.
|
||||
@@ -260,7 +260,7 @@ function twentytwenty_skip_link_focus_fix() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueue non-latin language styles.
|
||||
* Enqueues non-latin language styles.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
*
|
||||
@@ -277,7 +277,9 @@ function twentytwenty_non_latin_languages() {
|
||||
add_action( 'wp_enqueue_scripts', 'twentytwenty_non_latin_languages' );
|
||||
|
||||
/**
|
||||
* Register navigation menus uses wp_nav_menu in five places.
|
||||
* Registers navigation menus.
|
||||
*
|
||||
* This theme uses wp_nav_menu() in five places.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
*/
|
||||
@@ -297,11 +299,11 @@ function twentytwenty_menus() {
|
||||
add_action( 'init', 'twentytwenty_menus' );
|
||||
|
||||
/**
|
||||
* Get the information about the logo.
|
||||
* Gets the information about the logo.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
*
|
||||
* @param string $html The HTML output from get_custom_logo (core function).
|
||||
* @param string $html The HTML output from get_custom_logo() (core function).
|
||||
* @return string
|
||||
*/
|
||||
function twentytwenty_get_custom_logo( $html ) {
|
||||
@@ -356,7 +358,7 @@ add_filter( 'get_custom_logo', 'twentytwenty_get_custom_logo' );
|
||||
if ( ! function_exists( 'wp_body_open' ) ) {
|
||||
|
||||
/**
|
||||
* Shim for wp_body_open, ensuring backward compatibility with versions of WordPress older than 5.2.
|
||||
* Shim for wp_body_open(), ensuring backward compatibility with versions of WordPress older than 5.2.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
*/
|
||||
@@ -385,7 +387,7 @@ function twentytwenty_skip_link() {
|
||||
add_action( 'wp_body_open', 'twentytwenty_skip_link', 5 );
|
||||
|
||||
/**
|
||||
* Register widget areas.
|
||||
* Registers widget areas.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
*
|
||||
@@ -429,7 +431,7 @@ function twentytwenty_sidebar_registration() {
|
||||
add_action( 'widgets_init', 'twentytwenty_sidebar_registration' );
|
||||
|
||||
/**
|
||||
* Enqueue supplemental block editor styles.
|
||||
* Enqueues supplemental block editor styles.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
* @since Twenty Twenty 2.4 Removed a script related to the obsolete Squared style of Button blocks.
|
||||
@@ -466,7 +468,7 @@ if ( is_admin() && version_compare( $GLOBALS['wp_version'], '6.3', '>=' ) ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueue classic editor styles.
|
||||
* Enqueues classic editor styles.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
* @since Twenty Twenty 2.6 Enqueue the CSS file for the variable font.
|
||||
@@ -540,7 +542,7 @@ add_filter( 'tiny_mce_before_init', 'twentytwenty_add_classic_editor_non_latin_s
|
||||
|
||||
/**
|
||||
* Block Editor Settings.
|
||||
* Add custom colors and font sizes to the block editor.
|
||||
* Adds custom colors and font sizes to the block editor.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
*/
|
||||
@@ -665,7 +667,7 @@ function twentytwenty_customize_controls_enqueue_scripts() {
|
||||
add_action( 'customize_controls_enqueue_scripts', 'twentytwenty_customize_controls_enqueue_scripts' );
|
||||
|
||||
/**
|
||||
* Enqueue scripts for the customizer preview.
|
||||
* Enqueues scripts for the customizer preview.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
*
|
||||
@@ -691,7 +693,7 @@ function twentytwenty_customize_preview_init() {
|
||||
add_action( 'customize_preview_init', 'twentytwenty_customize_preview_init' );
|
||||
|
||||
/**
|
||||
* Get accessible color for an area.
|
||||
* Gets accessible color for an area.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
*
|
||||
@@ -749,7 +751,7 @@ function twentytwenty_get_customizer_color_vars() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an array of elements.
|
||||
* Gets an array of elements.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
*
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
if ( ! function_exists( 'twentytwenty_generate_css' ) ) {
|
||||
|
||||
/**
|
||||
* Generate CSS.
|
||||
* Generates CSS.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
*
|
||||
@@ -48,8 +48,8 @@ if ( ! function_exists( 'twentytwenty_generate_css' ) ) {
|
||||
if ( ! function_exists( 'twentytwenty_get_customizer_css' ) ) {
|
||||
|
||||
/**
|
||||
* Get CSS Built from Customizer Options.
|
||||
* Build CSS reflecting colors, fonts and other options set in the Customizer, and return them for output.
|
||||
* Gets CSS Built from Customizer Options.
|
||||
* Builds CSS reflecting colors, fonts and other options set in the Customizer, and returns them for output.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
*
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Function to return the array of starter content for the theme.
|
||||
* Returns the array of starter content for the theme.
|
||||
*
|
||||
* Passes it through the `twentytwenty_starter_content` filter before returning.
|
||||
*
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
|
||||
if ( ! function_exists( 'twentytwenty_the_theme_svg' ) ) {
|
||||
/**
|
||||
* Output and Get Theme SVG.
|
||||
* Output and get the SVG markup for an icon in the TwentyTwenty_SVG_Icons class.
|
||||
* Outputs the SVG markup for an icon in the TwentyTwenty_SVG_Icons class.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
*
|
||||
@@ -26,7 +25,7 @@ if ( ! function_exists( 'twentytwenty_the_theme_svg' ) ) {
|
||||
if ( ! function_exists( 'twentytwenty_get_theme_svg' ) ) {
|
||||
|
||||
/**
|
||||
* Get information about the SVG icon.
|
||||
* Gets information about the SVG icon.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
*
|
||||
|
||||
@@ -169,7 +169,7 @@ function twentytwenty_is_comment_by_post_author( $comment = null ) {
|
||||
/**
|
||||
* Filters comment reply link to not JS scroll.
|
||||
*
|
||||
* Filter the comment reply link to add a class indicating it should not use JS slow-scroll, as it
|
||||
* Filters the comment reply link to add a class indicating it should not use JS slow-scroll, as it
|
||||
* makes it scroll to the wrong position on the page.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
@@ -538,7 +538,7 @@ function twentytwenty_get_post_meta( $post_id = null, $location = 'single-top' )
|
||||
/**
|
||||
* Filters classes of wp_list_pages items to match menu items.
|
||||
*
|
||||
* Filter the class applied to wp_list_pages() items with children to match the menu class, to simplify.
|
||||
* Filters the class applied to wp_list_pages() items with children to match the menu class, to simplify
|
||||
* styling of sub levels in the fallback. Only applied if the match_menu_classes argument is set.
|
||||
*
|
||||
* @since Twenty Twenty 1.0
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Function to return the array of starter content for the theme.
|
||||
* Returns the array of starter content for the theme.
|
||||
*
|
||||
* Passes it through the `twenty_twenty_one_starter_content` filter before returning.
|
||||
*
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.9-alpha-60535';
|
||||
$wp_version = '6.9-alpha-60536';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
||||
Reference in New Issue
Block a user