WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#19756 closed defect (bug) (fixed)

@param documentation errors

Reported by: akshayagarwal Owned by: duck_
Milestone: 3.4 Priority: normal
Severity: minor Version: 3.1
Component: Inline Docs Keywords: has-patch commit
Focuses: Cc:

Description

Line no. 282 of ms-functions.php denotes the parameter name as $string whereas it should be $weblog_title & line no. 283 denotes the param name as $site which shoule be $site_id

Attachments (7)

19756.diff (653 bytes) - added by kawauso 3 years ago.
19756.patch (605 bytes) - added by linuxologos 3 years ago.
19756.merged.patch (1.2 KB) - added by linuxologos 3 years ago.
19756.002.diff (3.5 KB) - added by duck_ 3 years ago.
19756.3.patch (2.5 KB) - added by roscius 3 years ago.
19756.3.fixed.patch (2.6 KB) - added by roscius 3 years ago.
19756.3.fixed.2.patch (2.6 KB) - added by roscius 3 years ago.

Download all attachments as: .zip

Change History (27)

@kawauso3 years ago

comment:1 @kawauso3 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 3.4

Good catch.

comment:2 @linuxologos3 years ago

  • Version changed from 3.3 to 3.1

comment:3 @linuxologos3 years ago

There's another small oversight in the same revision in is_user_member_of_blog(). That function is defined in wp-includes/user.php now. I wouldn't open a new ticket for this...

@linuxologos3 years ago

@linuxologos3 years ago

comment:4 @SergeyBiryukov3 years ago

  • Keywords commit added

comment:5 @duck_3 years ago

In [19695]:

Fix some mismatching parameter documentation. Props akshayagarwal, linuxologos. See #19756.

@duck_3 years ago

comment:6 @duck_3 years ago

In [19702]:

Fix mistakes in parameter documentation and add some missing param docs. See #19756.

comment:7 @duck_3 years ago

  • Summary changed from Minor mistake in documentation of create_empty_blog() to @param documentation errors

Here are some more potential mistakes which I haven't had time to double check. Some may be incorrectly highlighted as errors.

MISMATCH IN PARAMS DOCUMENTATION in wp_handle_upload() wp-admin/includes/file.php:230
MISMATCH IN PARAMS DOCUMENTATION in wp_category_checklist() wp-admin/includes/template.php:63
MISMATCH IN PARAMS DOCUMENTATION in wp_comment_reply() wp-admin/includes/template.php:291
MISMATCH IN PARAMS DOCUMENTATION in add_meta_box() wp-admin/includes/template.php:844
MISMATCH IN PARAMS DOCUMENTATION in get_image_send_to_editor() wp-admin/includes/media.php:112
MISMATCH IN PARAMS DOCUMENTATION in image_add_caption() wp-admin/includes/media.php:140
MISMATCH IN PARAMS DOCUMENTATION in post_format_meta_box() wp-admin/includes/meta-boxes.php:241
MISMATCH IN PARAMS DOCUMENTATION in post_tags_meta_box() wp-admin/includes/meta-boxes.php:269
MISMATCH IN PARAMS DOCUMENTATION in post_categories_meta_box() wp-admin/includes/meta-boxes.php:310
MISMATCH IN PARAMS DOCUMENTATION in populate_network() wp-admin/includes/schema.php:813
MISMATCH IN PARAMS DOCUMENTATION in get_default_post_to_edit() wp-admin/includes/post.php:402
MISMATCH IN PARAMS DOCUMENTATION in get_editable_user_ids() wp-admin/includes/deprecated.php:247
MISMATCH IN PARAMS DOCUMENTATION in category_exists() wp-admin/includes/taxonomy.php:21
MISMATCH IN PARAMS DOCUMENTATION in get_tags_to_edit() wp-admin/includes/taxonomy.php:205
MISMATCH IN PARAMS DOCUMENTATION in get_terms_to_edit() wp-admin/includes/taxonomy.php:217
MISMATCH IN PARAMS DOCUMENTATION in wp_create_term() wp-admin/includes/taxonomy.php:247
MISMATCH IN PARAMS DOCUMENTATION in _wp_ajax_delete_comment_response() wp-admin/admin-ajax.php:189
MISMATCH IN PARAMS DOCUMENTATION in update_blog_option() wp-includes/ms-blogs.php:429
MISMATCH IN PARAMS DOCUMENTATION in update_blog_status() wp-includes/ms-blogs.php:627
MISMATCH IN PARAMS DOCUMENTATION in _is_valid_nav_menu_item() wp-includes/nav-menu.php:454
MISMATCH IN PARAMS DOCUMENTATION in is_protected_meta() wp-includes/meta.php:819
MISMATCH IN PARAMS DOCUMENTATION in _wptexturize_pushpop_element() wp-includes/formatting.php:108
MISMATCH IN PARAMS DOCUMENTATION in wp_get_attachment_image() wp-includes/media.php:641
MISMATCH IN PARAMS DOCUMENTATION in adjacent_image_link() wp-includes/media.php:915
MISMATCH IN PARAMS DOCUMENTATION in load_theme_textdomain() wp-includes/l10n.php:446
MISMATCH IN PARAMS DOCUMENTATION in load_child_theme_textdomain() wp-includes/l10n.php:467
MISMATCH IN PARAMS DOCUMENTATION in wp_set_auth_cookie() wp-includes/pluggable.php:641
MISMATCH IN PARAMS DOCUMENTATION in check_ajax_referer() wp-includes/pluggable.php:824
MISMATCH IN PARAMS DOCUMENTATION in wp_hash() wp-includes/pluggable.php:1394
MISMATCH IN PARAMS DOCUMENTATION in wp_check_password() wp-includes/pluggable.php:1449
MISMATCH IN PARAMS DOCUMENTATION in edit_term_link() wp-includes/link-template.php:720
MISMATCH IN PARAMS DOCUMENTATION in get_comments_pagenum_link() wp-includes/link-template.php:1645
MISMATCH IN PARAMS DOCUMENTATION in get_raw_theme_root() wp-includes/theme.php:706
MISMATCH IN PARAMS DOCUMENTATION in wp_get_post_revisions() wp-includes/post.php:5013
MISMATCH IN PARAMS DOCUMENTATION in wp_get_post_parent_id() wp-includes/post.php:5068
MISMATCH IN PARAMS DOCUMENTATION in wp_check_post_hierarchy_for_loops() wp-includes/post.php:5089
MISMATCH IN PARAMS DOCUMENTATION in wpmu_validate_blog_signup() wp-includes/ms-functions.php:546
MISMATCH IN PARAMS DOCUMENTATION in newblog_notify_siteadmin() wp-includes/ms-functions.php:1014
MISMATCH IN PARAMS DOCUMENTATION in global_terms() wp-includes/ms-functions.php:1577
MISMATCH IN PARAMS DOCUMENTATION in get_link() wp-includes/deprecated.php:2049
MISMATCH IN PARAMS DOCUMENTATION in the_editor() wp-includes/deprecated.php:2629
MISMATCH IN PARAMS DOCUMENTATION in wp_update_term_count() wp-includes/taxonomy.php:2432
MISMATCH IN PARAMS DOCUMENTATION in do_action() wp-includes/plugin.php:357
MISMATCH IN PARAMS DOCUMENTATION in add_permastruct() wp-includes/rewrite.php:57

comment:8 @nacin3 years ago

Re: do_action(), related: #14881.

comment:9 @GaryJ3 years ago

  • Cc gary@… added

comment:10 @duck_3 years ago

  • Keywords needs-patch added; has-patch commit removed

@roscius3 years ago

comment:11 @roscius3 years ago

Sorry...added bum patch file. Will fix.

@roscius3 years ago

comment:12 @roscius3 years ago

Ignore 19756.3.patch use, 19756.3.fixed.patch. Will try to work through some of duck's list above over next day or two.

Version 0, edited 3 years ago by roscius (next)

@roscius3 years ago

comment:13 @jkudish3 years ago

  • Keywords has-patch added; needs-patch removed

comment:14 @nacin3 years ago

  • Keywords commit added
  • Owner set to duck_
  • Status changed from new to assigned

comment:15 @SergeyBiryukov3 years ago

Shouldn't it be $deprecated in lines 160 and 165 of 19756.3.fixed.2.patch rather than $depreciated?

comment:16 @duck_3 years ago

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

In [20349]:

Add some missing documentation and fix a couple of typos. Props roscius. Fixes #19756.

comment:17 @GaryJ3 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

There are still several hundred @param issues in WP 3.4-beta1 - see http://docs.garyjones.co.uk/wordpress/3.4-beta1/errors.html (Ctrl-F to find "argument" to highlight the issues).

comment:18 follow-up: @nacin3 years ago

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

I am going to close this as fixed for 3.4, but GaryJ, that document is great. Could you open a new ticket for that? If there are patches, we can hit those now. The rest can wait for 3.5.

comment:19 in reply to: ↑ 18 @GaryJ3 years ago

Replying to nacin:

GaryJ, that document is great. Could you open a new ticket for that?

Done: #20425.

comment:20 @nacin3 years ago

In [20683]:

Update phpdoc for WP_User::has_cap(). props nunomorgadinho. see #19756.

Note: See TracTickets for help on using tickets.