Skip to content
Snippets Groups Projects
Commit 2834bab7 authored by Erick Hitter's avatar Erick Hitter
Browse files

Fix translations when plugin is used with older WordPress versions

parent a57efdbd
Branches
No related tags found
1 merge request!17Fix translations when plugin is used with older WordPress versions
Pipeline #4899 passed
...@@ -37,6 +37,9 @@ Using the `epr_post_types` filter, one can modify the default array of object ty ...@@ -37,6 +37,9 @@ Using the `epr_post_types` filter, one can modify the default array of object ty
## Changelog ## ## Changelog ##
### 1.3.2 ###
* Fix translations when plugin is used with older WordPress versions.
### 1.3.1 ### ### 1.3.1 ###
* Fix translations in block editor. * Fix translations in block editor.
...@@ -73,6 +76,9 @@ Using the `epr_post_types` filter, one can modify the default array of object ty ...@@ -73,6 +76,9 @@ Using the `epr_post_types` filter, one can modify the default array of object ty
## Upgrade Notice ## ## Upgrade Notice ##
### 1.3.2 ###
Fixes translations when plugin is used with older WordPress versions.
### 1.3.1 ### ### 1.3.1 ###
Fixes translations in block editor. Fixes translations in block editor.
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* Plugin Name: External Permalinks Redux * Plugin Name: External Permalinks Redux
* Plugin URI: http://www.thinkoomph.com/plugins-modules/external-permalinks-redux/ * Plugin URI: http://www.thinkoomph.com/plugins-modules/external-permalinks-redux/
* Description: Allows users to point WordPress objects (posts, pages, custom post types) to a URL of your choosing. Inspired by and backwards-compatible with <a href="http://txfx.net/wordpress-plugins/page-links-to/">Page Links To</a> by Mark Jaquith. Written for use on WordPress.com VIP. * Description: Allows users to point WordPress objects (posts, pages, custom post types) to a URL of your choosing. Inspired by and backwards-compatible with <a href="http://txfx.net/wordpress-plugins/page-links-to/">Page Links To</a> by Mark Jaquith. Written for use on WordPress.com VIP.
* Version: 1.3.1 * Version: 1.3.2
* Author: Erick Hitter & Oomph, Inc. * Author: Erick Hitter & Oomph, Inc.
* Author URI: http://www.thinkoomph.com/ * Author URI: http://www.thinkoomph.com/
* Text Domain: external-permalinks-redux * Text Domain: external-permalinks-redux
...@@ -146,6 +146,7 @@ class external_permalinks_redux { ...@@ -146,6 +146,7 @@ class external_permalinks_redux {
* Register actions and filters. * Register actions and filters.
*/ */
protected function _setup() { protected function _setup() {
add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
add_action( 'init', array( $this, 'action_init' ), 0 ); // Other init actions may rely on permalinks so filter early. add_action( 'init', array( $this, 'action_init' ), 0 ); // Other init actions may rely on permalinks so filter early.
add_action( 'admin_init', array( $this, 'action_admin_init' ) ); add_action( 'admin_init', array( $this, 'action_admin_init' ) );
add_action( 'save_post', array( $this, 'action_save_post' ) ); add_action( 'save_post', array( $this, 'action_save_post' ) );
...@@ -156,6 +157,19 @@ class external_permalinks_redux { ...@@ -156,6 +157,19 @@ class external_permalinks_redux {
add_action( 'wp', array( $this, 'action_wp' ) ); add_action( 'wp', array( $this, 'action_wp' ) );
} }
/**
* Load plugin translations.
*
* @return void
*/
public function load_textdomain() {
load_plugin_textdomain(
'external-permalinks-redux',
false,
dirname( plugin_basename( __FILE__ ) ) . '/languages/'
);
}
/** /**
* Register plugin keys and status codes. * Register plugin keys and status codes.
* *
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
# This file is distributed under the same license as the External Permalinks Redux package. # This file is distributed under the same license as the External Permalinks Redux package.
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: External Permalinks Redux 1.3.1\n" "Project-Id-Version: External Permalinks Redux 1.3.2\n"
"Report-Msgid-Bugs-To: " "Report-Msgid-Bugs-To: "
"https://wordpress.org/support/plugin/external-permalinks-redux\n" "https://wordpress.org/support/plugin/external-permalinks-redux\n"
"POT-Creation-Date: 2022-06-25 17:40:29+00:00\n" "POT-Creation-Date: 2022-06-25 20:20:40+00:00\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n" "Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
...@@ -25,11 +25,11 @@ msgstr "" ...@@ -25,11 +25,11 @@ msgstr ""
"X-Textdomain-Support: yes\n" "X-Textdomain-Support: yes\n"
"X-Generator: grunt-wp-i18n 1.0.3\n" "X-Generator: grunt-wp-i18n 1.0.3\n"
#: external-permalinks-redux.php:169 #: external-permalinks-redux.php:183
msgid "Temporary (302)" msgid "Temporary (302)"
msgstr "" msgstr ""
#: external-permalinks-redux.php:170 #: external-permalinks-redux.php:184
msgid "Permanent (301)" msgid "Permanent (301)"
msgstr "" msgstr ""
...@@ -37,19 +37,19 @@ msgstr "" ...@@ -37,19 +37,19 @@ msgstr ""
msgid "External Permalinks Redux" msgid "External Permalinks Redux"
msgstr "" msgstr ""
#: external-permalinks-redux.php:219 #: external-permalinks-redux.php:233
msgid "Destination Address:" msgid "Destination Address:"
msgstr "" msgstr ""
#: external-permalinks-redux.php:223 #: external-permalinks-redux.php:237
msgid "To restore the original permalink, remove the link entered above." msgid "To restore the original permalink, remove the link entered above."
msgstr "" msgstr ""
#: external-permalinks-redux.php:228 #: external-permalinks-redux.php:242
msgid "Redirect Type:" msgid "Redirect Type:"
msgstr "" msgstr ""
#: external-permalinks-redux.php:230 #: external-permalinks-redux.php:244
#: inc/class-external-permalinks-redux-block-editor.php:172 #: inc/class-external-permalinks-redux-block-editor.php:172
msgid "-- Select --" msgid "-- Select --"
msgstr "" msgstr ""
......
...@@ -37,6 +37,9 @@ Using the `epr_post_types` filter, one can modify the default array of object ty ...@@ -37,6 +37,9 @@ Using the `epr_post_types` filter, one can modify the default array of object ty
== Changelog == == Changelog ==
= 1.3.2 =
* Fix translations when plugin is used with older WordPress versions.
= 1.3.1 = = 1.3.1 =
* Fix translations in block editor. * Fix translations in block editor.
...@@ -73,6 +76,9 @@ Using the `epr_post_types` filter, one can modify the default array of object ty ...@@ -73,6 +76,9 @@ Using the `epr_post_types` filter, one can modify the default array of object ty
== Upgrade Notice == == Upgrade Notice ==
= 1.3.2 =
Fixes translations when plugin is used with older WordPress versions.
= 1.3.1 = = 1.3.1 =
Fixes translations in block editor. Fixes translations in block editor.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment