From 7daab9547942509b750dfde65daee29f3083aa12 Mon Sep 17 00:00:00 2001 From: Steve Jones Date: Tue, 29 Aug 2023 14:39:05 -0400 Subject: [PATCH] updated - textdomain etc --- README.txt | 9 +++++++-- accessibility-new-window-warnings.php | 27 +++++++++++---------------- config.codekit3 | 24 ------------------------ 3 files changed, 18 insertions(+), 42 deletions(-) diff --git a/README.txt b/README.txt index 7aaf092..2d70d2f 100644 --- a/README.txt +++ b/README.txt @@ -2,8 +2,8 @@ Contributors: equalizedigital, alh0319, stevejonesdev Tags: accessibility, accessible, wcag, ada, a11y, section 508, links, open new window, open new tab Requires at least: 5.0.0 -Tested up to: 6.3 -Stable tag: 1.0.6 +Tested up to: 6.3.1 +Stable tag: 1.0.7 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -74,6 +74,11 @@ If you would like to contribute a translation to this plugin, please [contact us == Changelog == += 1.0.7 = +* Updated - textdomain to plugin slug +* Updated - member variable doc comment +* Removed - call to local languages folder + = 1.0.6 = * Updated - tested up to version diff --git a/accessibility-new-window-warnings.php b/accessibility-new-window-warnings.php index 29f49bc..dd2c84b 100644 --- a/accessibility-new-window-warnings.php +++ b/accessibility-new-window-warnings.php @@ -3,18 +3,17 @@ * Plugin Name: Accessibility New Window Warnings * Plugin URI: https://a11ychecker.com * Description: Make links that open in a new window accessible by adding a warning. - * Version: 1.0.6 + * Version: 1.0.7 * Author: Equalize Digital * Author URI: https://equalizedigital.com * License: GPL-2.0+ * License URI: http://www.gnu.org/licenses/gpl-2.0.txt - * Text Domain: anww - * Domain Path: /languages + * Text Domain: accessibility-new-window-warnings * * @package ANWW */ -define( 'ANWW_VERSION', '1.0.6' ); +define( 'ANWW_VERSION', '1.0.7' ); define( 'ANWW_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); define( 'ANWW_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); @@ -27,12 +26,17 @@ */ class ANWW { + /** + * Singleton instance of the class. + * + * @var ANWW + */ private static $instance; /** * Get the singleton instance of the class. */ - public static function getInstance() { + public static function get_instance() { if ( null === static::$instance ) { static::$instance = new static(); } @@ -54,7 +58,6 @@ public function __construct() { public function setup_actions() { add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ) ); - add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) ); } /** @@ -74,20 +77,12 @@ public function enqueue_scripts() { // Localize the script with new data. $translation_array = array( - 'opens_a_new_window' => __( 'opens a new window', 'anww' ), + 'opens_a_new_window' => __( 'opens a new window', 'accessibility-new-window-warnings' ), ); wp_localize_script( 'anww', 'anww_localized', $translation_array ); } - - /** - * Loads the plugin's textdomain. - */ - public function load_textdomain() { - load_plugin_textdomain( 'anww', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); - } - } // instantiate the plugin class. - ANWW::getInstance(); + ANWW::get_instance(); } diff --git a/config.codekit3 b/config.codekit3 index 1c1d0c7..29666a1 100644 --- a/config.codekit3 +++ b/config.codekit3 @@ -105,30 +105,6 @@ "sC" : 3, "tS" : 0 }, - "\/languages\/anww-es_ES.mo" : { - "cB" : 0, - "ft" : 8192, - "hM" : 0, - "oA" : 0, - "oAP" : "\/languages\/anww-es_ES.mo", - "oF" : 0 - }, - "\/languages\/anww-es_ES.po" : { - "cB" : 0, - "ft" : 8192, - "hM" : 0, - "oA" : 0, - "oAP" : "\/languages\/anww-es_ES.po", - "oF" : 0 - }, - "\/languages\/anww.pot" : { - "cB" : 0, - "ft" : 8192, - "hM" : 0, - "oA" : 0, - "oAP" : "\/languages\/anww.pot", - "oF" : 0 - }, "\/phpcs.xml" : { "cB" : 0, "ft" : 8192,