[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-admin/includes/ -> class-wp-plugins-list-table.php (source)

   1  <?php
   2  /**
   3   * List Table API: WP_Plugins_List_Table class
   4   *
   5   * @package WordPress
   6   * @subpackage Administration
   7   * @since 3.1.0
   8   */
   9  
  10  /**
  11   * Core class used to implement displaying installed plugins in a list table.
  12   *
  13   * @since 3.1.0
  14   * @access private
  15   *
  16   * @see WP_List_Table
  17   */
  18  class WP_Plugins_List_Table extends WP_List_Table {
  19      /**
  20       * Whether to show the auto-updates UI.
  21       *
  22       * @since 5.5.0
  23       *
  24       * @var bool True if auto-updates UI is to be shown, false otherwise.
  25       */
  26      protected $show_autoupdates = true;
  27  
  28      /**
  29       * Constructor.
  30       *
  31       * @since 3.1.0
  32       *
  33       * @see WP_List_Table::__construct() for more information on default arguments.
  34       *
  35       * @global string $status
  36       * @global int    $page
  37       *
  38       * @param array $args An associative array of arguments.
  39       */
  40  	public function __construct( $args = array() ) {
  41          global $status, $page;
  42  
  43          parent::__construct(
  44              array(
  45                  'plural' => 'plugins',
  46                  'screen' => isset( $args['screen'] ) ? $args['screen'] : null,
  47              )
  48          );
  49  
  50          $allowed_statuses = array( 'active', 'inactive', 'recently_activated', 'upgrade', 'mustuse', 'dropins', 'search', 'paused', 'auto-update-enabled', 'auto-update-disabled' );
  51  
  52          $status = 'all';
  53          if ( isset( $_REQUEST['plugin_status'] ) && in_array( $_REQUEST['plugin_status'], $allowed_statuses, true ) ) {
  54              $status = $_REQUEST['plugin_status'];
  55          }
  56  
  57          if ( isset( $_REQUEST['s'] ) ) {
  58              $_SERVER['REQUEST_URI'] = add_query_arg( 's', wp_unslash( $_REQUEST['s'] ) );
  59          }
  60  
  61          $page = $this->get_pagenum();
  62  
  63          $this->show_autoupdates = wp_is_auto_update_enabled_for_type( 'plugin' )
  64              && current_user_can( 'update_plugins' )
  65              && ( ! is_multisite() || $this->screen->in_admin( 'network' ) )
  66              && ! in_array( $status, array( 'mustuse', 'dropins' ), true );
  67      }
  68  
  69      /**
  70       * @return array
  71       */
  72  	protected function get_table_classes() {
  73          return array( 'widefat', $this->_args['plural'] );
  74      }
  75  
  76      /**
  77       * @return bool
  78       */
  79  	public function ajax_user_can() {
  80          return current_user_can( 'activate_plugins' );
  81      }
  82  
  83      /**
  84       * @global string $status
  85       * @global array  $plugins
  86       * @global array  $totals
  87       * @global int    $page
  88       * @global string $orderby
  89       * @global string $order
  90       * @global string $s
  91       */
  92  	public function prepare_items() {
  93          global $status, $plugins, $totals, $page, $orderby, $order, $s;
  94  
  95          wp_reset_vars( array( 'orderby', 'order' ) );
  96  
  97          /**
  98           * Filters the full array of plugins to list in the Plugins list table.
  99           *
 100           * @since 3.0.0
 101           *
 102           * @see get_plugins()
 103           *
 104           * @param array $all_plugins An array of plugins to display in the list table.
 105           */
 106          $all_plugins = apply_filters( 'all_plugins', get_plugins() );
 107  
 108          $plugins = array(
 109              'all'                => $all_plugins,
 110              'search'             => array(),
 111              'active'             => array(),
 112              'inactive'           => array(),
 113              'recently_activated' => array(),
 114              'upgrade'            => array(),
 115              'mustuse'            => array(),
 116              'dropins'            => array(),
 117              'paused'             => array(),
 118          );
 119          if ( $this->show_autoupdates ) {
 120              $auto_updates = (array) get_site_option( 'auto_update_plugins', array() );
 121  
 122              $plugins['auto-update-enabled']  = array();
 123              $plugins['auto-update-disabled'] = array();
 124          }
 125  
 126          $screen = $this->screen;
 127  
 128          if ( ! is_multisite() || ( $screen->in_admin( 'network' ) && current_user_can( 'manage_network_plugins' ) ) ) {
 129  
 130              /**
 131               * Filters whether to display the advanced plugins list table.
 132               *
 133               * There are two types of advanced plugins - must-use and drop-ins -
 134               * which can be used in a single site or Multisite network.
 135               *
 136               * The $type parameter allows you to differentiate between the type of advanced
 137               * plugins to filter the display of. Contexts include 'mustuse' and 'dropins'.
 138               *
 139               * @since 3.0.0
 140               *
 141               * @param bool   $show Whether to show the advanced plugins for the specified
 142               *                     plugin type. Default true.
 143               * @param string $type The plugin type. Accepts 'mustuse', 'dropins'.
 144               */
 145              if ( apply_filters( 'show_advanced_plugins', true, 'mustuse' ) ) {
 146                  $plugins['mustuse'] = get_mu_plugins();
 147              }
 148  
 149              /** This action is documented in wp-admin/includes/class-wp-plugins-list-table.php */
 150              if ( apply_filters( 'show_advanced_plugins', true, 'dropins' ) ) {
 151                  $plugins['dropins'] = get_dropins();
 152              }
 153  
 154              if ( current_user_can( 'update_plugins' ) ) {
 155                  $current = get_site_transient( 'update_plugins' );
 156                  foreach ( (array) $plugins['all'] as $plugin_file => $plugin_data ) {
 157                      if ( isset( $current->response[ $plugin_file ] ) ) {
 158                          $plugins['all'][ $plugin_file ]['update'] = true;
 159                          $plugins['upgrade'][ $plugin_file ]       = $plugins['all'][ $plugin_file ];
 160                      }
 161                  }
 162              }
 163          }
 164  
 165          if ( ! $screen->in_admin( 'network' ) ) {
 166              $show = current_user_can( 'manage_network_plugins' );
 167              /**
 168               * Filters whether to display network-active plugins alongside plugins active for the current site.
 169               *
 170               * This also controls the display of inactive network-only plugins (plugins with
 171               * "Network: true" in the plugin header).
 172               *
 173               * Plugins cannot be network-activated or network-deactivated from this screen.
 174               *
 175               * @since 4.4.0
 176               *
 177               * @param bool $show Whether to show network-active plugins. Default is whether the current
 178               *                   user can manage network plugins (ie. a Super Admin).
 179               */
 180              $show_network_active = apply_filters( 'show_network_active_plugins', $show );
 181          }
 182  
 183          if ( $screen->in_admin( 'network' ) ) {
 184              $recently_activated = get_site_option( 'recently_activated', array() );
 185          } else {
 186              $recently_activated = get_option( 'recently_activated', array() );
 187          }
 188  
 189          foreach ( $recently_activated as $key => $time ) {
 190              if ( $time + WEEK_IN_SECONDS < time() ) {
 191                  unset( $recently_activated[ $key ] );
 192              }
 193          }
 194  
 195          if ( $screen->in_admin( 'network' ) ) {
 196              update_site_option( 'recently_activated', $recently_activated );
 197          } else {
 198              update_option( 'recently_activated', $recently_activated );
 199          }
 200  
 201          $plugin_info = get_site_transient( 'update_plugins' );
 202  
 203          foreach ( (array) $plugins['all'] as $plugin_file => $plugin_data ) {
 204              // Extra info if known. array_merge() ensures $plugin_data has precedence if keys collide.
 205              if ( isset( $plugin_info->response[ $plugin_file ] ) ) {
 206                  $plugin_data                    = array_merge( (array) $plugin_info->response[ $plugin_file ], $plugin_data );
 207                  $plugins['all'][ $plugin_file ] = $plugin_data;
 208                  // Make sure that $plugins['upgrade'] also receives the extra info since it is used on ?plugin_status=upgrade.
 209                  if ( isset( $plugins['upgrade'][ $plugin_file ] ) ) {
 210                      $plugins['upgrade'][ $plugin_file ] = $plugin_data;
 211                  }
 212              } elseif ( isset( $plugin_info->no_update[ $plugin_file ] ) ) {
 213                  $plugin_data                    = array_merge( (array) $plugin_info->no_update[ $plugin_file ], $plugin_data );
 214                  $plugins['all'][ $plugin_file ] = $plugin_data;
 215                  // Make sure that $plugins['upgrade'] also receives the extra info since it is used on ?plugin_status=upgrade.
 216                  if ( isset( $plugins['upgrade'][ $plugin_file ] ) ) {
 217                      $plugins['upgrade'][ $plugin_file ] = $plugin_data;
 218                  }
 219              }
 220  
 221              // Filter into individual sections.
 222              if ( is_multisite() && ! $screen->in_admin( 'network' ) && is_network_only_plugin( $plugin_file ) && ! is_plugin_active( $plugin_file ) ) {
 223                  if ( $show_network_active ) {
 224                      // On the non-network screen, show inactive network-only plugins if allowed.
 225                      $plugins['inactive'][ $plugin_file ] = $plugin_data;
 226                  } else {
 227                      // On the non-network screen, filter out network-only plugins as long as they're not individually active.
 228                      unset( $plugins['all'][ $plugin_file ] );
 229                  }
 230              } elseif ( ! $screen->in_admin( 'network' ) && is_plugin_active_for_network( $plugin_file ) ) {
 231                  if ( $show_network_active ) {
 232                      // On the non-network screen, show network-active plugins if allowed.
 233                      $plugins['active'][ $plugin_file ] = $plugin_data;
 234                  } else {
 235                      // On the non-network screen, filter out network-active plugins.
 236                      unset( $plugins['all'][ $plugin_file ] );
 237                  }
 238              } elseif ( ( ! $screen->in_admin( 'network' ) && is_plugin_active( $plugin_file ) )
 239                  || ( $screen->in_admin( 'network' ) && is_plugin_active_for_network( $plugin_file ) ) ) {
 240                  // On the non-network screen, populate the active list with plugins that are individually activated.
 241                  // On the network admin screen, populate the active list with plugins that are network-activated.
 242                  $plugins['active'][ $plugin_file ] = $plugin_data;
 243  
 244                  if ( ! $screen->in_admin( 'network' ) && is_plugin_paused( $plugin_file ) ) {
 245                      $plugins['paused'][ $plugin_file ] = $plugin_data;
 246                  }
 247              } else {
 248                  if ( isset( $recently_activated[ $plugin_file ] ) ) {
 249                      // Populate the recently activated list with plugins that have been recently activated.
 250                      $plugins['recently_activated'][ $plugin_file ] = $plugin_data;
 251                  }
 252                  // Populate the inactive list with plugins that aren't activated.
 253                  $plugins['inactive'][ $plugin_file ] = $plugin_data;
 254              }
 255  
 256              if ( $this->show_autoupdates ) {
 257                  if ( in_array( $plugin_file, $auto_updates, true ) ) {
 258                      $plugins['auto-update-enabled'][ $plugin_file ] = $plugins['all'][ $plugin_file ];
 259                  } else {
 260                      $plugins['auto-update-disabled'][ $plugin_file ] = $plugins['all'][ $plugin_file ];
 261                  }
 262              }
 263          }
 264  
 265          if ( strlen( $s ) ) {
 266              $status            = 'search';
 267              $plugins['search'] = array_filter( $plugins['all'], array( $this, '_search_callback' ) );
 268          }
 269  
 270          $totals = array();
 271          foreach ( $plugins as $type => $list ) {
 272              $totals[ $type ] = count( $list );
 273          }
 274  
 275          if ( empty( $plugins[ $status ] ) && ! in_array( $status, array( 'all', 'search' ), true ) ) {
 276              $status = 'all';
 277          }
 278  
 279          $this->items = array();
 280          foreach ( $plugins[ $status ] as $plugin_file => $plugin_data ) {
 281              // Translate, don't apply markup, sanitize HTML.
 282              $this->items[ $plugin_file ] = _get_plugin_data_markup_translate( $plugin_file, $plugin_data, false, true );
 283          }
 284  
 285          $total_this_page = $totals[ $status ];
 286  
 287          $js_plugins = array();
 288          foreach ( $plugins as $key => $list ) {
 289              $js_plugins[ $key ] = array_keys( (array) $list );
 290          }
 291  
 292          wp_localize_script(
 293              'updates',
 294              '_wpUpdatesItemCounts',
 295              array(
 296                  'plugins' => $js_plugins,
 297                  'totals'  => wp_get_update_data(),
 298              )
 299          );
 300  
 301          if ( ! $orderby ) {
 302              $orderby = 'Name';
 303          } else {
 304              $orderby = ucfirst( $orderby );
 305          }
 306  
 307          $order = strtoupper( $order );
 308  
 309          uasort( $this->items, array( $this, '_order_callback' ) );
 310  
 311          $plugins_per_page = $this->get_items_per_page( str_replace( '-', '_', $screen->id . '_per_page' ), 999 );
 312  
 313          $start = ( $page - 1 ) * $plugins_per_page;
 314  
 315          if ( $total_this_page > $plugins_per_page ) {
 316              $this->items = array_slice( $this->items, $start, $plugins_per_page );
 317          }
 318  
 319          $this->set_pagination_args(
 320              array(
 321                  'total_items' => $total_this_page,
 322                  'per_page'    => $plugins_per_page,
 323              )
 324          );
 325      }
 326  
 327      /**
 328       * @global string $s URL encoded search term.
 329       *
 330       * @param array $plugin
 331       * @return bool
 332       */
 333  	public function _search_callback( $plugin ) {
 334          global $s;
 335  
 336          foreach ( $plugin as $value ) {
 337              if ( is_string( $value ) && false !== stripos( strip_tags( $value ), urldecode( $s ) ) ) {
 338                  return true;
 339              }
 340          }
 341  
 342          return false;
 343      }
 344  
 345      /**
 346       * @global string $orderby
 347       * @global string $order
 348       * @param array $plugin_a
 349       * @param array $plugin_b
 350       * @return int
 351       */
 352  	public function _order_callback( $plugin_a, $plugin_b ) {
 353          global $orderby, $order;
 354  
 355          $a = $plugin_a[ $orderby ];
 356          $b = $plugin_b[ $orderby ];
 357  
 358          if ( $a == $b ) {
 359              return 0;
 360          }
 361  
 362          if ( 'DESC' === $order ) {
 363              return strcasecmp( $b, $a );
 364          } else {
 365              return strcasecmp( $a, $b );
 366          }
 367      }
 368  
 369      /**
 370       * @global array $plugins
 371       */
 372  	public function no_items() {
 373          global $plugins;
 374  
 375          if ( ! empty( $_REQUEST['s'] ) ) {
 376              $s = esc_html( wp_unslash( $_REQUEST['s'] ) );
 377  
 378              /* translators: %s: Plugin search term. */
 379              printf( __( 'No plugins found for &#8220;%s&#8221;.' ), $s );
 380  
 381              // We assume that somebody who can install plugins in multisite is experienced enough to not need this helper link.
 382              if ( ! is_multisite() && current_user_can( 'install_plugins' ) ) {
 383                  echo ' <a href="' . esc_url( admin_url( 'plugin-install.php?tab=search&s=' . urlencode( $s ) ) ) . '">' . __( 'Search for plugins in the WordPress Plugin Directory.' ) . '</a>';
 384              }
 385          } elseif ( ! empty( $plugins['all'] ) ) {
 386              _e( 'No plugins found.' );
 387          } else {
 388              _e( 'No plugins are currently available.' );
 389          }
 390      }
 391  
 392      /**
 393       * Displays the search box.
 394       *
 395       * @since 4.6.0
 396       *
 397       * @param string $text     The 'submit' button label.
 398       * @param string $input_id ID attribute value for the search input field.
 399       */
 400  	public function search_box( $text, $input_id ) {
 401          if ( empty( $_REQUEST['s'] ) && ! $this->has_items() ) {
 402              return;
 403          }
 404  
 405          $input_id = $input_id . '-search-input';
 406  
 407          if ( ! empty( $_REQUEST['orderby'] ) ) {
 408              echo '<input type="hidden" name="orderby" value="' . esc_attr( $_REQUEST['orderby'] ) . '" />';
 409          }
 410          if ( ! empty( $_REQUEST['order'] ) ) {
 411              echo '<input type="hidden" name="order" value="' . esc_attr( $_REQUEST['order'] ) . '" />';
 412          }
 413          ?>
 414          <p class="search-box">
 415              <label class="screen-reader-text" for="<?php echo esc_attr( $input_id ); ?>"><?php echo $text; ?>:</label>
 416              <input type="search" id="<?php echo esc_attr( $input_id ); ?>" class="wp-filter-search" name="s" value="<?php _admin_search_query(); ?>" placeholder="<?php esc_attr_e( 'Search installed plugins...' ); ?>"/>
 417              <?php submit_button( $text, 'hide-if-js', '', false, array( 'id' => 'search-submit' ) ); ?>
 418          </p>
 419          <?php
 420      }
 421  
 422      /**
 423       * @global string $status
 424       * @return array
 425       */
 426  	public function get_columns() {
 427          global $status;
 428  
 429          $columns = array(
 430              'cb'          => ! in_array( $status, array( 'mustuse', 'dropins' ), true ) ? '<input type="checkbox" />' : '',
 431              'name'        => __( 'Plugin' ),
 432              'description' => __( 'Description' ),
 433          );
 434  
 435          if ( $this->show_autoupdates ) {
 436              $columns['auto-updates'] = __( 'Automatic Updates' );
 437          }
 438  
 439          return $columns;
 440      }
 441  
 442      /**
 443       * @return array
 444       */
 445  	protected function get_sortable_columns() {
 446          return array();
 447      }
 448  
 449      /**
 450       * @global array $totals
 451       * @global string $status
 452       * @return array
 453       */
 454  	protected function get_views() {
 455          global $totals, $status;
 456  
 457          $status_links = array();
 458          foreach ( $totals as $type => $count ) {
 459              if ( ! $count ) {
 460                  continue;
 461              }
 462  
 463              switch ( $type ) {
 464                  case 'all':
 465                      /* translators: %s: Number of plugins. */
 466                      $text = _nx(
 467                          'All <span class="count">(%s)</span>',
 468                          'All <span class="count">(%s)</span>',
 469                          $count,
 470                          'plugins'
 471                      );
 472                      break;
 473                  case 'active':
 474                      /* translators: %s: Number of plugins. */
 475                      $text = _n(
 476                          'Active <span class="count">(%s)</span>',
 477                          'Active <span class="count">(%s)</span>',
 478                          $count
 479                      );
 480                      break;
 481                  case 'recently_activated':
 482                      /* translators: %s: Number of plugins. */
 483                      $text = _n(
 484                          'Recently Active <span class="count">(%s)</span>',
 485                          'Recently Active <span class="count">(%s)</span>',
 486                          $count
 487                      );
 488                      break;
 489                  case 'inactive':
 490                      /* translators: %s: Number of plugins. */
 491                      $text = _n(
 492                          'Inactive <span class="count">(%s)</span>',
 493                          'Inactive <span class="count">(%s)</span>',
 494                          $count
 495                      );
 496                      break;
 497                  case 'mustuse':
 498                      /* translators: %s: Number of plugins. */
 499                      $text = _n(
 500                          'Must-Use <span class="count">(%s)</span>',
 501                          'Must-Use <span class="count">(%s)</span>',
 502                          $count
 503                      );
 504                      break;
 505                  case 'dropins':
 506                      /* translators: %s: Number of plugins. */
 507                      $text = _n(
 508                          'Drop-in <span class="count">(%s)</span>',
 509                          'Drop-ins <span class="count">(%s)</span>',
 510                          $count
 511                      );
 512                      break;
 513                  case 'paused':
 514                      /* translators: %s: Number of plugins. */
 515                      $text = _n(
 516                          'Paused <span class="count">(%s)</span>',
 517                          'Paused <span class="count">(%s)</span>',
 518                          $count
 519                      );
 520                      break;
 521                  case 'upgrade':
 522                      /* translators: %s: Number of plugins. */
 523                      $text = _n(
 524                          'Update Available <span class="count">(%s)</span>',
 525                          'Update Available <span class="count">(%s)</span>',
 526                          $count
 527                      );
 528                      break;
 529                  case 'auto-update-enabled':
 530                      /* translators: %s: Number of plugins. */
 531                      $text = _n(
 532                          'Auto-updates Enabled <span class="count">(%s)</span>',
 533                          'Auto-updates Enabled <span class="count">(%s)</span>',
 534                          $count
 535                      );
 536                      break;
 537                  case 'auto-update-disabled':
 538                      /* translators: %s: Number of plugins. */
 539                      $text = _n(
 540                          'Auto-updates Disabled <span class="count">(%s)</span>',
 541                          'Auto-updates Disabled <span class="count">(%s)</span>',
 542                          $count
 543                      );
 544                      break;
 545              }
 546  
 547              if ( 'search' !== $type ) {
 548                  $status_links[ $type ] = sprintf(
 549                      "<a href='%s'%s>%s</a>",
 550                      add_query_arg( 'plugin_status', $type, 'plugins.php' ),
 551                      ( $type === $status ) ? ' class="current" aria-current="page"' : '',
 552                      sprintf( $text, number_format_i18n( $count ) )
 553                  );
 554              }
 555          }
 556  
 557          return $status_links;
 558      }
 559  
 560      /**
 561       * @global string $status
 562       * @return array
 563       */
 564  	protected function get_bulk_actions() {
 565          global $status;
 566  
 567          $actions = array();
 568  
 569          if ( 'active' !== $status ) {
 570              $actions['activate-selected'] = $this->screen->in_admin( 'network' ) ? __( 'Network Activate' ) : __( 'Activate' );
 571          }
 572  
 573          if ( 'inactive' !== $status && 'recent' !== $status ) {
 574              $actions['deactivate-selected'] = $this->screen->in_admin( 'network' ) ? __( 'Network Deactivate' ) : __( 'Deactivate' );
 575          }
 576  
 577          if ( ! is_multisite() || $this->screen->in_admin( 'network' ) ) {
 578              if ( current_user_can( 'update_plugins' ) ) {
 579                  $actions['update-selected'] = __( 'Update' );
 580              }
 581  
 582              if ( current_user_can( 'delete_plugins' ) && ( 'active' !== $status ) ) {
 583                  $actions['delete-selected'] = __( 'Delete' );
 584              }
 585  
 586              if ( $this->show_autoupdates ) {
 587                  if ( 'auto-update-enabled' !== $status ) {
 588                      $actions['enable-auto-update-selected'] = __( 'Enable Auto-updates' );
 589                  }
 590                  if ( 'auto-update-disabled' !== $status ) {
 591                      $actions['disable-auto-update-selected'] = __( 'Disable Auto-updates' );
 592                  }
 593              }
 594          }
 595  
 596          return $actions;
 597      }
 598  
 599      /**
 600       * @global string $status
 601       * @param string $which
 602       */
 603  	public function bulk_actions( $which = '' ) {
 604          global $status;
 605  
 606          if ( in_array( $status, array( 'mustuse', 'dropins' ), true ) ) {
 607              return;
 608          }
 609  
 610          parent::bulk_actions( $which );
 611      }
 612  
 613      /**
 614       * @global string $status
 615       * @param string $which
 616       */
 617  	protected function extra_tablenav( $which ) {
 618          global $status;
 619  
 620          if ( ! in_array( $status, array( 'recently_activated', 'mustuse', 'dropins' ), true ) ) {
 621              return;
 622          }
 623  
 624          echo '<div class="alignleft actions">';
 625  
 626          if ( 'recently_activated' === $status ) {
 627              submit_button( __( 'Clear List' ), '', 'clear-recent-list', false );
 628          } elseif ( 'top' === $which && 'mustuse' === $status ) {
 629              echo '<p>' . sprintf(
 630                  /* translators: %s: mu-plugins directory name. */
 631                  __( 'Files in the %s directory are executed automatically.' ),
 632                  '<code>' . str_replace( ABSPATH, '/', WPMU_PLUGIN_DIR ) . '</code>'
 633              ) . '</p>';
 634          } elseif ( 'top' === $which && 'dropins' === $status ) {
 635              echo '<p>' . sprintf(
 636                  /* translators: %s: wp-content directory name. */
 637                  __( 'Drop-ins are single files, found in the %s directory, that replace or enhance WordPress features in ways that are not possible for traditional plugins.' ),
 638                  '<code>' . str_replace( ABSPATH, '', WP_CONTENT_DIR ) . '</code>'
 639              ) . '</p>';
 640          }
 641          echo '</div>';
 642      }
 643  
 644      /**
 645       * @return string
 646       */
 647  	public function current_action() {
 648          if ( isset( $_POST['clear-recent-list'] ) ) {
 649              return 'clear-recent-list';
 650          }
 651  
 652          return parent::current_action();
 653      }
 654  
 655      /**
 656       * @global string $status
 657       */
 658  	public function display_rows() {
 659          global $status;
 660  
 661          if ( is_multisite() && ! $this->screen->in_admin( 'network' ) && in_array( $status, array( 'mustuse', 'dropins' ), true ) ) {
 662              return;
 663          }
 664  
 665          foreach ( $this->items as $plugin_file => $plugin_data ) {
 666              $this->single_row( array( $plugin_file, $plugin_data ) );
 667          }
 668      }
 669  
 670      /**
 671       * @global string $status
 672       * @global int $page
 673       * @global string $s
 674       * @global array $totals
 675       *
 676       * @param array $item
 677       */
 678  	public function single_row( $item ) {
 679          global $status, $page, $s, $totals;
 680          static $plugin_id_attrs = array();
 681  
 682          list( $plugin_file, $plugin_data ) = $item;
 683  
 684          $plugin_slug    = isset( $plugin_data['slug'] ) ? $plugin_data['slug'] : sanitize_title( $plugin_data['Name'] );
 685          $plugin_id_attr = $plugin_slug;
 686  
 687          // Ensure the ID attribute is unique.
 688          $suffix = 2;
 689          while ( in_array( $plugin_id_attr, $plugin_id_attrs, true ) ) {
 690              $plugin_id_attr = "$plugin_slug-$suffix";
 691              $suffix++;
 692          }
 693  
 694          $plugin_id_attrs[] = $plugin_id_attr;
 695  
 696          $context = $status;
 697          $screen  = $this->screen;
 698  
 699          // Pre-order.
 700          $actions = array(
 701              'deactivate' => '',
 702              'activate'   => '',
 703              'details'    => '',
 704              'delete'     => '',
 705          );
 706  
 707          // Do not restrict by default.
 708          $restrict_network_active = false;
 709          $restrict_network_only   = false;
 710  
 711          if ( 'mustuse' === $context ) {
 712              $is_active = true;
 713          } elseif ( 'dropins' === $context ) {
 714              $dropins     = _get_dropins();
 715              $plugin_name = $plugin_file;
 716              if ( $plugin_file != $plugin_data['Name'] ) {
 717                  $plugin_name .= '<br/>' . $plugin_data['Name'];
 718              }
 719              if ( true === ( $dropins[ $plugin_file ][1] ) ) { // Doesn't require a constant.
 720                  $is_active   = true;
 721                  $description = '<p><strong>' . $dropins[ $plugin_file ][0] . '</strong></p>';
 722              } elseif ( defined( $dropins[ $plugin_file ][1] ) && constant( $dropins[ $plugin_file ][1] ) ) { // Constant is true.
 723                  $is_active   = true;
 724                  $description = '<p><strong>' . $dropins[ $plugin_file ][0] . '</strong></p>';
 725              } else {
 726                  $is_active   = false;
 727                  $description = '<p><strong>' . $dropins[ $plugin_file ][0] . ' <span class="error-message">' . __( 'Inactive:' ) . '</span></strong> ' .
 728                      sprintf(
 729                          /* translators: 1: Drop-in constant name, 2: wp-config.php */
 730                          __( 'Requires %1$s in %2$s file.' ),
 731                          "<code>define('" . $dropins[ $plugin_file ][1] . "', true);</code>",
 732                          '<code>wp-config.php</code>'
 733                      ) . '</p>';
 734              }
 735              if ( $plugin_data['Description'] ) {
 736                  $description .= '<p>' . $plugin_data['Description'] . '</p>';
 737              }
 738          } else {
 739              if ( $screen->in_admin( 'network' ) ) {
 740                  $is_active = is_plugin_active_for_network( $plugin_file );
 741              } else {
 742                  $is_active               = is_plugin_active( $plugin_file );
 743                  $restrict_network_active = ( is_multisite() && is_plugin_active_for_network( $plugin_file ) );
 744                  $restrict_network_only   = ( is_multisite() && is_network_only_plugin( $plugin_file ) && ! $is_active );
 745              }
 746  
 747              if ( $screen->in_admin( 'network' ) ) {
 748                  if ( $is_active ) {
 749                      if ( current_user_can( 'manage_network_plugins' ) ) {
 750                          $actions['deactivate'] = sprintf(
 751                              '<a href="%s" id="deactivate-%s" aria-label="%s">%s</a>',
 752                              wp_nonce_url( 'plugins.php?action=deactivate&amp;plugin=' . urlencode( $plugin_file ) . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'deactivate-plugin_' . $plugin_file ),
 753                              esc_attr( $plugin_id_attr ),
 754                              /* translators: %s: Plugin name. */
 755                              esc_attr( sprintf( _x( 'Network Deactivate %s', 'plugin' ), $plugin_data['Name'] ) ),
 756                              __( 'Network Deactivate' )
 757                          );
 758                      }
 759                  } else {
 760                      if ( current_user_can( 'manage_network_plugins' ) ) {
 761                          $actions['activate'] = sprintf(
 762                              '<a href="%s" id="activate-%s" class="edit" aria-label="%s">%s</a>',
 763                              wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . urlencode( $plugin_file ) . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'activate-plugin_' . $plugin_file ),
 764                              esc_attr( $plugin_id_attr ),
 765                              /* translators: %s: Plugin name. */
 766                              esc_attr( sprintf( _x( 'Network Activate %s', 'plugin' ), $plugin_data['Name'] ) ),
 767                              __( 'Network Activate' )
 768                          );
 769                      }
 770  
 771                      if ( current_user_can( 'delete_plugins' ) && ! is_plugin_active( $plugin_file ) ) {
 772                          $actions['delete'] = sprintf(
 773                              '<a href="%s" id="delete-%s" class="delete" aria-label="%s">%s</a>',
 774                              wp_nonce_url( 'plugins.php?action=delete-selected&amp;checked[]=' . urlencode( $plugin_file ) . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'bulk-plugins' ),
 775                              esc_attr( $plugin_id_attr ),
 776                              /* translators: %s: Plugin name. */
 777                              esc_attr( sprintf( _x( 'Delete %s', 'plugin' ), $plugin_data['Name'] ) ),
 778                              __( 'Delete' )
 779                          );
 780                      }
 781                  }
 782              } else {
 783                  if ( $restrict_network_active ) {
 784                      $actions = array(
 785                          'network_active' => __( 'Network Active' ),
 786                      );
 787                  } elseif ( $restrict_network_only ) {
 788                      $actions = array(
 789                          'network_only' => __( 'Network Only' ),
 790                      );
 791                  } elseif ( $is_active ) {
 792                      if ( current_user_can( 'deactivate_plugin', $plugin_file ) ) {
 793                          $actions['deactivate'] = sprintf(
 794                              '<a href="%s" id="deactivate-%s" aria-label="%s">%s</a>',
 795                              wp_nonce_url( 'plugins.php?action=deactivate&amp;plugin=' . urlencode( $plugin_file ) . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'deactivate-plugin_' . $plugin_file ),
 796                              esc_attr( $plugin_id_attr ),
 797                              /* translators: %s: Plugin name. */
 798                              esc_attr( sprintf( _x( 'Deactivate %s', 'plugin' ), $plugin_data['Name'] ) ),
 799                              __( 'Deactivate' )
 800                          );
 801                      }
 802  
 803                      if ( current_user_can( 'resume_plugin', $plugin_file ) && is_plugin_paused( $plugin_file ) ) {
 804                          $actions['resume'] = sprintf(
 805                              '<a href="%s" id="resume-%s" class="resume-link" aria-label="%s">%s</a>',
 806                              wp_nonce_url( 'plugins.php?action=resume&amp;plugin=' . urlencode( $plugin_file ) . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'resume-plugin_' . $plugin_file ),
 807                              esc_attr( $plugin_id_attr ),
 808                              /* translators: %s: Plugin name. */
 809                              esc_attr( sprintf( _x( 'Resume %s', 'plugin' ), $plugin_data['Name'] ) ),
 810                              __( 'Resume' )
 811                          );
 812                      }
 813                  } else {
 814                      if ( current_user_can( 'activate_plugin', $plugin_file ) ) {
 815                          $actions['activate'] = sprintf(
 816                              '<a href="%s" id="activate-%s" class="edit" aria-label="%s">%s</a>',
 817                              wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . urlencode( $plugin_file ) . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'activate-plugin_' . $plugin_file ),
 818                              esc_attr( $plugin_id_attr ),
 819                              /* translators: %s: Plugin name. */
 820                              esc_attr( sprintf( _x( 'Activate %s', 'plugin' ), $plugin_data['Name'] ) ),
 821                              __( 'Activate' )
 822                          );
 823                      }
 824  
 825                      if ( ! is_multisite() && current_user_can( 'delete_plugins' ) ) {
 826                          $actions['delete'] = sprintf(
 827                              '<a href="%s" id="delete-%s" class="delete" aria-label="%s">%s</a>',
 828                              wp_nonce_url( 'plugins.php?action=delete-selected&amp;checked[]=' . urlencode( $plugin_file ) . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'bulk-plugins' ),
 829                              esc_attr( $plugin_id_attr ),
 830                              /* translators: %s: Plugin name. */
 831                              esc_attr( sprintf( _x( 'Delete %s', 'plugin' ), $plugin_data['Name'] ) ),
 832                              __( 'Delete' )
 833                          );
 834                      }
 835                  } // End if $is_active.
 836              } // End if $screen->in_admin( 'network' ).
 837          } // End if $context.
 838  
 839          $actions = array_filter( $actions );
 840  
 841          if ( $screen->in_admin( 'network' ) ) {
 842  
 843              /**
 844               * Filters the action links displayed for each plugin in the Network Admin Plugins list table.
 845               *
 846               * @since 3.1.0
 847               *
 848               * @param string[] $actions     An array of plugin action links. By default this can include 'activate',
 849               *                              'deactivate', and 'delete'.
 850               * @param string   $plugin_file Path to the plugin file relative to the plugins directory.
 851               * @param array    $plugin_data An array of plugin data. See `get_plugin_data()`.
 852               * @param string   $context     The plugin context. By default this can include 'all', 'active', 'inactive',
 853               *                              'recently_activated', 'upgrade', 'mustuse', 'dropins', and 'search'.
 854               */
 855              $actions = apply_filters( 'network_admin_plugin_action_links', $actions, $plugin_file, $plugin_data, $context );
 856  
 857              /**
 858               * Filters the list of action links displayed for a specific plugin in the Network Admin Plugins list table.
 859               *
 860               * The dynamic portion of the hook name, `$plugin_file`, refers to the path
 861               * to the plugin file, relative to the plugins directory.
 862               *
 863               * @since 3.1.0
 864               *
 865               * @param string[] $actions     An array of plugin action links. By default this can include 'activate',
 866               *                              'deactivate', and 'delete'.
 867               * @param string   $plugin_file Path to the plugin file relative to the plugins directory.
 868               * @param array    $plugin_data An array of plugin data. See `get_plugin_data()`.
 869               * @param string   $context     The plugin context. By default this can include 'all', 'active', 'inactive',
 870               *                              'recently_activated', 'upgrade', 'mustuse', 'dropins', and 'search'.
 871               */
 872              $actions = apply_filters( "network_admin_plugin_action_links_{$plugin_file}", $actions, $plugin_file, $plugin_data, $context );
 873  
 874          } else {
 875  
 876              /**
 877               * Filters the action links displayed for each plugin in the Plugins list table.
 878               *
 879               * @since 2.5.0
 880               * @since 2.6.0 The `$context` parameter was added.
 881               * @since 4.9.0 The 'Edit' link was removed from the list of action links.
 882               *
 883               * @param string[] $actions     An array of plugin action links. By default this can include 'activate',
 884               *                              'deactivate', and 'delete'. With Multisite active this can also include
 885               *                              'network_active' and 'network_only' items.
 886               * @param string   $plugin_file Path to the plugin file relative to the plugins directory.
 887               * @param array    $plugin_data An array of plugin data. See `get_plugin_data()`.
 888               * @param string   $context     The plugin context. By default this can include 'all', 'active', 'inactive',
 889               *                              'recently_activated', 'upgrade', 'mustuse', 'dropins', and 'search'.
 890               */
 891              $actions = apply_filters( 'plugin_action_links', $actions, $plugin_file, $plugin_data, $context );
 892  
 893              /**
 894               * Filters the list of action links displayed for a specific plugin in the Plugins list table.
 895               *
 896               * The dynamic portion of the hook name, `$plugin_file`, refers to the path
 897               * to the plugin file, relative to the plugins directory.
 898               *
 899               * @since 2.7.0
 900               * @since 4.9.0 The 'Edit' link was removed from the list of action links.
 901               *
 902               * @param string[] $actions     An array of plugin action links. By default this can include 'activate',
 903               *                              'deactivate', and 'delete'. With Multisite active this can also include
 904               *                              'network_active' and 'network_only' items.
 905               * @param string   $plugin_file Path to the plugin file relative to the plugins directory.
 906               * @param array    $plugin_data An array of plugin data. See `get_plugin_data()`.
 907               * @param string   $context     The plugin context. By default this can include 'all', 'active', 'inactive',
 908               *                              'recently_activated', 'upgrade', 'mustuse', 'dropins', and 'search'.
 909               */
 910              $actions = apply_filters( "plugin_action_links_{$plugin_file}", $actions, $plugin_file, $plugin_data, $context );
 911  
 912          }
 913  
 914          $requires_php   = isset( $plugin_data['requires_php'] ) ? $plugin_data['requires_php'] : null;
 915          $compatible_php = is_php_version_compatible( $requires_php );
 916          $class          = $is_active ? 'active' : 'inactive';
 917          $checkbox_id    = 'checkbox_' . md5( $plugin_data['Name'] );
 918          if ( $restrict_network_active || $restrict_network_only || in_array( $status, array( 'mustuse', 'dropins' ), true ) || ! $compatible_php ) {
 919              $checkbox = '';
 920          } else {
 921              $checkbox = sprintf(
 922                  '<label class="screen-reader-text" for="%1$s">%2$s</label>' .
 923                  '<input type="checkbox" name="checked[]" value="%3$s" id="%1$s" />',
 924                  $checkbox_id,
 925                  /* translators: %s: Plugin name. */
 926                  sprintf( __( 'Select %s' ), $plugin_data['Name'] ),
 927                  esc_attr( $plugin_file )
 928              );
 929          }
 930          if ( 'dropins' !== $context ) {
 931              $description = '<p>' . ( $plugin_data['Description'] ? $plugin_data['Description'] : '&nbsp;' ) . '</p>';
 932              $plugin_name = $plugin_data['Name'];
 933          }
 934  
 935          if ( ! empty( $totals['upgrade'] ) && ! empty( $plugin_data['update'] ) ) {
 936              $class .= ' update';
 937          }
 938  
 939          $paused = ! $screen->in_admin( 'network' ) && is_plugin_paused( $plugin_file );
 940  
 941          if ( $paused ) {
 942              $class .= ' paused';
 943          }
 944  
 945          printf(
 946              '<tr class="%s" data-slug="%s" data-plugin="%s">',
 947              esc_attr( $class ),
 948              esc_attr( $plugin_slug ),
 949              esc_attr( $plugin_file )
 950          );
 951  
 952          list( $columns, $hidden, $sortable, $primary ) = $this->get_column_info();
 953  
 954          $auto_updates      = (array) get_site_option( 'auto_update_plugins', array() );
 955          $available_updates = get_site_transient( 'update_plugins' );
 956  
 957          foreach ( $columns as $column_name => $column_display_name ) {
 958              $extra_classes = '';
 959              if ( in_array( $column_name, $hidden, true ) ) {
 960                  $extra_classes = ' hidden';
 961              }
 962  
 963              switch ( $column_name ) {
 964                  case 'cb':
 965                      echo "<th scope='row' class='check-column'>$checkbox</th>";
 966                      break;
 967                  case 'name':
 968                      echo "<td class='plugin-title column-primary'><strong>$plugin_name</strong>";
 969                      echo $this->row_actions( $actions, true );
 970                      echo '</td>';
 971                      break;
 972                  case 'description':
 973                      $classes = 'column-description desc';
 974  
 975                      echo "<td class='$classes{$extra_classes}'>
 976                          <div class='plugin-description'>$description</div>
 977                          <div class='$class second plugin-version-author-uri'>";
 978  
 979                      $plugin_meta = array();
 980                      if ( ! empty( $plugin_data['Version'] ) ) {
 981                          /* translators: %s: Plugin version number. */
 982                          $plugin_meta[] = sprintf( __( 'Version %s' ), $plugin_data['Version'] );
 983                      }
 984                      if ( ! empty( $plugin_data['Author'] ) ) {
 985                          $author = $plugin_data['Author'];
 986                          if ( ! empty( $plugin_data['AuthorURI'] ) ) {
 987                              $author = '<a href="' . $plugin_data['AuthorURI'] . '">' . $plugin_data['Author'] . '</a>';
 988                          }
 989                          /* translators: %s: Plugin author name. */
 990                          $plugin_meta[] = sprintf( __( 'By %s' ), $author );
 991                      }
 992  
 993                      // Details link using API info, if available.
 994                      if ( isset( $plugin_data['slug'] ) && current_user_can( 'install_plugins' ) ) {
 995                          $plugin_meta[] = sprintf(
 996                              '<a href="%s" class="thickbox open-plugin-details-modal" aria-label="%s" data-title="%s">%s</a>',
 997                              esc_url(
 998                                  network_admin_url(
 999                                      'plugin-install.php?tab=plugin-information&plugin=' . $plugin_data['slug'] .
1000                                      '&TB_iframe=true&width=600&height=550'
1001                                  )
1002                              ),
1003                              /* translators: %s: Plugin name. */
1004                              esc_attr( sprintf( __( 'More information about %s' ), $plugin_name ) ),
1005                              esc_attr( $plugin_name ),
1006                              __( 'View details' )
1007                          );
1008                      } elseif ( ! empty( $plugin_data['PluginURI'] ) ) {
1009                          $plugin_meta[] = sprintf(
1010                              '<a href="%s">%s</a>',
1011                              esc_url( $plugin_data['PluginURI'] ),
1012                              __( 'Visit plugin site' )
1013                          );
1014                      }
1015  
1016                      /**
1017                       * Filters the array of row meta for each plugin in the Plugins list table.
1018                       *
1019                       * @since 2.8.0
1020                       *
1021                       * @param string[] $plugin_meta An array of the plugin's metadata, including
1022                       *                              the version, author, author URI, and plugin URI.
1023                       * @param string   $plugin_file Path to the plugin file relative to the plugins directory.
1024                       * @param array    $plugin_data An array of plugin data.
1025                       * @param string   $status      Status filter currently applied to the plugin list. Possible
1026                       *                              values are: 'all', 'active', 'inactive', 'recently_activated',
1027                       *                              'upgrade', 'mustuse', 'dropins', 'search', 'paused',
1028                       *                              'auto-update-enabled', 'auto-update-disabled'.
1029                       */
1030                      $plugin_meta = apply_filters( 'plugin_row_meta', $plugin_meta, $plugin_file, $plugin_data, $status );
1031  
1032                      echo implode( ' | ', $plugin_meta );
1033  
1034                      echo '</div>';
1035  
1036                      if ( $paused ) {
1037                          $notice_text = __( 'This plugin failed to load properly and is paused during recovery mode.' );
1038  
1039                          printf( '<p><span class="dashicons dashicons-warning"></span> <strong>%s</strong></p>', $notice_text );
1040  
1041                          $error = wp_get_plugin_error( $plugin_file );
1042  
1043                          if ( false !== $error ) {
1044                              printf( '<div class="error-display"><p>%s</p></div>', wp_get_extension_error_description( $error ) );
1045                          }
1046                      }
1047  
1048                      echo '</td>';
1049                      break;
1050                  case 'auto-updates':
1051                      if ( ! $this->show_autoupdates ) {
1052                          break;
1053                      }
1054  
1055                      echo "<td class='column-auto-updates{$extra_classes}'>";
1056  
1057                      $html = array();
1058  
1059                      if ( in_array( $plugin_file, $auto_updates, true ) ) {
1060                          $text       = __( 'Disable auto-updates' );
1061                          $action     = 'disable';
1062                          $time_class = '';
1063                      } else {
1064                          $text       = __( 'Enable auto-updates' );
1065                          $action     = 'enable';
1066                          $time_class = ' hidden';
1067                      }
1068  
1069                      $query_args = array(
1070                          'action'        => "{$action}-auto-update",
1071                          'plugin'        => $plugin_file,
1072                          'paged'         => $page,
1073                          'plugin_status' => $status,
1074                      );
1075  
1076                      $url = add_query_arg( $query_args, 'plugins.php' );
1077  
1078                      $html[] = sprintf(
1079                          '<a href="%s" class="toggle-auto-update" data-wp-action="%s">',
1080                          wp_nonce_url( $url, 'updates' ),
1081                          $action
1082                      );
1083  
1084                      $html[] = '<span class="dashicons dashicons-update spin hidden" aria-hidden="true"></span>';
1085                      $html[] = '<span class="label">' . $text . '</span>';
1086                      $html[] = '</a>';
1087  
1088                      $available_updates = get_site_transient( 'update_plugins' );
1089  
1090                      if ( isset( $available_updates->response[ $plugin_file ] ) ) {
1091                          $html[] = sprintf(
1092                              '<div class="auto-update-time%s">%s</div>',
1093                              $time_class,
1094                              wp_get_auto_update_message()
1095                          );
1096                      }
1097  
1098                      $html = implode( '', $html );
1099  
1100                      /**
1101                       * Filters the HTML of the auto-updates setting for each plugin in the Plugins list table.
1102                       *
1103                       * @since 5.5.0
1104                       *
1105                       * @param string $html        The HTML of the plugin's auto-update column content, including
1106                       *                            toggle auto-update action links and time to next update.
1107                       * @param string $plugin_file Path to the plugin file relative to the plugins directory.
1108                       * @param array  $plugin_data An array of plugin data.
1109                       */
1110                      echo apply_filters( 'plugin_auto_update_setting_html', $html, $plugin_file, $plugin_data );
1111  
1112                      echo '<div class="notice notice-error notice-alt inline hidden"><p></p></div>';
1113                      echo '</td>';
1114  
1115                      break;
1116                  default:
1117                      $classes = "$column_name column-$column_name $class";
1118  
1119                      echo "<td class='$classes{$extra_classes}'>";
1120  
1121                      /**
1122                       * Fires inside each custom column of the Plugins list table.
1123                       *
1124                       * @since 3.1.0
1125                       *
1126                       * @param string $column_name Name of the column.
1127                       * @param string $plugin_file Path to the plugin file relative to the plugins directory.
1128                       * @param array  $plugin_data An array of plugin data.
1129                       */
1130                      do_action( 'manage_plugins_custom_column', $column_name, $plugin_file, $plugin_data );
1131  
1132                      echo '</td>';
1133              }
1134          }
1135  
1136          echo '</tr>';
1137  
1138          /**
1139           * Fires after each row in the Plugins list table.
1140           *
1141           * @since 2.3.0
1142           * @since 5.5.0 Added 'auto-update-enabled' and 'auto-update-disabled' to possible values for `$status`.
1143           *
1144           * @param string $plugin_file Path to the plugin file relative to the plugins directory.
1145           * @param array  $plugin_data An array of plugin data.
1146           * @param string $status      Status filter currently applied to the plugin list. Possible
1147           *                            values are: 'all', 'active', 'inactive', 'recently_activated',
1148           *                            'upgrade', 'mustuse', 'dropins', 'search', 'paused',
1149           *                            'auto-update-enabled', 'auto-update-disabled'.
1150           */
1151          do_action( 'after_plugin_row', $plugin_file, $plugin_data, $status );
1152  
1153          /**
1154           * Fires after each specific row in the Plugins list table.
1155           *
1156           * The dynamic portion of the hook name, `$plugin_file`, refers to the path
1157           * to the plugin file, relative to the plugins directory.
1158           *
1159           * @since 2.7.0
1160           * @since 5.5.0 Added 'auto-update-enabled' and 'auto-update-disabled' to possible values for `$status`.
1161           *
1162           * @param string $plugin_file Path to the plugin file relative to the plugins directory.
1163           * @param array  $plugin_data An array of plugin data.
1164           * @param string $status      Status filter currently applied to the plugin list. Possible
1165           *                            values are: 'all', 'active', 'inactive', 'recently_activated',
1166           *                            'upgrade', 'mustuse', 'dropins', 'search', 'paused',
1167           *                            'auto-update-enabled', 'auto-update-disabled'.
1168           */
1169          do_action( "after_plugin_row_{$plugin_file}", $plugin_file, $plugin_data, $status );
1170      }
1171  
1172      /**
1173       * Gets the name of the primary column for this specific list table.
1174       *
1175       * @since 4.3.0
1176       *
1177       * @return string Unalterable name for the primary column, in this case, 'name'.
1178       */
1179  	protected function get_primary_column_name() {
1180          return 'name';
1181      }
1182  }


Generated: Thu Jul 9 01:00:03 2020 Cross-referenced by PHPXref 0.7.1