Permalink
Browse files

Fix text domain, add some tags and description in styles.css.

  • Loading branch information...
gonzomir committed Jul 31, 2017
1 parent a3abeb4 commit e1d95c7c825fbbbde62d19622faa7d003305de71
View
@@ -13,11 +13,11 @@
<section class="error-404 not-found">
<header class="page-header">
<h1 class="page-title"><?php esc_html_e( 'Oops! That page can&rsquo;t be found.', 'grid-mag' ); ?></h1>
<h1 class="page-title"><?php esc_html_e( 'Oops! That page can&rsquo;t be found.', 'grid-magazine' ); ?></h1>
</header><!-- .page-header -->
<div class="page-content">
<p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'grid-mag' ); ?></p>
<p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'grid-magazine' ); ?></p>
<?php
get_search_form();
@@ -29,7 +29,7 @@
?>
<div class="widget widget_categories">
<h2 class="widget-title"><?php esc_html_e( 'Most Used Categories', 'grid-mag' ); ?></h2>
<h2 class="widget-title"><?php esc_html_e( 'Most Used Categories', 'grid-magazine' ); ?></h2>
<ul>
<?php
wp_list_categories( array(
@@ -47,7 +47,7 @@
endif;
/* translators: %1$s: smiley */
$archive_content = '<p>' . sprintf( esc_html__( 'Try looking in the monthly archives. %1$s', 'grid-mag' ), convert_smilies( ':)' ) ) . '</p>';
$archive_content = '<p>' . sprintf( esc_html__( 'Try looking in the monthly archives. %1$s', 'grid-magazine' ), convert_smilies( ':)' ) ) . '</p>';
the_widget( 'WP_Widget_Archives', 'dropdown=1', "after_title=</h2>$archive_content" );
the_widget( 'WP_Widget_Tag_Cloud' );
View
@@ -28,7 +28,7 @@
<h2 class="comments-title">
<?php
printf( // WPCS: XSS OK.
esc_html( _nx( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'grid-mag' ) ),
esc_html( _nx( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'grid-magazine' ) ),
number_format_i18n( get_comments_number() ),
'<span>' . get_the_title() . '</span>'
);
@@ -37,11 +37,11 @@
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
<nav id="comment-nav-above" class="navigation comment-navigation" role="navigation">
<h2 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'grid-mag' ); ?></h2>
<h2 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'grid-magazine' ); ?></h2>
<div class="nav-links">
<div class="nav-previous"><?php previous_comments_link( esc_html__( 'Older Comments', 'grid-mag' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( esc_html__( 'Newer Comments', 'grid-mag' ) ); ?></div>
<div class="nav-previous"><?php previous_comments_link( esc_html__( 'Older Comments', 'grid-magazine' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( esc_html__( 'Newer Comments', 'grid-magazine' ) ); ?></div>
</div><!-- .nav-links -->
</nav><!-- #comment-nav-above -->
@@ -59,11 +59,11 @@
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
<nav id="comment-nav-below" class="navigation comment-navigation" role="navigation">
<h2 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'grid-mag' ); ?></h2>
<h2 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'grid-magazine' ); ?></h2>
<div class="nav-links">
<div class="nav-previous"><?php previous_comments_link( esc_html__( 'Older Comments', 'grid-mag' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( esc_html__( 'Newer Comments', 'grid-mag' ) ); ?></div>
<div class="nav-previous"><?php previous_comments_link( esc_html__( 'Older Comments', 'grid-magazine' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( esc_html__( 'Newer Comments', 'grid-magazine' ) ); ?></div>
</div><!-- .nav-links -->
</nav><!-- #comment-nav-below -->
@@ -76,7 +76,7 @@
// If comments are closed and there are comments, let's leave a little note, shall we?
if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : ?>
<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'grid-mag' ); ?></p>
<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'grid-magazine' ); ?></p>
<?php
endif;
View
@@ -15,9 +15,9 @@
<footer id="colophon" class="site-footer" role="contentinfo">
<div class="site-info">
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'grid-mag' ) ); ?>"><?php printf( esc_html__( 'Proudly powered by %s', 'grid-mag' ), 'WordPress' ); ?></a>
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'grid-magazine' ) ); ?>"><?php printf( esc_html__( 'Proudly powered by %s', 'grid-magazine' ), 'WordPress' ); ?></a>
<span class="sep"> | </span>
<?php printf( esc_html__( 'Theme: %1$s by %2$s.', 'grid-mag' ), '<a href="https://github.com/gonzomir/grid-magazine">Grid Magazine</a>', '<a href="http://greatgonzo.net/" rel="designer">Milen Petrinski - Gonzo</a>' ); ?>
<?php printf( esc_html__( 'Theme: %1$s by %2$s.', 'grid-magazine' ), '<a href="https://github.com/gonzomir/grid-magazine">Grid Magazine</a>', '<a href="http://greatgonzo.net/" rel="designer">Milen Petrinski - Gonzo</a>' ); ?>
</div><!-- .site-info -->
</footer><!-- #colophon -->
</div><!-- #page -->
View
@@ -20,9 +20,9 @@ function grid_mag_setup() {
* Make theme available for translation.
* Translations can be filed in the /languages/ directory.
* If you're building a theme based on Grid Magazine, use a find and replace
* to change 'grid-mag' to the name of your theme in all the template files.
* to change 'grid-magazine' to the name of your theme in all the template files.
*/
load_theme_textdomain( 'grid-mag', get_template_directory() . '/languages' );
load_theme_textdomain( 'grid-magazine', get_template_directory() . '/languages' );
// Add default posts and comments RSS feed links to head.
add_theme_support( 'automatic-feed-links' );
@@ -44,7 +44,7 @@ function grid_mag_setup() {
// This theme uses wp_nav_menu() in one location.
register_nav_menus( array(
'menu-1' => esc_html__( 'Primary', 'grid-mag' ),
'menu-1' => esc_html__( 'Primary', 'grid-magazine' ),
) );
/*
@@ -108,9 +108,9 @@ function grid_mag_content_width() {
*/
function grid_mag_widgets_init() {
register_sidebar( array(
'name' => esc_html__( 'Sidebar', 'grid-mag' ),
'name' => esc_html__( 'Sidebar', 'grid-magazine' ),
'id' => 'sidebar-1',
'description' => esc_html__( 'Add widgets here.', 'grid-mag' ),
'description' => esc_html__( 'Add widgets here.', 'grid-magazine' ),
'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>',
'before_title' => '<h2 class="widget-title">',
View
@@ -21,7 +21,7 @@
<body <?php body_class(); ?>>
<div id="page" class="site">
<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'grid-mag' ); ?></a>
<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'grid-magazine' ); ?></a>
<header id="masthead" class="site-header" role="banner">
<div class="site-branding">
@@ -41,7 +41,7 @@
</div><!-- .site-branding -->
<nav id="site-navigation" class="main-navigation" role="navigation">
<button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false"><?php esc_html_e( 'Menu', 'grid-mag' ); ?></button>
<button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false"><?php esc_html_e( 'Menu', 'grid-magazine' ); ?></button>
<?php wp_nav_menu( array( 'theme_location' => 'menu-1', 'menu_id' => 'primary-menu', 'container' => 'ul', 'items_wrap' => '<ul>%3$s</ul>' ) ); ?>
</nav><!-- #site-navigation -->
</header><!-- #masthead -->
View
@@ -24,10 +24,10 @@ function grid_mag_posted_on() {
esc_html( get_the_modified_date() )
);
$posted_on = '<span class="screen-reader-text">' . esc_html_x( 'Posted on', 'post date', 'grid-mag' ) . '</span>' . $time_string;
$posted_on = '<span class="screen-reader-text">' . esc_html_x( 'Posted on', 'post date', 'grid-magazine' ) . '</span>' . $time_string;
$byline = sprintf(
esc_html_x( 'by %s', 'post author', 'grid-mag' ),
esc_html_x( 'by %s', 'post author', 'grid-magazine' ),
'<span class="author vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '">' . esc_html( get_the_author() ) . '</a></span>'
);
@@ -44,29 +44,29 @@ function grid_mag_entry_footer() {
// Hide category and tag text for pages.
if ( 'post' === get_post_type() ) {
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( esc_html__( ', ', 'grid-mag' ) );
$categories_list = get_the_category_list( esc_html__( ', ', 'grid-magazine' ) );
if ( $categories_list && grid_mag_categorized_blog() ) {
echo '<span class="cat-links"><span class="screen-reader-text">' . esc_html__( 'Posted in', 'grid-mag' ) . '</span>' . $categories_list . '</span>'; // WPCS: XSS OK.
echo '<span class="cat-links"><span class="screen-reader-text">' . esc_html__( 'Posted in', 'grid-magazine' ) . '</span>' . $categories_list . '</span>'; // WPCS: XSS OK.
}
/* translators: used between list items, there is a space after the comma */
$tags_list = get_the_tag_list( '', esc_html__( ', ', 'grid-mag' ) );
$tags_list = get_the_tag_list( '', esc_html__( ', ', 'grid-magazine' ) );
if ( $tags_list ) {
echo '<span class="tags-links"><span class="screen-reader-text">' . esc_html__( 'Tagged', 'grid-mag' ) . '</span> ' . $tags_list . '</spam>'; // WPCS: XSS OK.
echo '<span class="tags-links"><span class="screen-reader-text">' . esc_html__( 'Tagged', 'grid-magazine' ) . '</span> ' . $tags_list . '</spam>'; // WPCS: XSS OK.
}
}
if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
echo '<span class="comments-link">';
/* translators: %s: post title */
comments_popup_link( sprintf( wp_kses( __( 'Leave a Comment<span class="screen-reader-text"> on %s</span>', 'grid-mag' ), array( 'span' => array( 'class' => array() ) ) ), get_the_title() ) );
comments_popup_link( sprintf( wp_kses( __( 'Leave a Comment<span class="screen-reader-text"> on %s</span>', 'grid-magazine' ), array( 'span' => array( 'class' => array() ) ) ), get_the_title() ) );
echo '</span>';
}
edit_post_link(
sprintf(
/* translators: %s: Name of current post */
esc_html__( 'Edit %s', 'grid-mag' ),
esc_html__( 'Edit %s', 'grid-magazine' ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
),
'<span class="edit-link">',
View
@@ -15,7 +15,7 @@
if ( have_posts() ) : ?>
<header class="page-header">
<h1 class="page-title"><?php printf( esc_html__( 'Search Results for: %s', 'grid-mag' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
<h1 class="page-title"><?php printf( esc_html__( 'Search Results for: %s', 'grid-magazine' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
</header><!-- .page-header -->
<?php
View
@@ -1,5 +1,5 @@
<form role="search" method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
<label for="s" class="screen-reader-text"><?php _e( 'Search for:', 'grid-mag' ); ?></label>
<input type="search" name="s" id="s" class="search-field" placeholder="<?php echo esc_attr( __( 'Search &hellip;', 'grid-mag' ) ); ?>" value="<?php get_search_query(); ?>" required />
<button type="submit"><?php _e( 'Search', 'grid-mag' ); ?></button>
<label for="s" class="screen-reader-text"><?php _e( 'Search for:', 'grid-magazine' ); ?></label>
<input type="search" name="s" id="s" class="search-field" placeholder="<?php echo esc_attr( __( 'Search &hellip;', 'grid-magazine' ) ); ?>" value="<?php get_search_query(); ?>" required />
<button type="submit"><?php _e( 'Search', 'grid-magazine' ); ?></button>
</form>
View
@@ -17,8 +17,8 @@
get_template_part( 'template-parts/content', 'single' );
the_post_navigation( array(
'prev_text' => __( 'Previous post: <strong>%title</strong>', 'grid-mag' ),
'next_text' => __( 'Next post: <strong>%title</strong>', 'grid-mag' )
'prev_text' => __( 'Previous post: <strong>%title</strong>', 'grid-magazine' ),
'next_text' => __( 'Next post: <strong>%title</strong>', 'grid-magazine' )
)
);
View
@@ -3,12 +3,16 @@ Theme Name: Grid Magazine
Theme URI: https://github.com/gonzomir/grid-magazine
Author: Milen Petrinski - Gonzo
Author URI: http://greatgonzo.net
Description: A magazine theme using Grid Layout.
Description: A magazine / news theme using CSS Grid Layout on the homepage.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: grid-mag
Tags:
Text Domain: grid-magazine
Tags: grid-layout, one-column, two-columns, right-sidebar, custom-menu, featured-images, threaded-comments, translation-ready, blog, entertainment, news
Grid Magazine is a theme that uses the new Grid Layout CSS module to achieve a distinctive
look for the homepage - a grid of posts with featured images, properly alligned into rows
and columns.
This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others.
@@ -11,24 +11,24 @@
<section class="no-results not-found">
<header class="page-header">
<h1 class="page-title"><?php esc_html_e( 'Nothing Found', 'grid-mag' ); ?></h1>
<h1 class="page-title"><?php esc_html_e( 'Nothing Found', 'grid-magazine' ); ?></h1>
</header><!-- .page-header -->
<div class="page-content">
<?php
if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
<p><?php printf( wp_kses( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'grid-mag' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p>
<p><?php printf( wp_kses( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'grid-magazine' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p>
<?php elseif ( is_search() ) : ?>
<p><?php esc_html_e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'grid-mag' ); ?></p>
<p><?php esc_html_e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'grid-magazine' ); ?></p>
<?php
get_search_form();
else : ?>
<p><?php esc_html_e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'grid-mag' ); ?></p>
<p><?php esc_html_e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'grid-magazine' ); ?></p>
<?php
get_search_form();
@@ -19,7 +19,7 @@
the_content();
wp_link_pages( array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'grid-mag' ),
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'grid-magazine' ),
'after' => '</div>',
) );
?>
@@ -31,7 +31,7 @@
edit_post_link(
sprintf(
/* translators: %s: Name of current post */
esc_html__( 'Edit %s', 'grid-mag' ),
esc_html__( 'Edit %s', 'grid-magazine' ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
),
'<span class="edit-link">',
@@ -49,7 +49,7 @@
the_content();
wp_link_pages( array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'grid-mag' ),
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'grid-magazine' ),
'after' => '</div>',
) );
@@ -59,7 +59,7 @@
the_content();
wp_link_pages( array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'grid-mag' ),
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'grid-magazine' ),
'after' => '</div>',
) );

0 comments on commit e1d95c7

Please sign in to comment.