WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 2 years ago

#34117 closed enhancement (fixed)

Remove unnecessary dynamic portion from the `plugin_action_links` filters

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

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 4 years ago.
34117.2.diff (6.8 KB) - added by DrewAPicture 4 years ago.
Docs fixes

Download all attachments as: .zip

Change History (8)

@johnbillion
4 years ago

#1 @johnbillion
4 years ago

  • Keywords has-patch added
  • Owner set to DrewAPicture
  • Status changed from new to reviewing

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
4 years ago

  • Status changed from reviewing to accepted

@DrewAPicture
4 years ago

Docs fixes

#3 @DrewAPicture
4 years ago

  • Keywords commit added
  • Owner changed from DrewAPicture to johnbillion
  • Status changed from accepted to assigned

@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
4 years ago

  • Component changed from Administration to Plugins
  • Focuses administration added

#5 @johnbillion
4 years ago

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

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.


2 years ago

Note: See TracTickets for help on using tickets.