Archived
Updates
This commit is contained in:
1 parent
70d2335bba
commit
7428b67da5
1086 files changed
+94145
-59082
No files matched your search
@@ -125,8 +125,17 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||
// Extra info if known. array_merge() ensures $plugin_data has precedence if keys collide.
|
||||
if ( isset( $plugin_info->response[ $plugin_file ] ) ) {
|
||||
$plugins['all'][ $plugin_file ] = $plugin_data = array_merge( (array) $plugin_info->response[ $plugin_file ], $plugin_data );
|
||||
// Make sure that $plugins['upgrade'] also receives the extra info since it is used on ?plugin_status=upgrade
|
||||
if ( isset( $plugins['upgrade'][ $plugin_file ] ) ) {
|
||||
$plugins['upgrade'][ $plugin_file ] = $plugin_data = array_merge( (array) $plugin_info->response[ $plugin_file ], $plugin_data );
|
||||
}
|
||||
|
||||
} elseif ( isset( $plugin_info->no_update[ $plugin_file ] ) ) {
|
||||
$plugins['all'][ $plugin_file ] = $plugin_data = array_merge( (array) $plugin_info->no_update[ $plugin_file ], $plugin_data );
|
||||
// Make sure that $plugins['upgrade'] also receives the extra info since it is used on ?plugin_status=upgrade
|
||||
if ( isset( $plugins['upgrade'][ $plugin_file ] ) ) {
|
||||
$plugins['upgrade'][ $plugin_file ] = $plugin_data = array_merge( (array) $plugin_info->no_update[ $plugin_file ], $plugin_data );
|
||||
}
|
||||
}
|
||||
|
||||
// Filter into individual sections
|
||||
@@ -191,6 +200,11 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||
) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @staticvar string $term
|
||||
* @param array $plugin
|
||||
* @return boolean
|
||||
*/
|
||||
public function _search_callback( $plugin ) {
|
||||
static $term;
|
||||
if ( is_null( $term ) )
|
||||
@@ -205,6 +219,13 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @global string $orderby
|
||||
* @global string $order
|
||||
* @param array $plugin_a
|
||||
* @param array $plugin_b
|
||||
* @return int
|
||||
*/
|
||||
public function _order_callback( $plugin_a, $plugin_b ) {
|
||||
global $orderby, $order;
|
||||
|
||||
@@ -308,6 +329,11 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||
return $actions;
|
||||
}
|
||||
|
||||
/**
|
||||
* @global string $status
|
||||
* @param string $which
|
||||
* @return null
|
||||
*/
|
||||
public function bulk_actions( $which = '' ) {
|
||||
global $status;
|
||||
|
||||
@@ -317,6 +343,11 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||
parent::bulk_actions( $which );
|
||||
}
|
||||
|
||||
/**
|
||||
* @global string $status
|
||||
* @param string $which
|
||||
* @return null
|
||||
*/
|
||||
protected function extra_tablenav( $which ) {
|
||||
global $status;
|
||||
|
||||
@@ -352,6 +383,13 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||
$this->single_row( array( $plugin_file, $plugin_data ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @global string $status
|
||||
* @global int $page
|
||||
* @global string $s
|
||||
* @global array $totals
|
||||
* @param array $item
|
||||
*/
|
||||
public function single_row( $item ) {
|
||||
global $status, $page, $s, $totals;
|
||||
|
||||
@@ -424,7 +462,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||
/**
|
||||
* Filter the action links displayed for each plugin in the Plugins list table.
|
||||
*
|
||||
* The dynamic portion of the hook name, $prefix, refers to the context the
|
||||
* 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.
|
||||
@@ -486,7 +524,12 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||
if ( ! empty( $totals['upgrade'] ) && ! empty( $plugin_data['update'] ) )
|
||||
$class .= ' update';
|
||||
|
||||
echo "<tr id='$id' class='$class'>";
|
||||
$plugin_slug = ( isset( $plugin_data['slug'] ) ) ? $plugin_data['slug'] : '';
|
||||
printf( "<tr id='%s' class='%s' data-slug='%s'>",
|
||||
$id,
|
||||
$class,
|
||||
$plugin_slug
|
||||
);
|
||||
|
||||
list( $columns, $hidden ) = $this->get_column_info();
|
||||
|
||||
@@ -589,7 +632,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||
/**
|
||||
* Fires after each specific row in the Plugins list table.
|
||||
*
|
||||
* The dynamic portion of the hook name, $plugin_file, refers to the path
|
||||
* The dynamic portion of the hook name, `$plugin_file`, refers to the path
|
||||
* to the plugin file, relative to the plugins directory.
|
||||
*
|
||||
* @since 2.7.0
|
||||
|
||||
Reference in new issue
Block a user