WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#40231 closed defect (bug) (fixed)

Function description is not present in some functions.

Reported by: priyankabehera155 Owned by: westonruter
Milestone: 4.8 Priority: normal
Severity: normal Version:
Component: Customize Keywords: has-patch
Focuses: docs Cc:

Description

There is no description available in some of the functions. It is the standard rule to add descriptions in DocBlock.

File Path:- \src\wp-admin\custom-header.php
Functions:- customize_set_last_used, get_default_header_images, get_uploaded_header_images.

Attachments (6)

40231.patch (492 bytes) - added by tejas5989 2 years ago.
40231.2.patch (520 bytes) - added by riddhiehta02 2 years ago.
40231.3.patch (565 bytes) - added by jankimoradiya 2 years ago.
40231.4.diff (1.3 KB) - added by westonruter 2 years ago.
40231.5.diff (1.4 KB) - added by westonruter 2 years ago.
Add since tags
40231.6.diff (3.7 KB) - added by westonruter 2 years ago.
Add remaining since tags

Download all attachments as: .zip

Change History (15)

@tejas5989
2 years ago

#1 @tejas5989
2 years ago

  • Keywords has-patch added

Hello,

I have added the description in two functions in the attached patch.

Thank You

#2 @SergeyBiryukov
2 years ago

  • Component changed from General to Customize
  • Milestone changed from Awaiting Review to 4.8

#3 @riddhiehta02
2 years ago

Added the description for the function ( customize_set_last_used ).

#4 follow-up: @priyankabehera155
2 years ago

  • Keywords needs-patch added; has-patch removed

Hi,

There lots of other file having functions which are not having function description. Below I have provided some files and its functions.

  1. \wp-admin\includes\class-wp-comments-list-table.php - prepare_items, ajax_user_can, floated_admin_avatar, get_per_page, no_items, get_views, get_bulk_actions, extra_tablenav etc and lots more function in this page.
  1. \wp-admin\includes\media.php - get_upload_iframe_src, get_compat_media_markup

Thank you

#5 in reply to: ↑ 4 @alkesh7
2 years ago

Replying to priyankabehera155:

This is a nice catch!

You found out really good things. WordPress must follow own coding standards.

Let's found out more and more functions for the same issue and create full list with one single reply.

Hi,

There lots of other file having functions which are not having function description. Below I have provided some files and its functions.

  1. \wp-admin\includes\class-wp-comments-list-table.php - prepare_items, ajax_user_can, floated_admin_avatar, get_per_page, no_items, get_views, get_bulk_actions, extra_tablenav etc and lots more function in this page.
  1. \wp-admin\includes\media.php - get_upload_iframe_src, get_compat_media_markup

Thank you

#6 @jankimoradiya
2 years ago

Hello,

I have added the description of the prepare_items() function in \wp-admin\includes\class-wp-comments-list-table.php file.

Thank You

#7 @ketuchetan
2 years ago

  • Keywords has-patch added; needs-patch removed

@westonruter
2 years ago

#8 @westonruter
2 years ago

  • Owner set to westonruter
  • Status changed from new to accepted

40231.4.diff contains both 40231.4.diff and 40231.2.patch. I didn't include 40231.3.patch because the function description wasn't particularly descriptive and also it's not in the Customize component.

@westonruter
2 years ago

Add since tags

@westonruter
2 years ago

Add remaining since tags

#9 @westonruter
2 years ago

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

In 40788:

Docs: Add missing @since tags and phpdoc descriptions to the Custom_Image_Header class.

Amends [27497].
Props tejas5989, riddhiehta02, westonruter.
See #21785.
Fixes #40231.

Note: See TracTickets for help on using tickets.