|
$id,
'selected' => 'site-themes',
)
);
if ( isset( $_GET['enabled'] ) ) {
$enabled = absint( $_GET['enabled'] );
if ( 1 === $enabled ) {
$message = __( 'Theme enabled.' );
} else {
/* translators: %s: Number of themes. */
$message = _n( '%s theme enabled.', '%s themes enabled.', $enabled );
}
wp_admin_notice(
sprintf( $message, number_format_i18n( $enabled ) ),
array(
'type' => 'success',
'dismissible' => true,
'id' => 'message',
)
);
} elseif ( isset( $_GET['disabled'] ) ) {
$disabled = absint( $_GET['disabled'] );
if ( 1 === $disabled ) {
$message = __( 'Theme disabled.' );
} else {
/* translators: %s: Number of themes. */
$message = _n( '%s theme disabled.', '%s themes disabled.', $disabled );
}
wp_admin_notice(
sprintf( $message, number_format_i18n( $disabled ) ),
array(
'type' => 'success',
'dismissible' => true,
'id' => 'message',
)
);
} elseif ( isset( $_GET['error'] ) && 'none' === $_GET['error'] ) {
wp_admin_notice(
__( 'No theme selected.' ),
array(
'type' => 'error',
'dismissible' => true,
'id' => 'message',
)
);
}
?>
views(); ?>