Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 9 years ago

#34117 closed enhancement (fixed)

Remove unnecessary dynamic portion from the `plugin_action_links` filters

Reported by: johnbillion Owned by: johnbillion
Priority: normal Milestone: 4.4
Component: Plugins Version:
Severity: normal Keywords: has-patch commit
Cc: Focuses: docs, administration

Description

The plugin_action_links and plugin_action_links_{$plugin_file} filter names are prefixed with network_admin_ in the Network Admin Plugins list table. This makes the documentation for the filters unnecessarily verbose.

Let's remove the dynamic prefix from these filter names and apply the filters individually.

This has the side effect of allowing the @since docs for the network_admin_* filters to be corrected.

Attachments (2)

34117.diff (5.2 KB ) - added by johnbillion 11 years ago.
34117.2.diff (6.8 KB ) - added by DrewAPicture 11 years ago.
Docs fixes

Download all attachments as: .zip

Change History (8)

@johnbillion
11 years ago

#1 @johnbillion
11 years ago

  • Keywords has-patch added
  • Owner set to DrewAPicture
  • Status newreviewing

34117.diff looks complicated but all it's doing is removing the dynamic $prefix portion and replacing it with an if ( $screen->in_admin( 'network' ) ) { ... } else { ... } statement.

Indentation needs correcting before commit.

Drew, mind reviewing?

#2 @DrewAPicture
11 years ago

  • Status reviewingaccepted

@DrewAPicture
11 years ago

Docs fixes

#3 @DrewAPicture
11 years ago

  • Keywords commit added
  • Owner changed from DrewAPicture to johnbillion
  • Status acceptedassigned

@johnbillion I ended up just indenting the hooks since we're renaming them anyway. Our changelog style for renaming hooks (it's only happened about ~10 times before) is to mark the initial @since with "As hook_name", which I've done in 34117.2.diff among another minor fixes. Good to go.

#4 @DrewAPicture
11 years ago

  • Component AdministrationPlugins
  • Focuses administration added

#5 @johnbillion
11 years ago

  • Resolutionfixed
  • Status assignedclosed

In 34786:

Remove the unnecessary dynamic prefix used in the plugin_action_links filter name, and in those of its brethren. This way, network_admin_plugin_action_links gets listed as a separate filter.

Fixes #34117

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


9 years ago

Note: See TracTickets for help on using tickets.