Skip to content

Commit f5d9fb2

Browse files
authored
Merge pull request #219 from stevenkword/WPI-305
WPI-305: Better Translation Support
2 parents 9103f1b + 26e4abd commit f5d9fb2

File tree

4 files changed

+28
-10
lines changed

4 files changed

+28
-10
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ before_script:
6060
5.2)
6161
;;
6262
*)
63-
composer global require "phpunit/phpunit:^6"
63+
composer global require "phpunit/phpunit:6"
6464
;;
6565
esac
6666
- |

readme.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# PHP Compatibility Checker <a href="https://travis-ci.org/wpengine/phpcompat"><img src="https://travis-ci.org/wpengine/phpcompat.svg?branch=master"></a>
2-
**Contributors:** [wpengine](https://profiles.wordpress.org/wpengine), [octalmage](https://profiles.wordpress.org/octalmage), [stevenkword](https://profiles.wordpress.org/stevenkword), [Taylor4484](https://profiles.wordpress.org/Taylor4484), [pross](https://profiles.wordpress.org/pross), [jcross](https://profiles.wordpress.org/jcross)
3-
**Tags:** php 7, php 5.5, php, version, compatibility, checker, wp engine, wpe, wpengine
4-
**Requires at least:** 3.5
5-
**Tested up to:** 4.9
6-
**Stable tag:** 1.4.6
7-
**License:** GPLv2 or later
8-
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html
2+
**Contributors:** [wpengine](https://profiles.wordpress.org/wpengine), [octalmage](https://profiles.wordpress.org/octalmage), [stevenkword](https://profiles.wordpress.org/stevenkword), [Taylor4484](https://profiles.wordpress.org/Taylor4484), [pross](https://profiles.wordpress.org/pross), [jcross](https://profiles.wordpress.org/jcross)
3+
**Tags:** php 7, php 5.5, php, version, compatibility, checker, wp engine, wpe, wpengine
4+
**Requires at least:** 3.5
5+
**Tested up to:** 5.0
6+
**Stable tag:** 1.4.7
7+
**License:** GPLv2 or later
8+
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html
99

1010
Make sure your plugins and themes are compatible with newer PHP versions.
1111

@@ -117,6 +117,8 @@ To disclose security issues for this plugin please email [email protected]
117117

118118

119119
## Changelog ##
120+
### 1.4.7 ###
121+
- Better translation support.
120122

121123
### 1.4.6 ###
122124
- Switched to new PHPCompatibilityWP library to help prevent false positives.

readme.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
Contributors: wpengine, octalmage, stevenkword, Taylor4484, pross, jcross
33
Tags: php 7, php 5.5, php, version, compatibility, checker, wp engine, wpe, wpengine
44
Requires at least: 3.5
5-
Tested up to: 4.9
6-
Stable tag: 1.4.6
5+
Tested up to: 5.0
6+
Stable tag: 1.4.7
77
License: GPLv2 or later
88
License URI: http://www.gnu.org/licenses/gpl-2.0.html
99

@@ -113,6 +113,8 @@ To disclose security issues for this plugin please email [email protected]
113113
2. Compatibility results screen
114114

115115
== Changelog ==
116+
= 1.4.7 =
117+
- Better translation support.
116118

117119
= 1.4.6 =
118120
- Switched to new PHPCompatibilityWP library to help prevent false positives.

wpengine-phpcompat.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ public static function instance() {
7575
public static function init() {
7676
$instance = self::instance();
7777

78+
// Load textdomain.
79+
add_action( 'init', array( $instance, 'load_textdomain' ) );
80+
7881
// Build our tools page.
7982
add_action( 'admin_menu', array( $instance, 'create_menu' ) );
8083

@@ -310,6 +313,17 @@ public function create_job_queue() {
310313
) );
311314
}
312315

316+
/**
317+
* Loads textdomain for WP < 4.6 translation support.
318+
*
319+
* @since 1.4.7
320+
*
321+
* @action admin_init
322+
*/
323+
public function load_textdomain() {
324+
load_plugin_textdomain( 'php-compatibility-checker' );
325+
}
326+
313327
/**
314328
* Enqueues our JavaScript and CSS.
315329
*

0 commit comments

Comments
 (0)