WordPress.org

Make WordPress Core

Opened 13 months ago

Closed 10 months ago

Last modified 10 months ago

#37770 closed task (blessed) (fixed)

Docs improvements for 4.7

Reported by: johnbillion Owned by: johnbillion
Milestone: 4.7 Priority: normal
Severity: normal Version: 4.7
Component: General Keywords: ongoing
Focuses: docs Cc:

Description

Follow-up to #32246 which has gotten so long it might crash your browser.

Attachments (3)

37770-wp_enqueue_script.diff (1.0 KB) - added by Frank Klein 13 months ago.
Corrects type of $src parameter of wp_enqueue_script().
wp-admin-includes-plugin-php.patch (4.6 KB) - added by ramiy 12 months ago.
Docs in wp-admin/includes/plugin.php
elseif-to-switch.diff (7.5 KB) - added by georgestephanis 10 months ago.

Download all attachments as: .zip

Change History (34)

#1 @DrewAPicture
13 months ago

In 38350:

Docs: Add a missing parenthesis in an example in the DocBlock for wp_redirect().

Props shayanys.
See #37770.

This ticket was mentioned in Slack in #docs by drew. View the logs.


13 months ago

#3 @johnbillion
13 months ago

In 38369:

Docs: Correct various documentation around object and stdClass types.

See #37770

#4 @johnbillion
13 months ago

In 38370:

Docs: Alignment after [38369].

See #37770

#5 @johnbillion
13 months ago

In 38406:

Users: Correct the documentation for the wp_dropdown_users_args filter description and its parameters.

See #37770

#6 @johnbillion
13 months ago

In 38418:

Themes: Update filter names in the inline documentation for the get_*_template() functions.

See #14310, #37770

#7 @johnbillion
13 months ago

In 38434:

Themes: Correct the type for the $name parameter of the get_header, get_footer, get_sidebar, and get_template_part_{$slug} hooks.

See #37770

@Frank Klein
13 months ago

Corrects type of $src parameter of wp_enqueue_script().

#8 @johnbillion
13 months ago

In 38489:

Taxonomy: Update various docs for parameters which are now WP_Term objects.

See #37770
See #14162

#9 @johnbillion
13 months ago

In 38490:

Taxonomy: Correct the function description for wp_ajax_add_link_category().

See #37770

#10 @DrewAPicture
13 months ago

In 38518:

Docs: Update the $message parameter for _default_wp_die_handler() to notate that it can also accept a WP_Error object.

Additionally, update the $message parameter description in the DocBlock for wp_die() to make it explicitly clear messages derived from a passed WP_Error object will only be evaluated if not performing an Ajax or XML-RPC request (as both default handlers completely ignore WP_Error object messages).

See #37770.

#11 @SergeyBiryukov
13 months ago

In 38519:

Script Loader: Correct default value for $src in wp_enqueue_script() and wp_enqueue_style().

Props Frank Klein for initial patch.
See #37770.

#12 @johnbillion
13 months ago

In 38559:

Menus: Correct the docblocks for Walker_Nav_Menu, wp_nav_menu(), and walk_nav_menu_tree().

This corrects the parameter type for the $args and $item parameters passed throughout these functions, class methods, and hooks.

See #24587
See #35206
See #37770

#13 @ramiy
13 months ago

Suggestion: Improve the "menu_position" argument documentation in register_post_type() functions.

Seems like it can also accept null (default is null). Not mentioned in the docs.

And, more important, add the position list from the codex.

@ramiy
12 months ago

Docs in wp-admin/includes/plugin.php

#14 @SergeyBiryukov
12 months ago

In 38610:

Docs: Use a third-person singular verb for register_post_type_args filter added in [34242].

See #37770.

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


11 months ago

#16 @johnbillion
11 months ago

In 38789:

Themes: Improve the inline documentation for the get_*_template() functions by providing examples instead of verbose explanations.

Fixes #38249
See #37770

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


11 months ago

#18 @jbpaul17
11 months ago

  • Owner set to johnbillion
  • Status changed from new to assigned

#19 @johnbillion
11 months ago

In 38884:

General: Correct the docs for the default HTTP status code used by wp_die().

See #37770

#20 @helen
11 months ago

Related: #38398

Anything left here? Leaving it open to track?

#22 @ramiy
11 months ago

My patch above is not committed/reviewed yet.

#23 @DrewAPicture
11 months ago

In 39166:

Docs: Notate the incoming $theme object members for WP_Theme_Install_List_Table::single_row() as a proper hash notation.

h/t coffee2code.
See #37770.

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


11 months ago

#26 @johnbillion
11 months ago

In 39188:

Docs: Improve the documentation for parameters which accept OBJECT, ARRAY_A, and ARRAY_N as parameters.

See #37770

#27 @SergeyBiryukov
10 months ago

In 39281:

Docs: Use 3-digit, x.x.x style semantic versioning for @since 4.7.0 entries.

See #37770.

#28 @helen
10 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

Closing this out for 4.7; we can, of course, continue to commit against it should a reference ticket for a docs change be needed.

#29 @westonruter
10 months ago

In 39345:

Customize: Clean up docs and code style for customize changes in 4.7.

  • Adds missing resolve/fail for promise returned by loadThemePreview.
  • Adds missing jsdoc blocks and tags.
  • Adds missing phpdoc and makes corrections.

See #37770.
Fixes #38908.

#30 @georgestephanis
10 months ago

@westonruter re: your changes from else if to elseif -- would that block make more sense as a switch? Something like this (patch following)

#31 @westonruter
10 months ago

@georgestephanis Good question. I'm not 100% sure. I mean, using a switch increases the overall block size (37 lines instead of 27 lines) and it seems that switch statements are more brittle than if like when a break is forgotten. But I don't feel that strongly either way.

Note: See TracTickets for help on using tickets.