Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 24 additions & 8 deletions inc/admin/class-spacious-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,14 @@ public function __construct() {
public function admin_menu() {
$theme = wp_get_theme( get_template() );

$page = add_theme_page( esc_html__( 'About', 'spacious' ) . ' ' . $theme->display( 'Name' ), esc_html__( 'About', 'spacious' ) . ' ' . $theme->display( 'Name' ), 'activate_plugins', 'spacious-welcome', array( $this, 'welcome_screen' ) );
$page = add_theme_page(
/* translators: %s is theme name. */
sprintf( esc_html__('About %s', 'spacious'), $theme->display( 'Name' ) ),
/* translators: %s is theme name. */
sprintf( esc_html__('About %s', 'spacious'), $theme->display( 'Name' ) ),
'activate_plugins',
'spacious-welcome',
array( $this, 'welcome_screen' ) );
add_action( 'admin_print_styles-' . $page, array( $this, 'enqueue_styles' ) );
}

Expand Down Expand Up @@ -113,9 +120,12 @@ private function intro() {
?>
<div class="spacious-theme-info">
<h1>
<?php esc_html_e('About', 'spacious'); ?>
<?php echo $theme->display( 'Name' ); ?>
<?php printf( '%s', $major_version ); ?>
<?php
printf( /* translators: %1$s is theme name. / %2$s is major version number of theme. */
esc_html__('About %1$s %2$s', 'spacious'),
$theme->display( 'Name' ),
sprintf( '%s', $major_version )
); ?>
</h1>

<div class="welcome-description-wrap">
Expand Down Expand Up @@ -214,16 +224,22 @@ public function about_screen() {
<div class="col">
<h3>
<?php
esc_html_e( 'Translate', 'spacious' );
echo ' ' . $theme->display( 'Name' );
printf(
/* translators: %s is theme name. */
esc_html__('Translate %s', 'spacious'),
$theme->display( 'Name' )
)
?>
</h3>
<p><?php esc_html_e( 'Click below to translate this theme into your own language.', 'spacious' ) ?></p>
<p>
<a href="<?php echo esc_url( 'http://translate.wordpress.org/projects/wp-themes/spacious' ); ?>" class="button button-secondary">
<?php
esc_html_e( 'Translate', 'spacious' );
echo ' ' . $theme->display( 'Name' );
printf(
/* translators: %s is theme name. */
esc_html__('Translate %s', 'spacious'),
$theme->display( 'Name' )
)
?>
</a>
</p>
Expand Down