From 61b5311c5722202a07122cffebcc3d58d0823a0f Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 1 Jul 2021 12:59:57 +0000 Subject: [PATCH] Twenty Twenty-One: Improve documentation per the documentation standards: * Remove unnecessary `@access` tags that were previously removed from core. * Remove an empty line between `@param` and `@return` tags. * Correct alignment of `@param` tags. Follow-up to [41161], [41162], [41168], [49216], [49220]. See #52628, #53461. Built from https://develop.svn.wordpress.org/trunk@51294 git-svn-id: http://core.svn.wordpress.org/trunk@50903 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../class-twenty-twenty-one-custom-colors.php | 20 +------------ ...nty-twenty-one-customize-color-control.php | 6 ---- ...ty-twenty-one-customize-notice-control.php | 2 -- .../class-twenty-twenty-one-customize.php | 12 -------- .../class-twenty-twenty-one-dark-mode.php | 28 ------------------- .../class-twenty-twenty-one-svg-icons.php | 18 +++--------- .../themes/twentytwentyone/inc/custom-css.php | 13 ++++----- .../twentytwentyone/inc/menu-functions.php | 5 +--- .../inc/template-functions.php | 15 ++-------- wp-includes/version.php | 2 +- 10 files changed, 16 insertions(+), 105 deletions(-) diff --git a/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-custom-colors.php b/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-custom-colors.php index 897ef53617..3b6833c388 100644 --- a/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-custom-colors.php +++ b/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-custom-colors.php @@ -15,8 +15,6 @@ class Twenty_Twenty_One_Custom_Colors { /** * Instantiate the object. * - * @access public - * * @since Twenty Twenty-One 1.0 */ public function __construct() { @@ -34,12 +32,9 @@ class Twenty_Twenty_One_Custom_Colors { /** * Determine the luminance of the given color and then return #fff or #000 so that the text is always readable. * - * @access public - * - * @param string $background_color The background color. - * * @since Twenty Twenty-One 1.0 * + * @param string $background_color The background color. * @return string (hex color) */ public function custom_get_readable_color( $background_color ) { @@ -53,12 +48,9 @@ class Twenty_Twenty_One_Custom_Colors { * Both text and link colors needs to be updated. * The code below needs to be updated, because the colors are no longer theme mods. * - * @access public - * * @since Twenty Twenty-One 1.0 * * @param string|null $context Can be "editor" or null. - * * @return string */ public function generate_custom_color_variables( $context = null ) { @@ -87,8 +79,6 @@ class Twenty_Twenty_One_Custom_Colors { /** * Customizer & frontend custom color variables. * - * @access public - * * @since Twenty Twenty-One 1.0 * * @return void @@ -102,8 +92,6 @@ class Twenty_Twenty_One_Custom_Colors { /** * Editor custom color variables. * - * @access public - * * @since Twenty Twenty-One 1.0 * * @return void @@ -127,12 +115,9 @@ class Twenty_Twenty_One_Custom_Colors { * * @static * - * @access public - * * @since Twenty Twenty-One 1.0 * * @param string $hex The HEX color. - * * @return int Returns a number (0-255). */ public static function get_relative_luminance_from_hex( $hex ) { @@ -158,12 +143,9 @@ class Twenty_Twenty_One_Custom_Colors { /** * Adds a class to if the background-color is dark. * - * @access public - * * @since Twenty Twenty-One 1.0 * * @param array $classes The existing body classes. - * * @return array */ public function body_class( $classes ) { diff --git a/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-customize-color-control.php b/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-customize-color-control.php index f2c924e5a4..48049dcb7f 100644 --- a/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-customize-color-control.php +++ b/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-customize-color-control.php @@ -27,8 +27,6 @@ class Twenty_Twenty_One_Customize_Color_Control extends WP_Customize_Color_Contr /** * Colorpicker palette * - * @access public - * * @since Twenty Twenty-One 1.0 * * @var array @@ -38,8 +36,6 @@ class Twenty_Twenty_One_Customize_Color_Control extends WP_Customize_Color_Contr /** * Enqueue control related scripts/styles. * - * @access public - * * @since Twenty Twenty-One 1.0 * * @return void @@ -60,8 +56,6 @@ class Twenty_Twenty_One_Customize_Color_Control extends WP_Customize_Color_Contr /** * Refresh the parameters passed to the JavaScript via JSON. * - * @access public - * * @since Twenty Twenty-One 1.0 * * @uses WP_Customize_Control::to_json() diff --git a/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-customize-notice-control.php b/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-customize-notice-control.php index c128a89ed5..3d3c170f4b 100644 --- a/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-customize-notice-control.php +++ b/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-customize-notice-control.php @@ -29,8 +29,6 @@ class Twenty_Twenty_One_Customize_Notice_Control extends WP_Customize_Control { * * This simply prints the notice we need. * - * @access public - * * @since Twenty Twenty-One 1.0 * * @return void diff --git a/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-customize.php b/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-customize.php index f9488f8d62..b880a03afb 100644 --- a/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-customize.php +++ b/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-customize.php @@ -18,8 +18,6 @@ if ( ! class_exists( 'Twenty_Twenty_One_Customize' ) ) { /** * Constructor. Instantiate the object. * - * @access public - * * @since Twenty Twenty-One 1.0 */ public function __construct() { @@ -29,12 +27,9 @@ if ( ! class_exists( 'Twenty_Twenty_One_Customize' ) ) { /** * Register customizer options. * - * @access public - * * @since Twenty Twenty-One 1.0 * * @param WP_Customize_Manager $wp_customize Theme Customizer object. - * * @return void */ public function register( $wp_customize ) { @@ -151,12 +146,9 @@ if ( ! class_exists( 'Twenty_Twenty_One_Customize' ) ) { /** * Sanitize boolean for checkbox. * - * @access public - * * @since Twenty Twenty-One 1.0 * * @param bool $checked Whether or not a box is checked. - * * @return bool */ public static function sanitize_checkbox( $checked = null ) { @@ -166,8 +158,6 @@ if ( ! class_exists( 'Twenty_Twenty_One_Customize' ) ) { /** * Render the site title for the selective refresh partial. * - * @access public - * * @since Twenty Twenty-One 1.0 * * @return void @@ -179,8 +169,6 @@ if ( ! class_exists( 'Twenty_Twenty_One_Customize' ) ) { /** * Render the site tagline for the selective refresh partial. * - * @access public - * * @since Twenty Twenty-One 1.0 * * @return void diff --git a/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-dark-mode.php b/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-dark-mode.php index 7bd9568992..4034eaae25 100644 --- a/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-dark-mode.php +++ b/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-dark-mode.php @@ -15,8 +15,6 @@ class Twenty_Twenty_One_Dark_Mode { /** * Instantiate the object. * - * @access public - * * @since Twenty Twenty-One 1.0 */ public function __construct() { @@ -49,8 +47,6 @@ class Twenty_Twenty_One_Dark_Mode { /** * Editor custom color variables & scripts. * - * @access public - * * @since Twenty Twenty-One 1.0 * * @return void @@ -88,8 +84,6 @@ class Twenty_Twenty_One_Dark_Mode { /** * Enqueue scripts and styles. * - * @access public - * * @since Twenty Twenty-One 1.0 * * @return void @@ -108,8 +102,6 @@ class Twenty_Twenty_One_Dark_Mode { /** * Enqueue scripts for the customizer. * - * @access public - * * @since Twenty Twenty-One 1.0 * * @return void @@ -130,12 +122,9 @@ class Twenty_Twenty_One_Dark_Mode { /** * Register customizer options. * - * @access public - * * @since Twenty Twenty-One 1.0 * * @param WP_Customize_Manager $wp_customize Theme Customizer object. - * * @return void */ public function customizer_controls( $wp_customize ) { @@ -222,12 +211,9 @@ class Twenty_Twenty_One_Dark_Mode { /** * Calculate classes for the main element. * - * @access public - * * @since Twenty Twenty-One 1.0 * * @param string $classes The classes for element. - * * @return string */ public function html_classes( $classes ) { @@ -247,12 +233,9 @@ class Twenty_Twenty_One_Dark_Mode { /** * Adds a class to the element in the editor to accommodate dark-mode. * - * @access public - * * @since Twenty Twenty-One 1.0 * * @param string $classes The admin body-classes. - * * @return string */ public function admin_body_classes( $classes ) { @@ -280,8 +263,6 @@ class Twenty_Twenty_One_Dark_Mode { /** * Determine if we want to print the dark-mode switch or not. * - * @access public - * * @since Twenty Twenty-One 1.0 * * @return bool @@ -298,8 +279,6 @@ class Twenty_Twenty_One_Dark_Mode { /** * Add night/day switch. * - * @access public - * * @since Twenty Twenty-One 1.0 * * @return void @@ -317,12 +296,9 @@ class Twenty_Twenty_One_Dark_Mode { * * Inspired from https://codepen.io/aaroniker/pen/KGpXZo (MIT-licensed) * - * @access public - * * @since Twenty Twenty-One 1.0 * * @param array $attrs The attributes to add to our