TinyMCE Advanced - Version 5.5.1

Version Description

  • Renamed the plugin to Advanced Editor Tools to comply with trademark requirements.
Download this release

Release Info

Developer azaozz
Plugin Icon 128x128 TinyMCE Advanced
Version 5.5.1
Comparing to
See all releases

Code changes from version 5.5.0 to 5.5.1

mce/wptadv/plugin.js CHANGED
@@ -1,8 +1,6 @@
1
  /**
2
- * This file is part of the TinyMCE Advanced WordPress plugin and is released under the same license.
3
- * For more information please see tinymce-advanced.php.
4
- *
5
- * Copyright (c) 2007-2020 Andrew Ozz. All rights reserved.
6
  */
7
 
8
  ( function( tinymce ) {
1
  /**
2
+ * Additional functionality for TinyMCE.
3
+ * @package advanced-editor-tools
 
 
4
  */
5
 
6
  ( function( tinymce ) {
mce/wptadv/plugin.min.js CHANGED
@@ -1,8 +1,6 @@
1
  /**
2
- * This file is part of the TinyMCE Advanced WordPress plugin and is released under the same license.
3
- * For more information please see tinymce-advanced.php.
4
- *
5
- * Copyright (c) 2007-2020 Andrew Ozz. All rights reserved.
6
  */
7
 
8
  ( function( tinymce ) {
1
  /**
2
+ * Additional functionality for TinyMCE.
3
+ * @package advanced-editor-tools
 
 
4
  */
5
 
6
  ( function( tinymce ) {
plugin-assets/tadv.css CHANGED
@@ -1,8 +1,6 @@
1
  /**
2
- * This file is part of the TinyMCE Advanced WordPress plugin and is released under the same license.
3
- * For more information please see tinymce-advanced.php.
4
- *
5
- * Copyright (c) 2007-2019 Andrew Ozz. All rights reserved.
6
  */
7
 
8
  body.settings_page_tinymce-advanced {
@@ -10,7 +8,7 @@ body.settings_page_tinymce-advanced {
10
  color: #000;
11
  }
12
 
13
- .tinymce-advanced h4 {
14
  font-size: 1.1em;
15
  }
16
 
@@ -54,12 +52,12 @@ body.settings_page_tinymce-advanced {
54
  display: none;
55
  }
56
 
57
- .wrap.tinymce-advanced {
58
  max-width: 760px;
59
  margin: 16px 24px 0 16px;
60
  }
61
 
62
- .rtl .wrap.tinymce-advanced {
63
  margin: 16px 16px 0 24px;
64
  }
65
 
@@ -383,11 +381,11 @@ form#tadvadmin {
383
  font-weight: 600;
384
  }
385
 
386
- .tinymce-advanced label {
387
  vertical-align: baseline;
388
  }
389
 
390
- .tinymce-advanced input[type="checkbox"] {
391
  vertical-align: text-bottom;
392
  }
393
 
@@ -464,7 +462,7 @@ ul.container,
464
  height: 20px;
465
  line-height: 20px;
466
  text-align: center;
467
- vertical-align: text-top;
468
  margin: 0;
469
  padding: 0;
470
  color: #555;
1
  /**
2
+ * Styles for the settings screen.
3
+ * @package advanced-editor-tools
 
 
4
  */
5
 
6
  body.settings_page_tinymce-advanced {
8
  color: #000;
9
  }
10
 
11
+ .advanced-editor-tools h4 {
12
  font-size: 1.1em;
13
  }
14
 
52
  display: none;
53
  }
54
 
55
+ .wrap.advanced-editor-tools {
56
  max-width: 760px;
57
  margin: 16px 24px 0 16px;
58
  }
59
 
60
+ .rtl .wrap.advanced-editor-tools {
61
  margin: 16px 16px 0 24px;
62
  }
63
 
381
  font-weight: 600;
382
  }
383
 
384
+ .advanced-editor-tools label {
385
  vertical-align: baseline;
386
  }
387
 
388
+ .advanced-editor-tools input[type="checkbox"] {
389
  vertical-align: text-bottom;
390
  }
391
 
462
  height: 20px;
463
  line-height: 20px;
464
  text-align: center;
465
+ vertical-align: middle;
466
  margin: 0;
467
  padding: 0;
468
  color: #555;
plugin-assets/tadv.js CHANGED
@@ -1,8 +1,6 @@
1
  /**
2
- * This file is part of the TinyMCE Advanced WordPress plugin and is released under the same license.
3
- * For more information please see tinymce-advanced.php.
4
- *
5
- * Copyright (c) 2007-2019 Andrew Ozz. All rights reserved.
6
  */
7
 
8
  jQuery( document ).ready( function( $ ) {
1
  /**
2
+ * Scripts for the settings screen in wp-admin.
3
+ * @package advanced-editor-tools
 
 
4
  */
5
 
6
  jQuery( document ).ready( function( $ ) {
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
- === TinyMCE Advanced ===
2
- Contributors: azaozz
3
  Tags: block editor, classic editor, editor, Gutenberg, formatting, tinymce, write
4
  Requires at least: 5.5
5
  Tested up to: 5.5
6
- Stable tag: 5.5.0
7
  Requires PHP: 5.6
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -12,12 +12,12 @@ Extends and enhances the block editor (Gutenberg) and the classic editor (TinyMC
12
 
13
  == Description ==
14
 
15
- TinyMCE Advanced introduces a "Classic Paragraph" block for the block editor (Gutenberg).
16
  If you are not quite ready to switch to the block editor, or have plugins that cannot be used there (yet), using the Classic Paragraph block is your best option. It lets you to continue to use the familiar TinyMCE editor for most tasks, and at the same time gives you full access to all blocks and new features in the block editor.
17
 
18
- Version 5.5 continues to improve and enhance the new features introduced in version 5.0 of TinyMCE Advanced. It includes an improved "Clear Formatting" button, several advanced settings for tables, and importing and exporting of the settings to a file.
19
 
20
- If you want to continue to use the previous ("classic") editor in WordPress 5.0 and newer, this plugin has an option to replace the new editor with the previous one. If you prefer to have access to both editors side by side or to allow your users to switch editors, it would be better to install the [Classic Editor plugin](https://wordpress.org/plugins/classic-editor/). TinyMCE Advanced is fully compatible with the classic editor plugin and similar plugins that restore use of the previous WordPress editor.
21
 
22
  As always this plugin will let you add, remove and arrange the buttons that are shown on the Visual Editor toolbar in the Classic Paragraph and Classic blocks in the block editor, and in the classic editor (when enabled by a plugin). There you can configure up to four rows of buttons including Font Sizes, Font Family, text and background colors, tables, etc.
23
 
@@ -37,9 +37,9 @@ In addition this plugin adds options for keeping the paragraph tags in text mode
37
 
38
  = Privacy =
39
 
40
- TinyMCE Advanced does not collect or store any user related data. It does not set cookies, and it does not connect to any third-party websites. It only uses functionality that is available in [WordPress](https://wordpress.org/), and in the [TinyMCE editor](https://tinymce.com/).
41
 
42
- In that terms TinyMCE Advanced does not affect your website's user privacy in any way.
43
 
44
  == Installation ==
45
 
@@ -47,6 +47,9 @@ Best is to install directly from WordPress. If manual installation is required,
47
 
48
  == Changelog ==
49
 
 
 
 
50
  = 5.5.0 =
51
  * Updated for WordPress 5.5 and TinyMCE 4.9.10.
52
  * Updated/renamed the subscript and superscript buttons as these are now in Gutenberg.
@@ -268,7 +271,7 @@ Please see the new (as of version 5.2.0) advanced settings for tables. It is pos
268
 
269
  = No styles are imported in the Formats sub-menu =
270
 
271
- These styles are imported from your current theme editor-style.css file. However some themes do not have this functionality. For these themes TinyMCE Advanced has the option to let you add a customized editor-style.css and import it into the editor.
272
 
273
  = I have just installed this plugin, but it does not do anything =
274
 
@@ -286,19 +289,17 @@ Make sure the "Disable the visual editor when writing" checkbox under "Users - Y
286
 
287
  Re-save the settings or click the "Restore Default Settings" button on the plugin settings page and then set the buttons again and save.
288
 
289
- = Other questions? More screenshots? =
290
-
291
- Please post on the support forum or visit the homepage for [TinyMCE Advanced](http://www.laptoptips.ca/projects/tinymce-advanced/).
292
-
293
  == Screenshots ==
294
 
295
- 1. Rich-text toolbar and selected text color settings.
296
- 2. The Classic Paragraph block.
297
- 3. Converting several paragraphs into one classic paragraph.
298
- 4. Converting several paragraphs into one classic paragraph.
299
- 5. Settings for the rich-text toolbar, the Formatting toolbar and the selected text color.
300
- 6. Settings for the toolbars in Classic Paragraph and Classic blocks.
301
- 7. Additional options (defaults are shown).
 
 
302
 
303
  == Upgrade Notice ==
304
 
1
+ === Advanced Editor Tools (previously TinyMCE Advanced) ===
2
+ Contributors: automattic, azaozz
3
  Tags: block editor, classic editor, editor, Gutenberg, formatting, tinymce, write
4
  Requires at least: 5.5
5
  Tested up to: 5.5
6
+ Stable tag: 5.5.1
7
  Requires PHP: 5.6
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
13
  == Description ==
14
 
15
+ Advanced Editor Tools (previously TinyMCE Advanced) introduces a "Classic Paragraph" block for the block editor (Gutenberg).
16
  If you are not quite ready to switch to the block editor, or have plugins that cannot be used there (yet), using the Classic Paragraph block is your best option. It lets you to continue to use the familiar TinyMCE editor for most tasks, and at the same time gives you full access to all blocks and new features in the block editor.
17
 
18
+ Version 5.5 continues to improve and enhance the new features introduced in version 5.0 of the plugin. It includes an improved "Clear Formatting" button, several advanced settings for tables, and importing and exporting of the settings to a file.
19
 
20
+ If you want to continue to use the previous ("classic") editor in WordPress 5.0 and newer, this plugin has an option to replace the new editor with the previous one. If you prefer to have access to both editors side by side or to allow your users to switch editors, it would be better to install the [Classic Editor plugin](https://wordpress.org/plugins/classic-editor/). Advanced Editor Tools is fully compatible with the classic editor plugin and similar plugins that restore use of the previous WordPress editor.
21
 
22
  As always this plugin will let you add, remove and arrange the buttons that are shown on the Visual Editor toolbar in the Classic Paragraph and Classic blocks in the block editor, and in the classic editor (when enabled by a plugin). There you can configure up to four rows of buttons including Font Sizes, Font Family, text and background colors, tables, etc.
23
 
37
 
38
  = Privacy =
39
 
40
+ Advanced Editor Tools does not collect or store any user related data. It does not set cookies, and it does not connect to any third-party websites. It only uses functionality that is available in [WordPress](https://wordpress.org/), and in the [TinyMCE editor](https://tinymce.com/).
41
 
42
+ In that terms Advanced Editor Tools does not affect your website's user privacy in any way.
43
 
44
  == Installation ==
45
 
47
 
48
  == Changelog ==
49
 
50
+ = 5.5.1 =
51
+ * Renamed the plugin to Advanced Editor Tools to comply with trademark requirements.
52
+
53
  = 5.5.0 =
54
  * Updated for WordPress 5.5 and TinyMCE 4.9.10.
55
  * Updated/renamed the subscript and superscript buttons as these are now in Gutenberg.
271
 
272
  = No styles are imported in the Formats sub-menu =
273
 
274
+ These styles are imported from your current theme editor-style.css file. However some themes do not have this functionality. For these themes Advanced Editor Tools has the option to let you add a customized editor-style.css and import it into the editor.
275
 
276
  = I have just installed this plugin, but it does not do anything =
277
 
289
 
290
  Re-save the settings or click the "Restore Default Settings" button on the plugin settings page and then set the buttons again and save.
291
 
 
 
 
 
292
  == Screenshots ==
293
 
294
+ 1. Rich-text toolbar.
295
+ 2. Rich-text toolbar and extra formatting buttons in the Inspector (sidebar).
296
+ 3. Many of the buttons can be moved to the Formatting section in the Inspector.
297
+ 4. Converting the content of the Classic Paragraph block into separate blocks.
298
+ 5. Converting several paragraph blocks into a Classic Paragraph block.
299
+ 6. Settings for the Rich-text toolbar and the optional Formatting section in the Inspector.
300
+ 7. Settings for the toolbars in Classic Paragraph and Classic blocks.
301
+ 8. Additional options.
302
+ 9. Advanced options for tables.
303
 
304
  == Upgrade Notice ==
305
 
tadv_admin.php CHANGED
@@ -1,9 +1,7 @@
1
  <?php
2
  /**
3
- * This file is part of the TinyMCE Advanced WordPress plugin and is released under the same license.
4
- * For more information please see tinymce-advanced.php.
5
- *
6
- * Copyright (c) 2007-2018 Andrew Ozz. All rights reserved.
7
  */
8
 
9
  if ( ! defined( 'TADV_ADMIN_PAGE' ) ) {
@@ -41,8 +39,8 @@ if ( isset( $_POST['tadv-save'] ) ) {
41
 
42
  // TODO: all users
43
  ?>
44
- <div class="wrap tinymce-advanced">
45
- <h2><?php _e( 'TinyMCE Advanced Settings Import', 'tinymce-advanced' ); ?></h2>
46
 
47
  <div class="tadv-import-export">
48
  <form action="" method="post" enctype="multipart/form-data" class="import-file">
@@ -71,7 +69,7 @@ if ( isset( $_POST['tadv-save'] ) ) {
71
  } elseif ( isset( $_POST['tadv-import-submit'] ) && ! empty( $_POST['tadv-import'] ) && is_string( $_POST['tadv-import'] ) ) {
72
  check_admin_referer( 'tadv-import-settings', 'tadv-import-settings-nonce' );
73
 
74
- // TODO: all users
75
  $import = json_decode( trim( wp_unslash( $_POST['tadv-import'] ) ), true );
76
 
77
  if ( ! is_array( $import ) ) {
@@ -116,12 +114,20 @@ $all_buttons = $this->get_all_buttons();
116
 
117
  ?>
118
  <div class="wrap tinymce-advanced block-active<?php if ( is_rtl() ) echo ' mce-rtl'; ?>" id="contain">
119
- <h2><?php _e( 'Editor Settings', 'tinymce-advanced' ); ?></h2>
120
  <?php
121
 
122
  // TODO admin || SA
123
  $this->warn_if_unsupported();
124
 
 
 
 
 
 
 
 
 
125
  if ( isset( $_POST['tadv-save'] ) && empty( $message ) ) {
126
  ?><div class="updated notice notice-success is-dismissible"><p><?php _e( 'Settings saved.', 'tinymce-advanced' ); ?></p></div><?php
127
  } else {
@@ -910,7 +916,6 @@ if ( ! is_multisite() || current_user_can( 'manage_sites' ) ) {
910
  <label for="table_default_attributes"><?php _e( 'When inserting a table set the HTML border attribute to 1', 'tinymce-advanced' ); ?></label>
911
  <p>
912
  <?php _e( 'This will add a border around the table unless it is overriden by your theme.', 'tinymce-advanced' ); ?>
913
- <?php _e( 'To set other default attributes or inline styles use the Advanced TinyMCE Configuration plugin.', 'tinymce-advanced' ); ?>
914
  </p>
915
  </div>
916
  <div>
@@ -939,20 +944,6 @@ if ( ! is_multisite() || current_user_can( 'manage_sites' ) ) {
939
  </p>
940
  </div>
941
  </div>
942
- <hr>
943
- <div>
944
- <p class="tadv-help" id="advanced-tinymce-config">
945
- <span class="dashicons dashicons-external"></span>
946
- <?php
947
-
948
- $text = __( 'For other advanced TinyMCE settings, including settings for the Classic Paragraph block and more advanced table options, you can use the %1$sAdvanced TinyMCE Configuration plugin%2$s.', 'tinymce-advanced' );
949
- /* translators: URL to (localised) Advanced TinyMCE Configuration plugin. */
950
- $url = __( 'https://wordpress.org/plugins/advanced-tinymce-configuration/', 'tinymce-advanced' );
951
- printf( $text, '<a href="' . esc_url( $url ) . '">', '</a>' );
952
-
953
- ?>
954
- </p>
955
- </div>
956
  </div>
957
 
958
  <div class="advanced-options">
@@ -970,18 +961,18 @@ if ( ! is_multisite() || current_user_can( 'manage_sites' ) ) {
970
  </p>
971
  </div>
972
  <div>
973
- <h4><?php _e( 'Enable the TinyMCE editor enhancements for:', 'tinymce-advanced' ); ?></h4>
974
  <p>
975
  <input type="checkbox" id="tadv_enable_1" name="tadv_enable_at[]" value="edit_post_screen" <?php if ( $this->check_admin_setting( 'enable_edit_post_screen' ) ) echo ' checked'; ?> />
976
  <label for="tadv_enable_1"><?php _e( 'The Classic Editor (Add New and Edit posts and pages)', 'tinymce-advanced' ); ?></label>
977
  </p>
978
  <p>
979
  <input type="checkbox" id="tadv_enable_2" name="tadv_enable_at[]" value="rest_of_wpadmin" <?php if ( $this->check_admin_setting( 'enable_rest_of_wpadmin' ) ) echo ' checked'; ?> />
980
- <label for="tadv_enable_2"><?php _e( 'Other TinyMCE editors in wp-admin', 'tinymce-advanced' ); ?></label>
981
  </p>
982
  <p>
983
  <input type="checkbox" id="tadv_enable_3" name="tadv_enable_at[]" value="on_front_end" <?php if ( $this->check_admin_setting( 'enable_on_front_end' ) ) echo ' checked'; ?> />
984
- <label for="tadv_enable_3"><?php _e( 'TinyMCE editors on the front end of the site', 'tinymce-advanced' ); ?></label>
985
  </p>
986
  </div>
987
  </div>
1
  <?php
2
  /**
3
+ * User and admin settings UI.
4
+ * @package advanced-editor-tools
 
 
5
  */
6
 
7
  if ( ! defined( 'TADV_ADMIN_PAGE' ) ) {
39
 
40
  // TODO: all users
41
  ?>
42
+ <div class="wrap advanced-editor-tools">
43
+ <h2><?php _e( 'Advanced Editor Tools Settings Import', 'tinymce-advanced' ); ?></h2>
44
 
45
  <div class="tadv-import-export">
46
  <form action="" method="post" enctype="multipart/form-data" class="import-file">
69
  } elseif ( isset( $_POST['tadv-import-submit'] ) && ! empty( $_POST['tadv-import'] ) && is_string( $_POST['tadv-import'] ) ) {
70
  check_admin_referer( 'tadv-import-settings', 'tadv-import-settings-nonce' );
71
 
72
+ // TODO: all users that can have settings
73
  $import = json_decode( trim( wp_unslash( $_POST['tadv-import'] ) ), true );
74
 
75
  if ( ! is_array( $import ) ) {
114
 
115
  ?>
116
  <div class="wrap tinymce-advanced block-active<?php if ( is_rtl() ) echo ' mce-rtl'; ?>" id="contain">
117
+ <h2><?php _e( 'Advanced Editor Tools', 'tinymce-advanced' ); ?></h2>
118
  <?php
119
 
120
  // TODO admin || SA
121
  $this->warn_if_unsupported();
122
 
123
+ // Add a notice that the plugin was renamed.
124
+ // Remove in the bnext version.
125
+ ?>
126
+ <div class="notice notice-warning is-dismissible"><p>
127
+ <?php _e( 'Please note: This plugin was renamed from "TinyMCE Advanced" to "Advanced Editor Tools". The plugin functionality remains the same.', 'tinymce-advanced' ); ?>
128
+ </p></div>
129
+ <?php
130
+
131
  if ( isset( $_POST['tadv-save'] ) && empty( $message ) ) {
132
  ?><div class="updated notice notice-success is-dismissible"><p><?php _e( 'Settings saved.', 'tinymce-advanced' ); ?></p></div><?php
133
  } else {
916
  <label for="table_default_attributes"><?php _e( 'When inserting a table set the HTML border attribute to 1', 'tinymce-advanced' ); ?></label>
917
  <p>
918
  <?php _e( 'This will add a border around the table unless it is overriden by your theme.', 'tinymce-advanced' ); ?>
 
919
  </p>
920
  </div>
921
  <div>
944
  </p>
945
  </div>
946
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
947
  </div>
948
 
949
  <div class="advanced-options">
961
  </p>
962
  </div>
963
  <div>
964
+ <h4><?php _e( 'Enable the editor enhancements for:', 'tinymce-advanced' ); ?></h4>
965
  <p>
966
  <input type="checkbox" id="tadv_enable_1" name="tadv_enable_at[]" value="edit_post_screen" <?php if ( $this->check_admin_setting( 'enable_edit_post_screen' ) ) echo ' checked'; ?> />
967
  <label for="tadv_enable_1"><?php _e( 'The Classic Editor (Add New and Edit posts and pages)', 'tinymce-advanced' ); ?></label>
968
  </p>
969
  <p>
970
  <input type="checkbox" id="tadv_enable_2" name="tadv_enable_at[]" value="rest_of_wpadmin" <?php if ( $this->check_admin_setting( 'enable_rest_of_wpadmin' ) ) echo ' checked'; ?> />
971
+ <label for="tadv_enable_2"><?php _e( 'Other instances of the Classic (TinyMCE) editor in wp-admin', 'tinymce-advanced' ); ?></label>
972
  </p>
973
  <p>
974
  <input type="checkbox" id="tadv_enable_3" name="tadv_enable_at[]" value="on_front_end" <?php if ( $this->check_admin_setting( 'enable_on_front_end' ) ) echo ' checked'; ?> />
975
+ <label for="tadv_enable_3"><?php _e( 'Instances of the Classic editor on the front end of the site', 'tinymce-advanced' ); ?></label>
976
  </p>
977
  </div>
978
  </div>
tinymce-advanced.php CHANGED
@@ -1,42 +1,47 @@
1
  <?php
2
  /*
3
- Plugin Name: TinyMCE Advanced
4
- Plugin URI: http://www.laptoptips.ca/projects/tinymce-advanced/
5
  Description: Extends and enhances the block editor (Gutenberg) and the classic editor (TinyMCE).
6
- Version: 5.5.0
7
  Requires at least: 5.5
8
  Tested up to: 5.5
9
  Requires PHP: 5.6
10
- Author: Andrew Ozz
11
- Author URI: http://www.laptoptips.ca/
12
  License: GPL2
13
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
14
  Text Domain: tinymce-advanced
15
 
16
 
17
- TinyMCE Advanced is free software: you can redistribute it and/or modify
18
- it under the terms of the GNU General Public License as published by
19
- the Free Software Foundation, either version 2 of the License, or
20
  any later version.
21
 
22
- TinyMCE Advanced is distributed in the hope that it will be useful,
23
  but WITHOUT ANY WARRANTY; without even the implied warranty of
24
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25
  GNU General Public License for more details.
26
 
27
  You should have received a copy of the GNU General Public License along
28
- with TinyMCE Advanced or WordPress. If not, see https://www.gnu.org/licenses/gpl-2.0.html.
29
 
30
- Copyright (c) 2007-2020 Andrew Ozz. All rights reserved.
31
  */
32
 
 
 
 
 
 
33
  if ( ! defined( 'ABSPATH' ) ) {
34
  exit;
35
  }
36
 
37
- if ( ! class_exists( 'Tinymce_Advanced' ) ) :
38
 
39
- class Tinymce_Advanced {
40
 
41
  private $required_wp_version = '5.5-alpha';
42
  private $plugin_version = 5500;
@@ -370,7 +375,7 @@ class Tinymce_Advanced {
370
  <?php
371
 
372
  printf(
373
- __( 'TinyMCE Advanced requires WordPress version %1$s or newer. It appears that you are running %2$s. This can make the editor unstable.', 'tinymce-advanced' ),
374
  $this->required_wp_version,
375
  esc_html( $wp_version )
376
  );
@@ -1323,7 +1328,9 @@ class Tinymce_Advanced {
1323
  }
1324
 
1325
  public function add_menu() {
1326
- add_options_page( 'TinyMCE Advanced', 'TinyMCE Advanced', 'manage_options', 'tinymce-advanced', array( $this, 'settings_page' ) );
 
 
1327
  }
1328
 
1329
  /**
@@ -1331,8 +1338,7 @@ class Tinymce_Advanced {
1331
  */
1332
  public function add_settings_link( $links, $file ) {
1333
  if (
1334
- strpos( $file, '/tinymce-advanced.php' ) !== false &&
1335
- plugin_basename( __FILE__ ) === $file &&
1336
  current_user_can( 'manage_options' )
1337
  ) {
1338
  $settings_link = sprintf( '<a href="%s">%s</a>', admin_url( 'options-general.php?page=tinymce-advanced' ), __( 'Settings', 'tinymce-advanced' ) );
@@ -1344,5 +1350,5 @@ class Tinymce_Advanced {
1344
  }
1345
  }
1346
 
1347
- new Tinymce_Advanced;
1348
  endif;
1
  <?php
2
  /*
3
+ Plugin Name: Advanced Editor Tools (previously TinyMCE Advanced)
4
+ Plugin URI: https://wordpress.org/plugins/tinymce-advanced/
5
  Description: Extends and enhances the block editor (Gutenberg) and the classic editor (TinyMCE).
6
+ Version: 5.5.1
7
  Requires at least: 5.5
8
  Tested up to: 5.5
9
  Requires PHP: 5.6
10
+ Author: Automattic
11
+ Author URI: https://automattic.com
12
  License: GPL2
13
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
14
  Text Domain: tinymce-advanced
15
 
16
 
17
+ Advanced Editor Tools (previously TinyMCE Advanced) is free software: you can
18
+ redistribute it and/or modifyit under the terms of the GNU General Public License
19
+ as published bythe Free Software Foundation, either version 2 of the License, or
20
  any later version.
21
 
22
+ Advanced Editor Tools is distributed in the hope that it will be useful,
23
  but WITHOUT ANY WARRANTY; without even the implied warranty of
24
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25
  GNU General Public License for more details.
26
 
27
  You should have received a copy of the GNU General Public License along
28
+ with Advanced Editor Tools or WordPress. If not, see https://www.gnu.org/licenses/gpl-2.0.html.
29
 
30
+ Copyright (c) 2007-2020 Automattic, Inc. All rights reserved.
31
  */
32
 
33
+ /**
34
+ * Main plugin file.
35
+ * @package advanced-editor-tools
36
+ */
37
+
38
  if ( ! defined( 'ABSPATH' ) ) {
39
  exit;
40
  }
41
 
42
+ if ( ! class_exists( 'Advanced_Editor_Tools' ) ) :
43
 
44
+ class Advanced_Editor_Tools {
45
 
46
  private $required_wp_version = '5.5-alpha';
47
  private $plugin_version = 5500;
375
  <?php
376
 
377
  printf(
378
+ __( 'Advanced Editor Tools requires WordPress version %1$s or newer. It appears that you are running %2$s. This can make the editor unstable.', 'tinymce-advanced' ),
379
  $this->required_wp_version,
380
  esc_html( $wp_version )
381
  );
1328
  }
1329
 
1330
  public function add_menu() {
1331
+ $page_title = __( 'Advanced Editor Tools', 'tinymce-advanced' );
1332
+ $menu_item_label = __( 'Advanced Editor Tools (TinyMCE Advanced)', 'tinymce-advanced' );
1333
+ add_options_page( $page_title, $menu_item_label, 'manage_options', 'tinymce-advanced', array( $this, 'settings_page' ) );
1334
  }
1335
 
1336
  /**
1338
  */
1339
  public function add_settings_link( $links, $file ) {
1340
  if (
1341
+ strrpos( $file, '/tinymce-advanced.php' ) === ( strlen( $file ) - 21 ) &&
 
1342
  current_user_can( 'manage_options' )
1343
  ) {
1344
  $settings_link = sprintf( '<a href="%s">%s</a>', admin_url( 'options-general.php?page=tinymce-advanced' ), __( 'Settings', 'tinymce-advanced' ) );
1350
  }
1351
  }
1352
 
1353
+ new Advanced_Editor_Tools;
1354
  endif;
uninstall.php CHANGED
@@ -1,7 +1,14 @@
1
  <?php
 
 
 
 
2
 
3
- if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) || ! WP_UNINSTALL_PLUGIN ||
4
- dirname( WP_UNINSTALL_PLUGIN ) != dirname( plugin_basename( __FILE__ ) ) ) {
 
 
 
5
 
6
  exit;
7
  }
1
  <?php
2
+ /**
3
+ * Clean-up on uninstalling.
4
+ * @package advanced-editor-tools
5
+ */
6
 
7
+ if (
8
+ ! defined( 'WP_UNINSTALL_PLUGIN' ) ||
9
+ ! WP_UNINSTALL_PLUGIN ||
10
+ dirname( WP_UNINSTALL_PLUGIN ) !== dirname( plugin_basename( __FILE__ ) )
11
+ ) {
12
 
13
  exit;
14
  }