Changeset 27356
- Timestamp:
- 03/02/2014 08:47:31 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-plugins-list-table.php
r27326 r27356 41 41 wp_reset_vars( array( 'orderby', 'order', 's' ) ); 42 42 43 /** 44 * Filter the full array of plugins to list in the Plugins list table. 45 * 46 * @since 3.0.0 47 * 48 * @see get_plugins() 49 * 50 * @param array $plugins An array of plugins to display in the list table. 51 */ 43 52 $plugins = array( 44 53 'all' => apply_filters( 'all_plugins', get_plugins() ), … … 55 64 56 65 if ( ! is_multisite() || ( $screen->in_admin( 'network' ) && current_user_can( 'manage_network_plugins' ) ) ) { 57 if ( apply_filters( 'show_advanced_plugins', true, 'mustuse' ) ) 66 67 /** 68 * Filter whether to display the advanced plugins list table. 69 * 70 * There are two types of advanced plugins - must-use and drop-ins - 71 * which can be used in a single site or Multisite network. 72 * 73 * The $type parameter allows you to differentiate between the type of advanced 74 * plugins to filter the display of. Contexts include 'mustuse' and 'dropins'. 75 * 76 * @since 3.0.0 77 * 78 * @param bool $show Whether to show the advanced plugins for the specified 79 * plugin type. Default true. 80 * @param string $type The plugin type. Accepts 'mustuse', 'dropins'. 81 */ 82 if ( apply_filters( 'show_advanced_plugins', true, 'mustuse' ) ) { 58 83 $plugins['mustuse'] = get_mu_plugins(); 84 } 85 86 /** This action is documented in wp-admin/includes/class-wp-plugins-list-table.php */ 59 87 if ( apply_filters( 'show_advanced_plugins', true, 'dropins' ) ) 60 88 $plugins['dropins'] = get_dropins(); … … 370 398 371 399 $prefix = $screen->in_admin( 'network' ) ? 'network_admin_' : ''; 400 401 /** 402 * Filter the action links displayed for each plugin in the Plugins list table. 403 * 404 * The dynamic portion of the hook name, $prefix, refers to the context the 405 * action links are displayed in. The 'network_admin_' prefix is used if the 406 * current screen is the Network plugins list table. The prefix is empty ('') 407 * if the current screen is the site plugins list table. 408 * 409 * The default action links for the Network plugins list table include 410 * 'Network Activate', 'Network Deactivate', 'Edit', and 'Delete'. 411 * 412 * The default action links for the site plugins list table include 413 * 'Activate', 'Deactivate', and 'Edit', for a network site, and 414 * 'Activate', 'Deactivate', 'Edit', and 'Delete' for a single site. 415 * 416 * @since 2.5.0 417 * 418 * @param array $actions An array of plugin action links. 419 * @param string $plugin_file Path to the plugin file. 420 * @param array $plugin_data An array of plugin data. 421 * @param string $context The plugin context. Defaults are 'All', 'Active', 422 * 'Inactive', 'Recently Activated', 'Upgrade', 423 * 'Must-Use', 'Drop-ins', 'Search'. 424 */ 372 425 $actions = apply_filters( $prefix . 'plugin_action_links', array_filter( $actions ), $plugin_file, $plugin_data, $context ); 426 427 /** 428 * Filter the list of action links displayed for a specific plugin. 429 * 430 * The first dynamic portion of the hook name, $prefix, refers to the context 431 * the action links are displayed in. The 'network_admin_' prefix is used if the 432 * current screen is the Network plugins list table. The prefix is empty ('') 433 * if the current screen is the site plugins list table. 434 * 435 * The second dynamic portion of the hook name, $plugin_file, refers to the path 436 * to the plugin file, relative to the plugins directory. 437 * 438 * @since 2.7.0 439 * 440 * @param array $actions An array of plugin action links. 441 * @param string $plugin_file Path to the plugin file. 442 * @param array $plugin_data An array of plugin data. 443 * @param string $context The plugin context. Defaults are 'All', 'Active', 444 * 'Inactive', 'Recently Activated', 'Upgrade', 445 * 'Must-Use', 'Drop-ins', 'Search'. 446 */ 373 447 $actions = apply_filters( $prefix . "plugin_action_links_$plugin_file", $actions, $plugin_file, $plugin_data, $context ); 374 448 … … 425 499 $plugin_meta[] = '<a href="' . $plugin_data['PluginURI'] . '" title="' . esc_attr__( 'Visit plugin site' ) . '">' . __( 'Visit plugin site' ) . '</a>'; 426 500 501 /** 502 * Filter the array of row meta for each plugin in the Plugins list table. 503 * 504 * @since 2.8.0 505 * 506 * @param array $plugin_meta An array of the plugin's metadata, 507 * including the version, author, 508 * author URI, and plugin URI. 509 * @param string $plugin_file Path to the plugin file, relative to the plugins directory. 510 * @param array $plugin_data An array of plugin data. 511 * @param string $status Status of the plugin. Defaults are 'All', 'Active', 512 * 'Inactive', 'Recently Activated', 'Upgrade', 'Must-Use', 513 * 'Drop-ins', 'Search'. 514 */ 427 515 $plugin_meta = apply_filters( 'plugin_row_meta', $plugin_meta, $plugin_file, $plugin_data, $status ); 428 516 echo implode( ' | ', $plugin_meta ); … … 432 520 default: 433 521 echo "<td class='$column_name column-$column_name'$style>"; 522 523 /** 524 * Fires inside each custom column of the Plugins list table. 525 * 526 * @since 3.1.0 527 * 528 * @param string $column_name Name of the column. 529 * @param string $plugin_file Path to the plugin file. 530 * @param array $plugin_data An array of plugin data. 531 */ 434 532 do_action( 'manage_plugins_custom_column', $column_name, $plugin_file, $plugin_data ); 435 533 echo "</td>"; … … 439 537 echo "</tr>"; 440 538 539 /** 540 * Fires after each row in the Plugins list table. 541 * 542 * @since 2.3.0 543 * 544 * @param string $plugin_file Path to the plugin file, relative to the plugins directory. 545 * @param array $plugin_data An array of plugin data. 546 * @param string $status Status of the plugin. Defaults are 'All', 'Active', 547 * 'Inactive', 'Recently Activated', 'Upgrade', 'Must-Use', 548 * 'Drop-ins', 'Search'. 549 */ 441 550 do_action( 'after_plugin_row', $plugin_file, $plugin_data, $status ); 551 552 /** 553 * Fires after each specific row in the Plugins list table. 554 * 555 * The dynamic portion of the hook name, $plugin_file, refers to the path 556 * to the plugin file, relative to the plugins directory. 557 * 558 * @since 2.7.0 559 * 560 * @param string $plugin_file Path to the plugin file, relative to the plugins directory. 561 * @param array $plugin_data An array of plugin data. 562 * @param string $status Status of the plugin. Defaults are 'All', 'Active', 563 * 'Inactive', 'Recently Activated', 'Upgrade', 'Must-Use', 564 * 'Drop-ins', 'Search'. 565 */ 442 566 do_action( "after_plugin_row_$plugin_file", $plugin_file, $plugin_data, $status ); 443 567 }
Note: See TracChangeset
for help on using the changeset viewer.