WordPress.org

Make WordPress Core

Opened 13 months ago

Closed 8 months ago

#36912 closed defect (bug) (fixed)

Improve documentation for install_plugin_install_status()

Reported by: swissspidy Owned by: swissspidy
Milestone: 4.7 Priority: normal
Severity: normal Version:
Component: Plugins Keywords: good-first-bug has-patch
Focuses: docs Cc:

Description

The helper function install_plugin_install_status() is currently lacking some proper documentation. Besides not stating what exactly can be passed to the function, the return type is currently declared as type instead of array.

Attachments (6)

plugin-install.php.patch (473 bytes) - added by clarionwpdeveloper 13 months ago.
plugin-install.php.2.patch (911 bytes) - added by clarionwpdeveloper 12 months ago.
plugin-install.php.3.patch (883 bytes) - added by clarionwpdeveloper 11 months ago.
36912.patch (983 bytes) - added by sudar 9 months ago.
36912.2.patch (983 bytes) - added by sudar 9 months ago.
36912.3.patch (1015 bytes) - added by sudar 9 months ago.

Download all attachments as: .zip

Change History (22)

#1 @DrewAPicture
13 months ago

  • Keywords has-patch added; needs-patch removed
  • Owner set to clarionwpdeveloper
  • Status changed from new to assigned

Assigning to mark the good-first-bug as "claimed".

See plugin-install.php.patch

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


13 months ago

#3 @swissspidy
12 months ago

  • Milestone changed from Awaiting Review to Future Release

The patch needs a little bit more work. It needs to explain what exactly $loop does and what kind of array is being returned.

#4 @clarionwpdeveloper
12 months ago

I added more details of the $loop and return array.

#5 @DrewAPicture
12 months ago

@clarionwpdeveloper thanks for the updated patch. We should use the hash-notation style to document the return array. See the return notation for get_plugin_data() for a hint on how to do that.

#6 @clarionwpdeveloper
11 months ago

I added hash-notation style to document the return array.

#7 @swissspidy
10 months ago

  • Milestone changed from Future Release to 4.7

#8 @jorbin
10 months ago

@DrewAPicture Can you take a look at the new patch?

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


9 months ago

#10 @DrewAPicture
9 months ago

  • Owner changed from clarionwpdeveloper to DrewAPicture
  • Status changed from assigned to reviewing

#11 @sudar
9 months ago

Tweaked the docs a bit and fixed whitespace.

@sudar
9 months ago

@sudar
9 months ago

#12 @swissspidy
9 months ago

@sudar Thanks, this is getting along nicely.

Note that optional parameters should be documented according to the standards, see https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/php/#docblock-formatting. Also, Date about the plugin should probably be something like Data about the plugin retrieved from the API.

#13 @sudar
9 months ago

@swissspidy Thanks for reviewing it.

I am attaching the modified patch after implementing the changes you suggested.

@sudar
9 months ago

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


8 months ago

#15 @swissspidy
8 months ago

  • Owner changed from DrewAPicture to swissspidy

#16 @swissspidy
8 months ago

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

In 38805:

Docs: Improve documentation for install_plugin_install_status().

Props clarionwpdeveloper, sudar.
Fixes #36912.

Note: See TracTickets for help on using tickets.