WP_MS_Themes_List_Table

Core class used to implement displaying themes in a list table for the network admin.

Defined (1)

The class is defined in the following location(s).

/wp-admin/includes/class-wp-ms-themes-list-table.php  
  1. class WP_MS_Themes_List_Table extends WP_List_Table { 
  2.  
  3. public $site_id; 
  4. public $is_site_themes; 
  5.  
  6. private $has_items; 
  7.  
  8. /** 
  9. * Constructor. 
  10. * @since 3.1.0 
  11. * @access public 
  12. * @see WP_List_Table::__construct() for more information on default arguments. 
  13. * @global string $status 
  14. * @global int $page 
  15. * @param array $args An associative array of arguments. 
  16. */ 
  17. public function __construct( $args = array() ) { 
  18. global $status, $page; 
  19.  
  20. parent::__construct( array( 
  21. 'plural' => 'themes',  
  22. 'screen' => isset( $args['screen'] ) ? $args['screen'] : null,  
  23. ) ); 
  24.  
  25. $status = isset( $_REQUEST['theme_status'] ) ? $_REQUEST['theme_status'] : 'all'; 
  26. if ( !in_array( $status, array( 'all', 'enabled', 'disabled', 'upgrade', 'search', 'broken' ) ) ) 
  27. $status = 'all'; 
  28.  
  29. $page = $this->get_pagenum(); 
  30.  
  31. $this->is_site_themes = ( 'site-themes-network' === $this->screen->id ) ? true : false; 
  32.  
  33. if ( $this->is_site_themes ) 
  34. $this->site_id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0; 
  35.  
  36. /** 
  37. * @return array 
  38. */ 
  39. protected function get_table_classes() { 
  40. // todo: remove and add CSS for .themes 
  41. return array( 'widefat', 'plugins' ); 
  42.  
  43. /** 
  44. * @return bool 
  45. */ 
  46. public function ajax_user_can() { 
  47. if ( $this->is_site_themes ) 
  48. return current_user_can( 'manage_sites' ); 
  49. else 
  50. return current_user_can( 'manage_network_themes' ); 
  51.  
  52. /** 
  53. * @global string $status 
  54. * @global array $totals 
  55. * @global int $page 
  56. * @global string $orderby 
  57. * @global string $order 
  58. * @global string $s 
  59. */ 
  60. public function prepare_items() { 
  61. global $status, $totals, $page, $orderby, $order, $s; 
  62.  
  63. wp_reset_vars( array( 'orderby', 'order', 's' ) ); 
  64.  
  65. $themes = array( 
  66. /** 
  67. * Filters the full array of WP_Theme objects to list in the Multisite 
  68. * themes list table. 
  69. * @since 3.1.0 
  70. * @param array $all An array of WP_Theme objects to display in the list table. 
  71. */ 
  72. 'all' => apply_filters( 'all_themes', wp_get_themes() ),  
  73. 'search' => array(),  
  74. 'enabled' => array(),  
  75. 'disabled' => array(),  
  76. 'upgrade' => array(),  
  77. 'broken' => $this->is_site_themes ? array() : wp_get_themes( array( 'errors' => true ) ),  
  78. ); 
  79.  
  80. if ( $this->is_site_themes ) { 
  81. $themes_per_page = $this->get_items_per_page( 'site_themes_network_per_page' ); 
  82. $allowed_where = 'site'; 
  83. } else { 
  84. $themes_per_page = $this->get_items_per_page( 'themes_network_per_page' ); 
  85. $allowed_where = 'network'; 
  86.  
  87. $maybe_update = current_user_can( 'update_themes' ) && ! $this->is_site_themes && $current = get_site_transient( 'update_themes' ); 
  88.  
  89. foreach ( (array) $themes['all'] as $key => $theme ) { 
  90. if ( $this->is_site_themes && $theme->is_allowed( 'network' ) ) { 
  91. unset( $themes['all'][ $key ] ); 
  92. continue; 
  93.  
  94. if ( $maybe_update && isset( $current->response[ $key ] ) ) { 
  95. $themes['all'][ $key ]->update = true; 
  96. $themes['upgrade'][ $key ] = $themes['all'][ $key ]; 
  97.  
  98. $filter = $theme->is_allowed( $allowed_where, $this->site_id ) ? 'enabled' : 'disabled'; 
  99. $themes[ $filter ][ $key ] = $themes['all'][ $key ]; 
  100.  
  101. if ( $s ) { 
  102. $status = 'search'; 
  103. $themes['search'] = array_filter( array_merge( $themes['all'], $themes['broken'] ), array( $this, '_search_callback' ) ); 
  104.  
  105. $totals = array(); 
  106. foreach ( $themes as $type => $list ) 
  107. $totals[ $type ] = count( $list ); 
  108.  
  109. if ( empty( $themes[ $status ] ) && !in_array( $status, array( 'all', 'search' ) ) ) 
  110. $status = 'all'; 
  111.  
  112. $this->items = $themes[ $status ]; 
  113. WP_Theme::sort_by_name( $this->items ); 
  114.  
  115. $this->has_items = ! empty( $themes['all'] ); 
  116. $total_this_page = $totals[ $status ]; 
  117.  
  118. wp_localize_script( 'updates', '_wpUpdatesItemCounts', array( 
  119. 'totals' => $totals,  
  120. ) ); 
  121.  
  122. if ( $orderby ) { 
  123. $orderby = ucfirst( $orderby ); 
  124. $order = strtoupper( $order ); 
  125.  
  126. if ( $orderby === 'Name' ) { 
  127. if ( 'ASC' === $order ) { 
  128. $this->items = array_reverse( $this->items ); 
  129. } else { 
  130. uasort( $this->items, array( $this, '_order_callback' ) ); 
  131.  
  132. $start = ( $page - 1 ) * $themes_per_page; 
  133.  
  134. if ( $total_this_page > $themes_per_page ) 
  135. $this->items = array_slice( $this->items, $start, $themes_per_page, true ); 
  136.  
  137. $this->set_pagination_args( array( 
  138. 'total_items' => $total_this_page,  
  139. 'per_page' => $themes_per_page,  
  140. ) ); 
  141.  
  142. /** 
  143. * @staticvar string $term 
  144. * @param WP_Theme $theme 
  145. * @return bool 
  146. */ 
  147. public function _search_callback( $theme ) { 
  148. static $term = null; 
  149. if ( is_null( $term ) ) 
  150. $term = wp_unslash( $_REQUEST['s'] ); 
  151.  
  152. foreach ( array( 'Name', 'Description', 'Author', 'Author', 'AuthorURI' ) as $field ) { 
  153. // Don't mark up; Do translate. 
  154. if ( false !== stripos( $theme->display( $field, false, true ), $term ) ) 
  155. return true; 
  156.  
  157. if ( false !== stripos( $theme->get_stylesheet(), $term ) ) 
  158. return true; 
  159.  
  160. if ( false !== stripos( $theme->get_template(), $term ) ) 
  161. return true; 
  162.  
  163. return false; 
  164.  
  165. // Not used by any core columns. 
  166. /** 
  167. * @global string $orderby 
  168. * @global string $order 
  169. * @param array $theme_a 
  170. * @param array $theme_b 
  171. * @return int 
  172. */ 
  173. public function _order_callback( $theme_a, $theme_b ) { 
  174. global $orderby, $order; 
  175.  
  176. $a = $theme_a[ $orderby ]; 
  177. $b = $theme_b[ $orderby ]; 
  178.  
  179. if ( $a == $b ) 
  180. return 0; 
  181.  
  182. if ( 'DESC' === $order ) 
  183. return ( $a < $b ) ? 1 : -1; 
  184. else 
  185. return ( $a < $b ) ? -1 : 1; 
  186.  
  187. /** 
  188. * @access public 
  189. */ 
  190. public function no_items() { 
  191. if ( $this->has_items ) { 
  192. _e( 'No themes found.' ); 
  193. } else { 
  194. _e( 'You do not appear to have any themes available at this time.' ); 
  195.  
  196. /** 
  197. * @return array 
  198. */ 
  199. public function get_columns() { 
  200. return array( 
  201. 'cb' => '<input type="checkbox" />',  
  202. 'name' => __( 'Theme' ),  
  203. 'description' => __( 'Description' ),  
  204. ); 
  205.  
  206. /** 
  207. * @return array 
  208. */ 
  209. protected function get_sortable_columns() { 
  210. return array( 
  211. 'name' => 'name',  
  212. ); 
  213.  
  214. /** 
  215. * Gets the name of the primary column. 
  216. * @since 4.3.0 
  217. * @access protected 
  218. * @return string Unalterable name of the primary column name, in this case, 'name'. 
  219. */ 
  220. protected function get_primary_column_name() { 
  221. return 'name'; 
  222.  
  223. /** 
  224. * @global array $totals 
  225. * @global string $status 
  226. * @return array 
  227. */ 
  228. protected function get_views() { 
  229. global $totals, $status; 
  230.  
  231. $status_links = array(); 
  232. foreach ( $totals as $type => $count ) { 
  233. if ( !$count ) 
  234. continue; 
  235.  
  236. switch ( $type ) { 
  237. case 'all': 
  238. $text = _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $count, 'themes' ); 
  239. break; 
  240. case 'enabled': 
  241. $text = _n( 'Enabled <span class="count">(%s)</span>', 'Enabled <span class="count">(%s)</span>', $count ); 
  242. break; 
  243. case 'disabled': 
  244. $text = _n( 'Disabled <span class="count">(%s)</span>', 'Disabled <span class="count">(%s)</span>', $count ); 
  245. break; 
  246. case 'upgrade': 
  247. $text = _n( 'Update Available <span class="count">(%s)</span>', 'Update Available <span class="count">(%s)</span>', $count ); 
  248. break; 
  249. case 'broken' : 
  250. $text = _n( 'Broken <span class="count">(%s)</span>', 'Broken <span class="count">(%s)</span>', $count ); 
  251. break; 
  252.  
  253. if ( $this->is_site_themes ) 
  254. $url = 'site-themes.php?id=' . $this->site_id; 
  255. else 
  256. $url = 'themes.php'; 
  257.  
  258. if ( 'search' != $type ) { 
  259. $status_links[$type] = sprintf( "<a href='%s' %s>%s</a>",  
  260. esc_url( add_query_arg('theme_status', $type, $url) ),  
  261. ( $type === $status ) ? ' class="current"' : '',  
  262. sprintf( $text, number_format_i18n( $count ) ) 
  263. ); 
  264.  
  265. return $status_links; 
  266.  
  267. /** 
  268. * @global string $status 
  269. * @return array 
  270. */ 
  271. protected function get_bulk_actions() { 
  272. global $status; 
  273.  
  274. $actions = array(); 
  275. if ( 'enabled' != $status ) 
  276. $actions['enable-selected'] = $this->is_site_themes ? __( 'Enable' ) : __( 'Network Enable' ); 
  277. if ( 'disabled' != $status ) 
  278. $actions['disable-selected'] = $this->is_site_themes ? __( 'Disable' ) : __( 'Network Disable' ); 
  279. if ( ! $this->is_site_themes ) { 
  280. if ( current_user_can( 'update_themes' ) ) 
  281. $actions['update-selected'] = __( 'Update' ); 
  282. if ( current_user_can( 'delete_themes' ) ) 
  283. $actions['delete-selected'] = __( 'Delete' ); 
  284. return $actions; 
  285.  
  286. /** 
  287. * @access public 
  288. */ 
  289. public function display_rows() { 
  290. foreach ( $this->items as $theme ) 
  291. $this->single_row( $theme ); 
  292.  
  293. /** 
  294. * Handles the checkbox column output. 
  295. * @since 4.3.0 
  296. * @access public 
  297. * @param WP_Theme $theme The current WP_Theme object. 
  298. */ 
  299. public function column_cb( $theme ) { 
  300. $checkbox_id = 'checkbox_' . md5( $theme->get('Name') ); 
  301. ?> 
  302. <input type="checkbox" name="checked[]" value="<?php echo esc_attr( $theme->get_stylesheet() ) ?>" id="<?php echo $checkbox_id ?>" /> 
  303. <label class="screen-reader-text" for="<?php echo $checkbox_id ?>" ><?php _e( 'Select' ) ?> <?php echo $theme->display( 'Name' ) ?></label> 
  304. <?php 
  305.  
  306. /** 
  307. * Handles the name column output. 
  308. * @since 4.3.0 
  309. * @access public 
  310. * @global string $status 
  311. * @global int $page 
  312. * @global string $s 
  313. * @param WP_Theme $theme The current WP_Theme object. 
  314. */ 
  315. public function column_name( $theme ) { 
  316. global $status, $page, $s; 
  317.  
  318. $context = $status; 
  319.  
  320. if ( $this->is_site_themes ) { 
  321. $url = "site-themes.php?id={$this->site_id}&"; 
  322. $allowed = $theme->is_allowed( 'site', $this->site_id ); 
  323. } else { 
  324. $url = 'themes.php?'; 
  325. $allowed = $theme->is_allowed( 'network' ); 
  326.  
  327. // Pre-order. 
  328. $actions = array( 
  329. 'enable' => '',  
  330. 'disable' => '',  
  331. 'edit' => '',  
  332. 'delete' => '' 
  333. ); 
  334.  
  335. $stylesheet = $theme->get_stylesheet(); 
  336. $theme_key = urlencode( $stylesheet ); 
  337.  
  338. if ( ! $allowed ) { 
  339. if ( ! $theme->errors() ) { 
  340. $url = add_query_arg( array( 
  341. 'action' => 'enable',  
  342. 'theme' => $theme_key,  
  343. 'paged' => $page,  
  344. 's' => $s,  
  345. ), $url ); 
  346.  
  347. if ( $this->is_site_themes ) { 
  348. /** translators: %s: theme name */ 
  349. $aria_label = sprintf( __( 'Enable %s' ), $theme->display( 'Name' ) ); 
  350. } else { 
  351. /** translators: %s: theme name */ 
  352. $aria_label = sprintf( __( 'Network Enable %s' ), $theme->display( 'Name' ) ); 
  353.  
  354. $actions['enable'] = sprintf( '<a href="%s" class="edit" aria-label="%s">%s</a>',  
  355. esc_url( wp_nonce_url( $url, 'enable-theme_' . $stylesheet ) ),  
  356. esc_attr( $aria_label ),  
  357. ( $this->is_site_themes ? __( 'Enable' ) : __( 'Network Enable' ) ) 
  358. ); 
  359. } else { 
  360. $url = add_query_arg( array( 
  361. 'action' => 'disable',  
  362. 'theme' => $theme_key,  
  363. 'paged' => $page,  
  364. 's' => $s,  
  365. ), $url ); 
  366.  
  367. if ( $this->is_site_themes ) { 
  368. /** translators: %s: theme name */ 
  369. $aria_label = sprintf( __( 'Disable %s' ), $theme->display( 'Name' ) ); 
  370. } else { 
  371. /** translators: %s: theme name */ 
  372. $aria_label = sprintf( __( 'Network Disable %s' ), $theme->display( 'Name' ) ); 
  373.  
  374. $actions['disable'] = sprintf( '<a href="%s" aria-label="%s">%s</a>',  
  375. esc_url( wp_nonce_url( $url, 'disable-theme_' . $stylesheet ) ),  
  376. esc_attr( $aria_label ),  
  377. ( $this->is_site_themes ? __( 'Disable' ) : __( 'Network Disable' ) ) 
  378. ); 
  379.  
  380. if ( current_user_can('edit_themes') ) { 
  381. $url = add_query_arg( array( 
  382. 'theme' => $theme_key,  
  383. ), 'theme-editor.php' ); 
  384.  
  385. /** translators: %s: theme name */ 
  386. $aria_label = sprintf( __( 'Open %s in the Theme Editor' ), $theme->display( 'Name' ) ); 
  387.  
  388. $actions['edit'] = sprintf( '<a href="%s" class="edit" aria-label="%s">%s</a>',  
  389. esc_url( $url ),  
  390. esc_attr( $aria_label ),  
  391. __( 'Edit' ) 
  392. ); 
  393.  
  394. if ( ! $allowed && current_user_can( 'delete_themes' ) && ! $this->is_site_themes && $stylesheet != get_option( 'stylesheet' ) && $stylesheet != get_option( 'template' ) ) { 
  395. $url = add_query_arg( array( 
  396. 'action' => 'delete-selected',  
  397. 'checked[]' => $theme_key,  
  398. 'theme_status' => $context,  
  399. 'paged' => $page,  
  400. 's' => $s,  
  401. ), 'themes.php' ); 
  402.  
  403. /** translators: %s: theme name */ 
  404. $aria_label = sprintf( _x( 'Delete %s', 'theme' ), $theme->display( 'Name' ) ); 
  405.  
  406. $actions['delete'] = sprintf( '<a href="%s" class="delete" aria-label="%s">%s</a>',  
  407. esc_url( wp_nonce_url( $url, 'bulk-themes' ) ),  
  408. esc_attr( $aria_label ),  
  409. __( 'Delete' ) 
  410. ); 
  411. /** 
  412. * Filters the action links displayed for each theme in the Multisite 
  413. * themes list table. 
  414. * The action links displayed are determined by the theme's status, and 
  415. * which Multisite themes list table is being displayed - the Network 
  416. * themes list table (themes.php), which displays all installed themes,  
  417. * or the Site themes list table (site-themes.php), which displays the 
  418. * non-network enabled themes when editing a site in the Network admin. 
  419. * The default action links for the Network themes list table include 
  420. * 'Network Enable', 'Network Disable', 'Edit', and 'Delete'. 
  421. * The default action links for the Site themes list table include 
  422. * 'Enable', 'Disable', and 'Edit'. 
  423. * @since 2.8.0 
  424. * @param array $actions An array of action links. 
  425. * @param WP_Theme $theme The current WP_Theme object. 
  426. * @param string $context Status of the theme. 
  427. */ 
  428. $actions = apply_filters( 'theme_action_links', array_filter( $actions ), $theme, $context ); 
  429.  
  430. /** 
  431. * Filters the action links of a specific theme in the Multisite themes 
  432. * list table. 
  433. * The dynamic portion of the hook name, `$stylesheet`, refers to the 
  434. * directory name of the theme, which in most cases is synonymous 
  435. * with the template name. 
  436. * @since 3.1.0 
  437. * @param array $actions An array of action links. 
  438. * @param WP_Theme $theme The current WP_Theme object. 
  439. * @param string $context Status of the theme. 
  440. */ 
  441. $actions = apply_filters( "theme_action_links_$stylesheet", $actions, $theme, $context ); 
  442.  
  443. echo $this->row_actions( $actions, true ); 
  444.  
  445. /** 
  446. * Handles the description column output. 
  447. * @since 4.3.0 
  448. * @access public 
  449. * @global string $status 
  450. * @global array $totals 
  451. * @param WP_Theme $theme The current WP_Theme object. 
  452. */ 
  453. public function column_description( $theme ) { 
  454. global $status, $totals; 
  455. if ( $theme->errors() ) { 
  456. $pre = $status === 'broken' ? __( 'Broken Theme:' ) . ' ' : ''; 
  457. echo '<p><strong class="error-message">' . $pre . $theme->errors()->get_error_message() . '</strong></p>'; 
  458.  
  459. if ( $this->is_site_themes ) { 
  460. $allowed = $theme->is_allowed( 'site', $this->site_id ); 
  461. } else { 
  462. $allowed = $theme->is_allowed( 'network' ); 
  463.  
  464. $class = ! $allowed ? 'inactive' : 'active'; 
  465. if ( ! empty( $totals['upgrade'] ) && ! empty( $theme->update ) ) 
  466. $class .= ' update'; 
  467.  
  468. echo "<div class='theme-description'><p>" . $theme->display( 'Description' ) . "</p></div> 
  469. <div class='$class second theme-version-author-uri'>"; 
  470.  
  471. $stylesheet = $theme->get_stylesheet(); 
  472. $theme_meta = array(); 
  473.  
  474. if ( $theme->get('Version') ) { 
  475. $theme_meta[] = sprintf( __( 'Version %s' ), $theme->display('Version') ); 
  476. $theme_meta[] = sprintf( __( 'By %s' ), $theme->display('Author') ); 
  477.  
  478. if ( $theme->get('ThemeURI') ) { 
  479. /** translators: %s: theme name */ 
  480. $aria_label = sprintf( __( 'Visit %s homepage' ), $theme->display( 'Name' ) ); 
  481.  
  482. $theme_meta[] = sprintf( '<a href="%s" aria-label="%s">%s</a>',  
  483. $theme->display( 'ThemeURI' ),  
  484. esc_attr( $aria_label ),  
  485. __( 'Visit Theme Site' ) 
  486. ); 
  487. /** 
  488. * Filters the array of row meta for each theme in the Multisite themes 
  489. * list table. 
  490. * @since 3.1.0 
  491. * @param array $theme_meta An array of the theme's metadata,  
  492. * including the version, author, and 
  493. * theme URI. 
  494. * @param string $stylesheet Directory name of the theme. 
  495. * @param WP_Theme $theme WP_Theme object. 
  496. * @param string $status Status of the theme. 
  497. */ 
  498. $theme_meta = apply_filters( 'theme_row_meta', $theme_meta, $stylesheet, $theme, $status ); 
  499. echo implode( ' | ', $theme_meta ); 
  500.  
  501. echo '</div>'; 
  502.  
  503. /** 
  504. * Handles default column output. 
  505. * @since 4.3.0 
  506. * @access public 
  507. * @param WP_Theme $theme The current WP_Theme object. 
  508. * @param string $column_name The current column name. 
  509. */ 
  510. public function column_default( $theme, $column_name ) { 
  511. $stylesheet = $theme->get_stylesheet(); 
  512.  
  513. /** 
  514. * Fires inside each custom column of the Multisite themes list table. 
  515. * @since 3.1.0 
  516. * @param string $column_name Name of the column. 
  517. * @param string $stylesheet Directory name of the theme. 
  518. * @param WP_Theme $theme Current WP_Theme object. 
  519. */ 
  520. do_action( 'manage_themes_custom_column', $column_name, $stylesheet, $theme ); 
  521.  
  522. /** 
  523. * Handles the output for a single table row. 
  524. * @since 4.3.0 
  525. * @access public 
  526. * @param WP_Theme $item The current WP_Theme object. 
  527. */ 
  528. public function single_row_columns( $item ) { 
  529. list( $columns, $hidden, $sortable, $primary ) = $this->get_column_info(); 
  530.  
  531. foreach ( $columns as $column_name => $column_display_name ) { 
  532. $extra_classes = ''; 
  533. if ( in_array( $column_name, $hidden ) ) { 
  534. $extra_classes .= ' hidden'; 
  535.  
  536. switch ( $column_name ) { 
  537. case 'cb': 
  538. echo '<th scope="row" class="check-column">'; 
  539.  
  540. $this->column_cb( $item ); 
  541.  
  542. echo '</th>'; 
  543. break; 
  544.  
  545. case 'name': 
  546. echo "<td class='theme-title column-primary{$extra_classes}'><strong>" . $item->display('Name') . "</strong>"; 
  547.  
  548. $this->column_name( $item ); 
  549.  
  550. echo "</td>"; 
  551. break; 
  552.  
  553. case 'description': 
  554. echo "<td class='column-description desc{$extra_classes}'>"; 
  555.  
  556. $this->column_description( $item ); 
  557.  
  558. echo '</td>'; 
  559. break; 
  560.  
  561. default: 
  562. echo "<td class='$column_name column-$column_name{$extra_classes}'>"; 
  563.  
  564. $this->column_default( $item, $column_name ); 
  565.  
  566. echo "</td>"; 
  567. break; 
  568.  
  569. /** 
  570. * @global string $status 
  571. * @global array $totals 
  572. * @param WP_Theme $theme 
  573. */ 
  574. public function single_row( $theme ) { 
  575. global $status, $totals; 
  576.  
  577. if ( $this->is_site_themes ) { 
  578. $allowed = $theme->is_allowed( 'site', $this->site_id ); 
  579. } else { 
  580. $allowed = $theme->is_allowed( 'network' ); 
  581.  
  582. $stylesheet = $theme->get_stylesheet(); 
  583.  
  584. $class = ! $allowed ? 'inactive' : 'active'; 
  585. if ( ! empty( $totals['upgrade'] ) && ! empty( $theme->update ) ) { 
  586. $class .= ' update'; 
  587.  
  588. printf( '<tr class="%s" data-slug="%s">',  
  589. esc_attr( $class ),  
  590. esc_attr( $stylesheet ) 
  591. ); 
  592.  
  593. $this->single_row_columns( $theme ); 
  594.  
  595. echo "</tr>"; 
  596.  
  597. if ( $this->is_site_themes ) 
  598. remove_action( "after_theme_row_$stylesheet", 'wp_theme_update_row' ); 
  599.  
  600. /** 
  601. * Fires after each row in the Multisite themes list table. 
  602. * @since 3.1.0 
  603. * @param string $stylesheet Directory name of the theme. 
  604. * @param WP_Theme $theme Current WP_Theme object. 
  605. * @param string $status Status of the theme. 
  606. */ 
  607. do_action( 'after_theme_row', $stylesheet, $theme, $status ); 
  608.  
  609. /** 
  610. * Fires after each specific row in the Multisite themes list table. 
  611. * The dynamic portion of the hook name, `$stylesheet`, refers to the 
  612. * directory name of the theme, most often synonymous with the template 
  613. * name of the theme. 
  614. * @since 3.5.0 
  615. * @param string $stylesheet Directory name of the theme. 
  616. * @param WP_Theme $theme Current WP_Theme object. 
  617. * @param string $status Status of the theme. 
  618. */ 
  619. do_action( "after_theme_row_$stylesheet", $stylesheet, $theme, $status );