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 Built from https://develop.svn.wordpress.org/trunk@34786 git-svn-id: http://core.svn.wordpress.org/trunk@34751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9d7d1508e2
commit
9bc54c9442
|
@ -530,55 +530,86 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||||
}
|
}
|
||||||
} // end if $context
|
} // end if $context
|
||||||
|
|
||||||
$prefix = $screen->in_admin( 'network' ) ? 'network_admin_' : '';
|
$actions = array_filter( $actions );
|
||||||
|
|
||||||
|
if ( $screen->in_admin( 'network' ) ) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the action links displayed for each plugin in the Plugins list table.
|
* Filter the action links displayed for each plugin in the Network Admin Plugins list table.
|
||||||
*
|
|
||||||
* The dynamic portion of the hook name, `$prefix`, refers to the context the
|
|
||||||
* action links are displayed in. The 'network_admin_' prefix is used if the
|
|
||||||
* current screen is the Network plugins list table. The prefix is empty ('')
|
|
||||||
* if the current screen is the site plugins list table.
|
|
||||||
*
|
*
|
||||||
* The default action links for the Network plugins list table include
|
* The default action links for the Network plugins list table include
|
||||||
* 'Network Activate', 'Network Deactivate', 'Edit', and 'Delete'.
|
* 'Network Activate', 'Network Deactivate', 'Edit', and 'Delete'.
|
||||||
*
|
*
|
||||||
|
* @since 3.1.0 As `{$prefix}_plugin_action_links`
|
||||||
|
* @since 4.4.0
|
||||||
|
*
|
||||||
|
* @param array $actions An array of plugin action links.
|
||||||
|
* @param string $plugin_file Path to the plugin file relative to the plugins directory.
|
||||||
|
* @param array $plugin_data An array of plugin data.
|
||||||
|
* @param string $context The plugin context. Defaults are 'All', 'Active',
|
||||||
|
* 'Inactive', 'Recently Activated', 'Upgrade',
|
||||||
|
* 'Must-Use', 'Drop-ins', 'Search'.
|
||||||
|
*/
|
||||||
|
$actions = apply_filters( 'network_admin_plugin_action_links', $actions, $plugin_file, $plugin_data, $context );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the list of action links displayed for a specific plugin in the Network Admin Plugins list table.
|
||||||
|
*
|
||||||
|
* The dynamic portion of the hook name, $plugin_file, refers to the path
|
||||||
|
* to the plugin file, relative to the plugins directory.
|
||||||
|
*
|
||||||
|
* @since 3.1.0 As `{$prefix}_plugin_action_links_{$plugin_file}`
|
||||||
|
* @since 4.4.0
|
||||||
|
*
|
||||||
|
* @param array $actions An array of plugin action links.
|
||||||
|
* @param string $plugin_file Path to the plugin file relative to the plugins directory.
|
||||||
|
* @param array $plugin_data An array of plugin data.
|
||||||
|
* @param string $context The plugin context. Defaults are 'All', 'Active',
|
||||||
|
* 'Inactive', 'Recently Activated', 'Upgrade',
|
||||||
|
* 'Must-Use', 'Drop-ins', 'Search'.
|
||||||
|
*/
|
||||||
|
$actions = apply_filters( "network_admin_plugin_action_links_{$plugin_file}", $actions, $plugin_file, $plugin_data, $context );
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the action links displayed for each plugin in the Plugins list table.
|
||||||
|
*
|
||||||
* The default action links for the site plugins list table include
|
* The default action links for the site plugins list table include
|
||||||
* 'Activate', 'Deactivate', and 'Edit', for a network site, and
|
* 'Activate', 'Deactivate', and 'Edit', for a network site, and
|
||||||
* 'Activate', 'Deactivate', 'Edit', and 'Delete' for a single site.
|
* 'Activate', 'Deactivate', 'Edit', and 'Delete' for a single site.
|
||||||
*
|
*
|
||||||
* @since 2.5.0
|
* @since 2.5.0 As `{$prefix}_plugin_action_links`
|
||||||
|
* @since 4.4.0
|
||||||
*
|
*
|
||||||
* @param array $actions An array of plugin action links.
|
* @param array $actions An array of plugin action links.
|
||||||
* @param string $plugin_file Path to the plugin file.
|
* @param string $plugin_file Path to the plugin file relative to the plugins directory.
|
||||||
* @param array $plugin_data An array of plugin data.
|
* @param array $plugin_data An array of plugin data.
|
||||||
* @param string $context The plugin context. Defaults are 'All', 'Active',
|
* @param string $context The plugin context. Defaults are 'All', 'Active',
|
||||||
* 'Inactive', 'Recently Activated', 'Upgrade',
|
* 'Inactive', 'Recently Activated', 'Upgrade',
|
||||||
* 'Must-Use', 'Drop-ins', 'Search'.
|
* 'Must-Use', 'Drop-ins', 'Search'.
|
||||||
*/
|
*/
|
||||||
$actions = apply_filters( $prefix . 'plugin_action_links', array_filter( $actions ), $plugin_file, $plugin_data, $context );
|
$actions = apply_filters( 'plugin_action_links', $actions, $plugin_file, $plugin_data, $context );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the list of action links displayed for a specific plugin.
|
* Filter the list of action links displayed for a specific plugin in the Plugins list table.
|
||||||
*
|
*
|
||||||
* The first dynamic portion of the hook name, $prefix, refers to the context
|
* The dynamic portion of the hook name, $plugin_file, refers to the path
|
||||||
* the action links are displayed in. The 'network_admin_' prefix is used if the
|
|
||||||
* current screen is the Network plugins list table. The prefix is empty ('')
|
|
||||||
* if the current screen is the site plugins list table.
|
|
||||||
*
|
|
||||||
* The second dynamic portion of the hook name, $plugin_file, refers to the path
|
|
||||||
* to the plugin file, relative to the plugins directory.
|
* to the plugin file, relative to the plugins directory.
|
||||||
*
|
*
|
||||||
* @since 2.7.0
|
* @since 2.7.0 As `{$prefix}_plugin_action_links_{$plugin_file}`
|
||||||
|
* @since 4.4.0
|
||||||
*
|
*
|
||||||
* @param array $actions An array of plugin action links.
|
* @param array $actions An array of plugin action links.
|
||||||
* @param string $plugin_file Path to the plugin file.
|
* @param string $plugin_file Path to the plugin file relative to the plugins directory.
|
||||||
* @param array $plugin_data An array of plugin data.
|
* @param array $plugin_data An array of plugin data.
|
||||||
* @param string $context The plugin context. Defaults are 'All', 'Active',
|
* @param string $context The plugin context. Defaults are 'All', 'Active',
|
||||||
* 'Inactive', 'Recently Activated', 'Upgrade',
|
* 'Inactive', 'Recently Activated', 'Upgrade',
|
||||||
* 'Must-Use', 'Drop-ins', 'Search'.
|
* 'Must-Use', 'Drop-ins', 'Search'.
|
||||||
*/
|
*/
|
||||||
$actions = apply_filters( $prefix . "plugin_action_links_$plugin_file", $actions, $plugin_file, $plugin_data, $context );
|
$actions = apply_filters( "plugin_action_links_{$plugin_file}", $actions, $plugin_file, $plugin_data, $context );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
$class = $is_active ? 'active' : 'inactive';
|
$class = $is_active ? 'active' : 'inactive';
|
||||||
$checkbox_id = "checkbox_" . md5($plugin_data['Name']);
|
$checkbox_id = "checkbox_" . md5($plugin_data['Name']);
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.4-alpha-34785';
|
$wp_version = '4.4-alpha-34786';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue