Skip to content

Commit

Permalink
closes #4 Change rt to
Browse files Browse the repository at this point in the history
  • Loading branch information
fumikito committed Mar 16, 2020
1 parent 86bcc7b commit 864c1f0
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 14 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ branches:
php:
- 5.6
- 7.1
services: mysql
env:
matrix:
- WP_VERSION=latest WP_MULTISITE=0
Expand Down
8 changes: 4 additions & 4 deletions readme.md → README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

Contributors: Takahashi_Fumiki
Tags: wysiwyg, tinymce, ruby, dl, cite, q, small, css3, html5
Requires at least: 4.7
Tested up to: 5.0
Requires PHP: 5.4
Stable tag: 2.0.3
Requires at least: 5.0
Tested up to: 5.3
Requires PHP: 5.6
Stable tag: 2.1.0
Lisence: GPL 3.0 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Expand Down
7 changes: 6 additions & 1 deletion bin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,21 @@
set -e

# Build files
composer install --no-dev
composer install --no-dev --prefer-dist
npm install
npm run package
# Make Readme
echo 'Generate readme.'
curl -L https://raw.githubusercontent.com/fumikito/wp-readme/master/wp-readme.php | php
# Remove files
rm -rf .git
rm -rf node_modules
rm -rf tests
rm -rf bin
rm .gitignore
rm .travis.yml
rm phpcs.ruleset.xml
rm phpunit.xml.dist

if [ $TRAVIS_TAG ]; then
echo $TRAVIS_TAG
Expand Down
6 changes: 3 additions & 3 deletions src/Hametuha/Yomigana/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,13 @@ public function mce_init( $init_arr ) {
public function kses_allowed_html( $tags, $context ) {
foreach (
array(
'ruby' => array(
'ruby' => [
'id' => true,
'name' => true,
'class' => true,
'title' => true,
),
'rt' => true,
],
'rt' => [],
) as $tag_name => $setting
) {
if ( ! isset( $tags[ $tag_name ] ) ) {
Expand Down
15 changes: 9 additions & 6 deletions wp-yomigana.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
Plugin Name: WP-Yomigana
Plugin URI: https://wordpress.org/plugins/wp-yomigana/
Description: You can enter ruby tag in visual editor.
Version: 2.0.3
PHP Version: 5.4
Version: 2.1.0
PHP Version: 5.6
Author: Takahashi Fumiki
Author URI: https://takahashifumiki.com
License: GPL 3.0 or later
Text Domain: wp-yomigana
Domain Path: /languages
This plugins owes a lot to TinyMCE Advanced, a WordPress plugin(http://wordpress.org/extend/plugins/tinymce-advanced/).
This plugins owes a lot to TinyMCE Advanced, a WordPress plugin(https://wordpress.org/extend/plugins/tinymce-advanced/).
*/

Expand All @@ -32,7 +32,7 @@ function yomigana_init() {
add_action( 'admin_notices', 'yomigana_notice' );
} else {
require $auto_loader;
call_user_func( array( 'Hametuha\\Yomigana\\Bootstrap', 'get_instance' ) );
Hametuha\Yomigana\Bootstrap::get_instance();
}
}
add_action( 'plugins_loaded', 'yomigana_init' );
Expand All @@ -43,12 +43,15 @@ function yomigana_init() {
* @return WP_Error|string
*/
function yomigana_error() {
$required = '5.4';
$info = get_file_data( __FILE__, [
'version' => 'PHP Version'
] );
$required = $info['version'];
$current = phpversion();
$path = dirname( __FILE__ ) . '/vendor/autoload.php';
if ( version_compare( $current, $required, '<' ) ) {
// translators: %1$s is requires PHP version, %2$s is current version.
return new WP_Error( 'invalid_php_version', sprintf( __( 'WP-Yomigana requires PHP %1$s and later, but your PHP is %2$s', 'wp-yomigana' ), '5.4', phpversion() ) );
return new WP_Error( 'invalid_php_version', sprintf( __( 'WP-Yomigana requires PHP %1$s and later, but your PHP is %2$s', 'wp-yomigana' ), $required, phpversion() ) );
} elseif ( ! file_exists( $path ) ) {
// translators: %s is file path.
return new WP_Error( 'no_composer', sprintf( __( 'WP-Yomigana\'s auto load file %s is not found.', 'wp-yomigana' ), $path ) );
Expand Down

0 comments on commit 864c1f0

Please sign in to comment.