Skip to content

Commit

Permalink
updated - textdomain etc
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveJonesDev committed Aug 29, 2023
1 parent 573fbfb commit 7daab95
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 42 deletions.
9 changes: 7 additions & 2 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
27 changes: 11 additions & 16 deletions accessibility-new-window-warnings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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__ ) );

Expand All @@ -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();
}
Expand All @@ -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' ) );
}

/**
Expand All @@ -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();
}
24 changes: 0 additions & 24 deletions config.codekit3
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7daab95

Please sign in to comment.