Skip to content

Commit

Permalink
feat(feedback): Reverted translation text domain change, prepare quer…
Browse files Browse the repository at this point in the history
…y removed, version bump
  • Loading branch information
merlijnvanlent committed Sep 23, 2024
1 parent 2c65715 commit 8bf3607
Show file tree
Hide file tree
Showing 14 changed files with 21 additions and 26 deletions.
2 changes: 1 addition & 1 deletion Includes/Pages/LastWeek.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function getItems(array $parameters = []): array

public function getLabel(): string
{
return __('Last week', 'vohtmlsitemap');
return __('Last week', 'vo-html-sitemap');
}

public function getUrl(): string
Expand Down
2 changes: 1 addition & 1 deletion Includes/Pages/ThisWeek.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function getItems(array $parameters = []): array

public function getLabel(): string
{
return __('This week', 'vohtmlsitemap');
return __('This week', 'vo-html-sitemap');
}

public function getUrl(): string
Expand Down
2 changes: 1 addition & 1 deletion Includes/Pages/Today.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function getItems(array $parameters = []): array

public function getLabel(): string
{
return __('Today', 'vohtmlsitemap');
return __('Today', 'vo-html-sitemap');
}

public function getUrl(): string
Expand Down
2 changes: 1 addition & 1 deletion Includes/Pages/Yesterday.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function getItems(array $parameters = []): array

public function getLabel(): string
{
return __('Yesterday', 'vohtmlsitemap');
return __('Yesterday', 'vo-html-sitemap');
}

public function getUrl(): string
Expand Down
2 changes: 1 addition & 1 deletion Includes/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,6 @@ public function enqueueAssets(): void

public function loadTextDomain(): void
{
load_plugin_textdomain('vohtmlsitemap', false, dirname(plugin_basename(VOHTMLSITEMAP_FILE)) . '/languages');
load_plugin_textdomain('vo-html-sitemap', false, dirname(plugin_basename(VOHTMLSITEMAP_FILE)) . '/languages');
}
}
5 changes: 0 additions & 5 deletions Includes/QueryHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,4 @@ public function getPostTypesPreparableValues(): array
{
return array_keys(Settings::getPostTypes());
}

public function query($sql, array $args = []): array
{
return $this->wpdb->get_results($this->wpdb->prepare($sql, $args));
}
}
6 changes: 3 additions & 3 deletions Includes/SettingsPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static function registerSettings(): void

add_settings_section(
'vohtmlsitemap',
__('VO HTML Sitemap Settings', 'vohtmlsitemap'),
__('VO HTML Sitemap Settings', 'vo-html-sitemap'),
'__return_false',
'vohtmlsitemap'
);
Expand All @@ -60,8 +60,8 @@ public static function addSubmenuPage(): void
{
add_submenu_page(
'options-general.php',
__('VO HTML Sitemap', 'vohtmlsitemap'),
__('HTML Sitemap', 'vohtmlsitemap'),
__('VO HTML Sitemap', 'vo-html-sitemap'),
__('HTML Sitemap', 'vo-html-sitemap'),
'manage_options',
'vohtmlsitemap',
[self::class, 'renderSubmenuPage']
Expand Down
Binary file modified languages/vo-html-sitemap-nl_NL.mo
Binary file not shown.
4 changes: 2 additions & 2 deletions languages/vo-html-sitemap-nl_NL.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/vo-html-sitemap\n"
"POT-Creation-Date: 2024-09-23T08:55:20+00:00\n"
"PO-Revision-Date: 2024-09-23 10:56+0200\n"
"POT-Creation-Date: 2024-09-23T13:25:27+00:00\n"
"PO-Revision-Date: 2024-09-23 15:25+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: nl_NL\n"
Expand Down
4 changes: 2 additions & 2 deletions languages/vo-html-sitemap.pot
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2024-09-23T08:55:20+00:00\n"
"POT-Creation-Date: 2024-09-23T13:25:27+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.5.0\n"
"X-Domain: vohtmlsitemap\n"
"X-Domain: vo-html-sitemap\n"

#. Plugin Name of the plugin
#: Includes/SettingsPage.php:63
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: https://van-ons.nl/
Tags: sitemap, SEO, html
Requires at least: 6.4
Tested up to: 6.6
Stable tag: 1.0.2
Stable tag: 1.0.3
Requires PHP: 8.0
License: MIT
License URI: https://opensource.org/licenses/MIT
Expand Down
8 changes: 4 additions & 4 deletions templates/admin/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
<table class="form-table">
<tr>
<th scope="row">
<?php esc_html_e('Post types', 'vohtmlsitemap'); ?>
<?php esc_html_e('Post types', 'vo-html-sitemap'); ?>
</th>
<td>
<fieldset id="post_types">
<legend>
<?php esc_html_e('Post types to include in the sitemap', 'vohtmlsitemap') ?>
<?php esc_html_e('Post types to include in the sitemap', 'vo-html-sitemap') ?>
</legend>
<?php foreach (get_post_types(['public' => true]) as $type): ?>
<label>
Expand All @@ -32,12 +32,12 @@
<tr>
<th scope="row">
<label for="vohtmlsitemap-page">
<?php esc_html_e('Sitemap page', 'vohtmlsitemap') ?>
<?php esc_html_e('Sitemap page', 'vo-html-sitemap') ?>
</label>
</th>
<td>
<select id="vohtmlsitemap-page" name="vohtmlsitemap-page">
<option value="0"><?php esc_html_e('Select a page', 'vohtmlsitemap') ?></option>
<option value="0"><?php esc_html_e('Select a page', 'vo-html-sitemap') ?></option>
<?php foreach (get_posts(['post_type' => 'page', 'posts_per_page' => -1]) as $page): ?>
<option value="<?php echo esc_attr($page->ID) ?>" <?php echo selected(get_option('vohtmlsitemap-page'), $page->ID) ?>>
<?php echo esc_html( $page->post_title ) ?>
Expand Down
2 changes: 1 addition & 1 deletion templates/sitemap-range.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<ul class="vo-html-sitemap__list">
<?php if (empty($posts)): ?>
<li class="vo-html-sitemap__list-item">
<?php esc_html_e('No posts found', 'vohtmlsitemap') ?>
<?php esc_html_e('No posts found', 'vo-html-sitemap') ?>
</li>
<?php else: ?>
<?php foreach ($posts as $post): ?>
Expand Down
6 changes: 3 additions & 3 deletions vo-html-sitemap.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* Description: Van Ons plugin to add a HTML sitemap to your site.
* Author: Van Ons
* Author URI: https://van-ons.nl/
* Version: 1.0.2
* Text Domain: vohtmlsitemap
* Version: 1.0.3
* Text Domain: vo-html-sitemap
* Domain Path: /languages
* Requires at least: 6.4
* Requires PHP: 8.0
Expand All @@ -25,7 +25,7 @@
spl_autoload_register(__NAMESPACE__ . '\\autoload');

// define plugin constants
define('VOHTMLSITEMAP_VERSION', '1.0.2');
define('VOHTMLSITEMAP_VERSION', '1.0.3');

define('VOHTMLSITEMAP_ROOT', dirname(__FILE__) . '/');
define('VOHTMLSITEMAP_ROOT_FILE', __FILE__);
Expand Down

0 comments on commit 8bf3607

Please sign in to comment.