diff --git a/wp-content/themes/twentytwenty/assets/js/customize-preview.js b/wp-content/themes/twentytwenty/assets/js/customize-preview.js index 6bb361c740..fb76429ffe 100644 --- a/wp-content/themes/twentytwenty/assets/js/customize-preview.js +++ b/wp-content/themes/twentytwenty/assets/js/customize-preview.js @@ -11,6 +11,8 @@ /** * Return a value for our partial refresh. * + * @since Twenty Twenty 1.0 + * * @param {Object} partial Current partial. * * @return {jQuery.Promise} Resolved promise. @@ -31,6 +33,8 @@ /** * Override the refresh method. * + * @since Twenty Twenty 1.0 + * * @return {jQuery.Promise} Resolved promise. */ refresh: function() { @@ -55,6 +59,7 @@ /** * Input attributes. * + * @since Twenty Twenty 1.0 * @type {Object} */ attrs: {}, @@ -62,6 +67,8 @@ /** * Override the refresh method. * + * @since Twenty Twenty 1.0 + * * @return {jQuery.Promise} Resolved promise. */ refresh: function() { diff --git a/wp-content/themes/twentytwenty/assets/js/index.js b/wp-content/themes/twentytwenty/assets/js/index.js index 84875ef42e..0a64fd98ba 100644 --- a/wp-content/themes/twentytwenty/assets/js/index.js +++ b/wp-content/themes/twentytwenty/assets/js/index.js @@ -646,6 +646,8 @@ twentytwenty.toggles = { * * This implementation is coming from https://gomakethings.com/a-native-javascript-equivalent-of-jquerys-ready-method/ * + * @since Twenty Twenty 1.0 + * * @param {Function} fn Callback function to run. */ function twentytwentyDomReady( fn ) { @@ -695,6 +697,8 @@ function twentytwentyToggleAttribute( element, attribute, trueVal, falseVal ) { /** * Toggle a menu item on or off. * + * @since Twenty Twenty 1.0 + * * @param {HTMLElement} target * @param {number} duration */ @@ -796,6 +800,8 @@ function twentytwentyMenuToggle( target, duration ) { /** * Traverses the DOM up to find elements matching the query. * + * @since Twenty Twenty 1.0 + * * @param {HTMLElement} target * @param {string} query * @return {NodeList} parents matching query diff --git a/wp-content/themes/twentytwenty/assets/js/skip-link-focus-fix.js b/wp-content/themes/twentytwenty/assets/js/skip-link-focus-fix.js index 181b797996..2507a31de1 100644 --- a/wp-content/themes/twentytwenty/assets/js/skip-link-focus-fix.js +++ b/wp-content/themes/twentytwenty/assets/js/skip-link-focus-fix.js @@ -6,6 +6,8 @@ * This is the source file for what is minified in the twentytwenty_skip_link_focus_fix() PHP function. * * Learn more: https://git.io/vWdr2 + * + * @since Twenty Twenty 1.0 */ ( function() { var isIe = /(trident|msie)/i.test( navigator.userAgent ); diff --git a/wp-content/themes/twentytwenty/classes/class-twentytwenty-customize.php b/wp-content/themes/twentytwenty/classes/class-twentytwenty-customize.php index c6f0d7d869..d41b494584 100644 --- a/wp-content/themes/twentytwenty/classes/class-twentytwenty-customize.php +++ b/wp-content/themes/twentytwenty/classes/class-twentytwenty-customize.php @@ -10,12 +10,16 @@ if ( ! class_exists( 'TwentyTwenty_Customize' ) ) { /** * CUSTOMIZER SETTINGS + * + * @since Twenty Twenty 1.0 */ class TwentyTwenty_Customize { /** * Register customizer options. * + * @since Twenty Twenty 1.0 + * * @param WP_Customize_Manager $wp_customize Theme Customizer object. */ public static function register( $wp_customize ) { @@ -412,9 +416,8 @@ if ( ! class_exists( 'TwentyTwenty_Customize' ) ) { /** * Sanitization callback for the "accent_accessible_colors" setting. * - * @static - * @access public * @since Twenty Twenty 1.0 + * * @param array $value The value we want to sanitize. * @return array Returns sanitized value. Each item in the array gets sanitized separately. */ @@ -436,7 +439,9 @@ if ( ! class_exists( 'TwentyTwenty_Customize' ) ) { /** * Sanitize select. * - * @param string $input The input from the setting. + * @since Twenty Twenty 1.0 + * + * @param string $input The input from the setting. * @param object $setting The selected setting. * @return string The input from the setting or the default setting. */ @@ -449,6 +454,8 @@ if ( ! class_exists( 'TwentyTwenty_Customize' ) ) { /** * Sanitize boolean for checkbox. * + * @since Twenty Twenty 1.0 + * * @param bool $checked Whether or not a box is checked. * @return bool */ @@ -469,6 +476,8 @@ if ( ! class_exists( 'TwentyTwenty_Customize' ) ) { if ( ! function_exists( 'twentytwenty_customize_partial_blogname' ) ) { /** * Render the site title for the selective refresh partial. + * + * @since Twenty Twenty 1.0 */ function twentytwenty_customize_partial_blogname() { bloginfo( 'name' ); @@ -478,6 +487,8 @@ if ( ! function_exists( 'twentytwenty_customize_partial_blogname' ) ) { if ( ! function_exists( 'twentytwenty_customize_partial_blogdescription' ) ) { /** * Render the site description for the selective refresh partial. + * + * @since Twenty Twenty 1.0 */ function twentytwenty_customize_partial_blogdescription() { bloginfo( 'description' ); @@ -489,6 +500,8 @@ if ( ! function_exists( 'twentytwenty_customize_partial_site_logo' ) ) { * Render the site logo for the selective refresh partial. * * Doing it this way so we don't have issues with `render_callback`'s arguments. + * + * @since Twenty Twenty 1.0 */ function twentytwenty_customize_partial_site_logo() { twentytwenty_site_logo(); @@ -499,18 +512,22 @@ if ( ! function_exists( 'twentytwenty_customize_partial_site_logo' ) ) { /** * Input attributes for cover overlay opacity option. * + * @since Twenty Twenty 1.0 + * * @return array Array containing attribute names and their values. */ function twentytwenty_customize_opacity_range() { /** - * Filters the input attributes for opacity + * Filters the input attributes for opacity. + * + * @since Twenty Twenty 1.0 * * @param array $attrs { - * The attributes + * The attributes. * - * @type int $min Minimum value - * @type int $max Maximum value - * @type int $step Interval between numbers + * @type int $min Minimum value. + * @type int $max Maximum value. + * @type int $step Interval between numbers. * } */ return apply_filters( diff --git a/wp-content/themes/twentytwenty/classes/class-twentytwenty-non-latin-languages.php b/wp-content/themes/twentytwenty/classes/class-twentytwenty-non-latin-languages.php index 7fd444317d..a0845a4a70 100644 --- a/wp-content/themes/twentytwenty/classes/class-twentytwenty-non-latin-languages.php +++ b/wp-content/themes/twentytwenty/classes/class-twentytwenty-non-latin-languages.php @@ -12,6 +12,8 @@ if ( ! class_exists( 'TwentyTwenty_Non_Latin_Languages' ) ) { /** * Language handling. + * + * @since Twenty Twenty 1.0 */ class TwentyTwenty_Non_Latin_Languages { @@ -20,7 +22,9 @@ if ( ! class_exists( 'TwentyTwenty_Non_Latin_Languages' ) ) { * * Return CSS for non-latin language, if available, or null * - * @param string $type Whether to return CSS for the "front-end", "block-editor" or "classic-editor". + * @since Twenty Twenty 1.0 + * + * @param string $type Whether to return CSS for the "front-end", "block-editor", or "classic-editor". * @return void */ public static function get_non_latin_css( $type = 'front-end' ) { @@ -28,7 +32,13 @@ if ( ! class_exists( 'TwentyTwenty_Non_Latin_Languages' ) ) { // Fetch site locale. $locale = get_bloginfo( 'language' ); - // Define fallback fonts for non-latin languages. + /** + * Filters the fallback fonts for non-latin languages. + * + * @since Twenty Twenty 1.0 + * + * @param array $font_family An array of locales and font families. + */ $font_family = apply_filters( 'twentytwenty_get_localized_font_family_types', array( @@ -98,7 +108,13 @@ if ( ! class_exists( 'TwentyTwenty_Non_Latin_Languages' ) ) { return; } - // Define elements to apply fallback fonts to. + /** + * Filters the elements to apply fallback fonts to. + * + * @since Twenty Twenty 1.0 + * + * @param array $elements An array of elements for "front-end", "block-editor", or "classic-editor". + */ $elements = apply_filters( 'twentytwenty_get_localized_font_family_elements', array( diff --git a/wp-content/themes/twentytwenty/classes/class-twentytwenty-script-loader.php b/wp-content/themes/twentytwenty/classes/class-twentytwenty-script-loader.php index cc05187bcb..0327420471 100644 --- a/wp-content/themes/twentytwenty/classes/class-twentytwenty-script-loader.php +++ b/wp-content/themes/twentytwenty/classes/class-twentytwenty-script-loader.php @@ -14,6 +14,8 @@ if ( ! class_exists( 'TwentyTwenty_Script_Loader' ) ) { /** * A class that provides a way to add `async` or `defer` attributes to scripts. + * + * @since Twenty Twenty 1.0 */ class TwentyTwenty_Script_Loader { @@ -22,6 +24,8 @@ if ( ! class_exists( 'TwentyTwenty_Script_Loader' ) ) { * * If #12009 lands in WordPress, this function can no-op since it would be handled in core. * + * @since Twenty Twenty 1.0 + * * @link https://core.trac.wordpress.org/ticket/12009 * * @param string $tag The script tag. diff --git a/wp-content/themes/twentytwenty/classes/class-twentytwenty-separator-control.php b/wp-content/themes/twentytwenty/classes/class-twentytwenty-separator-control.php index 0682373a83..270d8e598e 100644 --- a/wp-content/themes/twentytwenty/classes/class-twentytwenty-separator-control.php +++ b/wp-content/themes/twentytwenty/classes/class-twentytwenty-separator-control.php @@ -12,10 +12,14 @@ if ( class_exists( 'WP_Customize_Control' ) ) { if ( ! class_exists( 'TwentyTwenty_Separator_Control' ) ) { /** * Separator Control. + * + * @since Twenty Twenty 1.0 */ class TwentyTwenty_Separator_Control extends WP_Customize_Control { /** * Render the hr. + * + * @since Twenty Twenty 1.0 */ public function render_content() { echo '
'; diff --git a/wp-content/themes/twentytwenty/classes/class-twentytwenty-svg-icons.php b/wp-content/themes/twentytwenty/classes/class-twentytwenty-svg-icons.php index 52648b40f6..7fee14b569 100644 --- a/wp-content/themes/twentytwenty/classes/class-twentytwenty-svg-icons.php +++ b/wp-content/themes/twentytwenty/classes/class-twentytwenty-svg-icons.php @@ -11,12 +11,16 @@ if ( ! class_exists( 'TwentyTwenty_SVG_Icons' ) ) { /** * SVG ICONS CLASS * Retrieve 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 * + * @since Twenty Twenty 1.0 + * * @param string $icon Icon name. * @param string $group Icon group. * @param string $color Color. @@ -69,6 +73,8 @@ if ( ! class_exists( 'TwentyTwenty_SVG_Icons' ) ) { * GET SOCIAL LINK SVG * Detects the social network from a URL and returns the SVG code for its icon. * + * @since Twenty Twenty 1.0 + * * @param string $uri The URL to retrieve SVG for. */ public static function get_social_link_svg( $uri ) { @@ -116,6 +122,7 @@ if ( ! class_exists( 'TwentyTwenty_SVG_Icons' ) ) { * ICON STORAGE * Store the code for all SVGs in an array. * + * @since Twenty Twenty 1.0 * @var array */ public static $ui_icons = array( @@ -169,6 +176,7 @@ if ( ! class_exists( 'TwentyTwenty_SVG_Icons' ) ) { * By default, each Icon ID is matched against a .com TLD. To override this behavior, * specify all the domains it covers (including the .com TLD too, if applicable). * + * @since Twenty Twenty 1.0 * @var array */ public static $social_icons_map = array( @@ -224,6 +232,7 @@ if ( ! class_exists( 'TwentyTwenty_SVG_Icons' ) ) { /** * Social Icons – svg sources. * + * @since Twenty Twenty 1.0 * @var array */ public static $social_icons = array( diff --git a/wp-content/themes/twentytwenty/classes/class-twentytwenty-walker-comment.php b/wp-content/themes/twentytwenty/classes/class-twentytwenty-walker-comment.php index c085878cb7..bf348dcd33 100644 --- a/wp-content/themes/twentytwenty/classes/class-twentytwenty-walker-comment.php +++ b/wp-content/themes/twentytwenty/classes/class-twentytwenty-walker-comment.php @@ -11,12 +11,16 @@ if ( ! class_exists( 'TwentyTwenty_Walker_Comment' ) ) { /** * CUSTOM COMMENT WALKER * A custom walker for comments, based on the walker in Twenty Nineteen. + * + * @since Twenty Twenty 1.0 */ class TwentyTwenty_Walker_Comment extends Walker_Comment { /** * Outputs a comment in the HTML5 format. * + * @since Twenty Twenty 1.0 + * * @see wp_list_comments() * @see https://developer.wordpress.org/reference/functions/get_comment_author_url/ * @see https://developer.wordpress.org/reference/functions/get_comment_author/ diff --git a/wp-content/themes/twentytwenty/classes/class-twentytwenty-walker-page.php b/wp-content/themes/twentytwenty/classes/class-twentytwenty-walker-page.php index 62de1f76bd..dcdc8445ad 100644 --- a/wp-content/themes/twentytwenty/classes/class-twentytwenty-walker-page.php +++ b/wp-content/themes/twentytwenty/classes/class-twentytwenty-walker-page.php @@ -11,14 +11,17 @@ if ( ! class_exists( 'TwentyTwenty_Walker_Page' ) ) { /** * CUSTOM PAGE WALKER * A custom walker for pages. + * + * @since Twenty Twenty 1.0 */ class TwentyTwenty_Walker_Page extends Walker_Page { /** * Outputs the beginning of the current element in the tree. * + * @since Twenty Twenty 1.0 + * * @see Walker::start_el() - * @since 2.1.0 * * @param string $output Used to append additional content. Passed by reference. * @param WP_Post $page Page data object. diff --git a/wp-content/themes/twentytwenty/functions.php b/wp-content/themes/twentytwenty/functions.php index 292e2a4cff..c8944e03c1 100644 --- a/wp-content/themes/twentytwenty/functions.php +++ b/wp-content/themes/twentytwenty/functions.php @@ -30,6 +30,8 @@ * Note that this function is hooked into the after_setup_theme hook, which * runs before the init hook. The init hook is too late for some features, such * as indicating support for post thumbnails. + * + * @since Twenty Twenty 1.0 */ function twentytwenty_theme_support() { @@ -183,6 +185,8 @@ require get_template_directory() . '/inc/block-patterns.php'; /** * Register and Enqueue Styles. + * + * @since Twenty Twenty 1.0 */ function twentytwenty_register_styles() { @@ -203,6 +207,8 @@ add_action( 'wp_enqueue_scripts', 'twentytwenty_register_styles' ); /** * Register and Enqueue Scripts. + * + * @since Twenty Twenty 1.0 */ function twentytwenty_register_scripts() { @@ -225,6 +231,8 @@ add_action( 'wp_enqueue_scripts', 'twentytwenty_register_scripts' ); * 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. * + * @since Twenty Twenty 1.0 + * * @link https://git.io/vWdr2 */ function twentytwenty_skip_link_focus_fix() { @@ -237,7 +245,8 @@ function twentytwenty_skip_link_focus_fix() { } add_action( 'wp_print_footer_scripts', 'twentytwenty_skip_link_focus_fix' ); -/** Enqueue non-latin language styles +/** + * Enqueue non-latin language styles. * * @since Twenty Twenty 1.0 * @@ -255,6 +264,8 @@ add_action( 'wp_enqueue_scripts', 'twentytwenty_non_latin_languages' ); /** * Register navigation menus uses wp_nav_menu in five places. + * + * @since Twenty Twenty 1.0 */ function twentytwenty_menus() { @@ -274,6 +285,8 @@ add_action( 'init', 'twentytwenty_menus' ); /** * Get the information about the logo. * + * @since Twenty Twenty 1.0 + * * @param string $html The HTML output from get_custom_logo (core function). * @return string */ @@ -331,14 +344,19 @@ if ( ! function_exists( 'wp_body_open' ) ) { /** * Shim for wp_body_open, ensuring backward compatibility with versions of WordPress older than 5.2. + * + * @since Twenty Twenty 1.0 */ function wp_body_open() { + /** This action is documented in wp-includes/general-template.php */ do_action( 'wp_body_open' ); } } /** * Include a skip to content link at the top of the page so that users can bypass the menu. + * + * @since Twenty Twenty 1.0 */ function twentytwenty_skip_link() { echo ''; @@ -349,6 +367,8 @@ add_action( 'wp_body_open', 'twentytwenty_skip_link', 5 ); /** * Register widget areas. * + * @since Twenty Twenty 1.0 + * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function twentytwenty_sidebar_registration() { @@ -391,6 +411,8 @@ add_action( 'widgets_init', 'twentytwenty_sidebar_registration' ); /** * Enqueue supplemental block editor styles. + * + * @since Twenty Twenty 1.0 */ function twentytwenty_block_editor_styles() { @@ -412,6 +434,8 @@ add_action( 'enqueue_block_editor_assets', 'twentytwenty_block_editor_styles', 1 /** * Enqueue classic editor styles. + * + * @since Twenty Twenty 1.0 */ function twentytwenty_classic_editor_styles() { @@ -429,6 +453,8 @@ add_action( 'init', 'twentytwenty_classic_editor_styles' ); * Output Customizer settings in the classic editor. * Adds styles to the head of the TinyMCE iframe. Kudos to @Otto42 for the original solution. * + * @since Twenty Twenty 1.0 + * * @param array $mce_init TinyMCE styles. * @return array TinyMCE styles. */ @@ -479,6 +505,8 @@ 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. + * + * @since Twenty Twenty 1.0 */ function twentytwenty_block_editor_settings() { @@ -632,7 +660,7 @@ add_action( 'customize_preview_init', 'twentytwenty_customize_preview_init' ); * * @since Twenty Twenty 1.0 * - * @param string $area The area we want to get the colors for. + * @param string $area The area we want to get the colors for. * @param string $context Can be 'text' or 'accent'. * @return string Returns a HEX color. */ @@ -750,11 +778,11 @@ function twentytwenty_get_elements_array() { ); /** - * Filters Twenty Twenty theme elements - * - * @since Twenty Twenty 1.0 - * - * @param array Array of elements - */ + * Filters Twenty Twenty theme elements. + * + * @since Twenty Twenty 1.0 + * + * @param array Array of elements. + */ return apply_filters( 'twentytwenty_get_elements_array', $elements ); } diff --git a/wp-content/themes/twentytwenty/inc/custom-css.php b/wp-content/themes/twentytwenty/inc/custom-css.php index 0bd00607e1..80ab714732 100644 --- a/wp-content/themes/twentytwenty/inc/custom-css.php +++ b/wp-content/themes/twentytwenty/inc/custom-css.php @@ -12,12 +12,14 @@ if ( ! function_exists( 'twentytwenty_generate_css' ) ) { /** * Generate CSS. * + * @since Twenty Twenty 1.0 + * * @param string $selector The CSS selector. - * @param string $style The CSS style. - * @param string $value The CSS value. - * @param string $prefix The CSS prefix. - * @param string $suffix The CSS suffix. - * @param bool $echo Echo the styles. + * @param string $style The CSS style. + * @param string $value The CSS value. + * @param string $prefix The CSS prefix. + * @param string $suffix The CSS suffix. + * @param bool $echo Echo the styles. */ function twentytwenty_generate_css( $selector, $style, $value, $prefix = '', $suffix = '', $echo = true ) { @@ -50,7 +52,9 @@ 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. * - * @param string $type Whether to return CSS for the "front-end", "block-editor" or "classic-editor". + * @since Twenty Twenty 1.0 + * + * @param string $type Whether to return CSS for the "front-end", "block-editor", or "classic-editor". */ function twentytwenty_get_customizer_css( $type = 'front-end' ) { @@ -78,7 +82,7 @@ if ( ! function_exists( 'twentytwenty_get_customizer_css' ) ) { ob_start(); - /** + /* * Note – Styles are applied in this order: * 1. Element specific * 2. Helper classes @@ -86,7 +90,7 @@ if ( ! function_exists( 'twentytwenty_get_customizer_css' ) ) { * This enables all helper classes to overwrite base element styles, * meaning that any color classes applied in the block editor will * have a higher priority than the base element styles. - */ + */ // Front-End Styles. if ( 'front-end' === $type ) { diff --git a/wp-content/themes/twentytwenty/inc/svg-icons.php b/wp-content/themes/twentytwenty/inc/svg-icons.php index 8882a13843..116bddc655 100644 --- a/wp-content/themes/twentytwenty/inc/svg-icons.php +++ b/wp-content/themes/twentytwenty/inc/svg-icons.php @@ -12,9 +12,11 @@ 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. * + * @since Twenty Twenty 1.0 + * * @param string $svg_name The name of the icon. - * @param string $group The group the icon belongs to. - * @param string $color Color code. + * @param string $group The group the icon belongs to. + * @param string $color Color code. */ function twentytwenty_the_theme_svg( $svg_name, $group = 'ui', $color = '' ) { echo twentytwenty_get_theme_svg( $svg_name, $group, $color ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped in twentytwenty_get_theme_svg(). @@ -26,9 +28,11 @@ if ( ! function_exists( 'twentytwenty_get_theme_svg' ) ) { /** * Get information about the SVG icon. * + * @since Twenty Twenty 1.0 + * * @param string $svg_name The name of the icon. - * @param string $group The group the icon belongs to. - * @param string $color Color code. + * @param string $group The group the icon belongs to. + * @param string $color Color code. */ function twentytwenty_get_theme_svg( $svg_name, $group = 'ui', $color = '' ) { diff --git a/wp-content/themes/twentytwenty/inc/template-tags.php b/wp-content/themes/twentytwenty/inc/template-tags.php index ced859d278..b7a2da21c9 100644 --- a/wp-content/themes/twentytwenty/inc/template-tags.php +++ b/wp-content/themes/twentytwenty/inc/template-tags.php @@ -25,8 +25,10 @@ /** * Displays the site logo, either text or image. * - * @param array $args Arguments for displaying the site logo either as an image or text. - * @param bool $echo Echo or return the HTML. + * @since Twenty Twenty 1.0 + * + * @param array $args Arguments for displaying the site logo either as an image or text. + * @param bool $echo Echo or return the HTML. * @return string Compiled HTML based on our arguments. */ function twentytwenty_site_logo( $args = array(), $echo = true ) { @@ -50,8 +52,10 @@ function twentytwenty_site_logo( $args = array(), $echo = true ) { /** * Filters the arguments for `twentytwenty_site_logo()`. * - * @param array $args Parsed arguments. - * @param array $defaults Function's default arguments. + * @since Twenty Twenty 1.0 + * + * @param array $args Parsed arguments. + * @param array $defaults Function's default arguments. */ $args = apply_filters( 'twentytwenty_site_logo_args', $args, $defaults ); @@ -70,6 +74,8 @@ function twentytwenty_site_logo( $args = array(), $echo = true ) { /** * Filters the arguments for `twentytwenty_site_logo()`. * + * @since Twenty Twenty 1.0 + * * @param string $html Compiled HTML based on our arguments. * @param array $args Parsed arguments. * @param string $classname Class name based on current view, home or single. @@ -88,6 +94,8 @@ function twentytwenty_site_logo( $args = array(), $echo = true ) { /** * Displays the site description. * + * @since Twenty Twenty 1.0 + * * @param bool $echo Echo or return the html. * @return string The HTML to display. */ @@ -107,9 +115,9 @@ function twentytwenty_site_description( $echo = true ) { * * @since Twenty Twenty 1.0 * - * @param string $html The HTML to display. - * @param string $description Site description via `bloginfo()`. - * @param string $wrapper The format used in case you want to reuse it in a `sprintf()`. + * @param string $html The HTML to display. + * @param string $description Site description via `bloginfo()`. + * @param string $wrapper The format used in case you want to reuse it in a `sprintf()`. */ $html = apply_filters( 'twentytwenty_site_description', $html, $description, $wrapper ); @@ -127,6 +135,8 @@ function twentytwenty_site_description( $echo = true ) { /** * Checks if the specified comment is written by the author of the post commented on. * + * @since Twenty Twenty 1.0 + * * @param object $comment Comment data. * @return bool */ @@ -153,6 +163,8 @@ function twentytwenty_is_comment_by_post_author( $comment = null ) { * Filter 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 + * * @param string $link Link to the top of the page. * @return string Link to the top of the page. */ @@ -174,6 +186,8 @@ add_filter( 'comment_reply_link', 'twentytwenty_filter_comment_reply_link' ); * * If it's a single post, outputs the post meta values specified in the Customizer settings. * + * @since Twenty Twenty 1.0 + * * @param int $post_id The ID of the post for which the post meta should be output. * @param string $location Which post meta location to output – single or preview. */ @@ -186,6 +200,8 @@ function twentytwenty_the_post_meta( $post_id = null, $location = 'single-top' ) /** * Filters the edit post link to add an icon and use the post meta structure. * + * @since Twenty Twenty 1.0 + * * @param string $link Anchor tag for the edit link. * @param int $post_id Post ID. * @param string $text Anchor text. @@ -223,7 +239,9 @@ add_filter( 'edit_post_link', 'twentytwenty_edit_post_link', 10, 3 ); /** * Retrieves the post meta. * - * @param int $post_id The ID of the post. + * @since Twenty Twenty 1.0 + * + * @param int $post_id The ID of the post. * @param string $location The location where the meta is shown. */ function twentytwenty_get_post_meta( $post_id = null, $location = 'single-top' ) { @@ -241,7 +259,7 @@ function twentytwenty_get_post_meta( $post_id = null, $location = 'single-top' ) * * @since Twenty Twenty 1.0 * - * @param array Array of post types + * @param array Array of post types. */ $disallowed_post_types = apply_filters( 'twentytwenty_disallowed_post_types_for_meta_output', array( 'page' ) ); @@ -263,10 +281,10 @@ function twentytwenty_get_post_meta( $post_id = null, $location = 'single-top' ) * @since Twenty Twenty 1.0 * * @param array $args { - * @type string 'author' - * @type string 'post-date' - * @type string 'comments' - * @type string 'sticky' + * @type string $author + * @type string $post-date + * @type string $comments + * @type string $sticky * } */ $post_meta = apply_filters( @@ -291,7 +309,7 @@ function twentytwenty_get_post_meta( $post_id = null, $location = 'single-top' ) * @since Twenty Twenty 1.0 * * @param array $args { - * @type string 'tags' + * @type string $tags * } */ $post_meta = apply_filters( @@ -499,6 +517,8 @@ function twentytwenty_get_post_meta( $post_id = null, $location = 'single-top' ) * Filter 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 + * * @param string[] $css_class An array of CSS classes to be applied to each list item. * @param WP_Post $page Page data object. * @param int $depth Depth of page, used for padding. @@ -534,6 +554,8 @@ add_filter( 'page_css_class', 'twentytwenty_filter_wp_list_pages_item_classes', /** * Adds a Sub Nav Toggle to the Expanded Menu and Mobile Menu. * + * @since Twenty Twenty 1.0 + * * @param stdClass $args An object of wp_nav_menu() arguments. * @param WP_Post $item Menu item data object. * @param int $depth Depth of menu item. Used for padding. @@ -580,6 +602,8 @@ add_filter( 'nav_menu_item_args', 'twentytwenty_add_sub_toggles_to_main_menu', 1 /** * Displays SVG icons in social links menu. * + * @since Twenty Twenty 1.0 + * * @param string $item_output The menu item's starting HTML output. * @param WP_Post $item Menu item data object. * @param int $depth Depth of the menu. Used for padding. @@ -609,6 +633,8 @@ add_filter( 'walker_nav_menu_start_el', 'twentytwenty_nav_menu_social_icons', 10 * Adds 'no-js' class. * * If we're missing JavaScript support, the HTML element will have a 'no-js' class. + * + * @since Twenty Twenty 1.0 */ function twentytwenty_no_js_class() { @@ -623,6 +649,8 @@ add_action( 'wp_head', 'twentytwenty_no_js_class' ); /** * Adds conditional body classes. * + * @since Twenty Twenty 1.0 + * * @param array $classes Classes added to the body tag. * @return array Classes added to the body tag. */ @@ -724,11 +752,20 @@ add_filter( 'body_class', 'twentytwenty_body_classes' ); /** * Filters the archive title and styles the word before the first colon. * + * @since Twenty Twenty 1.0 + * * @param string $title Current archive title. * @return string Current archive title. */ function twentytwenty_get_the_archive_title( $title ) { + /** + * Filters the regular expression used to style the word before the first colon. + * + * @since Twenty Twenty 1.0 + * + * @param array $regex An array of regular expression pattern and replacement. + */ $regex = apply_filters( 'twentytwenty_get_the_archive_title_regex', array( @@ -756,6 +793,8 @@ add_filter( 'get_the_archive_title', 'twentytwenty_get_the_archive_title' ); /** * Toggles animation duration in milliseconds. * + * @since Twenty Twenty 1.0 + * * @return int Duration in milliseconds */ function twentytwenty_toggle_duration() { @@ -779,6 +818,8 @@ function twentytwenty_toggle_duration() { * with the optional prefix. As such the returned value is not universally unique, * but it is unique across the life of the PHP process. * + * @since Twenty Twenty 1.0 + * * @see wp_unique_id() Themes requiring WordPress 5.0.3 and greater should use this instead. * * @param string $prefix Prefix for the returned ID. diff --git a/wp-content/themes/twentytwenty/template-parts/content-cover.php b/wp-content/themes/twentytwenty/template-parts/content-cover.php index f1150cb1c5..7bcb8761f3 100644 --- a/wp-content/themes/twentytwenty/template-parts/content-cover.php +++ b/wp-content/themes/twentytwenty/template-parts/content-cover.php @@ -59,7 +59,7 @@ * * @since Twenty Twenty 1.0 * - * @param bool Whether to show the categories in article header, Default true. + * @param bool Whether to show the categories in article header. Default true. */ $show_categories = apply_filters( 'twentytwenty_show_categories_in_entry_header', true ); @@ -162,10 +162,10 @@ get_template_part( 'template-parts/navigation' ); } - /** - * Output comments wrapper if it's a post, or if comments are open, + /* + * Output comments wrapper if it's a post, or if comments are open, * or if there's a comment number – and check for password. - * */ + */ if ( ( is_single() || is_page() ) && ( comments_open() || get_comments_number() ) && ! post_password_required() ) { ?> diff --git a/wp-content/themes/twentytwenty/template-parts/content.php b/wp-content/themes/twentytwenty/template-parts/content.php index ed0cf5173a..f146398add 100644 --- a/wp-content/themes/twentytwenty/template-parts/content.php +++ b/wp-content/themes/twentytwenty/template-parts/content.php @@ -74,10 +74,10 @@ } - /** - * Output comments wrapper if it's a post, or if comments are open, + /* + * Output comments wrapper if it's a post, or if comments are open, * or if there's a comment number – and check for password. - * */ + */ if ( ( is_single() || is_page() ) && ( comments_open() || get_comments_number() ) && ! post_password_required() ) { ?> diff --git a/wp-content/themes/twentytwenty/template-parts/entry-header.php b/wp-content/themes/twentytwenty/template-parts/entry-header.php index 224be7d463..830e263a83 100644 --- a/wp-content/themes/twentytwenty/template-parts/entry-header.php +++ b/wp-content/themes/twentytwenty/template-parts/entry-header.php @@ -25,7 +25,7 @@ if ( is_singular() ) { * * @since Twenty Twenty 1.0 * - * @param bool Whether to show the categories in header, Default true. + * @param bool Whether to show the categories in header. Default true. */ $show_categories = apply_filters( 'twentytwenty_show_categories_in_entry_header', true ); diff --git a/wp-content/themes/twentytwenty/template-parts/pagination.php b/wp-content/themes/twentytwenty/template-parts/pagination.php index 23c8bfb79f..8973447ad6 100644 --- a/wp-content/themes/twentytwenty/template-parts/pagination.php +++ b/wp-content/themes/twentytwenty/template-parts/pagination.php @@ -9,19 +9,21 @@ * @since Twenty Twenty 1.0 */ -/** - * Translators: - * This text contains HTML to allow the text to be shorter on small screens. - * The text inside the span with the class nav-short will be hidden on small screens. - */ - $prev_text = sprintf( '%s %s', '', + /* + * Translators: This text contains HTML to allow the text to be shorter on small screens. + * The text inside the span with the class nav-short will be hidden on small screens. + */ __( 'Newer Posts', 'twentytwenty' ) ); $next_text = sprintf( '%s %s', + /* + * Translators: This text contains HTML to allow the text to be shorter on small screens. + * The text inside the span with the class nav-short will be hidden on small screens. + */ __( 'Older Posts', 'twentytwenty' ), '' ); diff --git a/wp-content/themes/twentytwentyone/functions.php b/wp-content/themes/twentytwentyone/functions.php index 7d9b767d0e..df98fef838 100644 --- a/wp-content/themes/twentytwentyone/functions.php +++ b/wp-content/themes/twentytwentyone/functions.php @@ -507,7 +507,8 @@ function twenty_twenty_one_skip_link_focus_fix() { } add_action( 'wp_print_footer_scripts', 'twenty_twenty_one_skip_link_focus_fix' ); -/** Enqueue non-latin language styles +/** + * Enqueue non-latin language styles. * * @since Twenty Twenty-One 1.0 * diff --git a/wp-includes/version.php b/wp-includes/version.php index 3e00daf983..23bba1db5c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-51321'; +$wp_version = '5.9-alpha-51322'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.