Commit 7a1975ba authored by John Blackbourn's avatar John Blackbourn
Browse files

Docs: Further corrections and improvements to various inline docblocks.

See #49572
Built from https://develop.svn.wordpress.org/trunk@48576


git-svn-id: https://core.svn.wordpress.org/trunk@48338 1a063a9b-81f0-0310-95a4-ce76da25c4cd
parent d68fc631
Loading
Loading
Loading
Loading
+19 −17
Original line number Diff line number Diff line
@@ -159,17 +159,17 @@ class WP_Site_Health {
		 * @param array $test_result {
		 *     An associative array of test result data.
		 *
		 *     @param string $label       A label describing the test, and is used as a header in the output.
		 *     @param string $status      The status of the test, which can be a value of `good`, `recommended` or `critical`.
		 *     @param array  $badge {
		 *     @type string $label       A label describing the test, and is used as a header in the output.
		 *     @type string $status      The status of the test, which can be a value of `good`, `recommended` or `critical`.
		 *     @type array  $badge {
		 *         Tests are put into categories which have an associated badge shown, these can be modified and assigned here.
		 *
		 *         @param string $label The test label, for example `Performance`.
		 *         @param string $color Default `blue`. A string representing a color to use for the label.
		 *         @type string $label The test label, for example `Performance`.
		 *         @type string $color Default `blue`. A string representing a color to use for the label.
		 *     }
		 *     @param string $description A more descriptive explanation of what the test looks for, and why it is important for the end user.
		 *     @param string $actions     An action to direct the user to where they can resolve the issue, if one exists.
		 *     @param string $test        The name of the test being ran, used as a reference point.
		 *     @type string $description A more descriptive explanation of what the test looks for, and why it is important for the end user.
		 *     @type string $actions     An action to direct the user to where they can resolve the issue, if one exists.
		 *     @type string $test        The name of the test being ran, used as a reference point.
		 * }
		 */
		return apply_filters( 'site_status_test_result', call_user_func( $callback ) );
@@ -953,18 +953,18 @@ class WP_Site_Health {
		 * @since 5.3.0 The `$constant` and `$class` parameters were added.
		 *
		 * @param array $modules {
		 *     An associated array of modules to test for.
		 *     An associative array of modules to test for.
		 *
		 *     array $module {
		 *         An associated array of module properties used during testing.
		 *     @type array ...$0 {
		 *         An associative array of module properties used during testing.
		 *         One of either `$function` or `$extension` must be provided, or they will fail by default.
		 *
		 *         string $function     Optional. A function name to test for the existence of.
		 *         string $extension    Optional. An extension to check if is loaded in PHP.
		 *         string $constant     Optional. A constant name to check for to verify an extension exists.
		 *         string $class        Optional. A class name to check for to verify an extension exists.
		 *         bool   $required     Is this a required feature or not.
		 *         string $fallback_for Optional. The module this module replaces as a fallback.
		 *         @type string $function     Optional. A function name to test for the existence of.
		 *         @type string $extension    Optional. An extension to check if is loaded in PHP.
		 *         @type string $constant     Optional. A constant name to check for to verify an extension exists.
		 *         @type string $class        Optional. A class name to check for to verify an extension exists.
		 *         @type bool   $required     Is this a required feature or not.
		 *         @type string $fallback_for Optional. The module this module replaces as a fallback.
		 *     }
		 * }
		 */
@@ -2342,7 +2342,9 @@ class WP_Site_Health {
	 * @return object The test results.
	 */
	function detect_plugin_theme_auto_update_issues() {
		/** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */
		$test_plugins_enabled   = apply_filters( 'auto_update_plugin', true );
		/** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */
		$test_themes_enabled    = apply_filters( 'auto_update_theme', true );
		$ui_enabled_for_plugins = wp_is_auto_update_enabled_for_type( 'plugin' );
		$ui_enabled_for_themes  = wp_is_auto_update_enabled_for_type( 'theme' );
+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@
 * @param string $comment_author Author of the comment.
 * @param string $comment_date   Date of the comment.
 * @param string $timezone       Timezone. Accepts 'blog' or 'gmt'. Default 'blog'.
 * @return mixed Comment post ID on success.
 * @return string|null Comment post ID on success.
 */
function comment_exists( $comment_author, $comment_date, $timezone = 'blog' ) {
	global $wpdb;
+5 −5
Original line number Diff line number Diff line
@@ -1542,7 +1542,7 @@ function do_accordion_sections( $screen, $context, $object ) {
 *
 * @since 2.7.0
 *
 * @global $wp_settings_sections Storage array of all settings sections added to admin pages.
 * @global array $wp_settings_sections Storage array of all settings sections added to admin pages.
 *
 * @param string   $id       Slug-name to identify the section. Used in the 'id' attribute of tags.
 * @param string   $title    Formatted title of the section. Shown as the heading for the section.
@@ -1601,7 +1601,7 @@ function add_settings_section( $id, $title, $callback, $page ) {
 * @since 2.7.0
 * @since 4.2.0 The `$class` argument was added.
 *
 * @global $wp_settings_fields Storage array of settings fields and info about their pages/sections.
 * @global array $wp_settings_fields Storage array of settings fields and info about their pages/sections.
 *
 * @param string   $id       Slug-name to identify the field. Used in the 'id' attribute of tags.
 * @param string   $title    Formatted title of the field. Shown as the label for the field
@@ -1666,8 +1666,8 @@ function add_settings_field( $id, $title, $callback, $page, $section = 'default'
 * to output all the sections and fields that were added to that $page with
 * add_settings_section() and add_settings_field()
 *
 * @global $wp_settings_sections Storage array of all settings sections added to admin pages.
 * @global $wp_settings_fields Storage array of settings fields and info about their pages/sections.
 * @global array $wp_settings_sections Storage array of all settings sections added to admin pages.
 * @global array $wp_settings_fields Storage array of settings fields and info about their pages/sections.
 * @since 2.7.0
 *
 * @param string $page The slug name of the page whose settings sections you want to output.
@@ -1704,7 +1704,7 @@ function do_settings_sections( $page ) {
 * a specific section. Should normally be called by do_settings_sections()
 * rather than directly.
 *
 * @global $wp_settings_fields Storage array of settings fields and their pages/sections.
 * @global array $wp_settings_fields Storage array of settings fields and their pages/sections.
 *
 * @since 2.7.0
 *
+5 −5
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@
 *
 * @since 1.5.0
 *
 * @global object $authordata The current author's DB object.
 * @global WP_User $authordata The current author's data.
 *
 * @param string $deprecated Deprecated.
 * @return string|null The author's display name.
@@ -32,7 +32,7 @@ function get_the_author( $deprecated = '' ) {
	 *
	 * @since 2.9.0
	 *
	 * @param string $authordata->display_name The author's display name.
	 * @param string|null $display_name The author's display name.
	 */
	return apply_filters( 'the_author', is_object( $authordata ) ? $authordata->display_name : null );
}
@@ -99,7 +99,7 @@ function get_the_modified_author() {
		 *
		 * @since 2.8.0
		 *
		 * @param string $last_user->display_name The author's display name.
		 * @param string $display_name The author's display name.
		 */
		return apply_filters( 'the_modified_author', $last_user->display_name );
	}
@@ -152,7 +152,7 @@ function the_modified_author() {
 *
 * @since 2.8.0
 *
 * @global object $authordata The current author's DB object.
 * @global WP_User $authordata The current author's data.
 *
 * @param string    $field   Optional. The user field to retrieve. Default empty.
 * @param int|false $user_id Optional. User ID.
@@ -287,7 +287,7 @@ function the_author_posts() {
 *
 * @since 4.4.0
 *
 * @global object $authordata The current author's DB object.
 * @global WP_User $authordata The current author's data.
 *
 * @return string An HTML link to the author page, or an empty string if $authordata isn't defined.
 */
+2 −2
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ class WP_Comment_Query {
	 * Metadata query container
	 *
	 * @since 3.5.0
	 * @var object WP_Meta_Query
	 * @var WP_Meta_Query A meta query instance.
	 */
	public $meta_query = false;

@@ -69,7 +69,7 @@ class WP_Comment_Query {
	 * Date query container
	 *
	 * @since 3.7.0
	 * @var object WP_Date_Query
	 * @var WP_Date_Query A date query instance.
	 */
	public $date_query = false;

Loading