From 6cf8489db8500861289dcbdf237d7f97d03afc97 Mon Sep 17 00:00:00 2001 From: IanDelMar <42134098+IanDelMar@users.noreply.github.com> Date: Thu, 21 Jul 2022 00:05:40 +0200 Subject: [PATCH 01/22] Fix argument types and return type in doc block --- inc/block-editor.php | 2 +- inc/customizer.php | 9 ++------- inc/pagination.php | 2 +- inc/woocommerce.php | 8 ++++---- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/inc/block-editor.php b/inc/block-editor.php index 2dac4ac8..c9a211d7 100644 --- a/inc/block-editor.php +++ b/inc/block-editor.php @@ -32,7 +32,7 @@ if ( ! function_exists( 'understrap_generate_color_palette' ) ) { /** * Checks for our JSON file of color values. If exists, creates a color palette array. * - * @return array|bool + * @return array */ function understrap_generate_color_palette() { $color_palette = array(); diff --git a/inc/customizer.php b/inc/customizer.php index 4a0ad549..39e4791d 100644 --- a/inc/customizer.php +++ b/inc/customizer.php @@ -8,16 +8,11 @@ // Exit if accessed directly. defined( 'ABSPATH' ) || exit; -/** - * Add postMessage support for site title and description for the Theme Customizer. - * - * @param WP_Customize_Manager $wp_customize Theme Customizer object. - */ if ( ! function_exists( 'understrap_customize_register' ) ) { /** - * Register basic customizer support. + * Register basic support (site title, description, header text color) for the Theme Customizer. * - * @param object $wp_customize Customizer reference. + * @param WP_Customize_Manager $wp_customize Customizer reference. */ function understrap_customize_register( $wp_customize ) { $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; diff --git a/inc/pagination.php b/inc/pagination.php index 18a0cb95..8b4d4731 100644 --- a/inc/pagination.php +++ b/inc/pagination.php @@ -12,7 +12,7 @@ if ( ! function_exists( 'understrap_pagination' ) ) { /** * Displays the navigation to next/previous set of posts. * - * @param string|array $args { + * @param array $args { * (Optional) Array of arguments for generating paginated links for archives. * * @type string $base Base of the paginated url. Default empty. diff --git a/inc/woocommerce.php b/inc/woocommerce.php index 50b2ba2f..ba5d95d1 100644 --- a/inc/woocommerce.php +++ b/inc/woocommerce.php @@ -67,11 +67,11 @@ if ( ! function_exists( 'understrap_wc_form_field_args' ) ) { * Filter hook function monkey patching form classes * Author: Adriano Monecchi http://stackoverflow.com/a/36724593/307826 * - * @param string $args Form attributes. - * @param string $key Not in use. - * @param null $value Not in use. + * @param array $args Form field arguments. + * @param string $key Value of the fields name attribute. + * @param string|null $value Value of