";
$stylesheet = $theme->get_stylesheet();
$theme_meta = array();
if ( $theme->get( 'Version' ) ) {
/* translators: %s: Theme version. */
$theme_meta[] = sprintf( __( 'Version %s' ), $theme->display( 'Version' ) );
}
/* translators: %s: Theme author. */
$theme_meta[] = sprintf( __( 'By %s' ), $theme->display( 'Author' ) );
if ( $theme->get( 'ThemeURI' ) ) {
/* translators: %s: Theme name. */
$aria_label = sprintf( __( 'Visit theme site for %s' ), $theme->display( 'Name' ) );
$theme_meta[] = sprintf(
'
%s',
$theme->display( 'ThemeURI' ),
esc_attr( $aria_label ),
__( 'Visit Theme Site' )
);
}
if ( $theme->parent() ) {
$theme_meta[] = sprintf(
/* translators: %s: Theme name. */
__( 'Child theme of %s' ),
'
' . $theme->parent()->display( 'Name' ) . ''
);
}
/**
* Filters the array of row meta for each theme in the Multisite themes
* list table.
*
* @since 3.1.0
*
* @param string[] $theme_meta An array of the theme's metadata, including
* the version, author, and theme URI.
* @param string $stylesheet Directory name of the theme.
* @param WP_Theme $theme WP_Theme object.
* @param string $status Status of the theme.
*/
$theme_meta = apply_filters( 'theme_row_meta', $theme_meta, $stylesheet, $theme, $status );
echo implode( ' | ', $theme_meta );
echo '
';
}
/**
* Handles the auto-updates column output.
*
* @since 5.5.0
*
* @global string $status
* @global int $page
*
* @param WP_Theme $theme The current WP_Theme object.
*/
public function column_autoupdates( $theme ) {
global $status, $page;
static $auto_updates, $available_updates;
if ( ! $auto_updates ) {
$auto_updates = (array) get_site_option( 'auto_update_themes', array() );
}
if ( ! $available_updates ) {
$available_updates = get_site_transient( 'update_themes' );
}
$stylesheet = $theme->get_stylesheet();
if ( isset( $theme->auto_update_forced ) ) {
if ( $theme->auto_update_forced ) {
// Forced on.
$text = __( 'Auto-updates enabled' );
} else {
$text = __( 'Auto-updates disabled' );
}
$action = 'unavailable';
$time_class = ' hidden';
} elseif ( empty( $theme->update_supported ) ) {
$text = '';
$action = 'unavailable';
$time_class = ' hidden';
} elseif ( in_array( $stylesheet, $auto_updates, true ) ) {
$text = __( 'Disable auto-updates' );
$action = 'disable';
$time_class = '';
} else {
$text = __( 'Enable auto-updates' );
$action = 'enable';
$time_class = ' hidden';
}
$query_args = array(
'action' => "{$action}-auto-update",
'theme' => $stylesheet,
'paged' => $page,
'theme_status' => $status,
);
$url = add_query_arg( $query_args, 'themes.php' );
if ( 'unavailable' === $action ) {
$html[] = '