Skip to content

Commit

Permalink
Update text domains and package names
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverharrison committed May 31, 2022
1 parent cbeee85 commit ddb6fb8
Show file tree
Hide file tree
Showing 78 changed files with 280 additions and 271 deletions.
6 changes: 3 additions & 3 deletions 404.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* @link https://codex.wordpress.org/Creating_an_Error_404_Page
*
* @package _s
* @package wd_s
*/

get_header(); ?>
Expand All @@ -13,12 +13,12 @@

<section class="error-404 not-found">
<header class="page-header">
<h1 class="page-title"><?php esc_html_e( "Sorry, this page doesn't exist.", '_s' ); ?></h1>
<h1 class="page-title"><?php esc_html_e( "Sorry, this page doesn't exist.", 'wd_s' ); ?></h1>
</header><!-- .page-header -->

<div class="page-content">

<p><?php esc_html_e( "It seems we can't find what you're looking for. Perhaps searching can help.", '_s' ); ?></p>
<p><?php esc_html_e( "It seems we can't find what you're looking for. Perhaps searching can help.", 'wd_s' ); ?></p>

<?php get_search_form(); ?>

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ You'll need to change all instances of the names: `_s`.

- Search for: `'_s'` and replace with: `'project-name'` (inside single quotations) to capture the text domain
- Search for: `"_s"` and replace with: `"project-name"` (inside double quotations) to capture the text domain
- Search for: `_s_` and replace with: `project-name_` to capture all the function names
- Search for: `Text Domain: _s` and replace with: `Text Domain: project-name` in style.css
- Search for: `_wd_s_` and replace with: `project-name_` to capture all the function names
- Search for: `Text Domain: wd_s` and replace with: `Text Domain: project-name` in style.css
- Search for (and include the leading space): ` _s` and replace with: ` Project Name` (with a space before it) to capture DocBlocks
- Search for: `_s-` and replace with: `project-name-` to capture prefixed handles
- Search for `_s.pot` and replace with: `project-name.pot` to capture translation files
Expand Down
2 changes: 1 addition & 1 deletion archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package _s
* @package wd_s
*/

use function WebDevStudios\wd_s\print_numeric_pagination;
Expand Down
20 changes: 10 additions & 10 deletions comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package _s
* @package wd_s
*/

/**
Expand All @@ -22,7 +22,7 @@
?>

<div id="comments" class="container comments-area">
<h2 class="screen-reader-text"><?php esc_html_e( 'Comment section', '_s' ); ?></h2>
<h2 class="screen-reader-text"><?php esc_html_e( 'Comment section', 'wd_s' ); ?></h2>

<?php
// You can start editing here -- including this comment!
Expand All @@ -32,7 +32,7 @@
<?php
printf(
/* translators: the number of comments */
esc_html( _nx( '%1$s thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', '_s' ) ),
esc_html( _nx( '%1$s thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'wd_s' ) ),
number_format_i18n( get_comments_number() ), // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- XSS OK.
'<span>' . wp_kses_post( get_the_title() ) . '</span>' // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- XSS OK.
);
Expand All @@ -43,11 +43,11 @@
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">
<h3 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', '_s' ); ?></h3>
<h3 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'wd_s' ); ?></h3>
<div class="nav-links">

<div class="nav-previous"><?php previous_comments_link( esc_html__( 'Older Comments', '_s' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( esc_html__( 'Newer Comments', '_s' ) ); ?></div>
<div class="nav-previous"><?php previous_comments_link( esc_html__( 'Older Comments', 'wd_s' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( esc_html__( 'Newer Comments', 'wd_s' ) ); ?></div>

</div><!-- .nav-links -->
</nav><!-- #comment-nav-above -->
Expand All @@ -69,11 +69,11 @@
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', '_s' ); ?></h2>
<h2 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'wd_s' ); ?></h2>
<div class="nav-links">

<div class="nav-previous"><?php previous_comments_link( esc_html__( 'Older Comments', '_s' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( esc_html__( 'Newer Comments', '_s' ) ); ?></div>
<div class="nav-previous"><?php previous_comments_link( esc_html__( 'Older Comments', 'wd_s' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( esc_html__( 'Newer Comments', 'wd_s' ) ); ?></div>

</div><!-- .nav-links -->
</nav><!-- #comment-nav-below -->
Expand All @@ -85,7 +85,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.', '_s' ); ?></p>
<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'wd_s' ); ?></p>
<?php endif; ?>

<?php
Expand Down
4 changes: 2 additions & 2 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package _s
* @package wd_s
*/

use function WebDevStudios\wd_s\print_copyright_text;
Expand All @@ -17,7 +17,7 @@

<footer class="site-footer">

<nav id="site-footer-navigation" class="footer-navigation navigation-menu" aria-label="<?php esc_attr_e( 'Footer Navigation', '_s' ); ?>">
<nav id="site-footer-navigation" class="footer-navigation navigation-menu" aria-label="<?php esc_attr_e( 'Footer Navigation', 'wd_s' ); ?>">
<?php
wp_nav_menu(
[
Expand Down
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package _s
* @package wd_s
*/

/**
Expand Down
8 changes: 4 additions & 4 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package _s
* @package wd_s
*/

?>
Expand All @@ -28,7 +28,7 @@

<?php wp_body_open(); ?>

<a class="skip-link screen-reader-text" href="#main"><?php esc_html_e( 'Skip to content', '_s' ); ?></a>
<a class="skip-link screen-reader-text" href="#main"><?php esc_html_e( 'Skip to content', 'wd_s' ); ?></a>

<header class="site-header">

Expand All @@ -55,12 +55,12 @@
</div><!-- .site-branding -->

<?php if ( has_nav_menu( 'primary' ) || has_nav_menu( 'mobile' ) ) : ?>
<button type="button" class="off-canvas-open" aria-expanded="false" aria-label="<?php esc_attr_e( 'Open Menu', '_s' ); ?>"></button>
<button type="button" class="off-canvas-open" aria-expanded="false" aria-label="<?php esc_attr_e( 'Open Menu', 'wd_s' ); ?>"></button>
<?php endif; ?>

</div><!-- .container -->

<nav id="site-navigation" class="main-navigation navigation-menu" aria-label="<?php esc_attr_e( 'Main Navigation', '_s' ); ?>">
<nav id="site-navigation" class="main-navigation navigation-menu" aria-label="<?php esc_attr_e( 'Main Navigation', 'wd_s' ); ?>">
<?php
wp_nav_menu(
[
Expand Down
2 changes: 1 addition & 1 deletion inc/customizer/assets/scripts/livepreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
} );

// Copyright text.
api( '_s_copyright_text', function ( value ) {
api( '_wd_s_copyright_text', function ( value ) {
value.bind( function ( to ) {
$( '.site-info' ).text( to );
} );
Expand Down
2 changes: 1 addition & 1 deletion inc/customizer/class-text-editor-custom-control.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Enable multiple WYSIWYG editors in the theme customizer.
*
* @package _s
* @package wd_s
*/

namespace WebDevStudios\wd_s;
Expand Down
10 changes: 5 additions & 5 deletions inc/customizer/customizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Set up the theme customizer.
*
* @package _s
* @package wd_s
*/

namespace WebDevStudios\wd_s;
Expand Down Expand Up @@ -58,9 +58,9 @@ function selective_refresh_support( $wp_customize ) {

// The <div> classname to append edit icon too.
$settings = [
'blogname' => '.site-title a',
'blogdescription' => '.site-description',
'_s_copyright_text' => '.site-info',
'blogname' => '.site-title a',
'blogdescription' => '.site-description',
'_wd_s_copyright_text' => '.site-info',
];

// Loop through, and add selector partials.
Expand Down Expand Up @@ -89,7 +89,7 @@ function live_preview_support( $wp_customize ) {
'blogdescription',
'header_textcolor',
'background_image',
'_s_copyright_text',
'_wd_s_copyright_text',
];

// Loop through and add the live preview to each setting.
Expand Down
6 changes: 3 additions & 3 deletions inc/customizer/panels.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Customizer panels.
*
* @package _s
* @package wd_s
*/

namespace WebDevStudios\wd_s;
Expand All @@ -22,8 +22,8 @@ function customize_panels( $wp_customize ) {
'priority' => 10,
'capability' => 'edit_theme_options',
'theme_supports' => '',
'title' => esc_html__( 'Site Options', '_s' ),
'description' => esc_html__( 'Other theme options.', '_s' ),
'title' => esc_html__( 'Site Options', 'wd_s' ),
'description' => esc_html__( 'Other theme options.', 'wd_s' ),
]
);
}
Expand Down
20 changes: 10 additions & 10 deletions inc/customizer/sections.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Customizer sections.
*
* @package _s
* @package wd_s
*/

namespace WebDevStudios\wd_s;
Expand All @@ -17,40 +17,40 @@ function customize_sections( $wp_customize ) {

// Register additional scripts section.
$wp_customize->add_section(
'_s_additional_scripts_section',
'_wd_s_additional_scripts_section',
[
'title' => esc_html__( 'Additional Scripts', '_s' ),
'title' => esc_html__( 'Additional Scripts', 'wd_s' ),
'priority' => 10,
'panel' => 'site-options',
]
);

// Register a social links section.
$wp_customize->add_section(
'_s_social_links_section',
'_wd_s_social_links_section',
[
'title' => esc_html__( 'Social Media', '_s' ),
'description' => esc_html__( 'Links here power the print_social_network_links() template tag.', '_s' ),
'title' => esc_html__( 'Social Media', 'wd_s' ),
'description' => esc_html__( 'Links here power the print_social_network_links() template tag.', 'wd_s' ),
'priority' => 90,
'panel' => 'site-options',
]
);

// Register a header section.
$wp_customize->add_section(
'_s_header_section',
'_wd_s_header_section',
[
'title' => esc_html__( 'Header Customizations', '_s' ),
'title' => esc_html__( 'Header Customizations', 'wd_s' ),
'priority' => 90,
'panel' => 'site-options',
]
);

// Register a footer section.
$wp_customize->add_section(
'_s_footer_section',
'_wd_s_footer_section',
[
'title' => esc_html__( 'Footer Customizations', '_s' ),
'title' => esc_html__( 'Footer Customizations', 'wd_s' ),
'priority' => 90,
'panel' => 'site-options',
]
Expand Down
Loading

0 comments on commit ddb6fb8

Please sign in to comment.