Completed
Push — master ( c07007...f9ede4 )
by
unknown
19s
created
admin/includes/menus/settings.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -98,8 +98,8 @@  discard block
 block discarded – undo
98 98
 		if ( !is_user_logged_in() )
99 99
 			return;
100 100
         
101
-        // check for lasso story engine and add a class doniting this
102
-        $ase_status = class_exists( 'Aesop_Core' ) || defined( 'LASSO_CUSTOM' ) ? 'ase-active' : 'ase-not-active';
101
+		// check for lasso story engine and add a class doniting this
102
+		$ase_status = class_exists( 'Aesop_Core' ) || defined( 'LASSO_CUSTOM' ) ? 'ase-active' : 'ase-not-active';
103 103
 
104 104
 		$article_object   = lasso_editor_get_option( 'article_class', 'lasso_editor' );
105 105
 		$featImgClass    = lasso_editor_get_option( 'featimg_class', 'lasso_editor' );
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 		$edit_post_disabled  = lasso_editor_get_option( 'post_edit_disabled', 'lasso_editor' );
111 111
 		$post_settings_disabled = lasso_editor_get_option( 'post_settings_disabled', 'lasso_editor' );
112 112
 		$allow_change_date = lasso_editor_get_option( 'allow_change_date', 'lasso_editor' );
113
-        $allow_edit_excerpt = lasso_editor_get_option( 'allow_edit_excerpt', 'lasso_editor' );
113
+		$allow_edit_excerpt = lasso_editor_get_option( 'allow_edit_excerpt', 'lasso_editor' );
114 114
 		$allow_new_category = lasso_editor_get_option( 'allow_new_category', 'lasso_editor' );
115 115
 		$shortcodify_disabled  = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
116 116
 		$enable_autosave  = lasso_editor_get_option( 'enable_autosave', 'lasso_editor' );
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 		$toolbar_show_color      = lasso_editor_get_option( 'toolbar_show_color', 'lasso_editor' );
125 125
 		$toolbar_show_alignment  = lasso_editor_get_option( 'toolbar_show_alignment', 'lasso_editor' );
126 126
         
127
-        $text_select_popup = lasso_editor_get_option('text_select_popup', 'lasso_editor', false);
127
+		$text_select_popup = lasso_editor_get_option('text_select_popup', 'lasso_editor', false);
128 128
 		
129 129
 		$objectsNoSave  	= lasso_editor_get_option('dont_save', 'lasso_editor');
130 130
 		$objectsNonEditable  	= lasso_editor_get_option('non_editable', 'lasso_editor');
@@ -139,8 +139,8 @@  discard block
 block discarded – undo
139 139
 		$bold_tag = lasso_editor_get_option( 'bold_tag', 'lasso_editor',  "b");
140 140
 		$i_tag = lasso_editor_get_option( 'i_tag', 'lasso_editor',  "i");
141 141
         
142
-        $add_table = lasso_editor_get_option('add_table', 'lasso_editor', false);
143
-        $add_paragraph = lasso_editor_get_option('add_paragraph', 'lasso_editor', false);
142
+		$add_table = lasso_editor_get_option('add_table', 'lasso_editor', false);
143
+		$add_paragraph = lasso_editor_get_option('add_paragraph', 'lasso_editor', false);
144 144
 		
145 145
 		// do we support pending status
146 146
 		$no_pending_status = lasso_editor_get_option('no_pending_status', 'lasso_editor');
@@ -152,17 +152,17 @@  discard block
 block discarded – undo
152 152
 			$insert_comp_ui = 'drag';
153 153
 		}
154 154
         
155
-        $link_prefix_http = lasso_editor_get_option('link_prefix_http', 'lasso_editor');
155
+		$link_prefix_http = lasso_editor_get_option('link_prefix_http', 'lasso_editor');
156 156
 		$inherit_categories = lasso_editor_get_option('inherit_categories', 'lasso_editor');
157 157
         
158
-        $use_old_wpimg = lasso_editor_get_option('use_old_wpimg', 'lasso_editor','off');
159
-        $use_wp_block_image = lasso_editor_get_option('use_wp_block_image', 'lasso_editor','off');
158
+		$use_old_wpimg = lasso_editor_get_option('use_old_wpimg', 'lasso_editor','off');
159
+		$use_wp_block_image = lasso_editor_get_option('use_wp_block_image', 'lasso_editor','off');
160 160
 		
161 161
 		$support_custom_taxonomy   = lasso_editor_get_option( 'support_custom_taxonomy', 'lasso_editor' );
162 162
         
163
-        $new_post_text    = lasso_editor_get_option( 'new_post_text', 'lasso_editor' );
163
+		$new_post_text    = lasso_editor_get_option( 'new_post_text', 'lasso_editor' );
164 164
         
165
-        $no_wrap_shortcode    = lasso_editor_get_option( 'no_wrap_shortcode', 'lasso_editor');
165
+		$no_wrap_shortcode    = lasso_editor_get_option( 'no_wrap_shortcode', 'lasso_editor');
166 166
 
167 167
 ?>
168 168
 		<div class="wrap">
Please login to merge, or discard this patch.
Spacing   +195 added lines, -195 removed lines patch added patch discarded remove patch
@@ -9,9 +9,9 @@  discard block
 block discarded – undo
9 9
 
10 10
 	function __construct() {
11 11
 
12
-		add_action( 'admin_menu',     array( $this, 'menu' ) );
13
-		add_action( 'network_admin_menu',   array( $this, 'menu' ) );
14
-		add_action( 'wp_ajax_lasso-editor-settings', array( $this, 'process_settings' ) );
12
+		add_action('admin_menu', array($this, 'menu'));
13
+		add_action('network_admin_menu', array($this, 'menu'));
14
+		add_action('wp_ajax_lasso-editor-settings', array($this, 'process_settings'));
15 15
 
16 16
 	}
17 17
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	function menu() {
24 24
 
25 25
 		// CHANGED Removed condition.
26
-		add_submenu_page( 'lasso-editor', __( 'Settings', 'lasso' ), __( 'Settings', 'lasso' ), 'manage_options', 'lasso-editor-settings', array( $this, 'settings' ) );
26
+		add_submenu_page('lasso-editor', __('Settings', 'lasso'), __('Settings', 'lasso'), 'manage_options', 'lasso-editor-settings', array($this, 'settings'));
27 27
 
28 28
 	}
29 29
 
@@ -45,26 +45,26 @@  discard block
 block discarded – undo
45 45
 	function process_settings() {
46 46
 
47 47
 		// bail out if current user isn't and administrator and they are not logged in
48
-		if ( !current_user_can( 'manage_options' ) || !is_user_logged_in() )
48
+		if (!current_user_can('manage_options') || !is_user_logged_in())
49 49
 			return;
50 50
 
51
-		if ( isset( $_POST['action'] ) && 'lasso-editor-settings' == $_POST['action'] && check_admin_referer( 'nonce', 'lasso_editor_settings' ) ) {
51
+		if (isset($_POST['action']) && 'lasso-editor-settings' == $_POST['action'] && check_admin_referer('nonce', 'lasso_editor_settings')) {
52 52
 
53
-			$options = isset( $_POST['lasso_editor'] ) ? $_POST['lasso_editor'] : false;
53
+			$options = isset($_POST['lasso_editor']) ? $_POST['lasso_editor'] : false;
54 54
 			
55 55
 			$arr = $options['allowed_post_types'];
56
-			$options = array_map( 'sanitize_text_field', $options );
57
-			$options['allowed_post_types'] = array_keys( $arr);
56
+			$options = array_map('sanitize_text_field', $options);
57
+			$options['allowed_post_types'] = array_keys($arr);
58 58
 
59 59
 			
60 60
 
61
-			if ( function_exists( 'is_multisite' ) && is_multisite() ) {
61
+			if (function_exists('is_multisite') && is_multisite()) {
62 62
 
63
-				update_site_option( 'lasso_editor', $options );
63
+				update_site_option('lasso_editor', $options);
64 64
 
65 65
 			} else {
66 66
 
67
-				update_option( 'lasso_editor', $options );
67
+				update_option('lasso_editor', $options);
68 68
 			}
69 69
 
70 70
 			wp_send_json_success();
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	}
81 81
 	
82 82
 	function create_section_for_color_picker($id, $title, $defvalue) { 
83
-		$color_value = lasso_editor_get_option( $id, 'lasso_editor',$defvalue );
83
+		$color_value = lasso_editor_get_option($id, 'lasso_editor', $defvalue);
84 84
 	 
85 85
 		echo '<div lass="lasso-editor-settings--option-inner">'."\n";
86 86
 		echo '<label>'.$title.'</label>';
@@ -95,49 +95,49 @@  discard block
 block discarded – undo
95 95
 	 */
96 96
 	function lasso_editor_settings_form() {
97 97
 
98
-		if ( !is_user_logged_in() )
98
+		if (!is_user_logged_in())
99 99
 			return;
100 100
         
101 101
         // check for lasso story engine and add a class doniting this
102
-        $ase_status = class_exists( 'Aesop_Core' ) || defined( 'LASSO_CUSTOM' ) ? 'ase-active' : 'ase-not-active';
103
-
104
-		$article_object   = lasso_editor_get_option( 'article_class', 'lasso_editor' );
105
-		$featImgClass    = lasso_editor_get_option( 'featimg_class', 'lasso_editor' );
106
-		$titleClass    = lasso_editor_get_option( 'title_class', 'lasso_editor' );
107
-
108
-		$post_new_disabled   = lasso_editor_get_option( 'post_adding_disabled', 'lasso_editor' );
109
-		$save_to_post_disabled  = lasso_editor_get_option( 'post_save_disabled', 'lasso_editor' );
110
-		$edit_post_disabled  = lasso_editor_get_option( 'post_edit_disabled', 'lasso_editor' );
111
-		$post_settings_disabled = lasso_editor_get_option( 'post_settings_disabled', 'lasso_editor' );
112
-		$allow_change_date = lasso_editor_get_option( 'allow_change_date', 'lasso_editor' );
113
-        $allow_edit_excerpt = lasso_editor_get_option( 'allow_edit_excerpt', 'lasso_editor' );
114
-		$allow_new_category = lasso_editor_get_option( 'allow_new_category', 'lasso_editor' );
115
-		$shortcodify_disabled  = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
116
-		$enable_autosave  = lasso_editor_get_option( 'enable_autosave', 'lasso_editor' );
102
+        $ase_status = class_exists('Aesop_Core') || defined('LASSO_CUSTOM') ? 'ase-active' : 'ase-not-active';
103
+
104
+		$article_object   = lasso_editor_get_option('article_class', 'lasso_editor');
105
+		$featImgClass = lasso_editor_get_option('featimg_class', 'lasso_editor');
106
+		$titleClass = lasso_editor_get_option('title_class', 'lasso_editor');
107
+
108
+		$post_new_disabled   = lasso_editor_get_option('post_adding_disabled', 'lasso_editor');
109
+		$save_to_post_disabled  = lasso_editor_get_option('post_save_disabled', 'lasso_editor');
110
+		$edit_post_disabled  = lasso_editor_get_option('post_edit_disabled', 'lasso_editor');
111
+		$post_settings_disabled = lasso_editor_get_option('post_settings_disabled', 'lasso_editor');
112
+		$allow_change_date = lasso_editor_get_option('allow_change_date', 'lasso_editor');
113
+        $allow_edit_excerpt = lasso_editor_get_option('allow_edit_excerpt', 'lasso_editor');
114
+		$allow_new_category = lasso_editor_get_option('allow_new_category', 'lasso_editor');
115
+		$shortcodify_disabled = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor');
116
+		$enable_autosave = lasso_editor_get_option('enable_autosave', 'lasso_editor');
117 117
 		
118 118
 		$disable_shortcode_editing = lasso_editor_get_option('disable_shortcode_editing', 'lasso_editor');
119 119
 
120
-		$use_old_ui      = lasso_editor_get_option( 'use_old_ui', 'lasso_editor' );
121
-		$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
122
-		$toolbar_headings_h4      = lasso_editor_get_option( 'toolbar_headings_h4', 'lasso_editor' );
123
-		$toolbar_list      = lasso_editor_get_option( 'toolbar_list', 'lasso_editor' );
124
-		$toolbar_show_color      = lasso_editor_get_option( 'toolbar_show_color', 'lasso_editor' );
125
-		$toolbar_show_alignment  = lasso_editor_get_option( 'toolbar_show_alignment', 'lasso_editor' );
120
+		$use_old_ui = lasso_editor_get_option('use_old_ui', 'lasso_editor');
121
+		$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
122
+		$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
123
+		$toolbar_list = lasso_editor_get_option('toolbar_list', 'lasso_editor');
124
+		$toolbar_show_color      = lasso_editor_get_option('toolbar_show_color', 'lasso_editor');
125
+		$toolbar_show_alignment  = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor');
126 126
         
127 127
         $text_select_popup = lasso_editor_get_option('text_select_popup', 'lasso_editor', false);
128 128
 		
129
-		$objectsNoSave  	= lasso_editor_get_option('dont_save', 'lasso_editor');
130
-		$objectsNonEditable  	= lasso_editor_get_option('non_editable', 'lasso_editor');
129
+		$objectsNoSave = lasso_editor_get_option('dont_save', 'lasso_editor');
130
+		$objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor');
131 131
 		$disable_tour = lasso_editor_get_option('disable_tour', 'lasso_editor');
132 132
 		$show_ignored_items = lasso_editor_get_option('show_ignored_items', 'lasso_editor');
133 133
 		$save_using_rest_disabled = lasso_editor_get_option('save_using_rest_disabled', 'lasso_editor');
134 134
 		
135
-		$default_post_types = apply_filters( 'lasso_allowed_post_types', array( 'post', 'page'));
136
-		$allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor',  $default_post_types);
135
+		$default_post_types = apply_filters('lasso_allowed_post_types', array('post', 'page'));
136
+		$allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', $default_post_types);
137 137
 		
138 138
 		$links_editable = lasso_editor_get_option('links_editable', 'lasso_editor', false);
139
-		$bold_tag = lasso_editor_get_option( 'bold_tag', 'lasso_editor',  "b");
140
-		$i_tag = lasso_editor_get_option( 'i_tag', 'lasso_editor',  "i");
139
+		$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor', "b");
140
+		$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor', "i");
141 141
         
142 142
         $add_table = lasso_editor_get_option('add_table', 'lasso_editor', false);
143 143
         $add_paragraph = lasso_editor_get_option('add_paragraph', 'lasso_editor', false);
@@ -155,14 +155,14 @@  discard block
 block discarded – undo
155 155
         $link_prefix_http = lasso_editor_get_option('link_prefix_http', 'lasso_editor');
156 156
 		$inherit_categories = lasso_editor_get_option('inherit_categories', 'lasso_editor');
157 157
         
158
-        $use_old_wpimg = lasso_editor_get_option('use_old_wpimg', 'lasso_editor','off');
159
-        $use_wp_block_image = lasso_editor_get_option('use_wp_block_image', 'lasso_editor','off');
158
+        $use_old_wpimg = lasso_editor_get_option('use_old_wpimg', 'lasso_editor', 'off');
159
+        $use_wp_block_image = lasso_editor_get_option('use_wp_block_image', 'lasso_editor', 'off');
160 160
 		
161
-		$support_custom_taxonomy   = lasso_editor_get_option( 'support_custom_taxonomy', 'lasso_editor' );
161
+		$support_custom_taxonomy = lasso_editor_get_option('support_custom_taxonomy', 'lasso_editor');
162 162
         
163
-        $new_post_text    = lasso_editor_get_option( 'new_post_text', 'lasso_editor' );
163
+        $new_post_text = lasso_editor_get_option('new_post_text', 'lasso_editor');
164 164
         
165
-        $no_wrap_shortcode    = lasso_editor_get_option( 'no_wrap_shortcode', 'lasso_editor');
165
+        $no_wrap_shortcode = lasso_editor_get_option('no_wrap_shortcode', 'lasso_editor');
166 166
 
167 167
 ?>
168 168
 		<div class="wrap">
@@ -205,31 +205,31 @@  discard block
 block discarded – undo
205 205
 		
206 206
 		
207 207
 		</script>        
208
-	    	<h2><?php _e( 'Editus Settings', 'lasso' );?></h2>
208
+	    	<h2><?php _e('Editus Settings', 'lasso'); ?></h2>
209 209
             
210 210
 			<form id="lasso-editor-settings-form" class="lasso--form-settings" method="post" enctype="multipart/form-data">
211 211
 
212
-				<?php do_action('lasso_settings_before');?>
212
+				<?php do_action('lasso_settings_before'); ?>
213 213
 				
214 214
 				
215 215
 				
216
-				<h3 class="accordion show"><?php _e( 'Enable for:', 'lasso' );?></h3>
216
+				<h3 class="accordion show"><?php _e('Enable for:', 'lasso'); ?></h3>
217 217
 				<div class="lasso-editor-settings--option-wrap show">
218 218
 					<div class="lasso-editor-settings--option-inner">
219 219
 						
220
-						<span class="lasso--setting-description"><?php _e( 'Enable Editus for the following post types.', 'lasso' );?></span>
220
+						<span class="lasso--setting-description"><?php _e('Enable Editus for the following post types.', 'lasso'); ?></span>
221 221
 						<?php
222 222
 						$args = array(
223 223
 							'public'   => true
224 224
 						);
225 225
 						 
226
-						$allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
227
-						$post_types = get_post_types( $args, 'objects' );
226
+						$allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
227
+						$post_types = get_post_types($args, 'objects');
228 228
 						 
229
-						foreach ( $post_types  as $post_type ) {
229
+						foreach ($post_types  as $post_type) {
230 230
 						   if ($post_type->name == 'attachment') continue;
231
-						   $checked ="";
232
-						   if (  in_array( $post_type->name, $allowed_post_types )  ) {
231
+						   $checked = "";
232
+						   if (in_array($post_type->name, $allowed_post_types)) {
233 233
 								$checked = 'checked="checked"';
234 234
 						   }
235 235
 						   echo '<label><input type="checkbox" '.$checked.' name="lasso_editor[allowed_post_types]['.$post_type->name.']" id="lasso_editor[allowed_post_types]['.$post_type->name.']" >'.$post_type->name.'</label>';
@@ -239,140 +239,140 @@  discard block
 block discarded – undo
239 239
 				</div>
240 240
 				
241 241
 
242
-				<h3 class="accordion show"><?php _e( 'Internal Settings', 'lasso' );?></h3>
242
+				<h3 class="accordion show"><?php _e('Internal Settings', 'lasso'); ?></h3>
243 243
 				<div class="lasso-editor-settings--option-wrap show">
244 244
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
245
-						<label><?php _e( 'Article Class', 'lasso' );?></label>
246
-						<span class="lasso--setting-description"><?php _e( 'Provide the CSS class (including the preceding dot) of container that holds the post. This should be the first parent container class that holds the_content.', 'lasso' );?></span>
247
-						<input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr( $article_object );?>" placeholder=".entry-content">
245
+						<label><?php _e('Article Class', 'lasso'); ?></label>
246
+						<span class="lasso--setting-description"><?php _e('Provide the CSS class (including the preceding dot) of container that holds the post. This should be the first parent container class that holds the_content.', 'lasso'); ?></span>
247
+						<input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr($article_object); ?>" placeholder=".entry-content">
248 248
 					</div>
249 249
 				
250 250
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
251
-						<label><?php _e( 'Featured Image Class', 'lasso' );?></label>
252
-						<span class="lasso--setting-description"><?php _e( 'Provide the CSS class that uses a featured image as a background image. This currently only supports themes that have the featured image set as background image.', 'lasso' );?></span>
253
-						<input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr( $featImgClass );?>" placeholder=".entry-content">
251
+						<label><?php _e('Featured Image Class', 'lasso'); ?></label>
252
+						<span class="lasso--setting-description"><?php _e('Provide the CSS class that uses a featured image as a background image. This currently only supports themes that have the featured image set as background image.', 'lasso'); ?></span>
253
+						<input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr($featImgClass); ?>" placeholder=".entry-content">
254 254
 					</div>
255 255
 				
256 256
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
257
-						<label><?php _e( 'Article Title Class', 'lasso' );?></label>
258
-						<span class="lasso--setting-description"><?php _e( 'Provide the CSS class for the post title. This will enable you to update the title of the post by clicking and typing.', 'lasso' );?></span>
259
-						<input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr( $titleClass );?>" placeholder=".entry-content">
257
+						<label><?php _e('Article Title Class', 'lasso'); ?></label>
258
+						<span class="lasso--setting-description"><?php _e('Provide the CSS class for the post title. This will enable you to update the title of the post by clicking and typing.', 'lasso'); ?></span>
259
+						<input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr($titleClass); ?>" placeholder=".entry-content">
260 260
 					</div>
261 261
 				
262 262
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
263
-						<label><?php _e( 'Ignored Items to Save', 'lasso' );?></label>
264
-						<span class="lasso--setting-description"><?php _e( 'If your post container holds additional markup, list the css class names (comma separated, including the dot) of those items. When you enter the editor, Editus will remove (NOT delete) these items so that it does not save them as HTML.', 'lasso' );?></span>
265
-						<textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNoSave );?></textarea>
263
+						<label><?php _e('Ignored Items to Save', 'lasso'); ?></label>
264
+						<span class="lasso--setting-description"><?php _e('If your post container holds additional markup, list the css class names (comma separated, including the dot) of those items. When you enter the editor, Editus will remove (NOT delete) these items so that it does not save them as HTML.', 'lasso'); ?></span>
265
+						<textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNoSave); ?></textarea>
266 266
 					</div>
267 267
 				
268 268
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
269
-						<label><?php _e( 'Read Only Items', 'lasso' );?></label>
270
-						<span class="lasso--setting-description"><?php _e( 'If your post has items that should not be editable, list the css class names (comma separated, including the dot) of those items.', 'lasso' );?></span>
271
-						<textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNonEditable );?></textarea>
269
+						<label><?php _e('Read Only Items', 'lasso'); ?></label>
270
+						<span class="lasso--setting-description"><?php _e('If your post has items that should not be editable, list the css class names (comma separated, including the dot) of those items.', 'lasso'); ?></span>
271
+						<textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNonEditable); ?></textarea>
272 272
 					</div>
273 273
 				
274 274
 					<div class="lasso-editor-settings--option-inner" >
275
-						<input type="checkbox" class="checkbox" name="lasso_editor[show_ignored_items]" id="lasso_editor[show_ignored_items]" <?php echo checked( $show_ignored_items, 'on' );?> >
276
-						<label for="lasso_editor[show_ignored_items]"> <?php _e( 'Show Ignored Items', 'lasso' );?></label>
277
-						<span class="lasso--setting-description"><?php _e( 'By default the ignored items are hidden. Check this to show ignored items while keeping them uneditable.', 'lasso' );?></span>
275
+						<input type="checkbox" class="checkbox" name="lasso_editor[show_ignored_items]" id="lasso_editor[show_ignored_items]" <?php echo checked($show_ignored_items, 'on'); ?> >
276
+						<label for="lasso_editor[show_ignored_items]"> <?php _e('Show Ignored Items', 'lasso'); ?></label>
277
+						<span class="lasso--setting-description"><?php _e('By default the ignored items are hidden. Check this to show ignored items while keeping them uneditable.', 'lasso'); ?></span>
278 278
 					</div>
279 279
 				</div>
280 280
 
281
-				<h3 class="accordion"><?php _e( 'Editor UI', 'lasso' );?></h3>
281
+				<h3 class="accordion"><?php _e('Editor UI', 'lasso'); ?></h3>
282 282
 				<div class="lasso-editor-settings--option-wrap">
283 283
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
284
-						<input type="checkbox" class="checkbox" name="lasso_editor[use_old_ui]" id="lasso_editor_use_old_ui" <?php echo checked( $use_old_ui, 'on' );?> >
285
-						<label for="lasso_editor[use_old_ui]"><?php _e( 'Use the Old Toolbar', 'lasso' );?></label>
286
-						<span class="lasso--setting-description"><?php _e( 'Use this option to disable the new color options and use the pre-1.0 toolbar.', 'lasso' );?></span>
284
+						<input type="checkbox" class="checkbox" name="lasso_editor[use_old_ui]" id="lasso_editor_use_old_ui" <?php echo checked($use_old_ui, 'on'); ?> >
285
+						<label for="lasso_editor[use_old_ui]"><?php _e('Use the Old Toolbar', 'lasso'); ?></label>
286
+						<span class="lasso--setting-description"><?php _e('Use this option to disable the new color options and use the pre-1.0 toolbar.', 'lasso'); ?></span>
287 287
 					</div>
288 288
 				    <div id="lasso-editor-settings--colors">
289 289
 					<?php
290
-					self::create_section_for_color_picker('button-color1', _e( 'Editor Bar Color Top', 'lasso' ), '#0000ff');
291
-					self::create_section_for_color_picker('button-color2', _e( 'Editor Bar Color Bottom', 'lasso' ), '#000030');
292
-					self::create_section_for_color_picker('dialog-color', _e( 'Dialog Color', 'lasso' ), '#000055');
293
-					self::create_section_for_color_picker('text-color', _e( 'Icon/Text Color', 'lasso' ), '#ffffff');
290
+					self::create_section_for_color_picker('button-color1', _e('Editor Bar Color Top', 'lasso'), '#0000ff');
291
+					self::create_section_for_color_picker('button-color2', _e('Editor Bar Color Bottom', 'lasso'), '#000030');
292
+					self::create_section_for_color_picker('dialog-color', _e('Dialog Color', 'lasso'), '#000055');
293
+					self::create_section_for_color_picker('text-color', _e('Icon/Text Color', 'lasso'), '#ffffff');
294 294
 					?>
295
-					<button type="button" id="lasso-editor-settings--default-colors" ><?php _e( 'Default Colors', 'lasso' );?></button>
295
+					<button type="button" id="lasso-editor-settings--default-colors" ><?php _e('Default Colors', 'lasso'); ?></button>
296 296
 				    <div style="height:50px;"></div>
297 297
 					</div>
298 298
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
299
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked( $toolbar_headings, 'on' );?> >
300
-						<label for="lasso_editor[toolbar_headings]"><?php _e( 'Enable H2 and H3 Buttons', 'lasso' );?></label>
301
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set H2 and H3 settings.', 'lasso' );?></span>
299
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked($toolbar_headings, 'on'); ?> >
300
+						<label for="lasso_editor[toolbar_headings]"><?php _e('Enable H2 and H3 Buttons', 'lasso'); ?></label>
301
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set H2 and H3 settings.', 'lasso'); ?></span>
302 302
 
303 303
 					</div>
304 304
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
305
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings_h4]" id="lasso_editor[toolbar_headings_h4]" <?php echo checked( $toolbar_headings_h4, 'on' );?> >
306
-						<label for="lasso_editor[toolbar_headings_h4]"><?php _e( 'Enable H4/H5/H6 Buttons', 'lasso' );?></label>
307
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set H4/H5/H6 settings.', 'lasso' );?></span>
305
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings_h4]" id="lasso_editor[toolbar_headings_h4]" <?php echo checked($toolbar_headings_h4, 'on'); ?> >
306
+						<label for="lasso_editor[toolbar_headings_h4]"><?php _e('Enable H4/H5/H6 Buttons', 'lasso'); ?></label>
307
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set H4/H5/H6 settings.', 'lasso'); ?></span>
308 308
 
309 309
 					</div>
310 310
 					
311 311
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
312
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_list]" id="lasso_editor[toolbar_list]" <?php echo checked( $toolbar_list, 'on' );?> >
313
-						<label for="lasso_editor[toolbar_list]"><?php _e( 'Enable OL/UL Buttons', 'lasso' );?></label>
314
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to create Ordered and Unordered Lists from text selection.', 'lasso' );?></span>
312
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_list]" id="lasso_editor[toolbar_list]" <?php echo checked($toolbar_list, 'on'); ?> >
313
+						<label for="lasso_editor[toolbar_list]"><?php _e('Enable OL/UL Buttons', 'lasso'); ?></label>
314
+						<span class="lasso--setting-description"><?php _e('Show the buttons to create Ordered and Unordered Lists from text selection.', 'lasso'); ?></span>
315 315
 					</div>
316 316
 					
317 317
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
318
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked( $toolbar_show_color, 'on' );?> >
319
-						<label for="lasso_editor[toolbar_show_color]"><?php _e( 'Enable Text Color Buttons', 'lasso' );?></label>
320
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set text colors.', 'lasso' );?></span>
318
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked($toolbar_show_color, 'on'); ?> >
319
+						<label for="lasso_editor[toolbar_show_color]"><?php _e('Enable Text Color Buttons', 'lasso'); ?></label>
320
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set text colors.', 'lasso'); ?></span>
321 321
 
322 322
 					</div>
323 323
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
324
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked( $toolbar_show_alignment, 'on' );?> >
325
-						<label for="lasso_editor[toolbar_show_alignment]"><?php _e( 'Enable Text Align Buttons', 'lasso' );?></label>
326
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set text alignment.', 'lasso' );?></span>
324
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked($toolbar_show_alignment, 'on'); ?> >
325
+						<label for="lasso_editor[toolbar_show_alignment]"><?php _e('Enable Text Align Buttons', 'lasso'); ?></label>
326
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set text alignment.', 'lasso'); ?></span>
327 327
 
328 328
 					</div>
329 329
 					
330 330
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
331
-						<input type="checkbox" class="checkbox" name="lasso_editor[links_editable]" id="lasso_editor[links_editable]" <?php echo checked( $links_editable, 'on' );?> >
332
-						<label for="lasso_editor[links_editable]"><?php _e( 'Make links editable under the Editing Mode', 'lasso' );?></label>
333
-						<span class="lasso--setting-description"><?php _e( 'Make links editable under the Editing Mode. Turning this on will make the links non-clickable while editing.', 'lasso' );?></span>
331
+						<input type="checkbox" class="checkbox" name="lasso_editor[links_editable]" id="lasso_editor[links_editable]" <?php echo checked($links_editable, 'on'); ?> >
332
+						<label for="lasso_editor[links_editable]"><?php _e('Make links editable under the Editing Mode', 'lasso'); ?></label>
333
+						<span class="lasso--setting-description"><?php _e('Make links editable under the Editing Mode. Turning this on will make the links non-clickable while editing.', 'lasso'); ?></span>
334 334
 
335 335
 					</div>
336 336
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
337
-					    <label for="lasso_editor[insert_comp_ui]"> <?php _e( 'Insert Component UI', 'lasso' );?></label>
338
-						<span class="lasso--setting-description"><?php _e( 'UI mechanism to insert components', 'lasso' );?></span>
337
+					    <label for="lasso_editor[insert_comp_ui]"> <?php _e('Insert Component UI', 'lasso'); ?></label>
338
+						<span class="lasso--setting-description"><?php _e('UI mechanism to insert components', 'lasso'); ?></span>
339 339
 						<div class="lasso-editor-settings--option-inner" style="border:none;">
340
-					       <input type="radio" name="lasso_editor[insert_comp_ui]" value='drag' <?php echo checked( $insert_comp_ui, 'drag' );?>> <?php _e( 'Drag and Drop', 'lasso' );?>
340
+					       <input type="radio" name="lasso_editor[insert_comp_ui]" value='drag' <?php echo checked($insert_comp_ui, 'drag'); ?>> <?php _e('Drag and Drop', 'lasso'); ?>
341 341
 						</div>
342 342
 						<div class="lasso-editor-settings--option-inner" style="border:none;">
343
-						<input type="radio" name="lasso_editor[insert_comp_ui]" value="click" <?php echo checked( $insert_comp_ui, 'click' );?>> <?php _e( 'Click', 'lasso' );?>
343
+						<input type="radio" name="lasso_editor[insert_comp_ui]" value="click" <?php echo checked($insert_comp_ui, 'click'); ?>> <?php _e('Click', 'lasso'); ?>
344 344
 						</div>
345 345
 						<div class="lasso-editor-settings--option-inner" style="border:none;">
346
-						<input type="radio" name="lasso_editor[insert_comp_ui]" value="mediumcom" <?php echo checked( $insert_comp_ui, 'mediumcom' );?>> <?php _e( 'Auto Button on Empty Paragraph. medium.com-like UI.', 'lasso' );?>
346
+						<input type="radio" name="lasso_editor[insert_comp_ui]" value="mediumcom" <?php echo checked($insert_comp_ui, 'mediumcom'); ?>> <?php _e('Auto Button on Empty Paragraph. medium.com-like UI.', 'lasso'); ?>
347 347
 						</div>
348 348
 					</div>
349 349
                     
350 350
                     <div class="lasso-editor-settings--option-inner" >
351
-						<input type="checkbox" class="checkbox" name="lasso_editor[text_select_popup]" id="lasso_editor[text_select_popup]" <?php echo checked( $text_select_popup, 'on' );?> >
352
-						<label for="lasso_editor[text_select_popup]"><?php _e( 'Popup When Text is Selected', 'lasso' );?></label>
353
-						<span class="lasso--setting-description"><?php _e( 'Instead of using the bottom toolbar to format texts, use a popup box to format texts.', 'lasso' );?></span>
351
+						<input type="checkbox" class="checkbox" name="lasso_editor[text_select_popup]" id="lasso_editor[text_select_popup]" <?php echo checked($text_select_popup, 'on'); ?> >
352
+						<label for="lasso_editor[text_select_popup]"><?php _e('Popup When Text is Selected', 'lasso'); ?></label>
353
+						<span class="lasso--setting-description"><?php _e('Instead of using the bottom toolbar to format texts, use a popup box to format texts.', 'lasso'); ?></span>
354 354
 
355 355
 					</div>
356 356
                     
357 357
 				</div>
358 358
 				
359
-				<h3 class="accordion"><?php _e( 'Component', 'lasso' );?></h3>
359
+				<h3 class="accordion"><?php _e('Component', 'lasso'); ?></h3>
360 360
                 <div class="lasso-editor-settings--option-wrap" style="border:none;" >
361 361
                     <div class="lasso-editor-settings--option-inner" style="border:none">
362
-						<input type="checkbox" class="checkbox" name="lasso_editor[add_table]" id="lasso_editor[add_table]" <?php echo checked( $add_table, 'on' );?> >
363
-						<label for="lasso_editor[add_table]"><span class="dashicons dashicons-grid-view"> </span> <?php _e( 'Additional Component: Table', 'lasso' );?></label>
364
-						<span class="lasso--setting-description"><?php _e( 'Allow user to add and edit tables.', 'lasso' );?></span>
362
+						<input type="checkbox" class="checkbox" name="lasso_editor[add_table]" id="lasso_editor[add_table]" <?php echo checked($add_table, 'on'); ?> >
363
+						<label for="lasso_editor[add_table]"><span class="dashicons dashicons-grid-view"> </span> <?php _e('Additional Component: Table', 'lasso'); ?></label>
364
+						<span class="lasso--setting-description"><?php _e('Allow user to add and edit tables.', 'lasso'); ?></span>
365 365
 
366 366
 					</div>
367 367
                     
368 368
                      <div class="lasso-editor-settings--option-inner" >
369
-						<input type="checkbox" class="checkbox" name="lasso_editor[add_paragraph]" id="lasso_editor[add_paragraph]" <?php echo checked( $add_paragraph, 'on' );?> >
370
-						<label for="lasso_editor[add_paragraph]"><span class="dashicons dashicons-editor-paragraph"></span><?php _e( 'Additional Component: Paragraph', 'lasso' );?></label>
371
-						<span class="lasso--setting-description"><?php _e( 'Plain HTML Paragraph.', 'lasso' );?></span>
369
+						<input type="checkbox" class="checkbox" name="lasso_editor[add_paragraph]" id="lasso_editor[add_paragraph]" <?php echo checked($add_paragraph, 'on'); ?> >
370
+						<label for="lasso_editor[add_paragraph]"><span class="dashicons dashicons-editor-paragraph"></span><?php _e('Additional Component: Paragraph', 'lasso'); ?></label>
371
+						<span class="lasso--setting-description"><?php _e('Plain HTML Paragraph.', 'lasso'); ?></span>
372 372
 
373 373
 					</div>
374 374
                 
375
-                <?php if ( 'ase-active' != $ase_status ) { ?>
375
+                <?php if ('ase-active' != $ase_status) { ?>
376 376
                     <script>
377 377
                     $(document).ready(function(){
378 378
                         $("#lasso_editor\\[use_old_wpimg\\]").on('change', function(){                        
@@ -398,162 +398,162 @@  discard block
 block discarded – undo
398 398
                     </script>
399 399
                 
400 400
                     <div class="lasso-editor-settings--option-inner" style="border:none">
401
-						<input type="checkbox" class="checkbox" name="lasso_editor[use_old_wpimg]" id="lasso_editor[use_old_wpimg]" <?php echo checked( $use_old_wpimg, 'on' );?> >
402
-						<label for="lasso_editor[use_old_wpimg]"><?php _e( 'Use Simple Image', 'lasso' );?></label>
403
-						<span class="lasso--setting-description"><?php _e( 'Use Simple Image Component without Extra Options.', 'lasso' );?></span>
401
+						<input type="checkbox" class="checkbox" name="lasso_editor[use_old_wpimg]" id="lasso_editor[use_old_wpimg]" <?php echo checked($use_old_wpimg, 'on'); ?> >
402
+						<label for="lasso_editor[use_old_wpimg]"><?php _e('Use Simple Image', 'lasso'); ?></label>
403
+						<span class="lasso--setting-description"><?php _e('Use Simple Image Component without Extra Options.', 'lasso'); ?></span>
404 404
 
405 405
 					</div>
406 406
                 
407 407
                 
408 408
                     <div class="lasso-editor-settings--option-inner">
409
-						<input type="checkbox" class="checkbox" name="lasso_editor[use_wp_block_image]" id="lasso_editor[use_wp_block_image]" <?php echo checked( $use_wp_block_image, 'on' );?> >
410
-						<label for="lasso_editor[use_wp_block_image]"><?php _e( 'Use WP Image Block', 'lasso' );?></label>
411
-						<span class="lasso--setting-description"><?php _e( 'Use WP Image Block as the image component. Gutenberg Block Editor needs to be enabled.', 'lasso' );?></span>
409
+						<input type="checkbox" class="checkbox" name="lasso_editor[use_wp_block_image]" id="lasso_editor[use_wp_block_image]" <?php echo checked($use_wp_block_image, 'on'); ?> >
410
+						<label for="lasso_editor[use_wp_block_image]"><?php _e('Use WP Image Block', 'lasso'); ?></label>
411
+						<span class="lasso--setting-description"><?php _e('Use WP Image Block as the image component. Gutenberg Block Editor needs to be enabled.', 'lasso'); ?></span>
412 412
 
413 413
 					</div>
414 414
                 <?php }?>
415 415
                 </div>
416 416
 				
417 417
 
418
-				<h3 class="accordion"><?php _e( 'Post Settings UI', 'lasso' );?></h3>
418
+				<h3 class="accordion"><?php _e('Post Settings UI', 'lasso'); ?></h3>
419 419
 				<div class="lasso-editor-settings--option-wrap"  >
420 420
 					<div class="lasso-editor-settings--option-inner" style="border:none">
421
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked( $post_settings_disabled, 'on' );?> >
422
-						<label for="lasso_editor[post_settings_disabled]"> <?php _e( 'Disable Post Settings', 'lasso' );?></label>
423
-						<span class="lasso--setting-description"><?php _e( 'Check this to disable users from being able to edit post settings from the front-end.', 'lasso' );?></span>
421
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked($post_settings_disabled, 'on'); ?> >
422
+						<label for="lasso_editor[post_settings_disabled]"> <?php _e('Disable Post Settings', 'lasso'); ?></label>
423
+						<span class="lasso--setting-description"><?php _e('Check this to disable users from being able to edit post settings from the front-end.', 'lasso'); ?></span>
424 424
 					</div>
425 425
 					
426 426
 					<div class="lasso-editor-settings--option-inner" style="border:none">
427
-						<input type="checkbox" class="checkbox" name="lasso_editor[allow_change_date]" id="lasso_editor[allow_change_date]" <?php echo checked( $allow_change_date, 'on' );?> >
428
-						<label for="lasso_editor[allow_change_date]"> <?php _e( 'Allow Changing Post Date', 'lasso' );?></label>
429
-						<span class="lasso--setting-description"><?php _e( 'Add the date selector to change the post\'s date to the Post Setting dialog', 'lasso' );?></span>
427
+						<input type="checkbox" class="checkbox" name="lasso_editor[allow_change_date]" id="lasso_editor[allow_change_date]" <?php echo checked($allow_change_date, 'on'); ?> >
428
+						<label for="lasso_editor[allow_change_date]"> <?php _e('Allow Changing Post Date', 'lasso'); ?></label>
429
+						<span class="lasso--setting-description"><?php _e('Add the date selector to change the post\'s date to the Post Setting dialog', 'lasso'); ?></span>
430 430
 					</div>
431 431
                     
432 432
                     <div class="lasso-editor-settings--option-inner" style="border:none">
433
-						<input type="checkbox" class="checkbox" name="lasso_editor[allow_edit_excerpt]" id="lasso_editor[allow_edit_excerpt]" <?php echo checked( $allow_edit_excerpt, 'on' );?> >
434
-						<label for="lasso_editor[allow_edit_excerpt]"> <?php _e( 'Allow Editing Excerpt', 'lasso' );?></label>
435
-						<span class="lasso--setting-description"><?php _e( 'Allow the post\'s excerpt to be edited in the Post Setting dialog', 'lasso' );?></span>
433
+						<input type="checkbox" class="checkbox" name="lasso_editor[allow_edit_excerpt]" id="lasso_editor[allow_edit_excerpt]" <?php echo checked($allow_edit_excerpt, 'on'); ?> >
434
+						<label for="lasso_editor[allow_edit_excerpt]"> <?php _e('Allow Editing Excerpt', 'lasso'); ?></label>
435
+						<span class="lasso--setting-description"><?php _e('Allow the post\'s excerpt to be edited in the Post Setting dialog', 'lasso'); ?></span>
436 436
 					</div>
437 437
 					
438 438
 					<div class="lasso-editor-settings--option-inner" style="border:none">
439
-						<input type="checkbox" class="checkbox" name="lasso_editor[allow_new_category]" id="lasso_editor[allow_new_category]" <?php echo checked( $allow_new_category, 'on' );?> >
440
-						<label for="lasso_editor[allow_new_category]"> <?php _e( 'Allow Adding New Category', 'lasso' );?></label>
441
-						<span class="lasso--setting-description"><?php _e( 'Add the user to create new, previously non-existing categories for posts.', 'lasso' );?></span>
439
+						<input type="checkbox" class="checkbox" name="lasso_editor[allow_new_category]" id="lasso_editor[allow_new_category]" <?php echo checked($allow_new_category, 'on'); ?> >
440
+						<label for="lasso_editor[allow_new_category]"> <?php _e('Allow Adding New Category', 'lasso'); ?></label>
441
+						<span class="lasso--setting-description"><?php _e('Add the user to create new, previously non-existing categories for posts.', 'lasso'); ?></span>
442 442
 					</div>
443 443
 					
444 444
 					<div class="lasso-editor-settings--option-inner" style="border:none">
445
-						<input type="checkbox" class="checkbox" name="lasso_editor[no_pending_status]" id="lasso_editor[no_pending_status]" <?php echo checked( $no_pending_status, 'on' );?> >
446
-						<label for="lasso_editor[no_pending_status]"> <?php _e( 'Do Not Allow "Pending" Status', 'lasso' );?></label>
447
-						<span class="lasso--setting-description"><?php _e( 'Remove the Option to Set the Status to Pending.', 'lasso' );?></span>
445
+						<input type="checkbox" class="checkbox" name="lasso_editor[no_pending_status]" id="lasso_editor[no_pending_status]" <?php echo checked($no_pending_status, 'on'); ?> >
446
+						<label for="lasso_editor[no_pending_status]"> <?php _e('Do Not Allow "Pending" Status', 'lasso'); ?></label>
447
+						<span class="lasso--setting-description"><?php _e('Remove the Option to Set the Status to Pending.', 'lasso'); ?></span>
448 448
 					</div>
449 449
 					
450 450
 					<div class="lasso-editor-settings--option-inner" style="border:none">
451
-						<input type="checkbox" class="checkbox" name="lasso_editor[no_url_setting]" id="lasso_editor[no_slug_setting]" <?php echo checked( $no_url_setting, 'on' );?> >
452
-						<label for="lasso_editor[no_url_setting]"> <?php _e( 'Remove POST URL Option', 'lasso' );?></label>
453
-						<span class="lasso--setting-description"><?php _e( 'Remove the Option to Set the URL for the Post.', 'lasso' );?></span>
451
+						<input type="checkbox" class="checkbox" name="lasso_editor[no_url_setting]" id="lasso_editor[no_slug_setting]" <?php echo checked($no_url_setting, 'on'); ?> >
452
+						<label for="lasso_editor[no_url_setting]"> <?php _e('Remove POST URL Option', 'lasso'); ?></label>
453
+						<span class="lasso--setting-description"><?php _e('Remove the Option to Set the URL for the Post.', 'lasso'); ?></span>
454 454
 					</div>
455 455
 				
456 456
 					<div class="lasso-editor-settings--option-inner" style="border:none">
457
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked( $post_new_disabled, 'on' );?> >
458
-						<label for="lasso_editor[post_adding_disabled]"><?php _e( 'Disable Post Adding', 'lasso' );?></label>
459
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable users from being able to add new posts from the front-end.', 'lasso' );?></span>
457
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked($post_new_disabled, 'on'); ?> >
458
+						<label for="lasso_editor[post_adding_disabled]"><?php _e('Disable Post Adding', 'lasso'); ?></label>
459
+						<span class="lasso--setting-description"><?php _e('Check this box to disable users from being able to add new posts from the front-end.', 'lasso'); ?></span>
460 460
 					</div>
461 461
 					
462 462
 					<div class="lasso-editor-settings--option-inner" >
463
-						<input type="checkbox" class="checkbox" name="lasso_editor[support_custom_taxonomy]" id="lasso_editor[support_custom_taxonomy]" <?php echo checked( $support_custom_taxonomy, 'on' );?> >
464
-						<label for="lasso_editor[support_custom_taxonomy]"><?php _e( 'Support Custom Taxonomy', 'lasso' );?></label>
465
-						<span class="lasso--setting-description"><?php _e( 'Allow editing custom taxonomies.', 'lasso' );?></span>
463
+						<input type="checkbox" class="checkbox" name="lasso_editor[support_custom_taxonomy]" id="lasso_editor[support_custom_taxonomy]" <?php echo checked($support_custom_taxonomy, 'on'); ?> >
464
+						<label for="lasso_editor[support_custom_taxonomy]"><?php _e('Support Custom Taxonomy', 'lasso'); ?></label>
465
+						<span class="lasso--setting-description"><?php _e('Allow editing custom taxonomies.', 'lasso'); ?></span>
466 466
 					</div>
467 467
 					
468 468
 
469 469
 				</div>
470 470
 				
471
-				<h3 class="accordion"><?php _e( 'Misc', 'lasso' );?></h3>
471
+				<h3 class="accordion"><?php _e('Misc', 'lasso'); ?></h3>
472 472
 				<div class="lasso-editor-settings--option-wrap">
473 473
 					<div class="lasso-editor-settings--option-inner" style="border:none">
474
-						<input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked( $disable_tour, 'on' );?> >
475
-						<label for="lasso_editor[disable_tour]"> <?php _e( 'Do Not Show Tour Dialog', 'lasso' );?></label>
476
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable the tour dialog box for all users.', 'lasso' );?></span>
474
+						<input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked($disable_tour, 'on'); ?> >
475
+						<label for="lasso_editor[disable_tour]"> <?php _e('Do Not Show Tour Dialog', 'lasso'); ?></label>
476
+						<span class="lasso--setting-description"><?php _e('Check this box to disable the tour dialog box for all users.', 'lasso'); ?></span>
477 477
 					</div>
478 478
                     
479 479
                     <div class="lasso-editor-settings--option-inner" style="border:none;">
480
-						<label><?php _e( 'Placeholder Text for New Post', 'lasso' );?></label>
481
-						<span class="lasso--setting-description"><?php _e( 'Placeholder text to be displayed when a new post is created.', 'lasso' );?></span>
482
-						<input type="text" name="lasso_editor[new_post_text]" id="lasso_editor[new_post_text]" value="<?php echo esc_attr( $new_post_text );?>" placeholder="<?php $def = wp_strip_all_tags(apply_filters( 'lasso_new_object_content', __( 'Once upon a time...','lasso')));echo $def;?>", true)>
480
+						<label><?php _e('Placeholder Text for New Post', 'lasso'); ?></label>
481
+						<span class="lasso--setting-description"><?php _e('Placeholder text to be displayed when a new post is created.', 'lasso'); ?></span>
482
+						<input type="text" name="lasso_editor[new_post_text]" id="lasso_editor[new_post_text]" value="<?php echo esc_attr($new_post_text); ?>" placeholder="<?php $def = wp_strip_all_tags(apply_filters('lasso_new_object_content', __('Once upon a time...', 'lasso'))); echo $def; ?>", true)>
483 483
 					</div>
484 484
 					
485 485
 					<div class="lasso-editor-settings--option-inner" style="border:none">
486
-						<input type="checkbox" class="checkbox" name="lasso_editor[disable_shortcode_editing]" id="lasso_editor[disable_shortcode_editing]" <?php echo checked( $disable_shortcode_editing, 'on' );?> >
487
-						<label for="lasso_editor[disable_shortcode_editing]"> <?php _e( 'Do Not Allow Shortcode Editing', 'lasso' );?></label>
488
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable frontend editing of shortcodes.', 'lasso' );?></span>
486
+						<input type="checkbox" class="checkbox" name="lasso_editor[disable_shortcode_editing]" id="lasso_editor[disable_shortcode_editing]" <?php echo checked($disable_shortcode_editing, 'on'); ?> >
487
+						<label for="lasso_editor[disable_shortcode_editing]"> <?php _e('Do Not Allow Shortcode Editing', 'lasso'); ?></label>
488
+						<span class="lasso--setting-description"><?php _e('Check this box to disable frontend editing of shortcodes.', 'lasso'); ?></span>
489 489
 					</div>
490 490
 
491 491
 					<div class="lasso-editor-settings--option-inner" style="border:none">
492
-					    <label for="lasso_editor[bold_tag]"> <?php _e( '"Bold" Tag', 'lasso' );?></label>
493
-						<span class="lasso--setting-description"><?php _e( 'Choose the HTML tag used for the "Bold" style.', 'lasso' );?></span>
494
-					    <input type="radio" name="lasso_editor[bold_tag]" value='b' <?php echo checked( $bold_tag, 'b' );?>> b
495
-						<input type="radio" name="lasso_editor[bold_tag]" value="strong" <?php echo checked( $bold_tag, 'strong' );?>> strong
492
+					    <label for="lasso_editor[bold_tag]"> <?php _e('"Bold" Tag', 'lasso'); ?></label>
493
+						<span class="lasso--setting-description"><?php _e('Choose the HTML tag used for the "Bold" style.', 'lasso'); ?></span>
494
+					    <input type="radio" name="lasso_editor[bold_tag]" value='b' <?php echo checked($bold_tag, 'b'); ?>> b
495
+						<input type="radio" name="lasso_editor[bold_tag]" value="strong" <?php echo checked($bold_tag, 'strong'); ?>> strong
496 496
 					</div>
497 497
 					<div class="lasso-editor-settings--option-inner" style="border:none">
498
-					    <label for="lasso_editor[i_tag]"> <?php _e( '"Italic" Tag', 'lasso' );?></label>
499
-						<span class="lasso--setting-description"><?php _e( 'Choose the HTML tag used for the "Italic" style.', 'lasso' );?></span>
500
-					    <input type="radio" name="lasso_editor[i_tag]" value='i' <?php echo checked( $i_tag, 'i' );?>> i
501
-						<input type="radio" name="lasso_editor[i_tag]" value="em" <?php echo checked( $i_tag, 'em' );?>> em
498
+					    <label for="lasso_editor[i_tag]"> <?php _e('"Italic" Tag', 'lasso'); ?></label>
499
+						<span class="lasso--setting-description"><?php _e('Choose the HTML tag used for the "Italic" style.', 'lasso'); ?></span>
500
+					    <input type="radio" name="lasso_editor[i_tag]" value='i' <?php echo checked($i_tag, 'i'); ?>> i
501
+						<input type="radio" name="lasso_editor[i_tag]" value="em" <?php echo checked($i_tag, 'em'); ?>> em
502 502
 					</div>
503 503
                     <div class="lasso-editor-settings--option-inner" style="border:none" >
504
-						<input type="checkbox" class="checkbox" name="lasso_editor[link_prefix_http]" id="lasso_editor[link_prefix_http]" <?php echo checked( $link_prefix_http, 'on' );?> >
505
-						<label for="lasso_editor[link_prefix_http]"><?php _e( 'Auto Prefix HTTP to links', 'lasso' );?></label>
506
-						<span class="lasso--setting-description"><?php _e( 'When user adds a hyperlink, automatically add http:// if the user does not specify it explicitly.', 'lasso' );?></span>
504
+						<input type="checkbox" class="checkbox" name="lasso_editor[link_prefix_http]" id="lasso_editor[link_prefix_http]" <?php echo checked($link_prefix_http, 'on'); ?> >
505
+						<label for="lasso_editor[link_prefix_http]"><?php _e('Auto Prefix HTTP to links', 'lasso'); ?></label>
506
+						<span class="lasso--setting-description"><?php _e('When user adds a hyperlink, automatically add http:// if the user does not specify it explicitly.', 'lasso'); ?></span>
507 507
 					</div>
508 508
 					<div class="lasso-editor-settings--option-inner" >
509
-						<input type="checkbox" class="checkbox" name="lasso_editor[inherit_categories]" id="lasso_editor[inherit_categories]" <?php echo checked( $inherit_categories, 'on' );?> >
510
-						<label for="lasso_editor[inherit_categories]"><?php _e( 'Inherit Post Categories When Creating a New Post', 'lasso' );?></label>
511
-						<span class="lasso--setting-description"><?php _e( 'When creating a new post, take the categories of the current post and apply to the new post.', 'lasso' );?></span>
509
+						<input type="checkbox" class="checkbox" name="lasso_editor[inherit_categories]" id="lasso_editor[inherit_categories]" <?php echo checked($inherit_categories, 'on'); ?> >
510
+						<label for="lasso_editor[inherit_categories]"><?php _e('Inherit Post Categories When Creating a New Post', 'lasso'); ?></label>
511
+						<span class="lasso--setting-description"><?php _e('When creating a new post, take the categories of the current post and apply to the new post.', 'lasso'); ?></span>
512 512
 					</div>
513 513
 				</div>
514 514
 
515
-				<h3 class="accordion"><?php _e( 'Advanced Options', 'lasso' );?></h3>
515
+				<h3 class="accordion"><?php _e('Advanced Options', 'lasso'); ?></h3>
516 516
                 
517 517
 				<div class="lasso-editor-settings--option-wrap ">
518
-					<span class="lasso--setting-description"><?php _e( 'Suggested not to turn these options on without consulting the developer.', 'lasso' );?></span>
518
+					<span class="lasso--setting-description"><?php _e('Suggested not to turn these options on without consulting the developer.', 'lasso'); ?></span>
519 519
 					<span class="lasso--setting-description"> </span>		
520 520
 					<div class="lasso-editor-settings--option-inner" style="border:none">
521
-						<input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked( $shortcodify_disabled, 'on' );?> >
522
-						<label for="lasso_editor[shortcodify_disabled]"><?php _e( 'Disable Aesop Component Conversion', 'lasso' );?></label>
523
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso' );?></span>
521
+						<input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked($shortcodify_disabled, 'on'); ?> >
522
+						<label for="lasso_editor[shortcodify_disabled]"><?php _e('Disable Aesop Component Conversion', 'lasso'); ?></label>
523
+						<span class="lasso--setting-description"><?php _e('Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso'); ?></span>
524 524
 					</div>
525 525
 				
526 526
 					<div class="lasso-editor-settings--option-inner" style="border:none">
527
-						<input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked( $enable_autosave, 'on' );?> >
528
-						<label for="lasso_editor[enable_autosave]"><?php _e( 'Enable Auto Save', 'lasso' );?></label>
529
-						<span class="lasso--setting-description"><?php _e( 'Check this box to enable auto save.', 'lasso' );?></span>
527
+						<input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked($enable_autosave, 'on'); ?> >
528
+						<label for="lasso_editor[enable_autosave]"><?php _e('Enable Auto Save', 'lasso'); ?></label>
529
+						<span class="lasso--setting-description"><?php _e('Check this box to enable auto save.', 'lasso'); ?></span>
530 530
 					</div>
531 531
 				
532 532
 					<div class="lasso-editor-settings--option-inner" style="border:none">
533
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_save_disabled]" id="lasso_editor[post_save_disabled]" <?php echo checked( $save_to_post_disabled, 'on' );?> >
534
-						<label for="lasso_editor[post_save_disabled]"><?php _e( 'Disable Post Saving', 'lasso' );?></label>
535
-						<span class="lasso--setting-description"><?php _e( 'By default the editor will update the database with the post or page it is being used on. Check this box to disable this. If you check this box, it is assumed that you will be using the provided filters to save your own content.', 'lasso' );?></span>
533
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_save_disabled]" id="lasso_editor[post_save_disabled]" <?php echo checked($save_to_post_disabled, 'on'); ?> >
534
+						<label for="lasso_editor[post_save_disabled]"><?php _e('Disable Post Saving', 'lasso'); ?></label>
535
+						<span class="lasso--setting-description"><?php _e('By default the editor will update the database with the post or page it is being used on. Check this box to disable this. If you check this box, it is assumed that you will be using the provided filters to save your own content.', 'lasso'); ?></span>
536 536
 
537 537
 					</div>
538 538
 					
539 539
 					<div class="lasso-editor-settings--option-inner" style="border:none">
540
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_edit_disabled]" id="lasso_editor[post_edit_disabled]" <?php echo checked( $edit_post_disabled, 'on' );?> >
541
-						<label for="lasso_editor[post_edit_disabled]"><?php _e( 'Disable Post Editing', 'lasso' );?></label>
542
-						<span class="lasso--setting-description"><?php _e( 'You may use this option if you only want to edit custom fields. Refer <a href="https://edituswp.com/editing-and-updating-custom-fields-from-frontend/">here</a> for more information. The custom fields you specify will be still editable under the editing mode.', 'lasso' );?></span>
540
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_edit_disabled]" id="lasso_editor[post_edit_disabled]" <?php echo checked($edit_post_disabled, 'on'); ?> >
541
+						<label for="lasso_editor[post_edit_disabled]"><?php _e('Disable Post Editing', 'lasso'); ?></label>
542
+						<span class="lasso--setting-description"><?php _e('You may use this option if you only want to edit custom fields. Refer <a href="https://edituswp.com/editing-and-updating-custom-fields-from-frontend/">here</a> for more information. The custom fields you specify will be still editable under the editing mode.', 'lasso'); ?></span>
543 543
 
544 544
 					</div>
545 545
 				
546 546
 					<div class="lasso-editor-settings--option-inner" style="border:none">
547
-						<input type="checkbox" class="checkbox" name="lasso_editor[save_using_rest_disabled]" id="lasso_editor[save_using_rest_disabled]" <?php echo checked( $save_using_rest_disabled, 'on' );?> >
548
-						<label for="lasso_editor[save_using_rest_disabled]"><?php _e( "Don't Use REST API to Save", 'lasso' );?></label>
549
-						<span class="lasso--setting-description"><?php _e( 'By default the editor will use REST API to save posts. Check this box to use custom AJAX calls instead.', 'lasso' );?></span>
547
+						<input type="checkbox" class="checkbox" name="lasso_editor[save_using_rest_disabled]" id="lasso_editor[save_using_rest_disabled]" <?php echo checked($save_using_rest_disabled, 'on'); ?> >
548
+						<label for="lasso_editor[save_using_rest_disabled]"><?php _e("Don't Use REST API to Save", 'lasso'); ?></label>
549
+						<span class="lasso--setting-description"><?php _e('By default the editor will use REST API to save posts. Check this box to use custom AJAX calls instead.', 'lasso'); ?></span>
550 550
 
551 551
 					</div>
552 552
                     
553 553
                     <div class="lasso-editor-settings--option-inner">
554
-						<input type="checkbox" class="checkbox" name="lasso_editor[no_wrap_shortcode]" id="lasso_editor[no_wrap_shortcode]" <?php echo checked( $no_wrap_shortcode, 'on' );?> >
555
-						<label for="lasso_editor[no_wrap_shortcode]"><?php _e( "Don't Wrap Shortcodes", 'lasso' );?></label>
556
-						<span class="lasso--setting-description"><?php _e( 'By default Editus wraps shortcodes so they can be preserved. Disable this behavior.', 'lasso' );?></span>
554
+						<input type="checkbox" class="checkbox" name="lasso_editor[no_wrap_shortcode]" id="lasso_editor[no_wrap_shortcode]" <?php echo checked($no_wrap_shortcode, 'on'); ?> >
555
+						<label for="lasso_editor[no_wrap_shortcode]"><?php _e("Don't Wrap Shortcodes", 'lasso'); ?></label>
556
+						<span class="lasso--setting-description"><?php _e('By default Editus wraps shortcodes so they can be preserved. Disable this behavior.', 'lasso'); ?></span>
557 557
 
558 558
 					</div>
559 559
 				</div>
@@ -563,11 +563,11 @@  discard block
 block discarded – undo
563 563
 
564 564
 				<div class="lasso-editor-settings--submit">
565 565
 				    <input type="hidden" name="action" value="lasso-editor-settings" />
566
-				    <input type="submit" class="button-primary" value="<?php esc_attr_e( 'Save Settings', 'lasso' );?>" />
567
-					<?php wp_nonce_field( 'nonce', 'lasso_editor_settings' ); ?>
566
+				    <input type="submit" class="button-primary" value="<?php esc_attr_e('Save Settings', 'lasso'); ?>" />
567
+					<?php wp_nonce_field('nonce', 'lasso_editor_settings'); ?>
568 568
 				</div>
569 569
 				
570
-				<?php do_action('lasso_settings_after');?>
570
+				<?php do_action('lasso_settings_after'); ?>
571 571
 			</form>
572 572
 
573 573
 		</div><?php
Please login to merge, or discard this patch.
public/includes/assets.php 2 patches
Indentation   +88 added lines, -88 removed lines patch added patch discarded remove patch
@@ -15,29 +15,29 @@  discard block
 block discarded – undo
15 15
 		add_action('wp_enqueue_scripts', array($this,'scripts'));
16 16
 	}
17 17
     
18
-    function is_multipage()
19
-    {
20
-        global $post;
21
-        $pos = strpos($post->post_content, "<!--nextpage-->");
22
-        if (!$pos) return -1;
18
+	function is_multipage()
19
+	{
20
+		global $post;
21
+		$pos = strpos($post->post_content, "<!--nextpage-->");
22
+		if (!$pos) return -1;
23 23
         
24
-        global $wp;
25
-        $url =  home_url( $wp->request );
26
-        $index = intval(basename($url)) == 0 ? 0 : intval(basename($url))-1;
27
-        return $index;        
28
-    }
24
+		global $wp;
25
+		$url =  home_url( $wp->request );
26
+		$index = intval(basename($url)) == 0 ? 0 : intval(basename($url))-1;
27
+		return $index;        
28
+	}
29 29
 
30 30
 	public function scripts(){
31 31
 
32 32
 	
33 33
 		global $post;
34 34
 		if ( lasso_user_can('edit_posts') 
35
-		     /* uncomment this line to disable Editus on Gutenberg posts*/
36
-             /* && !( function_exists( 'has_blocks' ) && has_blocks( $post->post_content)  && !is_home()) */              
37
-             ) {
35
+			 /* uncomment this line to disable Editus on Gutenberg posts*/
36
+			 /* && !( function_exists( 'has_blocks' ) && has_blocks( $post->post_content)  && !is_home()) */              
37
+			 ) {
38 38
 			
39 39
 			/**    Returns the time offset from UTC
40
-			*/
40
+			 */
41 41
 			function get_UTC_offset() {
42 42
 				$timezone_string = get_option( 'timezone_string' );
43 43
 				if (empty( $timezone_string ) ) {
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
 			wp_enqueue_style('lasso-style', LASSO_URL.'/public/assets/css/lasso.css', LASSO_VERSION, true);
54 54
 
55
-            //don't load autocomplete if it's a stockholm theme
55
+			//don't load autocomplete if it's a stockholm theme
56 56
 			$themename  	= wp_get_theme()->get('Name');
57 57
 			if ($themename !='Stockholm' ) {
58 58
 				wp_enqueue_script('jquery-ui-autocomplete');
@@ -90,13 +90,13 @@  discard block
 block discarded – undo
90 90
 			$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor','b');
91 91
 			$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor','i');
92 92
             
93
-            $use_old_wpimg = lasso_editor_get_option('use_old_wpimg', 'lasso_editor','off');
93
+			$use_old_wpimg = lasso_editor_get_option('use_old_wpimg', 'lasso_editor','off');
94 94
             
95
-            $use_wpimgblock = false;
95
+			$use_wpimgblock = false;
96 96
             
97
-            $text_select_popup = lasso_editor_get_option('text_select_popup', 'lasso_editor', false);
97
+			$text_select_popup = lasso_editor_get_option('text_select_popup', 'lasso_editor', false);
98 98
             
99
-            $link_prefix_http = lasso_editor_get_option('link_prefix_http', 'lasso_editor', 'off');
99
+			$link_prefix_http = lasso_editor_get_option('link_prefix_http', 'lasso_editor', 'off');
100 100
 			$inherit_categories = lasso_editor_get_option('inherit_categories', 'lasso_editor', 'off');
101 101
 
102 102
 			
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 			//disable shortcode editing
116 116
 			$disable_shortcode_editing = lasso_editor_get_option('disable_shortcode_editing', 'lasso_editor');
117 117
             
118
-            // support custom taxonomy
118
+			// support custom taxonomy
119 119
 			$support_custom_taxonomy = lasso_editor_get_option('support_custom_taxonomy', 'lasso_editor');
120 120
 			
121 121
 			if ($show_color) {
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 			$tz_offset = get_UTC_offset();
142 142
 			$post_date = get_the_time('U', $postid);
143 143
 			$time = (time()+$tz_offset);
144
-            $delta = $time - $post_date;
144
+			$delta = $time - $post_date;
145 145
             
146 146
 			$strings = array(
147 147
 				'save' 				=> __('Save','lasso'),
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 				
186 186
 				'catsPlaceholder'     => __('add categories...'),
187 187
 				'tagsPlaceholder'     => __('add tags...'),
188
-                'taxoPlaceholder'     => __('add taxonomy terms...'),
188
+				'taxoPlaceholder'     => __('add taxonomy terms...'),
189 189
 				'editShortcode'     => __('Edit Shortcode'),
190 190
 				
191 191
 				
@@ -198,11 +198,11 @@  discard block
 block discarded – undo
198 198
 			$gallery_nonce = wp_create_nonce( $gallery_nonce_action );
199 199
 			
200 200
 			
201
-            if ($allow_change_date) {
202
-			    $permalink = get_site_url().'/?p='.$postid;
203
-            } else {
204
-                $permalink = get_permalink($postid);
205
-            }
201
+			if ($allow_change_date) {
202
+				$permalink = get_site_url().'/?p='.$postid;
203
+			} else {
204
+				$permalink = get_permalink($postid);
205
+			}
206 206
 			
207 207
 			// rest api
208 208
 			$rest_nonce = '';
@@ -222,17 +222,17 @@  discard block
 block discarded – undo
222 222
 				}
223 223
 			}
224 224
             
225
-            //excerpt
226
-            $post_excerpt = "";
227
-            $post_excerpt = wp_strip_all_tags($post->post_excerpt,true);
225
+			//excerpt
226
+			$post_excerpt = "";
227
+			$post_excerpt = wp_strip_all_tags($post->post_excerpt,true);
228 228
             
229
-            //find if this is multi page. -1 if not
230
-            $multipage = self::is_multipage();
231
-            $post_content = "";
232
-            //pass post_content if we need to process multipage. In future we may need to pass this for other purposes
233
-            //if ($multipage != -1) {
234
-               $post_content = $post->post_content;
235
-            //}
229
+			//find if this is multi page. -1 if not
230
+			$multipage = self::is_multipage();
231
+			$post_content = "";
232
+			//pass post_content if we need to process multipage. In future we may need to pass this for other purposes
233
+			//if ($multipage != -1) {
234
+			   $post_content = $post->post_content;
235
+			//}
236 236
 			
237 237
 			//get custom taxonomy
238 238
 			$custom_taxonomies         = array_diff(get_object_taxonomies( get_post_type( $postid ), 'names' ), ['category','post_tag','post_format']);
@@ -245,8 +245,8 @@  discard block
 block discarded – undo
245 245
 				$existing_taxo_arr[$taxonomy] = lasso_get_objects( $taxonomy );
246 246
 			}
247 247
             
248
-            $new_post_text    = lasso_editor_get_option( 'new_post_text', 'lasso_editor' );        
249
-            $new_post_text  = !empty($new_post_text) ? $new_post_text : wp_strip_all_tags(apply_filters( 'lasso_new_object_content', __( 'Once upon a time...','lasso')));
248
+			$new_post_text    = lasso_editor_get_option( 'new_post_text', 'lasso_editor' );        
249
+			$new_post_text  = !empty($new_post_text) ? $new_post_text : wp_strip_all_tags(apply_filters( 'lasso_new_object_content', __( 'Once upon a time...','lasso')));
250 250
 			
251 251
 			wp_reset_query();
252 252
 			$cat_new_post = ($inherit_categories =='on' && !is_home() && !is_page()) ? get_the_category() : null;
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 				'nonce'				=> wp_create_nonce('lasso_editor'),
279 279
 				'handle'			=> lasso_editor_settings_toolbar(),
280 280
 				'toolbar'			=> lasso_editor_text_toolbar(),
281
-                'toolbarPopup'		=> $text_select_popup ? lasso_editor_selected_text_toolbar(): false,
281
+				'toolbarPopup'		=> $text_select_popup ? lasso_editor_selected_text_toolbar(): false,
282 282
 				'toolbarHeadings'   => $toolbar_headings,
283 283
 				'toolbarHeadingsH4'   => $toolbar_headings_h4,
284 284
 				'component_modal'	=> lasso_editor_component_modal(),
@@ -331,19 +331,19 @@  discard block
 block discarded – undo
331 331
 				'customFields'      => $custom_fields,
332 332
 				'clickToInsert'     => ($insert_comp_ui =='click'),
333 333
 				'buttonOnEmptyP'     => ($insert_comp_ui =='mediumcom'),      // auto show a button to insert components on an empty paragraph      
334
-                'rtl'               => is_rtl(),				
334
+				'rtl'               => is_rtl(),				
335 335
 				'skipToEdit'        =>( $delta < 10 && $delta >=0 ), // if it's a new post, skip to edit mode
336 336
 				'linksEditable'    => $links_editable,
337 337
 				'supportPendingStatus' => !$no_pending_status,
338 338
 				'tableCode' => apply_filters( 'lasso_table_html_code','<table><tr><th>Cell 1</th><th>Cell 2</th></tr><tr><td>Cell 3</td><td>Cell 4</td></tr></table><p></p>'),
339
-                'hasGutenberg' => (function_exists( 'has_blocks' ) && has_blocks( $post->post_content)) || self::gutenberg_active(),//,
340
-                'multipages'=> $multipage,
341
-                'post_content'=>$post_content,
342
-                'post_excerpt'=>$post_excerpt,
343
-                'supCustTaxo' => $support_custom_taxonomy == 'on',
344
-                'oldWPimg'=> $use_old_wpimg =='on',
345
-                'useWPImgBlk'=> $use_wpimgblock,
346
-                'prefixHTTP'=> $link_prefix_http =='on',
339
+				'hasGutenberg' => (function_exists( 'has_blocks' ) && has_blocks( $post->post_content)) || self::gutenberg_active(),//,
340
+				'multipages'=> $multipage,
341
+				'post_content'=>$post_content,
342
+				'post_excerpt'=>$post_excerpt,
343
+				'supCustTaxo' => $support_custom_taxonomy == 'on',
344
+				'oldWPimg'=> $use_old_wpimg =='on',
345
+				'useWPImgBlk'=> $use_wpimgblock,
346
+				'prefixHTTP'=> $link_prefix_http =='on',
347 347
 				'currCat'=> $cat_new_post
348 348
 			);
349 349
 
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
 			
353 353
 			
354 354
 			if (!$using_restapiv2) {
355
-               // enqueue REST API V1
355
+			   // enqueue REST API V1
356 356
 			   wp_enqueue_script( 'wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
357 357
 			   $settings = array( 'root' => home_url( $home_url ), 'nonce' => wp_create_nonce( 'wp_json' ) );
358 358
 			   wp_localize_script( 'wp-api-js', 'WP_API_Settings', $settings );
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
 			if ($show_color) {
369 369
 				wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api','iris'), LASSO_VERSION, true);
370 370
 			} else {
371
-			    wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
371
+				wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
372 372
 			}
373 373
 			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects ) );
374 374
 
@@ -377,44 +377,44 @@  discard block
 block discarded – undo
377 377
 
378 378
 	}
379 379
     
380
-    function gutenberg_active() {
380
+	function gutenberg_active() {
381 381
         
382
-        // Gutenberg plugin is installed and activated.
383
-        $gutenberg = ! ( false === has_filter( 'replace_editor', 'gutenberg_init' ) );
384
-
385
-        // Block editor since 5.0.
386
-        $block_editor = version_compare( $GLOBALS['wp_version'], '5.0-beta', '>' );
387
-
388
-        if ( ! $gutenberg && ! $block_editor ) {
389
-            return false;
390
-        }
391
-
392
-        if ( self::is_classic_editor_plugin_active() ) {
393
-            $editor_option       = get_option( 'classic-editor-replace' );
394
-            $block_editor_active = array( 'no-replace', 'block' );
395
-
396
-            return in_array( $editor_option, $block_editor_active, true );
397
-        }
398
-
399
-        return true;
400
-    }
401
-
402
-    /**
403
-     * Check if Classic Editor plugin is active.
404
-     *
405
-     * @return bool
406
-     */
407
-    function is_classic_editor_plugin_active() {
408
-        if ( ! function_exists( 'is_plugin_active' ) ) {
409
-            include_once ABSPATH . 'wp-admin/includes/plugin.php';
410
-        }
411
-
412
-        if ( is_plugin_active( 'classic-editor/classic-editor.php' ) ) {
413
-            return true;
414
-        }
415
-
416
-        return false;
417
-    }
382
+		// Gutenberg plugin is installed and activated.
383
+		$gutenberg = ! ( false === has_filter( 'replace_editor', 'gutenberg_init' ) );
384
+
385
+		// Block editor since 5.0.
386
+		$block_editor = version_compare( $GLOBALS['wp_version'], '5.0-beta', '>' );
387
+
388
+		if ( ! $gutenberg && ! $block_editor ) {
389
+			return false;
390
+		}
391
+
392
+		if ( self::is_classic_editor_plugin_active() ) {
393
+			$editor_option       = get_option( 'classic-editor-replace' );
394
+			$block_editor_active = array( 'no-replace', 'block' );
395
+
396
+			return in_array( $editor_option, $block_editor_active, true );
397
+		}
398
+
399
+		return true;
400
+	}
401
+
402
+	/**
403
+	 * Check if Classic Editor plugin is active.
404
+	 *
405
+	 * @return bool
406
+	 */
407
+	function is_classic_editor_plugin_active() {
408
+		if ( ! function_exists( 'is_plugin_active' ) ) {
409
+			include_once ABSPATH . 'wp-admin/includes/plugin.php';
410
+		}
411
+
412
+		if ( is_plugin_active( 'classic-editor/classic-editor.php' ) ) {
413
+			return true;
414
+		}
415
+
416
+		return false;
417
+	}
418 418
 
419 419
 }
420 420
 
Please login to merge, or discard this patch.
Spacing   +118 added lines, -118 removed lines patch added patch discarded remove patch
@@ -10,9 +10,9 @@  discard block
 block discarded – undo
10 10
 
11 11
 class assets {
12 12
 
13
-	public function __construct(){
13
+	public function __construct() {
14 14
 
15
-		add_action('wp_enqueue_scripts', array($this,'scripts'));
15
+		add_action('wp_enqueue_scripts', array($this, 'scripts'));
16 16
 	}
17 17
     
18 18
     function is_multipage()
@@ -22,16 +22,16 @@  discard block
 block discarded – undo
22 22
         if (!$pos) return -1;
23 23
         
24 24
         global $wp;
25
-        $url =  home_url( $wp->request );
26
-        $index = intval(basename($url)) == 0 ? 0 : intval(basename($url))-1;
25
+        $url = home_url($wp->request);
26
+        $index = intval(basename($url)) == 0 ? 0 : intval(basename($url)) - 1;
27 27
         return $index;        
28 28
     }
29 29
 
30
-	public function scripts(){
30
+	public function scripts() {
31 31
 
32 32
 	
33 33
 		global $post;
34
-		if ( lasso_user_can('edit_posts') 
34
+		if (lasso_user_can('edit_posts') 
35 35
 		     /* uncomment this line to disable Editus on Gutenberg posts*/
36 36
              /* && !( function_exists( 'has_blocks' ) && has_blocks( $post->post_content)  && !is_home()) */              
37 37
              ) {
@@ -39,9 +39,9 @@  discard block
 block discarded – undo
39 39
 			/**    Returns the time offset from UTC
40 40
 			*/
41 41
 			function get_UTC_offset() {
42
-				$timezone_string = get_option( 'timezone_string' );
43
-				if (empty( $timezone_string ) ) {
44
-					return get_option('gmt_offset')*3600;
42
+				$timezone_string = get_option('timezone_string');
43
+				if (empty($timezone_string)) {
44
+					return get_option('gmt_offset') * 3600;
45 45
 				}
46 46
 				
47 47
 				$origin_dtz = new \DateTimeZone($timezone_string);				
@@ -53,8 +53,8 @@  discard block
 block discarded – undo
53 53
 			wp_enqueue_style('lasso-style', LASSO_URL.'/public/assets/css/lasso.css', LASSO_VERSION, true);
54 54
 
55 55
             //don't load autocomplete if it's a stockholm theme
56
-			$themename  	= wp_get_theme()->get('Name');
57
-			if ($themename !='Stockholm' ) {
56
+			$themename = wp_get_theme()->get('Name');
57
+			if ($themename != 'Stockholm') {
58 58
 				wp_enqueue_script('jquery-ui-autocomplete');
59 59
 			}
60 60
 			wp_enqueue_script('jquery-ui-draggable');
@@ -67,30 +67,30 @@  discard block
 block discarded – undo
67 67
 			// url for json api
68 68
 			$home_url = function_exists('json_get_url_prefix') ? json_get_url_prefix() : false;
69 69
 
70
-			$article_object 	= lasso_editor_get_option('article_class','lasso_editor');
70
+			$article_object 	= lasso_editor_get_option('article_class', 'lasso_editor');
71 71
 
72
-			$article_object 	= empty( $article_object ) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object;
72
+			$article_object 	= empty($article_object) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object;
73 73
 
74
-			$featImgClass 		= lasso_editor_get_option('featimg_class','lasso_editor');
75
-			if (empty( $featImgClass )) {
74
+			$featImgClass = lasso_editor_get_option('featimg_class', 'lasso_editor');
75
+			if (empty($featImgClass)) {
76 76
 				$featImgClass = lasso_get_supported_theme_featured_image_class();
77 77
 			}
78
-			$titleClass 		= lasso_editor_get_option('title_class','lasso_editor');
79
-			if (empty( $titleClass )) {
78
+			$titleClass = lasso_editor_get_option('title_class', 'lasso_editor');
79
+			if (empty($titleClass)) {
80 80
 				$titleClass = lasso_get_supported_theme_title_class();
81 81
 			}
82
-			$toolbar_headings  	= lasso_editor_get_option('toolbar_headings', 'lasso_editor');
83
-			$toolbar_headings_h4  	= lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
82
+			$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
83
+			$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
84 84
 			$objectsNoSave  	= lasso_editor_get_option('dont_save', 'lasso_editor');
85
-			$objectsNonEditable  	= lasso_editor_get_option('non_editable', 'lasso_editor');
85
+			$objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor');
86 86
 			$disableRESTSave = lasso_editor_get_option('save_using_rest_disabled', 'lasso_editor');
87
-			$save_to_post_disabled  = lasso_editor_get_option( 'post_save_disabled', 'lasso_editor' );
88
-			$edit_post_disabled  = lasso_editor_get_option( 'post_edit_disabled', 'lasso_editor' );
87
+			$save_to_post_disabled = lasso_editor_get_option('post_save_disabled', 'lasso_editor');
88
+			$edit_post_disabled = lasso_editor_get_option('post_edit_disabled', 'lasso_editor');
89 89
 			
90
-			$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor','b');
91
-			$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor','i');
90
+			$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor', 'b');
91
+			$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor', 'i');
92 92
             
93
-            $use_old_wpimg = lasso_editor_get_option('use_old_wpimg', 'lasso_editor','off');
93
+            $use_old_wpimg = lasso_editor_get_option('use_old_wpimg', 'lasso_editor', 'off');
94 94
             
95 95
             $use_wpimgblock = false;
96 96
             
@@ -120,8 +120,8 @@  discard block
 block discarded – undo
120 120
 			
121 121
 			if ($show_color) {
122 122
 				//color picker
123
-				wp_enqueue_style( 'wp-color-picker' );
124
-				wp_enqueue_script( 'iris', admin_url( 'js/iris.min.js' ), array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), false, 1 );
123
+				wp_enqueue_style('wp-color-picker');
124
+				wp_enqueue_script('iris', admin_url('js/iris.min.js'), array('jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch'), false, 1);
125 125
 			}
126 126
 			
127 127
 			// click to insert components, not drag and drop
@@ -133,54 +133,54 @@  discard block
 block discarded – undo
133 133
 			
134 134
 			// custom fields
135 135
 			
136
-			$custom_fields = apply_filters( 'editus_custom_fields', null ); 
136
+			$custom_fields = apply_filters('editus_custom_fields', null); 
137 137
 
138 138
 
139 139
 			// post id reference
140 140
 			$postid 			= get_the_ID();
141 141
 			$tz_offset = get_UTC_offset();
142 142
 			$post_date = get_the_time('U', $postid);
143
-			$time = (time()+$tz_offset);
143
+			$time = (time() + $tz_offset);
144 144
             $delta = $time - $post_date;
145 145
             
146 146
 			$strings = array(
147
-				'save' 				=> __('Save','lasso'),
148
-				'selectText'	  	=> __('Please Select Text First.','lasso'),
149
-				'cancel' 			=> __('Cancel','lasso'),
150
-				'exiteditor' 		=> __('Exit Editor','lasso'),
151
-				'saving' 			=> __('Saving...','lasso'),
152
-				'saved'				=> __('Saved!','lasso'),
153
-				'adding' 			=> __('Adding...','lasso'),
154
-				'added'				=> __('Added!','lasso'),
155
-				'loading' 			=> __('Loading...','lasso'),
156
-				'loadMore'			=> __('Load More','lasso'),
157
-				'close'			=> __('Close','lasso'),
158
-				'noPostsFound'		=> __('No more posts found','lasso'),
159
-				'fetchFail'	    	=> __('Fetching failed.','lasso'),
160
-				'galleryCreated' 	=> __('Gallery Created!','lasso'),
161
-				'galleryUpdated' 	=> __('Gallery Updated!','lasso'),
162
-				'justWrite'			=> __('Just write...','lasso'),
163
-				'chooseImage'		=> __('Choose an image','lasso'),
164
-				'updateImage'		=> __('Update Image','lasso'),
165
-				'insertImage'		=> __('Insert Image','lasso'),
166
-				'selectImage'		=> __('Select Image','lasso'),
167
-				'removeFeatImg'     => __('Remove featured image?','lasso'),
168
-				'updateSelectedImg' => __('Update Selected Image','lasso'),
169
-				'chooseImages'		=> __('Choose images','lasso'),
170
-				'editImage'			=> __('Edit Image','lasso'),
171
-				'addImages'			=> __('Add Images','lasso'),
172
-				'addNewGallery'		=> __('Add New Gallery','lasso'),
173
-				'selectGallery'		=> __('Select Editus Gallery Image','lasso'),
174
-				'useSelectedImages' => __('Use Selected Images','lasso'),
175
-				'publishPost'		=> __('Publish Post?','lasso'),
176
-				'publishYes'		=> __('Yes, publish it!','lasso'),
177
-				'deletePost'		=> __('Trash Post?','lasso'),
178
-				'deleteYes'			=> __('Yes, trash it!','lasso'),
179
-				'warning'			=> __('Oh snap!','laso'),
180
-				'cancelText'		=> __('O.K. got it!','lasso'),
181
-				'missingClass'		=> __('It looks like we are either missing the Article CSS class, or it is configured incorrectly. Editus will not function correctly without this CSS class.','lasso'),
147
+				'save' 				=> __('Save', 'lasso'),
148
+				'selectText'	  	=> __('Please Select Text First.', 'lasso'),
149
+				'cancel' 			=> __('Cancel', 'lasso'),
150
+				'exiteditor' 		=> __('Exit Editor', 'lasso'),
151
+				'saving' 			=> __('Saving...', 'lasso'),
152
+				'saved'				=> __('Saved!', 'lasso'),
153
+				'adding' 			=> __('Adding...', 'lasso'),
154
+				'added'				=> __('Added!', 'lasso'),
155
+				'loading' 			=> __('Loading...', 'lasso'),
156
+				'loadMore'			=> __('Load More', 'lasso'),
157
+				'close'			=> __('Close', 'lasso'),
158
+				'noPostsFound'		=> __('No more posts found', 'lasso'),
159
+				'fetchFail'	    	=> __('Fetching failed.', 'lasso'),
160
+				'galleryCreated' 	=> __('Gallery Created!', 'lasso'),
161
+				'galleryUpdated' 	=> __('Gallery Updated!', 'lasso'),
162
+				'justWrite'			=> __('Just write...', 'lasso'),
163
+				'chooseImage'		=> __('Choose an image', 'lasso'),
164
+				'updateImage'		=> __('Update Image', 'lasso'),
165
+				'insertImage'		=> __('Insert Image', 'lasso'),
166
+				'selectImage'		=> __('Select Image', 'lasso'),
167
+				'removeFeatImg'     => __('Remove featured image?', 'lasso'),
168
+				'updateSelectedImg' => __('Update Selected Image', 'lasso'),
169
+				'chooseImages'		=> __('Choose images', 'lasso'),
170
+				'editImage'			=> __('Edit Image', 'lasso'),
171
+				'addImages'			=> __('Add Images', 'lasso'),
172
+				'addNewGallery'		=> __('Add New Gallery', 'lasso'),
173
+				'selectGallery'		=> __('Select Editus Gallery Image', 'lasso'),
174
+				'useSelectedImages' => __('Use Selected Images', 'lasso'),
175
+				'publishPost'		=> __('Publish Post?', 'lasso'),
176
+				'publishYes'		=> __('Yes, publish it!', 'lasso'),
177
+				'deletePost'		=> __('Trash Post?', 'lasso'),
178
+				'deleteYes'			=> __('Yes, trash it!', 'lasso'),
179
+				'warning'			=> __('Oh snap!', 'laso'),
180
+				'cancelText'		=> __('O.K. got it!', 'lasso'),
181
+				'missingClass'		=> __('It looks like we are either missing the Article CSS class, or it is configured incorrectly. Editus will not function correctly without this CSS class.', 'lasso'),
182 182
 				'missingConfirm'	=> __('Update Settings', 'lasso'),
183
-				'helperText'		=> __('one more letter','lasso'),
183
+				'helperText'		=> __('one more letter', 'lasso'),
184 184
 				'editingBackup'  	=> __('You are currently editing a backup copy of this post.'),
185 185
 				
186 186
 				'catsPlaceholder'     => __('add categories...'),
@@ -191,11 +191,11 @@  discard block
 block discarded – undo
191 191
 				
192 192
 			);
193 193
 
194
-			$api_url = trailingslashit( home_url() ) . 'lasso-internal-api';
194
+			$api_url = trailingslashit(home_url()).'lasso-internal-api';
195 195
 
196 196
 			$gallery_class = new gallery();
197 197
 			$gallery_nonce_action = $gallery_class->nonce_action;
198
-			$gallery_nonce = wp_create_nonce( $gallery_nonce_action );
198
+			$gallery_nonce = wp_create_nonce($gallery_nonce_action);
199 199
 			
200 200
 			
201 201
             if ($allow_change_date) {
@@ -210,13 +210,13 @@  discard block
 block discarded – undo
210 210
 			  
211 211
 			if (function_exists('rest_url')) {
212 212
 				//$rest_root = esc_url_raw( rest_url());
213
-				$rest_nonce = wp_create_nonce( 'wp_rest' );
214
-				$settings = array( 'root' => $rest_root, 'nonce' => $rest_nonce );
215
-				wp_enqueue_script( 'wp-api', '', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
216
-				wp_localize_script( 'wp-api', 'wpApiSettings', $settings );
217
-				wp_localize_script( 'wp-api', 'WP_API_Settings', $settings );
213
+				$rest_nonce = wp_create_nonce('wp_rest');
214
+				$settings = array('root' => $rest_root, 'nonce' => $rest_nonce);
215
+				wp_enqueue_script('wp-api', '', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true);
216
+				wp_localize_script('wp-api', 'wpApiSettings', $settings);
217
+				wp_localize_script('wp-api', 'WP_API_Settings', $settings);
218 218
 				
219
-				if ( class_exists( 'WP_REST_Controller' )) {
219
+				if (class_exists('WP_REST_Controller')) {
220 220
 					// we are using REST API V2
221 221
 					$using_restapiv2 = true;
222 222
 				}
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
             
225 225
             //excerpt
226 226
             $post_excerpt = "";
227
-            $post_excerpt = wp_strip_all_tags($post->post_excerpt,true);
227
+            $post_excerpt = wp_strip_all_tags($post->post_excerpt, true);
228 228
             
229 229
             //find if this is multi page. -1 if not
230 230
             $multipage = self::is_multipage();
@@ -235,27 +235,27 @@  discard block
 block discarded – undo
235 235
             //}
236 236
 			
237 237
 			//get custom taxonomy
238
-			$custom_taxonomies         = array_diff(get_object_taxonomies( get_post_type( $postid ), 'names' ), ['category','post_tag','post_format']);
239
-			$post_taxo_arr    = array();
238
+			$custom_taxonomies         = array_diff(get_object_taxonomies(get_post_type($postid), 'names'), ['category', 'post_tag', 'post_format']);
239
+			$post_taxo_arr = array();
240 240
 			foreach ($custom_taxonomies as $taxonomy) {
241
-				$post_taxo_arr[$taxonomy] = lasso_get_post_objects( $postid, $taxonomy );
241
+				$post_taxo_arr[$taxonomy] = lasso_get_post_objects($postid, $taxonomy);
242 242
 			}
243
-			$existing_taxo_arr    = array();
243
+			$existing_taxo_arr = array();
244 244
 			foreach ($custom_taxonomies as $taxonomy) {
245
-				$existing_taxo_arr[$taxonomy] = lasso_get_objects( $taxonomy );
245
+				$existing_taxo_arr[$taxonomy] = lasso_get_objects($taxonomy);
246 246
 			}
247 247
             
248
-            $new_post_text    = lasso_editor_get_option( 'new_post_text', 'lasso_editor' );        
249
-            $new_post_text  = !empty($new_post_text) ? $new_post_text : wp_strip_all_tags(apply_filters( 'lasso_new_object_content', __( 'Once upon a time...','lasso')));
248
+            $new_post_text = lasso_editor_get_option('new_post_text', 'lasso_editor');        
249
+            $new_post_text = !empty($new_post_text) ? $new_post_text : wp_strip_all_tags(apply_filters('lasso_new_object_content', __('Once upon a time...', 'lasso')));
250 250
 			
251 251
 			wp_reset_query();
252
-			$cat_new_post = ($inherit_categories =='on' && !is_home() && !is_page()) ? get_the_category() : null;
252
+			$cat_new_post = ($inherit_categories == 'on' && !is_home() && !is_page()) ? get_the_category() : null;
253 253
 
254 254
 
255 255
 			// localized objects
256 256
 			$objects = array(
257
-				'ajaxurl' 			=> esc_url( $api_url ),
258
-				'ajaxurl2' 			=> esc_url( admin_url( 'admin-ajax.php' )),
257
+				'ajaxurl' 			=> esc_url($api_url),
258
+				'ajaxurl2' 			=> esc_url(admin_url('admin-ajax.php')),
259 259
 				'siteUrl'           => site_url(),
260 260
 				'rest_root'         => $rest_root,
261 261
 				'rest_nonce'        => $rest_nonce,
@@ -264,13 +264,13 @@  discard block
 block discarded – undo
264 264
 				'featImgClass'		=> $featImgClass,
265 265
 				'titleClass'		=> $titleClass,
266 266
 				'strings'			=> $strings,
267
-				'settingsLink'		=> function_exists('is_multisite') && is_multisite() ? network_admin_url( 'settings.php?page=lasso-editor' ) : admin_url( 'admin.php?page=lasso-editor-settings' ),
268
-				'post_status'		=> get_post_status( $postid ),
267
+				'settingsLink'		=> function_exists('is_multisite') && is_multisite() ? network_admin_url('settings.php?page=lasso-editor') : admin_url('admin.php?page=lasso-editor-settings'),
268
+				'post_status'		=> get_post_status($postid),
269 269
 				'postid'			=> $postid,
270 270
 				'permalink'			=> $permalink,
271 271
 				'edit_others_pages'	=> current_user_can('edit_others_pages') ? true : false,
272 272
 				'edit_others_posts'	=> current_user_can('edit_others_posts') ? true : false,
273
-				'userCanEdit'		=> current_user_can('edit_post', $postid ),
273
+				'userCanEdit'		=> current_user_can('edit_post', $postid),
274 274
 				'can_publish'		=> is_page() ? current_user_can('publish_pages') : current_user_can('publish_posts'),
275 275
 				//'can_publish_posts'	=> current_user_can('publish_posts'),
276 276
 				//'can_publish_pages'	=> current_user_can('publish_pages'),
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 				'nonce'				=> wp_create_nonce('lasso_editor'),
279 279
 				'handle'			=> lasso_editor_settings_toolbar(),
280 280
 				'toolbar'			=> lasso_editor_text_toolbar(),
281
-                'toolbarPopup'		=> $text_select_popup ? lasso_editor_selected_text_toolbar(): false,
281
+                'toolbarPopup'		=> $text_select_popup ? lasso_editor_selected_text_toolbar() : false,
282 282
 				'toolbarHeadings'   => $toolbar_headings,
283 283
 				'toolbarHeadingsH4'   => $toolbar_headings_h4,
284 284
 				'component_modal'	=> lasso_editor_component_modal(),
@@ -310,40 +310,40 @@  discard block
 block discarded – undo
310 310
 				'extCusTaxonomies' => $existing_taxo_arr,
311 311
 				'noResultsDiv'		=> lasso_editor_empty_results(),
312 312
 				'noRevisionsDiv'	=> lasso_editor_empty_results('revision'),
313
-				'mapTileProvider'   => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider( $postid ) : false,
314
-				'mapLocations'		=> get_post_meta( $postid, 'ase_map_component_locations' ),
315
-				'mapStart'			=> get_post_meta( $postid, 'ase_map_component_start_point', true ),
316
-				'mapZoom'			=> get_post_meta( $postid, 'ase_map_component_zoom', true ),
313
+				'mapTileProvider'   => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider($postid) : false,
314
+				'mapLocations'		=> get_post_meta($postid, 'ase_map_component_locations'),
315
+				'mapStart'			=> get_post_meta($postid, 'ase_map_component_start_point', true),
316
+				'mapZoom'			=> get_post_meta($postid, 'ase_map_component_zoom', true),
317 317
 				'revisionModal' 	=> lasso_editor_revision_modal(),
318 318
 				'isMobile'          => wp_is_mobile(),
319
-				'enableAutoSave'    => lasso_editor_get_option( 'enable_autosave', 'lasso_editor' ),
319
+				'enableAutoSave'    => lasso_editor_get_option('enable_autosave', 'lasso_editor'),
320 320
 				'showColor'         => $show_color,
321 321
 				'showAlignment'     => $show_align,
322 322
 				'showIgnoredItems'  => lasso_editor_get_option('show_ignored_items', 'lasso_editor'),
323 323
 				'restapi2'          => $using_restapiv2,
324 324
 				'saveusingrest'     => $using_restapiv2 && !$disableRESTSave,
325
-				'newObjectContent'  => '<p class="editus-firstp" placeholder="'. $new_post_text . '"></p>',
325
+				'newObjectContent'  => '<p class="editus-firstp" placeholder="'.$new_post_text.'"></p>',
326 326
 				'disableSavePost'   => $save_to_post_disabled,
327 327
 				'disableEditPost'   => $edit_post_disabled,
328 328
 				'disableEditSC'     => $disable_shortcode_editing,
329 329
 				'boldTag'           => $bold_tag,
330 330
 				'iTag'           	=> $i_tag, 
331 331
 				'customFields'      => $custom_fields,
332
-				'clickToInsert'     => ($insert_comp_ui =='click'),
333
-				'buttonOnEmptyP'     => ($insert_comp_ui =='mediumcom'),      // auto show a button to insert components on an empty paragraph      
332
+				'clickToInsert'     => ($insert_comp_ui == 'click'),
333
+				'buttonOnEmptyP'     => ($insert_comp_ui == 'mediumcom'), // auto show a button to insert components on an empty paragraph      
334 334
                 'rtl'               => is_rtl(),				
335
-				'skipToEdit'        =>( $delta < 10 && $delta >=0 ), // if it's a new post, skip to edit mode
335
+				'skipToEdit'        =>($delta < 10 && $delta >= 0), // if it's a new post, skip to edit mode
336 336
 				'linksEditable'    => $links_editable,
337 337
 				'supportPendingStatus' => !$no_pending_status,
338
-				'tableCode' => apply_filters( 'lasso_table_html_code','<table><tr><th>Cell 1</th><th>Cell 2</th></tr><tr><td>Cell 3</td><td>Cell 4</td></tr></table><p></p>'),
339
-                'hasGutenberg' => (function_exists( 'has_blocks' ) && has_blocks( $post->post_content)) || self::gutenberg_active(),//,
338
+				'tableCode' => apply_filters('lasso_table_html_code', '<table><tr><th>Cell 1</th><th>Cell 2</th></tr><tr><td>Cell 3</td><td>Cell 4</td></tr></table><p></p>'),
339
+                'hasGutenberg' => (function_exists('has_blocks') && has_blocks($post->post_content)) || self::gutenberg_active(), //,
340 340
                 'multipages'=> $multipage,
341 341
                 'post_content'=>$post_content,
342 342
                 'post_excerpt'=>$post_excerpt,
343 343
                 'supCustTaxo' => $support_custom_taxonomy == 'on',
344
-                'oldWPimg'=> $use_old_wpimg =='on',
344
+                'oldWPimg'=> $use_old_wpimg == 'on',
345 345
                 'useWPImgBlk'=> $use_wpimgblock,
346
-                'prefixHTTP'=> $link_prefix_http =='on',
346
+                'prefixHTTP'=> $link_prefix_http == 'on',
347 347
 				'currCat'=> $cat_new_post
348 348
 			);
349 349
 
@@ -353,9 +353,9 @@  discard block
 block discarded – undo
353 353
 			
354 354
 			if (!$using_restapiv2) {
355 355
                // enqueue REST API V1
356
-			   wp_enqueue_script( 'wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
357
-			   $settings = array( 'root' => home_url( $home_url ), 'nonce' => wp_create_nonce( 'wp_json' ) );
358
-			   wp_localize_script( 'wp-api-js', 'WP_API_Settings', $settings );
356
+			   wp_enqueue_script('wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true);
357
+			   $settings = array('root' => home_url($home_url), 'nonce' => wp_create_nonce('wp_json'));
358
+			   wp_localize_script('wp-api-js', 'WP_API_Settings', $settings);
359 359
 			}
360 360
 			
361 361
 			if ($allow_change_date) {
@@ -364,13 +364,13 @@  discard block
 block discarded – undo
364 364
 				wp_enqueue_style('jquery-ui');
365 365
 			}
366 366
 
367
-			$postfix = ( defined( 'SCRIPT_DEBUG' ) && true === SCRIPT_DEBUG ) ? '' : '.min';
367
+			$postfix = (defined('SCRIPT_DEBUG') && true === SCRIPT_DEBUG) ? '' : '.min';
368 368
 			if ($show_color) {
369
-				wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api','iris'), LASSO_VERSION, true);
369
+				wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api', 'iris'), LASSO_VERSION, true);
370 370
 			} else {
371
-			    wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
371
+			    wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
372 372
 			}
373
-			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects ) );
373
+			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects));
374 374
 
375 375
 
376 376
 		}
@@ -380,20 +380,20 @@  discard block
 block discarded – undo
380 380
     function gutenberg_active() {
381 381
         
382 382
         // Gutenberg plugin is installed and activated.
383
-        $gutenberg = ! ( false === has_filter( 'replace_editor', 'gutenberg_init' ) );
383
+        $gutenberg = !(false === has_filter('replace_editor', 'gutenberg_init'));
384 384
 
385 385
         // Block editor since 5.0.
386
-        $block_editor = version_compare( $GLOBALS['wp_version'], '5.0-beta', '>' );
386
+        $block_editor = version_compare($GLOBALS['wp_version'], '5.0-beta', '>');
387 387
 
388
-        if ( ! $gutenberg && ! $block_editor ) {
388
+        if (!$gutenberg && !$block_editor) {
389 389
             return false;
390 390
         }
391 391
 
392
-        if ( self::is_classic_editor_plugin_active() ) {
393
-            $editor_option       = get_option( 'classic-editor-replace' );
394
-            $block_editor_active = array( 'no-replace', 'block' );
392
+        if (self::is_classic_editor_plugin_active()) {
393
+            $editor_option       = get_option('classic-editor-replace');
394
+            $block_editor_active = array('no-replace', 'block');
395 395
 
396
-            return in_array( $editor_option, $block_editor_active, true );
396
+            return in_array($editor_option, $block_editor_active, true);
397 397
         }
398 398
 
399 399
         return true;
@@ -405,11 +405,11 @@  discard block
 block discarded – undo
405 405
      * @return bool
406 406
      */
407 407
     function is_classic_editor_plugin_active() {
408
-        if ( ! function_exists( 'is_plugin_active' ) ) {
409
-            include_once ABSPATH . 'wp-admin/includes/plugin.php';
408
+        if (!function_exists('is_plugin_active')) {
409
+            include_once ABSPATH.'wp-admin/includes/plugin.php';
410 410
         }
411 411
 
412
-        if ( is_plugin_active( 'classic-editor/classic-editor.php' ) ) {
412
+        if (is_plugin_active('classic-editor/classic-editor.php')) {
413 413
             return true;
414 414
         }
415 415
 
Please login to merge, or discard this patch.
lasso.php 1 patch
Spacing   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -18,27 +18,27 @@  discard block
 block discarded – undo
18 18
  */
19 19
 
20 20
 // If this file is called directly, abort.
21
-if ( ! defined( 'WPINC' ) ) {
21
+if (!defined('WPINC')) {
22 22
 	die;
23 23
 }
24 24
 
25 25
 // Set some constants
26
-define( 'LASSO_VERSION', '1.7.0' );
27
-define( 'LASSO_DIR', plugin_dir_path( __FILE__ ) );
28
-define( 'LASSO_URL', plugins_url( '', __FILE__ ) );
29
-define( 'LASSO_FILE', __FILE__ );
26
+define('LASSO_VERSION', '1.7.0');
27
+define('LASSO_DIR', plugin_dir_path(__FILE__));
28
+define('LASSO_URL', plugins_url('', __FILE__));
29
+define('LASSO_FILE', __FILE__);
30 30
 
31 31
 /**
32 32
  * Load plugin if PHP version is 5.4 or later.
33 33
  */
34
-if ( version_compare( PHP_VERSION, '5.4.0', '>=' ) ) {
34
+if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
35 35
 
36
-	include_once( LASSO_DIR . '/bootstrap.php' );
36
+	include_once(LASSO_DIR.'/bootstrap.php');
37 37
 
38 38
 } else {
39 39
 
40 40
 	add_action('admin_head', 'lasso_fail_notice');
41
-	function lasso_fail_notice(){
41
+	function lasso_fail_notice() {
42 42
 
43 43
 		printf('<div class="error"><p>Editus requires PHP 5.4 or higher.</p></div>');
44 44
 
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
 }
47 47
 
48 48
 add_filter('register_post_type_args', 'lasso_show_in_rest', 10, 2);
49
-function lasso_show_in_rest($args, $post_type){
49
+function lasso_show_in_rest($args, $post_type) {
50 50
  
51
-    $allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor', array( ) );
52
-	$allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
53
-	if (in_array( $post_type,$allowed_post_types)) {
51
+    $allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', array( ));
52
+	$allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
53
+	if (in_array($post_type, $allowed_post_types)) {
54 54
 		$args['show_in_rest'] = true;
55 55
 		if ($post_type != 'post' && $post_type != 'page') {
56 56
 			$args['rest_base'] = $post_type;
@@ -61,21 +61,21 @@  discard block
 block discarded – undo
61 61
 }
62 62
 
63 63
 
64
-function lasso_editor_get_option( $option, $section, $default = '' ) {
64
+function lasso_editor_get_option($option, $section, $default = '') {
65 65
 
66
-	if ( empty( $option ) )
66
+	if (empty($option))
67 67
 		return;
68 68
 
69
-	if ( function_exists( 'is_multisite' ) && is_multisite() ) {
69
+	if (function_exists('is_multisite') && is_multisite()) {
70 70
 
71
-		$options = get_site_option( $section );
71
+		$options = get_site_option($section);
72 72
 
73 73
 	} else {
74 74
 
75
-		$options = get_option( $section );
75
+		$options = get_option($section);
76 76
 	}
77 77
 
78
-	if ( isset( $options[$option] ) ) {
78
+	if (isset($options[$option])) {
79 79
 		return $options[$option];
80 80
 	}
81 81
 
@@ -88,17 +88,17 @@  discard block
 block discarded – undo
88 88
 ));
89 89
 
90 90
 // Gutenberg
91
-if( function_exists( 'is_gutenberg_page' ) ) {
92
-	function add_raw_to_post( $response, $post, $request ) {
91
+if (function_exists('is_gutenberg_page')) {
92
+	function add_raw_to_post($response, $post, $request) {
93 93
 		$response_data = $response->get_data();
94
-		if ( is_array( $response_data['content'] )) {
95
-			$response_data['content']['raw'] =  $post->post_content ;
96
-			$response->set_data( $response_data );
94
+		if (is_array($response_data['content'])) {
95
+			$response_data['content']['raw'] = $post->post_content;
96
+			$response->set_data($response_data);
97 97
 		}
98 98
 
99 99
 		return $response;
100 100
 	}
101
-	add_filter( "rest_prepare_post", 'add_raw_to_post', 10, 3 );
101
+	add_filter("rest_prepare_post", 'add_raw_to_post', 10, 3);
102 102
 }
103 103
 
104 104
 
@@ -106,32 +106,32 @@  discard block
 block discarded – undo
106 106
 //table codes to be added
107 107
 class editus_table {
108 108
     
109
-    public function __construct(){
109
+    public function __construct() {
110 110
         $add_table = lasso_editor_get_option('add_table', 'lasso_editor', false);
111 111
         if ($add_table) {
112
-            add_action('wp_enqueue_scripts', array($this,'scripts'));
112
+            add_action('wp_enqueue_scripts', array($this, 'scripts'));
113 113
             
114 114
         }
115 115
 	}
116 116
     
117 117
     function scripts()
118 118
     {
119
-        add_action('lasso_editor_controls_after_outside', array($this,'editus_table_edit_menu'));
120
-            add_filter('lasso_components',array($this,'editus_components_add_table'),10,1);
121
-            add_action( 'lasso_toolbar_components', array($this,'editus_toolbar_components_add_table'), 10 );
122
-            wp_enqueue_style( 'editus-table-style', LASSO_URL.  '/public/assets/css/editus-table-edit-public.css', LASSO_VERSION, true );
123
-            wp_enqueue_script( 'editus_table',  LASSO_URL. '/public/assets/js/editus-table-edit-public.js', array( 'jquery' ), LASSO_VERSION, true );
119
+        add_action('lasso_editor_controls_after_outside', array($this, 'editus_table_edit_menu'));
120
+            add_filter('lasso_components', array($this, 'editus_components_add_table'), 10, 1);
121
+            add_action('lasso_toolbar_components', array($this, 'editus_toolbar_components_add_table'), 10);
122
+            wp_enqueue_style('editus-table-style', LASSO_URL.'/public/assets/css/editus-table-edit-public.css', LASSO_VERSION, true);
123
+            wp_enqueue_script('editus_table', LASSO_URL.'/public/assets/js/editus-table-edit-public.js', array('jquery'), LASSO_VERSION, true);
124 124
     }
125 125
     
126 126
     function editus_table_edit_menu()
127 127
     { ?>
128 128
 
129 129
         <ul class='editus-table-menu'>
130
-          <li data-action="insertcol"><?php echo __('Insert Column','lasso')?></li>
131
-          <li data-action="insertrow"><?php echo __('Insert Row','lasso')?></li>
132
-          <li data-action="delcol"><?php echo __('Delete Column','lasso')?></li>
133
-          <li data-action="delrow"><?php echo __('Delete Row','lasso')?></li>
134
-          <li data-action="deltable"><?php echo __('Delete Table','lasso')?></li
130
+          <li data-action="insertcol"><?php echo __('Insert Column', 'lasso')?></li>
131
+          <li data-action="insertrow"><?php echo __('Insert Row', 'lasso')?></li>
132
+          <li data-action="delcol"><?php echo __('Delete Column', 'lasso')?></li>
133
+          <li data-action="delrow"><?php echo __('Delete Row', 'lasso')?></li>
134
+          <li data-action="deltable"><?php echo __('Delete Table', 'lasso')?></li
135 135
         </ul>
136 136
     <?php
137 137
     }
@@ -143,20 +143,20 @@  discard block
 block discarded – undo
143 143
     }
144 144
 
145 145
 
146
-    function editus_components_add_table( $array ){
146
+    function editus_components_add_table($array) {
147 147
         $custom = array(
148 148
                'htmltable' => array(
149
-                         'name'    => __('HTML Table','lasso'),
149
+                         'name'    => __('HTML Table', 'lasso'),
150 150
                           'content' => self::editus_html_table(),
151 151
                 )
152 152
         );
153
-        return array_merge( $array, $custom );
153
+        return array_merge($array, $custom);
154 154
     }
155 155
 
156 156
 
157 157
     function editus_toolbar_components_add_table( ) {
158 158
           ?>
159
-          <li data-type="htmltable" title="<?php esc_attr_e( 'HTML Table', 'lasso' );?>" class="quote lasso-toolbar--component__htmltable dashicons dashicons-grid-view"></li>
159
+          <li data-type="htmltable" title="<?php esc_attr_e('HTML Table', 'lasso'); ?>" class="quote lasso-toolbar--component__htmltable dashicons dashicons-grid-view"></li>
160 160
           <?php
161 161
     }
162 162
 }
@@ -169,31 +169,31 @@  discard block
 block discarded – undo
169 169
 //table codes to be added
170 170
 class editus_paragraph {
171 171
     
172
-    public function __construct(){
172
+    public function __construct() {
173 173
         $add_paragraph = lasso_editor_get_option('add_paragraph', 'lasso_editor', false);
174 174
         if ($add_paragraph) {
175
-            add_action('wp_enqueue_scripts', array($this,'scripts'));
175
+            add_action('wp_enqueue_scripts', array($this, 'scripts'));
176 176
             
177 177
         }
178 178
 	}
179 179
     
180 180
     function scripts()
181 181
     {
182
-            add_action('lasso_editor_controls_after_outside', array($this,'editus_paragraph_style'));
183
-            add_filter('lasso_components',array($this,'editus_components_add_paragraph'),10,1);
184
-            add_action( 'lasso_toolbar_components', array($this,'editus_toolbar_components_add_paragraph'), 10 );
182
+            add_action('lasso_editor_controls_after_outside', array($this, 'editus_paragraph_style'));
183
+            add_filter('lasso_components', array($this, 'editus_components_add_paragraph'), 10, 1);
184
+            add_action('lasso_toolbar_components', array($this, 'editus_toolbar_components_add_paragraph'), 10);
185 185
             //wp_enqueue_style( 'editus-table-style', LASSO_URL.  '/public/assets/css/editus-table-edit-public.css', LASSO_VERSION, true );
186 186
             //wp_enqueue_script( 'editus_table',  LASSO_URL. '/public/assets/js/editus-table-edit-public.js', array( 'jquery' ), LASSO_VERSION, true );
187 187
     }
188 188
    
189
-    function editus_components_add_paragraph( $array ){
189
+    function editus_components_add_paragraph($array) {
190 190
         $custom = array(
191 191
                'htmlparagraph' => array(
192
-                         'name'    => __('HTML Paragraph','lasso'),
192
+                         'name'    => __('HTML Paragraph', 'lasso'),
193 193
                           'content' => self::editus_html_paragraph(),
194 194
                 )
195 195
         );
196
-        return array_merge( $array, $custom );
196
+        return array_merge($array, $custom);
197 197
     }
198 198
     
199 199
     
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 
218 218
     function editus_toolbar_components_add_paragraph( ) {
219 219
           ?>
220
-          <li data-type="htmlparagraph" title="<?php esc_attr_e( 'HTML Paragraph', 'lasso' );?>" class="quote lasso-toolbar--component__htmlparagraph dashicons dashicons-editor-paragraph"></li>
220
+          <li data-type="htmlparagraph" title="<?php esc_attr_e('HTML Paragraph', 'lasso'); ?>" class="quote lasso-toolbar--component__htmlparagraph dashicons dashicons-editor-paragraph"></li>
221 221
           <?php
222 222
     }
223 223
 }
Please login to merge, or discard this patch.