Ticket #34117: 34117.diff
File 34117.diff, 5.2 KB (added by , 9 years ago) |
---|
-
src/wp-admin/includes/class-wp-plugins-list-table.php
530 530 } 531 531 } // end if $context 532 532 533 $prefix = $screen->in_admin( 'network' ) ? 'network_admin_' : ''; 533 $actions = array_filter( $actions ); 534 535 if ( $screen->in_admin( 'network' ) ) { 534 536 535 537 /** 536 * Filter the action links displayed for each plugin in the Plugins list table. 537 * 538 * The dynamic portion of the hook name, `$prefix`, refers to the context the 539 * action links are displayed in. The 'network_admin_' prefix is used if the 540 * current screen is the Network plugins list table. The prefix is empty ('') 541 * if the current screen is the site plugins list table. 538 * Filter the action links displayed for each plugin in the Network Admin Plugins list table. 542 539 * 543 540 * The default action links for the Network plugins list table include 544 541 * 'Network Activate', 'Network Deactivate', 'Edit', and 'Delete'. 545 542 * 543 * @since 3.1.0 544 * 545 * @param array $actions An array of plugin action links. 546 * @param string $plugin_file Path to the plugin file relative to the plugins directory. 547 * @param array $plugin_data An array of plugin data. 548 * @param string $context The plugin context. Defaults are 'All', 'Active', 549 * 'Inactive', 'Recently Activated', 'Upgrade', 550 * 'Must-Use', 'Drop-ins', 'Search'. 551 */ 552 $actions = apply_filters( 'network_admin_plugin_action_links', $actions, $plugin_file, $plugin_data, $context ); 553 554 /** 555 * Filter the list of action links displayed for a specific plugin in the Network Admin Plugins list table. 556 * 557 * The dynamic portion of the hook name, $plugin_file, refers to the path 558 * to the plugin file, relative to the plugins directory. 559 * 560 * @since 3.1.0 561 * 562 * @param array $actions An array of plugin action links. 563 * @param string $plugin_file Path to the plugin file relative to the plugins directory. 564 * @param array $plugin_data An array of plugin data. 565 * @param string $context The plugin context. Defaults are 'All', 'Active', 566 * 'Inactive', 'Recently Activated', 'Upgrade', 567 * 'Must-Use', 'Drop-ins', 'Search'. 568 */ 569 $actions = apply_filters( "network_admin_plugin_action_links_$plugin_file", $actions, $plugin_file, $plugin_data, $context ); 570 571 } else { 572 573 /** 574 * Filter the action links displayed for each plugin in the Plugins list table. 575 * 546 576 * The default action links for the site plugins list table include 547 577 * 'Activate', 'Deactivate', and 'Edit', for a network site, and 548 578 * 'Activate', 'Deactivate', 'Edit', and 'Delete' for a single site. … … 550 580 * @since 2.5.0 551 581 * 552 582 * @param array $actions An array of plugin action links. 553 * @param string $plugin_file Path to the plugin file .583 * @param string $plugin_file Path to the plugin file relative to the plugins directory. 554 584 * @param array $plugin_data An array of plugin data. 555 585 * @param string $context The plugin context. Defaults are 'All', 'Active', 556 586 * 'Inactive', 'Recently Activated', 'Upgrade', 557 587 * 'Must-Use', 'Drop-ins', 'Search'. 558 588 */ 559 $actions = apply_filters( $prefix . 'plugin_action_links', array_filter( $actions ), $plugin_file, $plugin_data, $context );589 $actions = apply_filters( 'plugin_action_links', $actions, $plugin_file, $plugin_data, $context ); 560 590 561 591 /** 562 * Filter the list of action links displayed for a specific plugin .592 * Filter the list of action links displayed for a specific plugin in the Plugins list table. 563 593 * 564 * The first dynamic portion of the hook name, $prefix, refers to the context 565 * the action links are displayed in. The 'network_admin_' prefix is used if the 566 * current screen is the Network plugins list table. The prefix is empty ('') 567 * if the current screen is the site plugins list table. 568 * 569 * The second dynamic portion of the hook name, $plugin_file, refers to the path 594 * The dynamic portion of the hook name, $plugin_file, refers to the path 570 595 * to the plugin file, relative to the plugins directory. 571 596 * 572 597 * @since 2.7.0 573 598 * 574 599 * @param array $actions An array of plugin action links. 575 * @param string $plugin_file Path to the plugin file .600 * @param string $plugin_file Path to the plugin file relative to the plugins directory. 576 601 * @param array $plugin_data An array of plugin data. 577 602 * @param string $context The plugin context. Defaults are 'All', 'Active', 578 603 * 'Inactive', 'Recently Activated', 'Upgrade', 579 604 * 'Must-Use', 'Drop-ins', 'Search'. 580 605 */ 581 $actions = apply_filters( $prefix . "plugin_action_links_$plugin_file", $actions, $plugin_file, $plugin_data, $context ); 606 $actions = apply_filters( "plugin_action_links_$plugin_file", $actions, $plugin_file, $plugin_data, $context ); 607 608 } 582 609 583 610 $class = $is_active ? 'active' : 'inactive'; 584 611 $checkbox_id = "checkbox_" . md5($plugin_data['Name']);