Skip to content

WPI-305: Better Translation Support #219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ before_script:
5.2)
;;
*)
composer global require "phpunit/phpunit:^6"
composer global require "phpunit/phpunit:6"
;;
esac
- |
Expand Down
16 changes: 9 additions & 7 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# PHP Compatibility Checker <a href="https://travis-ci.org/wpengine/phpcompat"><img src="https://travis-ci.org/wpengine/phpcompat.svg?branch=master"></a>
**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)
**Tags:** php 7, php 5.5, php, version, compatibility, checker, wp engine, wpe, wpengine
**Requires at least:** 3.5
**Tested up to:** 4.9
**Stable tag:** 1.4.6
**License:** GPLv2 or later
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html
**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)
**Tags:** php 7, php 5.5, php, version, compatibility, checker, wp engine, wpe, wpengine
**Requires at least:** 3.5
**Tested up to:** 5.0
**Stable tag:** 1.4.7
**License:** GPLv2 or later
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html

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

Expand Down Expand Up @@ -117,6 +117,8 @@ To disclose security issues for this plugin please email WordPress@wpengine.com


## Changelog ##
### 1.4.7 ###
- Better translation support.

### 1.4.6 ###
- Switched to new PHPCompatibilityWP library to help prevent false positives.
Expand Down
6 changes: 4 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Contributors: wpengine, octalmage, stevenkword, Taylor4484, pross, jcross
Tags: php 7, php 5.5, php, version, compatibility, checker, wp engine, wpe, wpengine
Requires at least: 3.5
Tested up to: 4.9
Stable tag: 1.4.6
Tested up to: 5.0
Stable tag: 1.4.7
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -113,6 +113,8 @@ To disclose security issues for this plugin please email WordPress@wpengine.com
2. Compatibility results screen

== Changelog ==
= 1.4.7 =
- Better translation support.

= 1.4.6 =
- Switched to new PHPCompatibilityWP library to help prevent false positives.
Expand Down
14 changes: 14 additions & 0 deletions wpengine-phpcompat.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ public static function instance() {
public static function init() {
$instance = self::instance();

// Load textdomain.
add_action( 'init', array( $instance, 'load_textdomain' ) );

// Build our tools page.
add_action( 'admin_menu', array( $instance, 'create_menu' ) );

Expand Down Expand Up @@ -310,6 +313,17 @@ public function create_job_queue() {
) );
}

/**
* Loads textdomain for WP < 4.6 translation support.
*
* @since 1.4.7
*
* @action admin_init
*/
public function load_textdomain() {
load_plugin_textdomain( 'php-compatibility-checker' );
}

/**
* Enqueues our JavaScript and CSS.
*
Expand Down