Skip to content

Commit

Permalink
more escaping/translation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Gieseking committed Jun 26, 2019
1 parent a18d9bb commit 5306c08
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 43 deletions.
6 changes: 3 additions & 3 deletions archive.php
Expand Up @@ -38,9 +38,9 @@
// Previous/next page navigation.
the_posts_pagination(
array(
'prev_text' => __( 'Previous page', 'basetheme' ),
'next_text' => __( 'Next page', 'basetheme' ),
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'basetheme' ) . ' </span>',
'prev_text' => esc_attr__( 'Previous page', 'basetheme' ),
'next_text' => esc_attr__( 'Next page', 'basetheme' ),
'before_page_number' => '<span class="meta-nav screen-reader-text">' . esc_attr__( 'Page', 'basetheme' ) . ' </span>',
)
);

Expand Down
6 changes: 3 additions & 3 deletions index.php
Expand Up @@ -42,9 +42,9 @@
// Previous/next page navigation.
the_posts_pagination(
array(
'prev_text' => __( 'Previous page', 'basetheme' ),
'next_text' => __( 'Next page', 'basetheme' ),
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'basetheme' ) . ' </span>',
'prev_text' => esc_attr__( 'Previous page', 'basetheme' ),
'next_text' => esc_attr__( 'Next page', 'basetheme' ),
'before_page_number' => '<span class="meta-nav screen-reader-text">' . esc_attr__( 'Page', 'basetheme' ) . ' </span>',
)
);

Expand Down
34 changes: 17 additions & 17 deletions lib/theme-acfblocks.php
Expand Up @@ -29,8 +29,8 @@ function bt_acf_register_blocks() {
acf_register_block_type(
array(
'name' => 'buttongroup',
'title' => __( 'Button Group' ),
'description' => __( 'A group of Bootstrap-style buttons.' ),
'title' => esc_attr__( 'Button Group', 'basetheme' ),
'description' => esc_attr__( 'A group of Bootstrap-style buttons.', 'basetheme' ),
'render_callback' => 'bt_acf_block_render_callback',
'category' => BT_ACF_BLOCKS_CATEGORY,
'icon' => $icon,
Expand All @@ -43,8 +43,8 @@ function bt_acf_register_blocks() {
acf_register_block_type(
array(
'name' => 'buttonbootstrap',
'title' => __( 'Button (Bootstrap)' ),
'description' => __( 'A bootstrap-style button.' ),
'title' => esc_attr__( 'Button (Bootstrap)', 'basetheme' ),
'description' => esc_attr__( 'A bootstrap-style button.', 'basetheme' ),
'render_callback' => 'bt_acf_block_render_callback',
'category' => BT_ACF_BLOCKS_CATEGORY,
'icon' => $icon,
Expand All @@ -64,8 +64,8 @@ function bt_acf_register_blocks() {
acf_register_block_type(
array(
'name' => 'pageheader',
'title' => __( 'Page Header' ),
'description' => __( 'A page header with an image and content.' ),
'title' => esc_attr__( 'Page Header', 'basetheme' ),
'description' => esc_attr__( 'A page header with an image and content.', 'basetheme' ),
'render_callback' => 'bt_acf_block_render_callback',
'category' => BT_ACF_BLOCKS_CATEGORY,
'icon' => $icon,
Expand All @@ -80,8 +80,8 @@ function bt_acf_register_blocks() {
acf_register_block_type(
array(
'name' => 'carddeck',
'title' => __( 'Card Deck' ),
'description' => __( 'A Bootstrap card deck.' ),
'title' => esc_attr__( 'Card Deck', 'basetheme' ),
'description' => esc_attr__( 'A Bootstrap card deck.', 'basetheme' ),
'render_callback' => 'bt_acf_block_render_callback',
'category' => BT_ACF_BLOCKS_CATEGORY,
'icon' => $icon,
Expand All @@ -94,8 +94,8 @@ function bt_acf_register_blocks() {
acf_register_block_type(
array(
'name' => 'imageadvanced',
'title' => __( 'Image (Advanced)' ),
'description' => __( 'An advanced image field. Use if you need specifically styled images or additional HTML with an image.' ),
'title' => esc_attr__( 'Image (Advanced)', 'basetheme' ),
'description' => esc_attr__( 'An advanced image field. Use if you need specifically styled images or additional HTML with an image.', 'basetheme' ),
'render_callback' => 'bt_acf_block_render_callback',
'category' => BT_ACF_BLOCKS_CATEGORY,
'icon' => $icon,
Expand All @@ -108,8 +108,8 @@ function bt_acf_register_blocks() {
acf_register_block_type(
array(
'name' => 'accordion',
'title' => __( 'Accordion' ),
'description' => __( 'A set of accordions.' ),
'title' => esc_attr__( 'Accordion', 'basetheme' ),
'description' => esc_attr__( 'A set of accordions.', 'basetheme' ),
'render_callback' => 'bt_acf_block_render_callback',
'category' => BT_ACF_BLOCKS_CATEGORY,
'icon' => $icon,
Expand All @@ -122,8 +122,8 @@ function bt_acf_register_blocks() {
acf_register_block_type(
array(
'name' => 'slider',
'title' => __( 'Slider' ),
'description' => __( 'A slider block.' ),
'title' => esc_attr__( 'Slider', 'basetheme' ),
'description' => esc_attr__( 'A slider block.', 'basetheme' ),
'render_callback' => 'bt_acf_block_render_callback',
'category' => BT_ACF_BLOCKS_CATEGORY,
'icon' => $icon,
Expand All @@ -139,8 +139,8 @@ function bt_acf_register_blocks() {
acf_register_block_type(
array(
'name' => 'relatedposts',
'title' => __( 'Related Posts' ),
'description' => __( 'Display posts related to the current post\'s categories and/or tags.' ),
'title' => esc_attr__( 'Related Posts', 'basetheme' ),
'description' => esc_attr__( 'Display posts related to the current post\'s categories and/or tags.', 'basetheme' ),
'render_callback' => 'bt_acf_block_render_callback',
'category' => BT_ACF_BLOCKS_CATEGORY,
'icon' => $icon,
Expand Down Expand Up @@ -176,7 +176,7 @@ function bt_register_block_categories( $categories, $post ) {
array(
array(
'slug' => BT_ACF_BLOCKS_CATEGORY,
'title' => __( 'Basetheme Blocks', 'basetheme' ),
'title' => esc_attr__( 'Basetheme Blocks', 'basetheme' ),
),
),
$categories
Expand Down
10 changes: 5 additions & 5 deletions lib/theme-functions.php
Expand Up @@ -61,27 +61,27 @@ function bt_editor_add_theme_support() {
'editor-font-sizes',
array(
array(
'name' => __( 'Small', 'basetheme' ),
'name' => esc_attr__( 'Small', 'basetheme' ),
'size' => 12,
'slug' => 'small',
),
array(
'name' => __( 'Normal', 'basetheme' ),
'name' => esc_attr__( 'Normal', 'basetheme' ),
'size' => 16,
'slug' => 'normal',
),
array(
'name' => __( 'Medium', 'basetheme' ),
'name' => esc_attr__( 'Medium', 'basetheme' ),
'size' => 20,
'slug' => 'medium',
),
array(
'name' => __( 'Large', 'basetheme' ),
'name' => esc_attr__( 'Large', 'basetheme' ),
'size' => 36,
'slug' => 'large',
),
array(
'name' => __( 'Huge', 'basetheme' ),
'name' => esc_attr__( 'Huge', 'basetheme' ),
'size' => 48,
'slug' => 'huge',
),
Expand Down
2 changes: 1 addition & 1 deletion lib/theme-helpers.php
Expand Up @@ -254,7 +254,7 @@ function bt_custom_oembed_filter( $html ) {
* Returns a "Continue Reading" link.
*/
function boilerplate_continue_reading_link() {
return ' <a href="' . get_permalink() . '">' . __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'basetheme' ) . '</a>';
return ' <a href="' . get_permalink() . '">' . esc_attr__( 'Continue reading <span class="meta-nav">&rarr;</span>', 'basetheme' ) . '</a>';
}
}

Expand Down
14 changes: 7 additions & 7 deletions lib/theme-setup.php
Expand Up @@ -58,9 +58,9 @@ function bt_setup() {
*/
register_nav_menus(
array(
'site-header-utility-nav' => __( 'Utility Navigation', 'basetheme' ),
'site-header-main-nav' => __( 'Main Navigation', 'basetheme' ),
'site-footer-main-nav' => __( 'Footer Navigation', 'basetheme' ),
'site-header-utility-nav' => esc_attr__( 'Utility Navigation', 'basetheme' ),
'site-header-main-nav' => esc_attr__( 'Main Navigation', 'basetheme' ),
'site-footer-main-nav' => esc_attr__( 'Footer Navigation', 'basetheme' ),
)
);

Expand Down Expand Up @@ -103,9 +103,9 @@ function bt_setup() {
function bt_widgets_init() {
register_sidebar(
array(
'name' => __( 'Blog Sidebar Widget Area', 'basetheme' ),
'name' => esc_attr__( 'Blog Sidebar Widget Area', 'basetheme' ),
'id' => 'blog-sidebar-widget-area',
'description' => __( 'The blog widget area', 'basetheme' ),
'description' => esc_attr__( 'The blog widget area', 'basetheme' ),
'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
'after_widget' => '</li>',
'before_title' => '<h4 class="widget-title">',
Expand All @@ -114,9 +114,9 @@ function bt_widgets_init() {
);
register_sidebar(
array(
'name' => __( 'Page Sidebar Widget Area', 'basetheme' ),
'name' => esc_attr__( 'Page Sidebar Widget Area', 'basetheme' ),
'id' => 'page-sidebar-widget-area',
'description' => __( 'The page widget area', 'basetheme' ),
'description' => esc_attr__( 'The page widget area', 'basetheme' ),
'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
'after_widget' => '</li>',
'before_title' => '<h4 class="widget-title">',
Expand Down
6 changes: 3 additions & 3 deletions search.php
Expand Up @@ -37,9 +37,9 @@
// Previous/next page navigation.
the_posts_pagination(
array(
'prev_text' => __( 'Previous page', 'basetheme' ),
'next_text' => __( 'Next page', 'basetheme' ),
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'basetheme' ) . ' </span>',
'prev_text' => esc_attr__( 'Previous page', 'basetheme' ),
'next_text' => esc_attr__( 'Next page', 'basetheme' ),
'before_page_number' => '<span class="meta-nav screen-reader-text">' . esc_attr__( 'Page', 'basetheme' ) . ' </span>',
)
);

Expand Down
8 changes: 4 additions & 4 deletions single.php
Expand Up @@ -35,11 +35,11 @@
// Previous/next post navigation.
the_post_navigation(
array(
'next_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Next', 'basetheme' ) . '</span> ' .
'<span class="screen-reader-text">' . __( 'Next post:', 'basetheme' ) . '</span> ' .
'next_text' => '<span class="meta-nav" aria-hidden="true">' . esc_attr__( 'Next', 'basetheme' ) . '</span> ' .
'<span class="screen-reader-text">' . esc_attr__( 'Next post:', 'basetheme' ) . '</span> ' .
'<span class="post-title">%title</span>',
'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Previous', 'basetheme' ) . '</span> ' .
'<span class="screen-reader-text">' . __( 'Previous post:', 'basetheme' ) . '</span> ' .
'prev_text' => '<span class="meta-nav" aria-hidden="true">' . esc_attr__( 'Previous', 'basetheme' ) . '</span> ' .
'<span class="screen-reader-text">' . esc_attr__( 'Previous post:', 'basetheme' ) . '</span> ' .
'<span class="post-title">%title</span>',
)
);
Expand Down

0 comments on commit 5306c08

Please sign in to comment.