- $actions = apply_filters( 'theme_action_links', array_filter( $actions ), $theme_key, $theme, $context );
- $actions = apply_filters( "theme_action_links_$theme_key", $actions, $theme_key, $theme, $context );
-
- $class = empty( $theme['enabled'] ) ? 'inactive' : 'active';
- $checkbox_id = "checkbox_" . md5($theme['Name']);
- $checkbox = "<input type='checkbox' name='checked[]' value='" . esc_attr( $theme_key ) . "' id='" . $checkbox_id . "' /><label class='screen-reader-text' for='" . $checkbox_id . "' >" . __('Select') . " " . $theme['Name'] . "</label>";
-
- $description = '<p>' . $theme['Description'] . '</p>';
- $theme_name = $theme['Name'];
-
- $id = sanitize_title( $theme_name );
+ /**
+ * Filter the action links displayed for each theme in the Multisite
+ * themes list table.
+ *
+ * The action links displayed are determined by the theme's status, and
+ * which Multisite themes list table is being displayed - the Network
+ * themes list table (themes.php), which displays all installed themes,
+ * or the Site themes list table (site-themes.php), which displays the
+ * non-network enabled themes when editing a site in the Network admin.
+ *
+ * The default action links for the Network themes list table include
+ * 'Network Enable', 'Network Disable', 'Edit', and 'Delete'.
+ *
+ * The default action links for the Site themes list table include
+ * 'Enable', 'Disable', and 'Edit'.
+ *
+ * @since 2.8.0
+ *
+ * @param array $actions An array of action links.
+ * @param WP_Theme $theme The current WP_Theme object.
+ * @param string $context Status of the theme.
+ */
+ $actions = apply_filters( 'theme_action_links', array_filter( $actions ), $theme, $context );
+
+ /**
+ * Filter the action links of a specific theme in the Multisite themes
+ * list table.
+ *
+ * The dynamic portion of the hook name, $stylesheet, refers to the
+ * directory name of the theme, which in most cases is synonymous
+ * with the template name.
+ *
+ * @since 3.1.0
+ *
+ * @param array $actions An array of action links.
+ * @param WP_Theme $theme The current WP_Theme object.
+ * @param string $context Status of the theme.
+ */
+ $actions = apply_filters( "theme_action_links_$stylesheet", $actions, $theme, $context );
+
+ $class = ! $allowed ? 'inactive' : 'active';
+ $checkbox_id = "checkbox_" . md5( $theme->get('Name') );
+ $checkbox = "<input type='checkbox' name='checked[]' value='" . esc_attr( $stylesheet ) . "' id='" . $checkbox_id . "' /><label class='screen-reader-text' for='" . $checkbox_id . "' >" . __('Select') . " " . $theme->display('Name') . "</label>";
+
+ $id = sanitize_html_class( $theme->get_stylesheet() );
+
+ if ( ! empty( $totals['upgrade'] ) && ! empty( $theme->update ) )
+ $class .= ' update';