Skip to content

Commit 3e56dfc

Browse files
committed
Docs: Various improvements to inline documentation.
See #62281 git-svn-id: https://develop.svn.wordpress.org/trunk@59896 602fd350-edb4-49c9-b593-d223f7449a82
1 parent f6b5544 commit 3e56dfc

File tree

6 files changed

+28
-12
lines changed

6 files changed

+28
-12
lines changed

src/wp-admin/includes/misc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ function show_message( $message ) {
625625
* @since 2.8.0
626626
*
627627
* @param string $content
628-
* @return array
628+
* @return string[] Array of function names.
629629
*/
630630
function wp_doc_link_parse( $content ) {
631631
if ( ! is_string( $content ) || empty( $content ) ) {

src/wp-admin/includes/post.php

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,13 @@ function edit_post( $post_data = null ) {
493493
*
494494
* @param array|null $post_data Optional. The array of post data to process.
495495
* Defaults to the `$_POST` superglobal.
496-
* @return array
496+
* @return array {
497+
* An array of updated, skipped, and locked post IDs.
498+
*
499+
* @type int[] $updated An array of updated post IDs.
500+
* @type int[] $skipped An array of skipped post IDs.
501+
* @type int[] $locked An array of locked post IDs.
502+
* }
497503
*/
498504
function bulk_edit_posts( $post_data = null ) {
499505
global $wpdb;
@@ -1211,7 +1217,7 @@ function get_available_post_statuses( $type = 'post' ) {
12111217
*
12121218
* @param array|false $q Optional. Array of query variables to use to build the query.
12131219
* Defaults to the `$_GET` superglobal.
1214-
* @return array
1220+
* @return string[] An array of all the statuses for the queried post type.
12151221
*/
12161222
function wp_edit_posts_query( $q = false ) {
12171223
if ( false === $q ) {
@@ -1383,7 +1389,12 @@ function wp_edit_attachments_query_vars( $q = false ) {
13831389
*
13841390
* @param array|false $q Optional. Array of query variables to use to build the query.
13851391
* Defaults to the `$_GET` superglobal.
1386-
* @return array
1392+
* @return array {
1393+
* Array containing the post mime types and available post mime types.
1394+
*
1395+
* @type array[] $post_mime_types Post mime types.
1396+
* @type string[] $avail_post_mime_types Available post mime types.
1397+
* }
13871398
*/
13881399
function wp_edit_attachments_query( $q = false ) {
13891400
wp( wp_edit_attachments_query_vars( $q ) );

src/wp-admin/includes/user.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ function get_users_drafts( $user_id ) {
313313
$query = $wpdb->prepare( "SELECT ID, post_title FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'draft' AND post_author = %d ORDER BY post_modified DESC", $user_id );
314314

315315
/**
316-
* Filters the user's drafts query string.
316+
* Filters the SQL query string for the user's drafts query.
317317
*
318318
* @since 2.0.0
319319
*

src/wp-includes/script-loader.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2095,7 +2095,7 @@ function wp_style_loader_src( $src, $handle ) {
20952095
*
20962096
* @global bool $concatenate_scripts
20972097
*
2098-
* @return array
2098+
* @return string[] Handles of the scripts that were printed.
20992099
*/
21002100
function print_head_scripts() {
21012101
global $concatenate_scripts;
@@ -2134,7 +2134,7 @@ function print_head_scripts() {
21342134
* @global WP_Scripts $wp_scripts
21352135
* @global bool $concatenate_scripts
21362136
*
2137-
* @return array
2137+
* @return string[] Handles of the scripts that were printed.
21382138
*/
21392139
function print_footer_scripts() {
21402140
global $wp_scripts, $concatenate_scripts;
@@ -2215,7 +2215,7 @@ function _print_scripts() {
22152215
*
22162216
* @global WP_Scripts $wp_scripts
22172217
*
2218-
* @return array
2218+
* @return string[] Handles of the scripts that were printed.
22192219
*/
22202220
function wp_print_head_scripts() {
22212221
global $wp_scripts;
@@ -2280,7 +2280,7 @@ function wp_enqueue_scripts() {
22802280
*
22812281
* @global bool $concatenate_scripts
22822282
*
2283-
* @return array
2283+
* @return string[] Handles of the styles that were printed.
22842284
*/
22852285
function print_admin_styles() {
22862286
global $concatenate_scripts;

src/wp-includes/update.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,12 @@ function wp_get_translation_updates() {
891891
*
892892
* @since 3.3.0
893893
*
894-
* @return array
894+
* @return array {
895+
* Fetched update data.
896+
*
897+
* @type int[] $counts An array of counts for available plugin, theme, and WordPress updates.
898+
* @type string $update_title Titles of available updates.
899+
* }
895900
*/
896901
function wp_get_update_data() {
897902
$counts = array(

tests/phpunit/includes/abstract-testcase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1462,7 +1462,7 @@ public function remove_added_uploads() {
14621462
* @since 4.0.0
14631463
*
14641464
* @param string $dir Path to the directory to scan.
1465-
* @return array List of file paths.
1465+
* @return string[] List of file paths.
14661466
*/
14671467
public function files_in_dir( $dir ) {
14681468
$files = array();
@@ -1483,7 +1483,7 @@ public function files_in_dir( $dir ) {
14831483
*
14841484
* @since 4.0.0
14851485
*
1486-
* @return array List of file paths.
1486+
* @return string[] List of file paths.
14871487
*/
14881488
public function scan_user_uploads() {
14891489
static $files = array();

0 commit comments

Comments
 (0)