Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#36912 closed defect (bug) (fixed)

Improve documentation for install_plugin_install_status()

Reported by: swissspidy's profile swissspidy Owned by: swissspidy's profile 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 8 years ago.
plugin-install.php.2.patch (911 bytes) - added by clarionwpdeveloper 8 years ago.
plugin-install.php.3.patch (883 bytes) - added by clarionwpdeveloper 8 years ago.
36912.patch (983 bytes) - added by sudar 8 years ago.
36912.2.patch (983 bytes) - added by sudar 8 years ago.
36912.3.patch (1015 bytes) - added by sudar 8 years ago.

Download all attachments as: .zip

Change History (22)

#1 @DrewAPicture
8 years 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.


8 years ago

#3 @swissspidy
8 years 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
8 years ago

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

#5 @DrewAPicture
8 years 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
8 years ago

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

#7 @swissspidy
8 years ago

  • Milestone changed from Future Release to 4.7

#8 @jorbin
8 years ago

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

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


8 years ago

#10 @DrewAPicture
8 years ago

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

#11 @sudar
8 years ago

Tweaked the docs a bit and fixed whitespace.

@sudar
8 years ago

@sudar
8 years ago

#12 @swissspidy
8 years 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
8 years ago

@swissspidy Thanks for reviewing it.

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

@sudar
8 years ago

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


8 years ago

#15 @swissspidy
8 years ago

  • Owner changed from DrewAPicture to swissspidy

#16 @swissspidy
8 years 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.