Skip to content

Commit 2798af3

Browse files
committed
Fix conflict when TinyMCE is used in frontend.
1 parent b49dd32 commit 2798af3

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

admin/class-bread-admin.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ function ml_default_editor($r)
142142
if (function_exists('get_current_screen')) {
143143
global $my_admin_page;
144144
$screen = get_current_screen();
145-
if ($screen->id == $my_admin_page) {
145+
if ($screen != null && $screen->id == $my_admin_page) {
146146
return "tinymce";
147147
}
148148
}
@@ -154,7 +154,7 @@ function force_mce_refresh($ver)
154154
if (function_exists('get_current_screen')) {
155155
global $my_admin_page;
156156
$screen = get_current_screen();
157-
if ($screen->id == $my_admin_page) {
157+
if ($screen != null && $screen->id == $my_admin_page) {
158158
return $ver + 99;
159159
}
160160
}
@@ -167,7 +167,7 @@ function my_register_mce_button($buttons)
167167
if (function_exists('get_current_screen')) {
168168
global $my_admin_page;
169169
$screen = get_current_screen();
170-
if ($screen->id == $my_admin_page) {
170+
if ($screen != null && $screen->id == $my_admin_page) {
171171
array_push($buttons, 'front_page_button', 'custom_template_button_1', 'custom_template_button_2');
172172
}
173173
}
@@ -182,7 +182,7 @@ function my_custom_plugins()
182182
return $plugins_array;
183183
}
184184
$screen = get_current_screen();
185-
if ($screen->id == $my_admin_page) {
185+
if ($screen != null && $screen->id == $my_admin_page) {
186186
$plugins = array('table', 'code', 'contextmenu'); //Add any more plugins you want to load here
187187
//Build the response - the key is the plugin name, value is the URL to the plugin JS
188188
foreach ($plugins as $plugin) {
@@ -204,7 +204,7 @@ function tiny_tweaks($initArray)
204204
if (function_exists('get_current_screen')) {
205205
global $my_admin_page;
206206
$screen = get_current_screen();
207-
if ($screen->id == $my_admin_page) {
207+
if ($screen != null && $screen->id == $my_admin_page) {
208208
$initArray['fontsize_formats'] = "5pt 6pt 7pt 8pt 9pt 10pt 11pt 12pt 13pt 14pt 15pt 16pt 17pt 18pt 19pt 20pt 22pt 24pt 26pt 28pt 30pt 32pt 34pt 36pt 38pt";
209209
$initArray['theme_advanced_blockformats'] = 'h2,h3,h4,p';
210210
$initArray['wordpress_adv_hidden'] = false;
@@ -223,7 +223,7 @@ function is_root_server_missing()
223223
}
224224
global $my_admin_page;
225225
$screen = get_current_screen();
226-
if ($screen->id == $my_admin_page) {
226+
if ($screen != null && $screen->id == $my_admin_page) {
227227
$root_server = $this->bread->getOption('root_server');
228228
if ($root_server == '') {
229229
echo '<div id="message" class="error"><p>Missing BMLT Server in settings for bread.</p>';

bmlt-meeting-list.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Plugin Name: Bread
1212
* Plugin URI: https://bmlt.app
1313
* Description: Maintains and generates PDF Meeting Lists from BMLT.
14-
* Version: 2.8.10
14+
* Version: 2.8.11
1515
* Author: bmlt-enabled
1616
* Author URI: https://bmlt.app/
1717
* License: GPL-2.0+

readme.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Contributors: odathp, radius314, pjaudiomv, klgrimley, jbraswell, otrok7, alanb2
44
Tags: meeting list, bmlt, narcotics anonymous, na
55
Requires PHP: 8.1
66
Requires at least: 6.2
7-
Tested up to: 6.7.1
8-
Stable tag: 2.8.10
7+
Tested up to: 6.7.2
8+
Stable tag: 2.8.11
99

1010
License: GPLv2 or later
1111
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -55,6 +55,9 @@ Follow all these steps, keep in mind that once you start using bread, it's not g
5555

5656
== Changelog ==
5757

58+
= 2.8.11 =
59+
* Remove conflicts when TinyMCE is used in the frontend.
60+
5861
= 2.8.10 =
5962
* Improve code quality
6063

0 commit comments

Comments
 (0)