Completed
Push — master ( bad7aa...df1b2a )
by
unknown
25:20
created
public/includes/helpers.php 1 patch
Spacing   +83 added lines, -83 removed lines patch added patch discarded remove patch
@@ -12,22 +12,22 @@  discard block
 block discarded – undo
12 12
  * @return the option value
13 13
  * @since 1.0
14 14
  */
15
-if( !function_exists('lasso_editor_get_option')):
16
-	function lasso_editor_get_option( $option, $section, $default = '' ) {
15
+if (!function_exists('lasso_editor_get_option')):
16
+	function lasso_editor_get_option($option, $section, $default = '') {
17 17
 
18
-		if ( empty( $option ) )
18
+		if (empty($option))
19 19
 			return;
20 20
 
21
-		if ( function_exists( 'is_multisite' ) && is_multisite() ) {
21
+		if (function_exists('is_multisite') && is_multisite()) {
22 22
 
23
-			$options = get_site_option( $section );
23
+			$options = get_site_option($section);
24 24
 
25 25
 		} else {
26 26
 
27
-			$options = get_option( $section );
27
+			$options = get_option($section);
28 28
 		}
29 29
 
30
-		if ( isset( $options[$option] ) ) {
30
+		if (isset($options[$option])) {
31 31
 			return $options[$option];
32 32
 		}
33 33
 
@@ -42,9 +42,9 @@  discard block
 block discarded – undo
42 42
  */
43 43
 function lasso_editor_galleries_exist() {
44 44
 
45
-	$q = new wp_query( array( 'post_type' => 'ai_galleries', 'post_status' => 'publish' ) );
45
+	$q = new wp_query(array('post_type' => 'ai_galleries', 'post_status' => 'publish'));
46 46
 
47
-	if ( $q->have_posts() )
47
+	if ($q->have_posts())
48 48
 		return true;
49 49
 	else
50 50
 		return false;
@@ -59,9 +59,9 @@  discard block
 block discarded – undo
59 59
 function lasso_get_supported_theme_class() {
60 60
 
61 61
 	$name  	= wp_get_theme()->get('Name');
62
-	$slug  	= lasso_clean_string( $name );
62
+	$slug  	= lasso_clean_string($name);
63 63
 
64
-	switch ( $slug ) {
64
+	switch ($slug) {
65 65
 		case 'aesop-story-theme': // aesop
66 66
 			$out = '.aesop-entry-content';
67 67
 			break;
@@ -110,16 +110,16 @@  discard block
 block discarded – undo
110 110
 
111 111
 	}
112 112
 
113
-	return apply_filters('lasso_content_class', !empty( $out ) ? $out : false);
113
+	return apply_filters('lasso_content_class', !empty($out) ? $out : false);
114 114
 	//return !empty( $out ) ? $out : false;
115 115
 }
116 116
 
117 117
 function lasso_get_supported_theme_title_class() {
118 118
 
119 119
 	$name  	= wp_get_theme()->get('Name');
120
-	$slug  	= lasso_clean_string( $name );
120
+	$slug  	= lasso_clean_string($name);
121 121
 
122
-	switch ( $slug ) {
122
+	switch ($slug) {
123 123
 
124 124
 		case 'aesop-story-theme': // aesop
125 125
 			$out = '.aesop-entry-title';
@@ -147,16 +147,16 @@  discard block
 block discarded – undo
147 147
 			break;
148 148
 	}
149 149
 
150
-	return apply_filters('lasso_title_class', !empty( $out ) ? $out : false);
150
+	return apply_filters('lasso_title_class', !empty($out) ? $out : false);
151 151
 }
152 152
 
153 153
 //since 0.9.9.6
154 154
 function lasso_get_supported_theme_featured_image_class() {
155 155
 
156 156
 	$name  	= wp_get_theme()->get('Name');
157
-	$slug  	= lasso_clean_string( $name );
157
+	$slug  	= lasso_clean_string($name);
158 158
 
159
-	return apply_filters('lasso_featured_image_class', !empty( $out ) ? $out : false);
159
+	return apply_filters('lasso_featured_image_class', !empty($out) ? $out : false);
160 160
 }
161 161
 
162 162
 
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 *	@since 0.8.7
168 168
 *	@return string of comma separated classes
169 169
 */
170
-function lasso_supported_no_save(){
170
+function lasso_supported_no_save() {
171 171
 
172 172
 	return apply_filters('lasso_dont_save', '.lasso--ignore,.sharedaddy,.us_wrapper,.meta,.edit-link,.ssba,.addtoany_share_save_container,.mashsb-container,.heateor_sss_sharing_container,.nc_socialPanel,.jp-relatedposts,.fb-comments,.adsbygoogle,.swp_social_panel');
173 173
 }
@@ -181,8 +181,8 @@  discard block
 block discarded – undo
181 181
  *
182 182
  * @return array|mixed|object|string|void
183 183
  */
184
-function lasso_sanitize_data( $data ) {
185
-	return \lasso\sanatize::do_sanitize( $data );
184
+function lasso_sanitize_data($data) {
185
+	return \lasso\sanatize::do_sanitize($data);
186 186
 
187 187
 }
188 188
 
@@ -192,18 +192,18 @@  discard block
 block discarded – undo
192 192
  *	@since 0.9.3
193 193
  *	@return string of comma delimited category slugs
194 194
 */
195
-function lasso_get_post_objects( $postid = '', $taxonomy = 'category') {
195
+function lasso_get_post_objects($postid = '', $taxonomy = 'category') {
196 196
 
197
-	if ( empty( $postid ) )
197
+	if (empty($postid))
198 198
 		$postid = get_the_ID();
199 199
 
200
-	$objects = 'category' == $taxonomy ? get_the_category( $postid ) : get_the_tags( $postid );
200
+	$objects = 'category' == $taxonomy ? get_the_category($postid) : get_the_tags($postid);
201 201
 
202
-	if ( empty( $objects) )
202
+	if (empty($objects))
203 203
 		return;
204 204
 
205 205
 	$out = '';
206
-	foreach( $objects as $object ) {
206
+	foreach ($objects as $object) {
207 207
 		//$out .= $object->slug.', ';
208 208
 		$out .= $object->name.',';
209 209
 	}
@@ -218,15 +218,15 @@  discard block
 block discarded – undo
218 218
  *	@since 0.9.3
219 219
  *	@return array all categoiries
220 220
 */
221
-function lasso_get_objects( $taxonomy = 'category' ) {
221
+function lasso_get_objects($taxonomy = 'category') {
222 222
 
223 223
 	$objects = 'category' == $taxonomy ? get_categories(array('hide_empty' => 0)) : get_tags(array('hide_empty' => 0));
224 224
 
225
-	if ( empty( $objects) )
225
+	if (empty($objects))
226 226
 		return;
227 227
 
228 228
 	$out = "";
229
-	foreach( $objects as $object ) {
229
+	foreach ($objects as $object) {
230 230
 		$out .= $object->name.',';
231 231
 	}
232 232
 
@@ -241,11 +241,11 @@  discard block
 block discarded – undo
241 241
  * @since 0.9.4
242 242
  */
243 243
 function lasso_post_types_names() {
244
-	$post_types = get_post_types( array(
244
+	$post_types = get_post_types(array(
245 245
 		'public' => true,
246
-	), 'objects' );
247
-	$post_types = array_combine( array_keys( $post_types ), wp_list_pluck( $post_types, 'label' ) );
248
-    unset( $post_types[ 'attachment' ] );
246
+	), 'objects');
247
+	$post_types = array_combine(array_keys($post_types), wp_list_pluck($post_types, 'label'));
248
+    unset($post_types['attachment']);
249 249
 
250 250
 	/**
251 251
 	 * Set which post types are allowed
@@ -254,14 +254,14 @@  discard block
 block discarded – undo
254 254
 	 *
255 255
 	 * @param array $allowed_post_types Array of names (not labels) of allowed post types. Must be registered.
256 256
 	 */
257
-	$allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor', array( 'post', 'page') );
258
-	$allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
257
+	$allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', array('post', 'page'));
258
+	$allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
259 259
 	if (!current_user_can('edit_pages')) {
260
-		$allowed_post_types = array_diff($allowed_post_types,array('page'));
260
+		$allowed_post_types = array_diff($allowed_post_types, array('page'));
261 261
 	}
262
-	foreach( $post_types as $name => $label ) {
263
-		if ( ! in_array( $name, $allowed_post_types ) ) {
264
-			unset( $post_types[ $name ] );
262
+	foreach ($post_types as $name => $label) {
263
+		if (!in_array($name, $allowed_post_types)) {
264
+			unset($post_types[$name]);
265 265
 		}
266 266
 	}
267 267
 	return $post_types;
@@ -269,10 +269,10 @@  discard block
 block discarded – undo
269 269
 
270 270
 
271 271
 function lasso_post_types() {
272
-	$post_types = get_post_types( array(
272
+	$post_types = get_post_types(array(
273 273
 		'public' => true,
274
-	), 'names' );
275
-    unset( $post_types[ 'attachment' ] );
274
+	), 'names');
275
+    unset($post_types['attachment']);
276 276
 
277 277
 	/**
278 278
 	 * Set which post types are allowed
@@ -281,11 +281,11 @@  discard block
 block discarded – undo
281 281
 	 *
282 282
 	 * @param array $allowed_post_types Array of names (not labels) of allowed post types. Must be registered.
283 283
 	 */
284
-	$allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor', array( 'post') );
285
-	$allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
286
-	foreach( $post_types as $name => $label ) {
287
-		if ( ! in_array( $name, $allowed_post_types ) ) {
288
-			unset( $post_types[ $name ] );
284
+	$allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', array('post'));
285
+	$allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
286
+	foreach ($post_types as $name => $label) {
287
+		if (!in_array($name, $allowed_post_types)) {
288
+			unset($post_types[$name]);
289 289
 		}
290 290
 	}
291 291
 	return $post_types;
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 	global $wp_post_types;
296 296
 	$post_types = lasso_post_types();
297 297
 	$rest_base = array();
298
-	foreach ( $post_types as $post_type) {
298
+	foreach ($post_types as $post_type) {
299 299
 		$rest_base[$post_type] = $wp_post_types[$post_type]->rest_base;
300 300
 	}
301 301
     
@@ -313,22 +313,22 @@  discard block
 block discarded – undo
313 313
 *	@uses lasso_modal_addons()
314 314
 *	@since 0.9.4
315 315
 */
316
-function lasso_modal_addons_content( $tab = '', $type ){
316
+function lasso_modal_addons_content($tab = '', $type) {
317 317
 
318
-	$name = lasso_clean_string( $tab['name'] );
318
+	$name = lasso_clean_string($tab['name']);
319 319
 
320
-	if ( 'tab' == $type ) {
320
+	if ('tab' == $type) {
321 321
 
322
-		$out = sprintf( '<li data-addon-name="%s">%s</li>', $name, $tab['name'] );
322
+		$out = sprintf('<li data-addon-name="%s">%s</li>', $name, $tab['name']);
323 323
 
324
-	} else if ( 'content' == $type ){
324
+	} else if ('content' == $type) {
325 325
 
326
-		$content = isset( $tab['content'] ) && is_callable( $tab['content'] ) ? call_user_func( $tab['content'] ) : false;
327
-		$options = isset( $tab['options'] ) && is_callable( $tab['options'] ) ? call_user_func( $tab['options'] ) : false;
326
+		$content = isset($tab['content']) && is_callable($tab['content']) ? call_user_func($tab['content']) : false;
327
+		$options = isset($tab['options']) && is_callable($tab['options']) ? call_user_func($tab['options']) : false;
328 328
 
329
-		$out = sprintf( '<div class="lasso--modal__content not-visible" data-addon-content="%s">
329
+		$out = sprintf('<div class="lasso--modal__content not-visible" data-addon-content="%s">
330 330
 			%s%s
331
-			</div>', $name, $content, lasso_option_form( $name, $options ) );
331
+			</div>', $name, $content, lasso_option_form($name, $options));
332 332
 
333 333
 	}
334 334
 
@@ -343,12 +343,12 @@  discard block
 block discarded – undo
343 343
 *
344 344
 * @return void|string
345 345
 */
346
-function lasso_clean_string( $string = '' ) {
346
+function lasso_clean_string($string = '') {
347 347
 
348
-	if ( empty( $string ) )
348
+	if (empty($string))
349 349
 		return;
350 350
 
351
-	return sanitize_text_field( strtolower( preg_replace('/[\s_]/', '-', $string ) ) );
351
+	return sanitize_text_field(strtolower(preg_replace('/[\s_]/', '-', $string)));
352 352
 }
353 353
 
354 354
 /**
@@ -361,13 +361,13 @@  discard block
 block discarded – undo
361 361
  *
362 362
  * @return void|string
363 363
  */
364
-function lasso_unclean_string( $string = '' ) {
364
+function lasso_unclean_string($string = '') {
365 365
 
366
-	if ( empty( $string ) ) {
366
+	if (empty($string)) {
367 367
 		return;
368 368
 	}
369 369
 
370
-	return sanitize_text_field( strtolower( str_replace( '-', '_', $string ) ) );
370
+	return sanitize_text_field(strtolower(str_replace('-', '_', $string)));
371 371
 }
372 372
 
373 373
 
@@ -382,40 +382,40 @@  discard block
 block discarded – undo
382 382
  * @param unknown $postid int the id of the post object to check against
383 383
  * @since 0.9.9.7 added filter 'lasso_user_can_filter'
384 384
  */
385
-if ( !function_exists( 'lasso_user_can' ) ):
386
-	function lasso_user_can( $action = '', $postid = 0 ) {
385
+if (!function_exists('lasso_user_can')):
386
+	function lasso_user_can($action = '', $postid = 0) {
387 387
         $result = false;
388
-		if ( empty( $action ) )
388
+		if (empty($action))
389 389
 			$action = 'edit_posts';
390 390
 
391
-		if ( empty( $postid ) && $action != 'edit_posts' && $action != 'publish_posts' && $action != 'delete_posts')
391
+		if (empty($postid) && $action != 'edit_posts' && $action != 'publish_posts' && $action != 'delete_posts')
392 392
 			$postid = get_the_ID();
393 393
 
394
-		if ( is_user_logged_in() && current_user_can( $action, $postid ) ) {
394
+		if (is_user_logged_in() && current_user_can($action, $postid)) {
395 395
 			// check against post types:
396
-			$allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor', array( 'post', 'page') );
396
+			$allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', array('post', 'page'));
397 397
 			
398 398
 			if (!current_user_can('edit_pages')) {
399
-				$allowed_post_types = array_diff($allowed_post_types,array('page'));
399
+				$allowed_post_types = array_diff($allowed_post_types, array('page'));
400 400
 			}
401 401
 			
402 402
             if (!empty($allowed_post_types) && !empty($postid)) {
403
-				$type = get_post_type( $postid );
404
-                $allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
403
+				$type = get_post_type($postid);
404
+                $allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
405 405
 				
406
-                if ( in_array( $type, $allowed_post_types ) ) {
407
-				   $result =  true;
406
+                if (in_array($type, $allowed_post_types)) {
407
+				   $result = true;
408 408
 			    }
409 409
             } else {
410 410
                 //we are not checking against a post, return true
411
-				$result =  true;
411
+				$result = true;
412 412
         	}
413 413
 		} else {
414 414
 			$result = false;
415 415
 		}
416 416
 		//if ( function_exists( 'is_gutenberg_page' ) && has_blocks() ) return false;
417 417
 		
418
-		return apply_filters( 'lasso_user_can_filter', $result,  $action, $postid);
418
+		return apply_filters('lasso_user_can_filter', $result, $action, $postid);
419 419
 	}
420 420
 endif;
421 421
 
@@ -424,25 +424,25 @@  discard block
 block discarded – undo
424 424
 *
425 425
 *	@since 0.9.5
426 426
 */
427
-if ( !function_exists('lasso_editor_empty_results') ):
427
+if (!function_exists('lasso_editor_empty_results')):
428 428
 
429
-	function lasso_editor_empty_results( $type = 'posts' ){
429
+	function lasso_editor_empty_results($type = 'posts') {
430 430
 
431
-		if ( 'posts' == $type ) {
431
+		if ('posts' == $type) {
432 432
 
433
-			$string = apply_filters('lasso_empty_state_message', __('No posts to show', 'lasso') );
433
+			$string = apply_filters('lasso_empty_state_message', __('No posts to show', 'lasso'));
434 434
 			$icon = 'lasso-icon-file-text2';
435 435
 			$button = false;
436 436
 
437
-		} elseif ( 'revision' == $type ) {
437
+		} elseif ('revision' == $type) {
438 438
 
439
-			$string = apply_filters('lasso_empty_state_message', __('No revisions found', 'lasso') );
439
+			$string = apply_filters('lasso_empty_state_message', __('No revisions found', 'lasso'));
440 440
 			$icon = 'lasso-icon-history';
441
-			$button = sprintf('<a href="#" class="lasso--btn-secondary" id="lasso--close-modal">%s</a>', __('Close','lasso') );
441
+			$button = sprintf('<a href="#" class="lasso--btn-secondary" id="lasso--close-modal">%s</a>', __('Close', 'lasso'));
442 442
 
443 443
 		}
444 444
 
445
-		return sprintf('<div id="lasso--empty-state" class="lasso--empty-state"><i class="lasso--empty-state-icon lasso-icon %s"></i><p>%s</p>%s</div>', $icon, $string, $button );
445
+		return sprintf('<div id="lasso--empty-state" class="lasso--empty-state"><i class="lasso--empty-state-icon lasso-icon %s"></i><p>%s</p>%s</div>', $icon, $string, $button);
446 446
 	}
447 447
 
448 448
 endif;
Please login to merge, or discard this patch.
admin/includes/menus/welcome.php 1 patch
Spacing   +81 added lines, -81 removed lines patch added patch discarded remove patch
@@ -10,30 +10,30 @@  discard block
 block discarded – undo
10 10
 
11 11
 	function __construct() {
12 12
 
13
-		add_action( 'admin_init',   array( $this, 'redirect' ) );
14
-		add_action( 'admin_menu',   array( $this, 'lasso_welcome' ) );
15
-		add_action( 'network_admin_menu',   array( $this, 'lasso_welcome' ) );  // CHANGED Added hook.
13
+		add_action('admin_init', array($this, 'redirect'));
14
+		add_action('admin_menu', array($this, 'lasso_welcome'));
15
+		add_action('network_admin_menu', array($this, 'lasso_welcome')); // CHANGED Added hook.
16 16
 
17
-		add_action( 'tgmpa_register',  array( $this,'required_plugins' ));
17
+		add_action('tgmpa_register', array($this, 'required_plugins'));
18 18
 
19 19
 	}
20 20
 
21 21
 	function redirect() {
22 22
 
23 23
 		// Bail if no activation redirect
24
-		if ( !get_transient( '_lasso_welcome_redirect' ) ) {
24
+		if (!get_transient('_lasso_welcome_redirect')) {
25 25
 			return;
26 26
 		}
27 27
 
28 28
 		// Delete the redirect transient
29
-		delete_transient( '_lasso_welcome_redirect' );
29
+		delete_transient('_lasso_welcome_redirect');
30 30
 
31 31
 		// Bail if activating from network, or bulk
32
-		if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) {
32
+		if (is_network_admin() || isset($_GET['activate-multi'])) {
33 33
 			return;
34 34
 		}
35 35
 
36
-		wp_safe_redirect( esc_url_raw( add_query_arg( array( 'page' => 'lasso-editor' ), admin_url( 'admin.php' ) ) ) );
36
+		wp_safe_redirect(esc_url_raw(add_query_arg(array('page' => 'lasso-editor'), admin_url('admin.php'))));
37 37
 
38 38
 	}
39 39
 
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
 	function lasso_welcome() {
46 46
 
47 47
 		// CHANGED Removed condition.
48
-		add_menu_page( __( 'Editus', 'lasso' ), __( 'Editus', 'lasso' ), 'manage_options', 'lasso-editor', '', LASSO_URL.'/admin/assets/img/menu-icon.png' );
49
-		add_submenu_page( 'lasso-editor', __( 'Welcome', 'lasso' ), __( 'Status', 'lasso' ), 'manage_options', 'lasso-editor', array( $this, 'welcome' ) );
48
+		add_menu_page(__('Editus', 'lasso'), __('Editus', 'lasso'), 'manage_options', 'lasso-editor', '', LASSO_URL.'/admin/assets/img/menu-icon.png');
49
+		add_submenu_page('lasso-editor', __('Welcome', 'lasso'), __('Status', 'lasso'), 'manage_options', 'lasso-editor', array($this, 'welcome'));
50 50
 
51 51
 	}
52 52
 
@@ -60,24 +60,24 @@  discard block
 block discarded – undo
60 60
 		?>
61 61
 		  <div class="wrap lasso--welcome">
62 62
 
63
-		  		<?php self::header();?>
63
+		  		<?php self::header(); ?>
64 64
 
65 65
 		  		<ul class="lasso--welcome__steps">
66 66
 
67 67
 		  		<?php // CHANGED Added the is_network_admin condition. ?>
68
-			  		<?php if ( is_network_admin() ) : ?>
68
+			  		<?php if (is_network_admin()) : ?>
69 69
 
70 70
 			  			<li>
71
-			  				<p><?php _e( 'We will check the current theme on every site in your network and give you a quick status feedback here. You can see the status by visiting the Editus menu on each site.', 'lasso' );?></p>
71
+			  				<p><?php _e('We will check the current theme on every site in your network and give you a quick status feedback here. You can see the status by visiting the Editus menu on each site.', 'lasso'); ?></p>
72 72
 			  			</li>
73 73
 
74 74
 			  		<?php else :
75 75
 
76 76
 					$checks = self::lasso_preflight_check();
77 77
 
78
-					if ( $checks && !defined( 'LASSO_AGENCY_MODE' ) ):
78
+					if ($checks && !defined('LASSO_AGENCY_MODE')):
79 79
 
80
-						foreach ( (array) $checks as $key => $check ) {
80
+						foreach ((array) $checks as $key => $check) {
81 81
 
82 82
 							echo $check;
83 83
 						}
@@ -87,11 +87,11 @@  discard block
 block discarded – undo
87 87
 							// pre-flight is go for flight
88 88
 						?>
89 89
 						<li class="success">
90
-							<h3><?php _e( 'You\'re Ready to Rock!', 'lasso' );?></h3>
91
-							<?php if ( lasso_get_supported_theme_class() ) { ?>
92
-							<p><?php _e( 'Your theme is automatically supported. No additional setup is needed.', 'lasso' );?></p>
90
+							<h3><?php _e('You\'re Ready to Rock!', 'lasso'); ?></h3>
91
+							<?php if (lasso_get_supported_theme_class()) { ?>
92
+							<p><?php _e('Your theme is automatically supported. No additional setup is needed.', 'lasso'); ?></p>
93 93
 							<?php } ?>
94
-			  				<p><?php _e( 'Editus will place a small menu on the bottom of your site. While on a single post or page, click the "pen" icon to go into edit mode. Press escape to get out of edit mode.', 'lasso' );?></p>
94
+			  				<p><?php _e('Editus will place a small menu on the bottom of your site. While on a single post or page, click the "pen" icon to go into edit mode. Press escape to get out of edit mode.', 'lasso'); ?></p>
95 95
 			  			</li>
96 96
 			  			<?php
97 97
 			  			endif;
@@ -113,16 +113,16 @@  discard block
 block discarded – undo
113 113
 
114 114
 	  		<div class="lasso--welcome__top">
115 115
 
116
-	  			<img style="width:125px;" src="<?php echo LASSO_URL.'/admin/assets/img/logo.png';?>">
117
-	    		<h1><?php _e( 'Welcome to Editus', 'lasso' );?></h1>
118
-	    		<p><?php _e( 'Version', 'lasso' );echo '<span> '.LASSO_VERSION.'</span>';?></p>
116
+	  			<img style="width:125px;" src="<?php echo LASSO_URL.'/admin/assets/img/logo.png'; ?>">
117
+	    		<h1><?php _e('Welcome to Editus', 'lasso'); ?></h1>
118
+	    		<p><?php _e('Version', 'lasso'); echo '<span> '.LASSO_VERSION.'</span>'; ?></p>
119 119
 
120
-	    		<?php if ( !defined( 'LASSO_AGENCY_MODE' ) ): ?>
120
+	    		<?php if (!defined('LASSO_AGENCY_MODE')): ?>
121 121
 
122 122
 			    	<ul class="lasso--welcome__social">
123
-			    		<li><a href="https://edituswp.com/help" target="_blank"><i class="dashicons dashicons-sos"></i> <?php _e( 'Help', 'lasso' );?></a></li>
124
-			    		<li><a href="http://twitter.com/aesopinteractiv" target="_blank"><i class="dashicons dashicons-twitter"></i> <?php _e( 'Twitter', 'lasso' );?></a></li>
125
-			    		<li><a href="http://facebook.com/aesopinteractive" target="_blank"><i class="dashicons dashicons-facebook"></i> <?php _e( 'Facebook', 'lasso' );?></a></li>
123
+			    		<li><a href="https://edituswp.com/help" target="_blank"><i class="dashicons dashicons-sos"></i> <?php _e('Help', 'lasso'); ?></a></li>
124
+			    		<li><a href="http://twitter.com/aesopinteractiv" target="_blank"><i class="dashicons dashicons-twitter"></i> <?php _e('Twitter', 'lasso'); ?></a></li>
125
+			    		<li><a href="http://facebook.com/aesopinteractive" target="_blank"><i class="dashicons dashicons-facebook"></i> <?php _e('Facebook', 'lasso'); ?></a></li>
126 126
 			    	</ul>
127 127
 
128 128
 			    <?php endif; ?>
@@ -139,68 +139,68 @@  discard block
 block discarded – undo
139 139
 	 */
140 140
 	function lasso_preflight_check() {
141 141
 
142
-		$notices 		= array();
142
+		$notices = array();
143 143
 
144
-		$article_object = lasso_editor_get_option( 'article_class', 'lasso_editor' );
144
+		$article_object = lasso_editor_get_option('article_class', 'lasso_editor');
145 145
 
146
-		$theme_name  	= wp_get_theme()->get('Name');
147
-		$theme_class  	= lasso_get_supported_theme_class();
146
+		$theme_name = wp_get_theme()->get('Name');
147
+		$theme_class = lasso_get_supported_theme_class();
148 148
 
149
-		$license   		= get_option( 'lasso_license_key' );
150
-		$status   		= get_option( 'lasso_license_status' );
149
+		$license = get_option('lasso_license_key');
150
+		$status = get_option('lasso_license_status');
151 151
 		
152 152
 		// Gutenberg Not Supported
153
-		if( function_exists( 'is_gutenberg_page' )) {
153
+		if (function_exists('is_gutenberg_page')) {
154 154
 			$notices[] = '<li class="info"><h3>Gutenberg Not Supported.</h3>
155
-							<p>'.__( 'Currently Editus does not support Gutenberg. It will be disabled on Gutenberg enabled posts.', 'lasso' ).'</p>
155
+							<p>'.__('Currently Editus does not support Gutenberg. It will be disabled on Gutenberg enabled posts.', 'lasso').'</p>
156 156
 							</li>';
157 157
 		}
158 158
 
159 159
 		// if the required CSS class has not been saved and we're not a supported theme
160
-		if ( empty( $article_object ) && false == $theme_class ) {
160
+		if (empty($article_object) && false == $theme_class) {
161 161
 
162 162
 			// we dont automatically support this theme so show them otherwise
163 163
 			$notices[] = sprintf('<li class="error">
164
-							<h3>'.__( 'Article CSS Class Needed!', 'lasso' ).'</h3>
165
-							<p>'.__( 'Before using Editus,', 'lasso' ).' <a href="%s">'.__( 'enter and save', 'lasso' ).'</a> '.__( 'the CSS class of the container that holds your post and page content. You can <a href="https://dl.dropboxusercontent.com/u/5594632/lasso-media/doc-movies/using-inspector-lasso.gif" target="_blank">use a tool like inspector</a> in Chrome or Firefox to find this CSS class, or ', 'lasso' ).' <a href="mailto:[email protected]">'.__( 'email us.', 'lasso' ).'</a> '.__( 'with a link to a public URL with the theme and we\'ll find it for you.', 'lasso' ).'</p>
166
-							</li>', admin_url( 'admin.php?page=lasso-editor-settings' ) );
164
+							<h3>'.__('Article CSS Class Needed!', 'lasso').'</h3>
165
+							<p>'.__('Before using Editus,', 'lasso').' <a href="%s">'.__('enter and save', 'lasso').'</a> '.__('the CSS class of the container that holds your post and page content. You can <a href="https://dl.dropboxusercontent.com/u/5594632/lasso-media/doc-movies/using-inspector-lasso.gif" target="_blank">use a tool like inspector</a> in Chrome or Firefox to find this CSS class, or ', 'lasso').' <a href="mailto:[email protected]">'.__('email us.', 'lasso').'</a> '.__('with a link to a public URL with the theme and we\'ll find it for you.', 'lasso').'</p>
166
+							</li>', admin_url('admin.php?page=lasso-editor-settings'));
167 167
 		}
168 168
 
169 169
 		// WP REST API not active
170
-		if ( !function_exists( 'json_get_url_prefix' ) &&  !function_exists( 'rest_url' )) {
170
+		if (!function_exists('json_get_url_prefix') && !function_exists('rest_url')) {
171 171
 			$notices[] = '<li class="info"><h3>WP REST API not Activated!</h3>
172
-							<p>'.__( 'Just a heads up that the WP REST API isn\'t activated. This is required to list the posts and pages on the front-end.', 'lasso' ).'</p>
172
+							<p>'.__('Just a heads up that the WP REST API isn\'t activated. This is required to list the posts and pages on the front-end.', 'lasso').'</p>
173 173
 							</li>';
174 174
 		}
175 175
 
176 176
 		// aesop story engine isnt active
177
-		if ( !class_exists( 'Aesop_Core' ) ) {
178
-			$notices[] = sprintf( '<li class="info"><h3>Aesop Story Engine not Activated!</h3>
179
-							<p>'.__( 'Just a heads up that ', 'lasso' ).'<a href="%s" target="_blank
180
-							">'.__( 'Aesop Story Engine', 'lasso' ).'</a> '.__( 'isn\'t activated. It\'s not required to use Editus, but you won\'t get the cool drag and drop components without it activated. It\'s free!', 'lasso' ).'</p>
181
-							</li>', admin_url('plugin-install.php?tab=search&s=aesop+story+engine') );
177
+		if (!class_exists('Aesop_Core')) {
178
+			$notices[] = sprintf('<li class="info"><h3>Aesop Story Engine not Activated!</h3>
179
+							<p>'.__('Just a heads up that ', 'lasso').'<a href="%s" target="_blank
180
+							">'.__('Aesop Story Engine', 'lasso').'</a> '.__('isn\'t activated. It\'s not required to use Editus, but you won\'t get the cool drag and drop components without it activated. It\'s free!', 'lasso').'</p>
181
+							</li>', admin_url('plugin-install.php?tab=search&s=aesop+story+engine'));
182 182
 		}
183 183
 
184 184
 		// we dont really get along with wp side comments because of the section ids that get applied dynamically. since we save our html, it'll get saved along with the post as HTML
185
-		if ( class_exists( 'WP_Side_Comments' ) ) {
186
-			$notices[] = '<li class="error"><h3>'.__( 'WP Side Comments Compatibility Warning!', 'lasso' ).'</h3>
187
-							<p>'.__( 'Since Editus saves the HTML of a post, this may cause undesired issues. We\'re working to resolve incompatibilities faster than a jack rabbit in a hot greasy griddle in the middle of August.', 'lasso' ).'</p>
185
+		if (class_exists('WP_Side_Comments')) {
186
+			$notices[] = '<li class="error"><h3>'.__('WP Side Comments Compatibility Warning!', 'lasso').'</h3>
187
+							<p>'.__('Since Editus saves the HTML of a post, this may cause undesired issues. We\'re working to resolve incompatibilities faster than a jack rabbit in a hot greasy griddle in the middle of August.', 'lasso').'</p>
188 188
 							</li>';
189 189
 		}
190 190
 
191 191
 		// if the license key isnt activated
192
-		if ( empty( $license ) ) {
193
-			$notices[] = '<li class="info"><h3>'.__( 'License Key Not Activated', 'lasso' ).'</h3>
194
-							<p>'.__( 'Just a heads up, your license key isn\'t activated. Enter your license key into the License tab on the left in order to receive plugin update notifications.', 'lasso' ).'</p>
192
+		if (empty($license)) {
193
+			$notices[] = '<li class="info"><h3>'.__('License Key Not Activated', 'lasso').'</h3>
194
+							<p>'.__('Just a heads up, your license key isn\'t activated. Enter your license key into the License tab on the left in order to receive plugin update notifications.', 'lasso').'</p>
195 195
 							</li>';
196 196
 		}
197
-		if ( !empty( $license ) && 'invalid' == $status ) {
198
-			$notices[] = '<li class="error"><h3>'.__( 'License Key Invalid', 'lasso' ).'</h3>
199
-							<p>'.__( 'The license key that you entered is ', 'lasso' ).'<strong>'.__( 'invalid', 'lasso' ).'</strong>'.__( '. It may have been entered incorreclty, or may have expired.', 'lasso' ).'</p>
197
+		if (!empty($license) && 'invalid' == $status) {
198
+			$notices[] = '<li class="error"><h3>'.__('License Key Invalid', 'lasso').'</h3>
199
+							<p>'.__('The license key that you entered is ', 'lasso').'<strong>'.__('invalid', 'lasso').'</strong>'.__('. It may have been entered incorreclty, or may have expired.', 'lasso').'</p>
200 200
 							</li>';
201 201
 		}
202 202
 
203
-		return apply_filters( 'lasso_preflight_notices', $notices );
203
+		return apply_filters('lasso_preflight_notices', $notices);
204 204
 
205 205
 	}
206 206
 
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 	    $plugins = array(
215 215
 
216 216
 	        array(
217
-	            'name'      => __('Aesop Story Engine','lasso'),
217
+	            'name'      => __('Aesop Story Engine', 'lasso'),
218 218
 	            'slug'      => 'aesop-story-engine',
219 219
 	            'required'  => false,
220 220
 	        ),
@@ -222,38 +222,38 @@  discard block
 block discarded – undo
222 222
 	    );
223 223
 
224 224
 	    $config = array(
225
-	        'default_path' => '',                      // Default absolute path to pre-packaged plugins.
225
+	        'default_path' => '', // Default absolute path to pre-packaged plugins.
226 226
 	        'menu'         => 'lasso-install-plugins', // Menu slug.
227
-	        'has_notices'  => true,                    // Show admin notices or not.
228
-	        'dismissable'  => true,                    // If false, a user cannot dismiss the nag message.
229
-	        'dismiss_msg'  => '',                      // If 'dismissable' is false, this message will be output at top of nag.
230
-	        'is_automatic' => false,                   // Automatically activate plugins after installation or not.
231
-	        'message'      => '',                      // Message to output right before the plugins table.
227
+	        'has_notices'  => true, // Show admin notices or not.
228
+	        'dismissable'  => true, // If false, a user cannot dismiss the nag message.
229
+	        'dismiss_msg'  => '', // If 'dismissable' is false, this message will be output at top of nag.
230
+	        'is_automatic' => false, // Automatically activate plugins after installation or not.
231
+	        'message'      => '', // Message to output right before the plugins table.
232 232
 	        'strings'      => array(
233
-	            'page_title'                      => __( 'Install Required Plugins', 'lasso' ),
234
-	            'menu_title'                      => __( 'Install Plugins', 'lasso' ),
235
-	            'installing'                      => __( 'Installing Plugin: %s', 'lasso' ), // %s = plugin name.
236
-	            'oops'                            => __( 'Something went wrong with the plugin API.', 'lasso' ),
237
-	            'notice_can_install_required'     => _n_noop( 'This plugin requires the following plugin: %1$s.', 'This plugin requires the following plugins: %1$s.' ), // %1$s = plugin name(s).
238
-	            'notice_can_install_recommended'  => _n_noop( 'This plugin recommends the following plugin: %1$s.', 'This plugin recommends the following plugins: %1$s.' ), // %1$s = plugin name(s).
239
-	            'notice_cannot_install'           => _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.' ), // %1$s = plugin name(s).
240
-	            'notice_can_activate_required'    => _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s).
241
-	            'notice_can_activate_recommended' => _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s).
242
-	            'notice_cannot_activate'          => _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.' ), // %1$s = plugin name(s).
243
-	            'notice_ask_to_update'            => _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this plugin: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this plugin: %1$s.' ), // %1$s = plugin name(s).
244
-	            'notice_cannot_update'            => _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.' ), // %1$s = plugin name(s).
245
-	            'install_link'                    => _n_noop( 'Begin installing plugin', 'Begin installing plugins' ),
246
-	            'activate_link'                   => _n_noop( 'Begin activating plugin', 'Begin activating plugins' ),
247
-	            'return'                          => __( 'Return to Required Plugins Installer', 'lasso' ),
248
-	            'plugin_activated'                => __( 'Plugin activated successfully.', 'lasso' ),
249
-	            'complete'                        => __( 'All plugins installed and activated successfully. %s', 'lasso' ), // %s = dashboard link.
233
+	            'page_title'                      => __('Install Required Plugins', 'lasso'),
234
+	            'menu_title'                      => __('Install Plugins', 'lasso'),
235
+	            'installing'                      => __('Installing Plugin: %s', 'lasso'), // %s = plugin name.
236
+	            'oops'                            => __('Something went wrong with the plugin API.', 'lasso'),
237
+	            'notice_can_install_required'     => _n_noop('This plugin requires the following plugin: %1$s.', 'This plugin requires the following plugins: %1$s.'), // %1$s = plugin name(s).
238
+	            'notice_can_install_recommended'  => _n_noop('This plugin recommends the following plugin: %1$s.', 'This plugin recommends the following plugins: %1$s.'), // %1$s = plugin name(s).
239
+	            'notice_cannot_install'           => _n_noop('Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.'), // %1$s = plugin name(s).
240
+	            'notice_can_activate_required'    => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), // %1$s = plugin name(s).
241
+	            'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), // %1$s = plugin name(s).
242
+	            'notice_cannot_activate'          => _n_noop('Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.'), // %1$s = plugin name(s).
243
+	            'notice_ask_to_update'            => _n_noop('The following plugin needs to be updated to its latest version to ensure maximum compatibility with this plugin: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this plugin: %1$s.'), // %1$s = plugin name(s).
244
+	            'notice_cannot_update'            => _n_noop('Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.'), // %1$s = plugin name(s).
245
+	            'install_link'                    => _n_noop('Begin installing plugin', 'Begin installing plugins'),
246
+	            'activate_link'                   => _n_noop('Begin activating plugin', 'Begin activating plugins'),
247
+	            'return'                          => __('Return to Required Plugins Installer', 'lasso'),
248
+	            'plugin_activated'                => __('Plugin activated successfully.', 'lasso'),
249
+	            'complete'                        => __('All plugins installed and activated successfully. %s', 'lasso'), // %s = dashboard link.
250 250
 	            'nag_type'                        => 'updated' // Determines admin notice type - can only be 'updated', 'update-nag' or 'error'.
251 251
 	        )
252 252
 	    );
253 253
 		
254
-		$plugins = apply_filters( 'lasso_required_plugins', $plugins );
254
+		$plugins = apply_filters('lasso_required_plugins', $plugins);
255 255
 
256
-	    tgmpa( $plugins, $config );
256
+	    tgmpa($plugins, $config);
257 257
 
258 258
 	}
259 259
 }
Please login to merge, or discard this patch.
public/includes/editor-modules.php 1 patch
Spacing   +247 added lines, -247 removed lines patch added patch discarded remove patch
@@ -11,39 +11,39 @@  discard block
 block discarded – undo
11 11
  *
12 12
  * @since 1.0
13 13
  */
14
-add_action( 'wp_footer', 'lasso_editor_controls' );
14
+add_action('wp_footer', 'lasso_editor_controls');
15 15
 function lasso_editor_controls() {
16 16
 
17 17
 	global $post;
18 18
 
19
-	if ( lasso_user_can('edit_posts') ) {
19
+	if (lasso_user_can('edit_posts')) {
20 20
 
21
-		$status = get_post_status( get_the_ID() );
22
-		$use_old_ui   = lasso_editor_get_option( 'use_old_ui', 'lasso_editor' );
23
-		$button_color1 = lasso_editor_get_option('button-color1', 'lasso_editor','#0000ff');
24
-		$button_color2 = lasso_editor_get_option('button-color2', 'lasso_editor','#000000');
25
-		$dialog_color = lasso_editor_get_option('dialog-color', 'lasso_editor','#000055');
26
-		$text_color = lasso_editor_get_option('text-color', 'lasso_editor','#ffffff');
21
+		$status = get_post_status(get_the_ID());
22
+		$use_old_ui   = lasso_editor_get_option('use_old_ui', 'lasso_editor');
23
+		$button_color1 = lasso_editor_get_option('button-color1', 'lasso_editor', '#0000ff');
24
+		$button_color2 = lasso_editor_get_option('button-color2', 'lasso_editor', '#000000');
25
+		$dialog_color = lasso_editor_get_option('dialog-color', 'lasso_editor', '#000055');
26
+		$text_color = lasso_editor_get_option('text-color', 'lasso_editor', '#ffffff');
27 27
 		$hover_color1 = lasso_editor_adjustBrightness($button_color1, 50);
28 28
 		$hover_color2 = lasso_editor_adjustBrightness($button_color2, 50);
29 29
 
30 30
 		// let users add custom css classes
31
-		$custom_classes = apply_filters( 'lasso_control_classes', '' );
31
+		$custom_classes = apply_filters('lasso_control_classes', '');
32 32
 
33 33
 		$post_access_class   = '';
34
-		$post_new_disabled   = lasso_editor_get_option( 'post_adding_disabled', 'lasso_editor' );
35
-		$post_settings_disabled = lasso_editor_get_option( 'post_settings_disabled', 'lasso_editor' );
36
-		$shortcodify_disabled = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
34
+		$post_new_disabled   = lasso_editor_get_option('post_adding_disabled', 'lasso_editor');
35
+		$post_settings_disabled = lasso_editor_get_option('post_settings_disabled', 'lasso_editor');
36
+		$shortcodify_disabled = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor');
37 37
 
38 38
 
39 39
 		// CSS class if adding new post objects is disabled
40
-		if ( 'on' == $post_new_disabled ) { $post_access_class = 'lasso--post-new-disabled'; }
40
+		if ('on' == $post_new_disabled) { $post_access_class = 'lasso--post-new-disabled'; }
41 41
 
42 42
 		// CSS class if adjust settings is disabled
43
-		if ( 'on' == $post_settings_disabled ) { $post_access_class = 'lasso--post-settings-disabled'; }
43
+		if ('on' == $post_settings_disabled) { $post_access_class = 'lasso--post-settings-disabled'; }
44 44
 
45 45
 		// CSS class if adding new post objects AND settings are disabled
46
-		if ( 'on' == $post_new_disabled && 'on' == $post_settings_disabled ) { $post_access_class = 'lasso--post-all-disabled'; }
46
+		if ('on' == $post_new_disabled && 'on' == $post_settings_disabled) { $post_access_class = 'lasso--post-all-disabled'; }
47 47
 
48 48
 		// CSS class if shortcodify or (Aesop Shortcode Conversion) is disabled
49 49
 		$sc_saving_class = 'on' == $shortcodify_disabled ? 'shortcodify-disabled' : 'shortcodify-enabled';
@@ -60,29 +60,29 @@  discard block
 block discarded – undo
60 60
 		?>
61 61
 		<style>
62 62
 		.lasso-editor-controls--wrap, #lasso--post-settings2,#lasso--save,#lasso--exit,#lasso--publish {
63
-			background-image: -webkit-linear-gradient(top,<?php echo $button_color1;?> 0,<?php echo $button_color2;?> 100%);
64
-			background-image: -o-linear-gradient(top,<?php echo $button_color1;?> 0,<?php echo $button_color2;?> 100%);
65
-			background-image: linear-gradient(to bottom,<?php echo $button_color1;?> 0,<?php echo $button_color2;?> 100%);
66
-			color: <?php echo $text_color;?>;
63
+			background-image: -webkit-linear-gradient(top,<?php echo $button_color1; ?> 0,<?php echo $button_color2; ?> 100%);
64
+			background-image: -o-linear-gradient(top,<?php echo $button_color1; ?> 0,<?php echo $button_color2; ?> 100%);
65
+			background-image: linear-gradient(to bottom,<?php echo $button_color1; ?> 0,<?php echo $button_color2; ?> 100%);
66
+			color: <?php echo $text_color; ?>;
67 67
 		}
68 68
 		
69 69
 		.lasso--controls__right a:before, #lasso-toolbar--html__footer_desc {
70
-			color: <?php echo $text_color;?> !important;
70
+			color: <?php echo $text_color; ?> !important;
71 71
 		}
72 72
 		
73 73
 		ul.lasso-editor-controls li:hover, #lasso--exit:hover,#lasso--post-settings2:hover,#lasso--publish:hover,#lasso--save:hover {
74
-			background-image: -webkit-linear-gradient(top,<?php echo $hover_color1;?> 0,<?php echo $hover_color2;?> 100%);
75
-			background-image: -o-linear-gradient(top,<?php echo $hover_color1;?> 0,<?php echo $hover_color2;?> 100%);
76
-			background-image: linear-gradient(to bottom,<?php echo $hover_color1;?> 0,<?php echo $hover_color2;?> 100%);
74
+			background-image: -webkit-linear-gradient(top,<?php echo $hover_color1; ?> 0,<?php echo $hover_color2; ?> 100%);
75
+			background-image: -o-linear-gradient(top,<?php echo $hover_color1; ?> 0,<?php echo $hover_color2; ?> 100%);
76
+			background-image: linear-gradient(to bottom,<?php echo $hover_color1; ?> 0,<?php echo $hover_color2; ?> 100%);
77 77
 		}
78 78
 		
79 79
 		.lasso--modal__inner,.sweet-alert,#lasso-toolbar--components.toolbar--drop-up ul,#lasso-toolbar--components__list,#lasso-toolbar--html.html--drop-up #lasso-toolbar--html__wrap,
80 80
 		#lasso-toolbar--link.link--drop-up #lasso-toolbar--link__wrap		{
81
-			background: <?php echo $dialog_color;?>;
82
-			color: <?php echo $text_color;?>;
81
+			background: <?php echo $dialog_color; ?>;
82
+			color: <?php echo $text_color; ?>;
83 83
 		}
84 84
 		.sweet-alert p,.lasso--modal__inner label,.lasso--toolbar__inner label {
85
-			color: <?php echo $text_color;?> !important;
85
+			color: <?php echo $text_color; ?> !important;
86 86
 		}
87 87
 		
88 88
 		<?php if (!$is_mobile) {?>
@@ -108,47 +108,47 @@  discard block
 block discarded – undo
108 108
 		</style>
109 109
 		<?php
110 110
 		} ?>
111
-		<div id="lasso--controls" class="lasso-post-status--<?php echo sanitize_html_class( $status );?> <?php echo sanitize_html_class( $custom_classes );?>" data-post-id="<?php echo get_the_ID();?>" >
111
+		<div id="lasso--controls" class="lasso-post-status--<?php echo sanitize_html_class($status); ?> <?php echo sanitize_html_class($custom_classes); ?>" data-post-id="<?php echo get_the_ID(); ?>" >
112 112
 
113
-			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class;?> "  <?php echo $mobile_style ?> >
113
+			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class; ?> "  <?php echo $mobile_style ?> >
114 114
 
115
-				<?php do_action( 'lasso_editor_controls_before' );
115
+				<?php do_action('lasso_editor_controls_before');
116 116
 
117
-				if ( $is_capable ) { ?>
117
+				if ($is_capable) { ?>
118 118
 
119
-					<li id="lasso--edit" title="<?php esc_attr_e( 'Edit Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
119
+					<li id="lasso--edit" title="<?php esc_attr_e('Edit Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
120 120
 
121
-					<?php if ( 'off' == $post_settings_disabled || empty( $post_settings_disabled ) ) { ?>
122
-						<li id="lasso--post-settings" title="<?php esc_attr_e( 'Post Settings', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
121
+					<?php if ('off' == $post_settings_disabled || empty($post_settings_disabled)) { ?>
122
+						<li id="lasso--post-settings" title="<?php esc_attr_e('Post Settings', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
123 123
 					<?php }
124 124
 
125 125
 				} ?>
126 126
 
127
-				<li id="lasso--post-all" title="<?php esc_attr_e( 'All Posts', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
127
+				<li id="lasso--post-all" title="<?php esc_attr_e('All Posts', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
128 128
 
129
-				<?php if ( $is_capable && wp_revisions_enabled( $post ) ) { ?>
130
-					<li id="lasso--post-revisions" title="<?php esc_attr_e( 'Revisions', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
129
+				<?php if ($is_capable && wp_revisions_enabled($post)) { ?>
130
+					<li id="lasso--post-revisions" title="<?php esc_attr_e('Revisions', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
131 131
 				<?php } ?>
132 132
 
133
-				<?php if ( ( 'off' == $post_new_disabled || empty( $post_new_disabled ) && lasso_user_can('edit_posts') ) ) { ?>
134
-					<li id="lasso--post-new" title="<?php esc_attr_e( 'Add Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
133
+				<?php if (('off' == $post_new_disabled || empty($post_new_disabled) && lasso_user_can('edit_posts'))) { ?>
134
+					<li id="lasso--post-new" title="<?php esc_attr_e('Add Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
135 135
 				<?php } ?>
136 136
 
137
-				<?php do_action( 'lasso_editor_controls_after' );?>
137
+				<?php do_action('lasso_editor_controls_after'); ?>
138 138
 
139 139
 			</ul>
140 140
 
141
-			<?php if ( is_singular() && !$is_mobile ) { ?>
141
+			<?php if (is_singular() && !$is_mobile) { ?>
142 142
 
143
-				<div class="lasso--controls__right" data-posttype="<?php echo get_post_type( get_the_ID() );?>" data-status="<?php echo $status;?>">
143
+				<div class="lasso--controls__right" data-posttype="<?php echo get_post_type(get_the_ID()); ?>" data-status="<?php echo $status; ?>">
144 144
 				
145
-				<a href="#" title="<?php esc_attr_e( 'Post Settings', 'lasso' );?>" id="lasso--post-settings2" class="lasso-save-post lasso--button <?php echo $sc_saving_class;?>"></a>
145
+				<a href="#" title="<?php esc_attr_e('Post Settings', 'lasso'); ?>" id="lasso--post-settings2" class="lasso-save-post lasso--button <?php echo $sc_saving_class; ?>"></a>
146 146
 
147 147
 
148
-					<a href="#" title="<?php esc_attr_e( 'Save Post', 'lasso' );?>" id="lasso--save" class="lasso-save-post lasso--button <?php echo $sc_saving_class;?>"></a>
148
+					<a href="#" title="<?php esc_attr_e('Save Post', 'lasso'); ?>" id="lasso--save" class="lasso-save-post lasso--button <?php echo $sc_saving_class; ?>"></a>
149 149
 
150
-					<?php if ( ('draft' == $status ) || ('pending' == $status && $can_publish) ) { ?>
151
-						<a href="#" title="<?php $can_publish ? esc_attr_e( 'Publish Post', 'lasso' ) : esc_attr_e( 'Submit For Review', 'lasso' );?>" id="lasso--publish" class="lasso-publish-post lasso--button <?php echo $sc_saving_class;?>"></a>
150
+					<?php if (('draft' == $status) || ('pending' == $status && $can_publish)) { ?>
151
+						<a href="#" title="<?php $can_publish ? esc_attr_e('Publish Post', 'lasso') : esc_attr_e('Submit For Review', 'lasso'); ?>" id="lasso--publish" class="lasso-publish-post lasso--button <?php echo $sc_saving_class; ?>"></a>
152 152
 					<?php } ?>
153 153
 
154 154
 				</div>
@@ -173,9 +173,9 @@  discard block
 block discarded – undo
173 173
 
174 174
 
175 175
 	// let users add custom css classes
176
-	$custom_classes = apply_filters( 'lasso_sidebar_classes', '' );
176
+	$custom_classes = apply_filters('lasso_sidebar_classes', '');
177 177
 	?>
178
-	<div id="lasso--sidebar" class="<?php echo sanitize_html_class( $custom_classes );?>" >
178
+	<div id="lasso--sidebar" class="<?php echo sanitize_html_class($custom_classes); ?>" >
179 179
 		<div class="lasso--sidebar__inner">
180 180
 			<div id="lasso--component__settings"></div>
181 181
 		</div>
@@ -197,20 +197,20 @@  discard block
 block discarded – undo
197 197
 	$is_mobile = wp_is_mobile();
198 198
 
199 199
 	// check for lasso story engine and add a class doniting this
200
-	$ase_status = class_exists( 'Aesop_Core' ) || defined( 'LASSO_CUSTOM' ) ? 'ase-active' : 'ase-not-active';
200
+	$ase_status = class_exists('Aesop_Core') || defined('LASSO_CUSTOM') ? 'ase-active' : 'ase-not-active';
201 201
 
202 202
 	// let users add custom css classes
203
-	$custom_classes = apply_filters( 'lasso_toolbar_classes', '' );
203
+	$custom_classes = apply_filters('lasso_toolbar_classes', '');
204 204
 
205 205
 	// are toolbar headings enabled
206
-	$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
207
-	$toolbar_headings_h4      = lasso_editor_get_option( 'toolbar_headings_h4', 'lasso_editor' );
206
+	$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
207
+	$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
208 208
 
209
-	$toolbar_class  = $toolbar_headings ? 'toolbar-extended' : false;
209
+	$toolbar_class = $toolbar_headings ? 'toolbar-extended' : false;
210 210
 	
211 211
 	// mobile styles
212 212
     $mobile_class = $is_mobile ? 'lasso-mobile' : false;
213
-	$mobile_style =$is_mobile ? 'style="bottom:0px;"' : null;
213
+	$mobile_style = $is_mobile ? 'style="bottom:0px;"' : null;
214 214
 	
215 215
 	//show color
216 216
 	$show_color = lasso_editor_get_option('toolbar_show_color', 'lasso_editor');
@@ -218,109 +218,109 @@  discard block
 block discarded – undo
218 218
 	//show alignment
219 219
 	$show_align = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor');
220 220
 	
221
-	$status = get_post_status( get_the_ID() );
221
+	$status = get_post_status(get_the_ID());
222 222
 
223 223
 
224 224
 	?>
225
-	<div class="lasso--toolbar_wrap lasso-editor-controls--wrap <?php echo $toolbar_class.' '.$mobile_class.' '.$ase_status.' '.sanitize_html_class( $custom_classes );?>" <?php echo $mobile_style ?>>
226
-		<ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"';}?>>
227
-			<?php do_action( 'lasso_toolbar_components_before' );?>
228
-		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e( 'Bold', 'lasso' );?>"></li>
229
-		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e( 'Underline', 'lasso' );?>"></li>
230
-		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e( 'Italicize', 'lasso' );?>"></li>
231
-		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e( 'Strikethrough', 'lasso' );?>"></li>
232
-			<li id="lasso-toolbar--components" title="<?php esc_attr_e( 'Insert Component', 'lasso' );?>" style="color:#ffffa0;">
225
+	<div class="lasso--toolbar_wrap lasso-editor-controls--wrap <?php echo $toolbar_class.' '.$mobile_class.' '.$ase_status.' '.sanitize_html_class($custom_classes); ?>" <?php echo $mobile_style ?>>
226
+		<ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"'; }?>>
227
+			<?php do_action('lasso_toolbar_components_before'); ?>
228
+		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e('Bold', 'lasso'); ?>"></li>
229
+		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e('Underline', 'lasso'); ?>"></li>
230
+		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e('Italicize', 'lasso'); ?>"></li>
231
+		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e('Strikethrough', 'lasso'); ?>"></li>
232
+			<li id="lasso-toolbar--components" title="<?php esc_attr_e('Insert Component', 'lasso'); ?>" style="color:#ffffa0;">
233 233
 			    <ul id="lasso-toolbar--components__list" style="display:none;color:white;">
234
-			    	<?php if ( 'ase-active' == $ase_status ): ?>
235
-						<li data-type="image" title="<?php esc_attr_e( 'Image', 'lasso' );?>" class="lasso-toolbar--component__image"></li>
236
-						<li data-type="character" title="<?php esc_attr_e( 'Character', 'lasso' );?>" class="lasso-toolbar--component__character"></li>
237
-						<li data-type="quote" title="<?php esc_attr_e( 'Quote', 'lasso' );?>"  class="lasso-toolbar--component__quote"></li>
238
-						<li data-type="content" title="<?php esc_attr_e( 'Content', 'lasso' );?>"  class="lasso-toolbar--component__content"></li>
239
-						<li data-type="chapter" title="<?php esc_attr_e( 'Chapter', 'lasso' );?>"  class="lasso-toolbar--component__chapter"></li>
240
-						<li data-type="parallax" title="<?php esc_attr_e( 'Parallax', 'lasso' );?>"  class="lasso-toolbar--component__parallax"></li>
241
-						<li data-type="audio" title="<?php esc_attr_e( 'Audio', 'lasso' );?>"  class="lasso-toolbar--component__audio"></li>
242
-						<li data-type="video" title="<?php esc_attr_e( 'Video', 'lasso' );?>"  class="lasso-toolbar--component__video"></li>
243
-						<li data-type="map" title="<?php esc_attr_e( 'Map', 'lasso' );?>"  class="lasso-toolbar--component__map"></li>
244
-						<li data-type="timeline_stop" title="<?php esc_attr_e( 'Timeline', 'lasso' );?>"  class="lasso-toolbar--component__timeline"></li>
245
-						<li data-type="document" title="<?php esc_attr_e( 'Document', 'lasso' );?>"  class="lasso-toolbar--component__document"></li>
246
-						<li data-type="collection" title="<?php esc_attr_e( 'Collection', 'lasso' );?>"  class="lasso-toolbar--component__collection"></li>
247
-						<li data-type="gallery" title="<?php esc_attr_e( 'Gallery', 'lasso' );?>"  class="lasso-toolbar--component__gallery"></li>
248
-						<?php if ( class_exists ('Aesop_GalleryPop') ) { ?>
249
-						     <li data-type="gallery" title="<?php esc_attr_e( 'Gallery Pop', 'lasso' );?>"  class="lasso-toolbar--component__gallerypop"></li>
234
+			    	<?php if ('ase-active' == $ase_status): ?>
235
+						<li data-type="image" title="<?php esc_attr_e('Image', 'lasso'); ?>" class="lasso-toolbar--component__image"></li>
236
+						<li data-type="character" title="<?php esc_attr_e('Character', 'lasso'); ?>" class="lasso-toolbar--component__character"></li>
237
+						<li data-type="quote" title="<?php esc_attr_e('Quote', 'lasso'); ?>"  class="lasso-toolbar--component__quote"></li>
238
+						<li data-type="content" title="<?php esc_attr_e('Content', 'lasso'); ?>"  class="lasso-toolbar--component__content"></li>
239
+						<li data-type="chapter" title="<?php esc_attr_e('Chapter', 'lasso'); ?>"  class="lasso-toolbar--component__chapter"></li>
240
+						<li data-type="parallax" title="<?php esc_attr_e('Parallax', 'lasso'); ?>"  class="lasso-toolbar--component__parallax"></li>
241
+						<li data-type="audio" title="<?php esc_attr_e('Audio', 'lasso'); ?>"  class="lasso-toolbar--component__audio"></li>
242
+						<li data-type="video" title="<?php esc_attr_e('Video', 'lasso'); ?>"  class="lasso-toolbar--component__video"></li>
243
+						<li data-type="map" title="<?php esc_attr_e('Map', 'lasso'); ?>"  class="lasso-toolbar--component__map"></li>
244
+						<li data-type="timeline_stop" title="<?php esc_attr_e('Timeline', 'lasso'); ?>"  class="lasso-toolbar--component__timeline"></li>
245
+						<li data-type="document" title="<?php esc_attr_e('Document', 'lasso'); ?>"  class="lasso-toolbar--component__document"></li>
246
+						<li data-type="collection" title="<?php esc_attr_e('Collection', 'lasso'); ?>"  class="lasso-toolbar--component__collection"></li>
247
+						<li data-type="gallery" title="<?php esc_attr_e('Gallery', 'lasso'); ?>"  class="lasso-toolbar--component__gallery"></li>
248
+						<?php if (class_exists('Aesop_GalleryPop')) { ?>
249
+						     <li data-type="gallery" title="<?php esc_attr_e('Gallery Pop', 'lasso'); ?>"  class="lasso-toolbar--component__gallerypop"></li>
250 250
 						<?php }?>
251
-						<?php if ( class_exists ('Aesop_Events') ) { ?>
252
-						     <li data-type="events" title="<?php esc_attr_e( 'Event', 'lasso' );?>"  class="lasso-toolbar--component__event"></li>
251
+						<?php if (class_exists('Aesop_Events')) { ?>
252
+						     <li data-type="events" title="<?php esc_attr_e('Event', 'lasso'); ?>"  class="lasso-toolbar--component__event"></li>
253 253
 						<?php }?>
254 254
 					<?php else: ?>
255
-						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );?>" class="image lasso-toolbar--component__image"></li>
256
-						<li data-type="wpquote" title="<?php esc_attr_e( 'WordPress Quote', 'lasso' );?>" class="quote lasso-toolbar--component__quote"></li>
257
-						<!--li data-type="wpvideo" title="<?php esc_attr_e( 'WordPress Video', 'lasso' );?>" class="video lasso-toolbar--component__video"></li-->
255
+						<li data-type="wpimg" title="<?php esc_attr_e('WordPress Image', 'lasso'); ?>" class="image lasso-toolbar--component__image"></li>
256
+						<li data-type="wpquote" title="<?php esc_attr_e('WordPress Quote', 'lasso'); ?>" class="quote lasso-toolbar--component__quote"></li>
257
+						<!--li data-type="wpvideo" title="<?php esc_attr_e('WordPress Video', 'lasso'); ?>" class="video lasso-toolbar--component__video"></li-->
258 258
 					<?php endif; ?>
259
-					<?php do_action( 'lasso_toolbar_components' );?>
259
+					<?php do_action('lasso_toolbar_components'); ?>
260 260
 			    </ul>
261 261
 			</li>
262
-		    <?php if ( $toolbar_headings ): ?>
263
-		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>"></li>
264
-		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>"></li>
262
+		    <?php if ($toolbar_headings): ?>
263
+		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>"></li>
264
+		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>"></li>
265 265
 			<?php endif; ?>
266
-			<?php if ( $toolbar_headings_h4 ): ?>
267
-		    <li id="lasso-toolbar--h4" title="<?php esc_attr_e( 'H4 Heading', 'lasso' );?>"></li>
268
-		    <li id="lasso-toolbar--h5" title="<?php esc_attr_e( 'H5 Heading', 'lasso' );?>"></li>
269
-			<li id="lasso-toolbar--h6" title="<?php esc_attr_e( 'H6 Heading', 'lasso' );?>"></li>
266
+			<?php if ($toolbar_headings_h4): ?>
267
+		    <li id="lasso-toolbar--h4" title="<?php esc_attr_e('H4 Heading', 'lasso'); ?>"></li>
268
+		    <li id="lasso-toolbar--h5" title="<?php esc_attr_e('H5 Heading', 'lasso'); ?>"></li>
269
+			<li id="lasso-toolbar--h6" title="<?php esc_attr_e('H6 Heading', 'lasso'); ?>"></li>
270 270
 			<?php endif; ?>
271 271
 			
272
-			<?php if ( $show_color ): ?>
273
-		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e( 'Set Color for Selected Text', 'lasso' );?>"></li>
274
-		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e( 'Choose Color', 'lasso' );?>"></li>
272
+			<?php if ($show_color): ?>
273
+		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e('Set Color for Selected Text', 'lasso'); ?>"></li>
274
+		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e('Choose Color', 'lasso'); ?>"></li>
275 275
 			<?php endif; ?>
276 276
 					
277 277
 		    
278
-			<li id="lasso-toolbar--link" title="<?php esc_attr_e( 'Anchor Link', 'lasso' );?>">
278
+			<li id="lasso-toolbar--link" title="<?php esc_attr_e('Anchor Link', 'lasso'); ?>">
279 279
 		    	<div id="lasso-toolbar--link__wrap" <?php echo $mobile_style ?> >
280
-		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'http://url.com', 'lasso' );?>"></div>
281
-		    		<a href="#" title="<?php esc_attr_e( 'Create Link', 'lasso' );?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
280
+		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e('http://url.com', 'lasso'); ?>"></div>
281
+		    		<a href="#" title="<?php esc_attr_e('Create Link', 'lasso'); ?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
282 282
 					<input class="styled-checkbox" type="checkbox" id="aesop-toolbar--link_newtab" checked/>
283
-                    <label for="aesop-toolbar--link_newtab"><?php esc_attr_e( 'Open in a New Tab', 'lasso' );?></label>
283
+                    <label for="aesop-toolbar--link_newtab"><?php esc_attr_e('Open in a New Tab', 'lasso'); ?></label>
284 284
 		    	</div>
285 285
 		    </li>
286
-		    <?php do_action( 'lasso_toolbar_components_after' );?>
287
-		    <li id="lasso-toolbar--html" title="<?php esc_attr_e( 'Insert HTML or Code', 'lasso' );?>">
286
+		    <?php do_action('lasso_toolbar_components_after'); ?>
287
+		    <li id="lasso-toolbar--html" title="<?php esc_attr_e('Insert HTML or Code', 'lasso'); ?>">
288 288
 		    	<div id="lasso-toolbar--html__wrap" <?php echo $mobile_style ?>>
289
-		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?>"></div>
289
+		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?>"></div>
290 290
 		    		<div id="lasso-toolbar--html__footer">
291 291
 					<div id="lasso-toolbar--html__footer_desc" >
292
-					<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?><br>
293
-					<?php esc_attr_e( 'You can also use Shortcodes', 'lasso' );?><br>
294
-					<?php esc_attr_e( 'You can also enter a URL to embed, such as Youtube, Vimeo and Twitter URLs.', 'lasso' );?>
292
+					<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?><br>
293
+					<?php esc_attr_e('You can also use Shortcodes', 'lasso'); ?><br>
294
+					<?php esc_attr_e('You can also enter a URL to embed, such as Youtube, Vimeo and Twitter URLs.', 'lasso'); ?>
295 295
 					</div>
296 296
 		    			<ul class="lasso-toolbar--html-snips">
297 297
 						
298
-		    				<?php if ( !$toolbar_headings ): ?>
299
-		    				<li id="lasso-html--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>">
300
-		    				<li id="lasso-html--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>">
298
+		    				<?php if (!$toolbar_headings): ?>
299
+		    				<li id="lasso-html--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>">
300
+		    				<li id="lasso-html--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>">
301 301
 		    				<?php endif; ?>
302
-		    				<li id="lasso-html--ul" title="<?php esc_attr_e( 'Unordered List', 'lasso' );?>">
303
-		    				<li id="lasso-html--ol" title="<?php esc_attr_e( 'Ordered List', 'lasso' );?>">
302
+		    				<li id="lasso-html--ul" title="<?php esc_attr_e('Unordered List', 'lasso'); ?>">
303
+		    				<li id="lasso-html--ol" title="<?php esc_attr_e('Ordered List', 'lasso'); ?>">
304 304
 		    			</ul>
305
-		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e( 'Cancel', 'lasso' );?></a>
306
-		    			<a href="#" title="<?php esc_attr_e( 'Insert HTML or Code', 'lasso' );?>" class="lasso-toolbar--html__control" id="lasso-toolbar--html__insert" ><?php _e( 'Insert', 'lasso' );?></a>
305
+		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e('Cancel', 'lasso'); ?></a>
306
+		    			<a href="#" title="<?php esc_attr_e('Insert HTML or Code', 'lasso'); ?>" class="lasso-toolbar--html__control" id="lasso-toolbar--html__insert" ><?php _e('Insert', 'lasso'); ?></a>
307 307
 		    		</div>
308 308
 		    	</div>
309 309
 		    </li>
310
-			<?php if ( $show_align ): ?>
311
-		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e( 'Text Left Align', 'lasso' );?>"></li>
312
-		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e( 'Text Center Align', 'lasso' );?>"></li>
313
-			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e( 'Text Right Align', 'lasso' );?>"></li>
310
+			<?php if ($show_align): ?>
311
+		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e('Text Left Align', 'lasso'); ?>"></li>
312
+		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e('Text Center Align', 'lasso'); ?>"></li>
313
+			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e('Text Right Align', 'lasso'); ?>"></li>
314 314
 			<?php endif; ?>
315 315
 		</ul>
316
-		<?php if ( is_singular() && $is_mobile ) { ?>
316
+		<?php if (is_singular() && $is_mobile) { ?>
317 317
 
318
-				<div class="lasso--controls__right" data-posttype="<?php echo get_post_type( get_the_ID() );?>" data-status="<?php echo $status;?>" style="position:static;bottom:0px;right;0px;left:auto;">
318
+				<div class="lasso--controls__right" data-posttype="<?php echo get_post_type(get_the_ID()); ?>" data-status="<?php echo $status; ?>" style="position:static;bottom:0px;right;0px;left:auto;">
319 319
 
320
-					<a href="#" title="<?php esc_attr_e( 'Save Post', 'lasso' );?>" id="lasso--save" class="lasso-save-post lasso--button <?php echo $sc_saving_class;?>"></a>
320
+					<a href="#" title="<?php esc_attr_e('Save Post', 'lasso'); ?>" id="lasso--save" class="lasso-save-post lasso--button <?php echo $sc_saving_class; ?>"></a>
321 321
 
322
-					<?php if ( 'draft' == $status && ( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') )  ) { ?>
323
-						<a href="#" title="<?php esc_attr_e( 'Publish Post', 'lasso' );?>" id="lasso--publish" class="lasso-publish-post lasso--button <?php echo $sc_saving_class;?>"></a>
322
+					<?php if ('draft' == $status && (lasso_user_can('publish_posts') || lasso_user_can('publish_pages'))) { ?>
323
+						<a href="#" title="<?php esc_attr_e('Publish Post', 'lasso'); ?>" id="lasso--publish" class="lasso-publish-post lasso--button <?php echo $sc_saving_class; ?>"></a>
324 324
 					<?php } ?>
325 325
 
326 326
 				</div>
@@ -338,20 +338,20 @@  discard block
 block discarded – undo
338 338
  */
339 339
 function lasso_editor_settings_toolbar() {
340 340
 
341
-	$delete_nonce = wp_create_nonce( 'lasso-delete-nonce' );
341
+	$delete_nonce = wp_create_nonce('lasso-delete-nonce');
342 342
 
343 343
 	ob_start();
344 344
 
345 345
 
346 346
 	// let users add custom css classes
347
-	$custom_classes = apply_filters( 'lasso_component_classes', '' );
347
+	$custom_classes = apply_filters('lasso_component_classes', '');
348 348
 
349 349
 	?>
350
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
351
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
352
-		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
353
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
354
-		<li class="lasso-delete" data-postid="<?php echo get_the_ID();?>" data-nonce="<?php echo $delete_nonce;?>" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
350
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
351
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
352
+		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
353
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
354
+		<li class="lasso-delete" data-postid="<?php echo get_the_ID(); ?>" data-nonce="<?php echo $delete_nonce; ?>" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
355 355
 	</ul>
356 356
 
357 357
 	<?php return ob_get_clean();
@@ -369,13 +369,13 @@  discard block
 block discarded – undo
369 369
 
370 370
 
371 371
 	// has post thumbnail
372
-	$has_thumbnail = has_post_thumbnail( get_the_ID() ) ? 'class="lasso--featImg--has-thumb"' : false;
372
+	$has_thumbnail = has_post_thumbnail(get_the_ID()) ? 'class="lasso--featImg--has-thumb"' : false;
373 373
 
374 374
 	?>
375
-	<ul id="lasso--featImgControls" <?php echo $has_thumbnail;?>>
376
-		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e( 'Replace Image', 'lasso' );?>" href="#"><i class="lasso-icon-image"></i></a></li>
377
-		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e( 'Delete Image', 'lasso' );?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
378
-		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e( 'save', 'lasso' );?></a></li>
375
+	<ul id="lasso--featImgControls" <?php echo $has_thumbnail; ?>>
376
+		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e('Replace Image', 'lasso'); ?>" href="#"><i class="lasso-icon-image"></i></a></li>
377
+		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e('Delete Image', 'lasso'); ?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
378
+		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e('save', 'lasso'); ?></a></li>
379 379
 	</ul>
380 380
 
381 381
 	<?php return ob_get_clean();
@@ -399,51 +399,51 @@  discard block
 block discarded – undo
399 399
 
400 400
 	$postid = get_the_ID();
401 401
 
402
-	$status = get_post_status( $postid );
403
-	$nonce = wp_create_nonce( 'lasso-update-post-settings' );
402
+	$status = get_post_status($postid);
403
+	$nonce = wp_create_nonce('lasso-update-post-settings');
404 404
 
405 405
 	// let users add custom css classes
406
-	$custom_classes = apply_filters( 'lasso_modal_settings_classes', '' );
406
+	$custom_classes = apply_filters('lasso_modal_settings_classes', '');
407 407
 
408 408
 	// objects categories
409
-	$categories 		= lasso_get_post_objects( $postid, 'category' );
410
-	$tags 				= lasso_get_post_objects( $postid, 'tag' );
409
+	$categories = lasso_get_post_objects($postid, 'category');
410
+	$tags = lasso_get_post_objects($postid, 'tag');
411 411
 
412 412
 	// modal tabs
413
-	$tabs  				= lasso_modal_addons('tab');
414
-	$content 			= lasso_modal_addons('content');
413
+	$tabs = lasso_modal_addons('tab');
414
+	$content = lasso_modal_addons('content');
415 415
 	
416 416
 	//editor options
417 417
 	$allow_change_date = lasso_editor_get_option('allow_change_date', 'lasso_editor');
418 418
 
419 419
 	// are we singular
420
-	$is_singular 		= is_singular();
420
+	$is_singular = is_singular();
421 421
 	$is_singular_class 	= $is_singular ? 'lasso--postsettings__2col' : 'lasso--postsettings__1col';
422 422
 	$has_thumb_class    = has_post_thumbnail() ? 'has-thumbnail' : 'no-thumbnail';
423 423
 	$theme_supports     = current_theme_supports('post-thumbnails');
424
-	$default_image 		= LASSO_URL.'/admin/assets/img/empty-img.png';
424
+	$default_image = LASSO_URL.'/admin/assets/img/empty-img.png';
425 425
 
426 426
 ?>
427
-	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>">
427
+	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>">
428 428
 		<div class="lasso--modal__inner">
429 429
 
430
-			<?php if( $tabs ) { echo $tabs; } ?>
430
+			<?php if ($tabs) { echo $tabs; } ?>
431 431
 
432 432
 			<div class="lasso--modal__content modal__content--core visible" data-addon-content="core">
433
-				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class;?>" >
433
+				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class; ?>" >
434 434
 
435
-					<?php if ( $is_singular && $theme_supports ) : ?>
435
+					<?php if ($is_singular && $theme_supports) : ?>
436 436
 					<div class="lasso--postsettings__left">
437
-						<label><?php _e( 'Featured Image', 'lasso' );?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e( 'Change the featured image for this post.', 'lasso' );?>"><i class="lasso-icon-help"></i></span></label>
438
-						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url( $default_image );?>">
437
+						<label><?php _e('Featured Image', 'lasso'); ?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e('Change the featured image for this post.', 'lasso'); ?>"><i class="lasso-icon-help"></i></span></label>
438
+						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url($default_image); ?>">
439 439
 
440 440
 							<div id="lasso--post-thumb__controls" class="lasso--post-thumb__controls">
441
-								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image','lasso');?>" class="dashicons dashicons-edit"></i>
442
-								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image','lasso');?>" class="dashicons dashicons-no-alt"></i>
441
+								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image', 'lasso'); ?>" class="dashicons dashicons-edit"></i>
442
+								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image', 'lasso'); ?>" class="dashicons dashicons-no-alt"></i>
443 443
 								<i id="lasso--save-status" class="lasso-icon lasso-icon-spinner6 not-visible"></i>
444 444
 							</div>
445 445
 
446
-							<?php echo has_post_thumbnail() ? get_the_post_thumbnail( $post->ID, 'medium' ) : '<img src="'.$default_image.'">'; ?>
446
+							<?php echo has_post_thumbnail() ? get_the_post_thumbnail($post->ID, 'medium') : '<img src="'.$default_image.'">'; ?>
447 447
 
448 448
 						</div>
449 449
 						<div id="lasso--featImgSave"><a href="#" class="not-visible">Save</a></div>
@@ -453,13 +453,13 @@  discard block
 block discarded – undo
453 453
 
454 454
 					<div class="lasso--postsettings__right">
455 455
 
456
-						<?php if( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') ): ?>
456
+						<?php if (lasso_user_can('publish_posts') || lasso_user_can('publish_pages')): ?>
457 457
 						<div class="lasso--postsettings__option story-status-option">
458
-							<label><?php _e( 'Status', 'lasso' );?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e( 'Change the status of the post to draft or publish.', 'lasso' );?>"><i class="lasso-icon-help"></i></span></label>
459
-							<ul class="story-status story-status-<?php echo sanitize_html_class( $status );?>">
460
-								<li id="lasso--status-draft"><?php _e( 'Draft', 'lasso' );?></li>
461
-								<li id="lasso--status-pending"><?php _e( 'Pending', 'lasso' );?></li>
462
-								<li id="lasso--status-publish"><?php _e( 'Publish', 'lasso' );?></li>
458
+							<label><?php _e('Status', 'lasso'); ?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e('Change the status of the post to draft or publish.', 'lasso'); ?>"><i class="lasso-icon-help"></i></span></label>
459
+							<ul class="story-status story-status-<?php echo sanitize_html_class($status); ?>">
460
+								<li id="lasso--status-draft"><?php _e('Draft', 'lasso'); ?></li>
461
+								<li id="lasso--status-pending"><?php _e('Pending', 'lasso'); ?></li>
462
+								<li id="lasso--status-publish"><?php _e('Publish', 'lasso'); ?></li>
463 463
 							</ul>
464 464
 							<div class="lasso--slider_wrap">
465 465
 								<div id="lasso--slider"></div>
@@ -467,10 +467,10 @@  discard block
 block discarded – undo
467 467
 						</div>
468 468
 						<?php endif; ?>
469 469
 
470
-						<?php if ( 'publish' == $status ): ?>
470
+						<?php if ('publish' == $status): ?>
471 471
 						<div class="lasso--postsettings__option story-slug-option">
472
-							<label><?php _e( 'Post URL', 'lasso' );?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e( 'Change the URL (slug) of this post.', 'lasso' );?>"><i class="lasso-icon-help"></i></span></label>
473
-							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset( $post ) ? esc_attr( $post->post_name ) : false;?>">
472
+							<label><?php _e('Post URL', 'lasso'); ?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e('Change the URL (slug) of this post.', 'lasso'); ?>"><i class="lasso-icon-help"></i></span></label>
473
+							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset($post) ? esc_attr($post->post_name) : false; ?>">
474 474
 						</div>
475 475
 						<?php endif; ?>
476 476
 
@@ -479,20 +479,20 @@  discard block
 block discarded – undo
479 479
 					<div class="lasso--postsettings__middle">
480 480
 
481 481
 						<div class="lasso--postsettings__option story-categories-option">
482
-							<label style="width:120px;"><?php _e( 'Categories', 'lasso' );?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e( 'Type a category name and press enter.', 'lasso' );?>"><i class="lasso-icon-help"></i></span></label>
483
-							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories;?>">
482
+							<label style="width:120px;"><?php _e('Categories', 'lasso'); ?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e('Type a category name and press enter.', 'lasso'); ?>"><i class="lasso-icon-help"></i></span></label>
483
+							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories; ?>">
484 484
 						</div>
485 485
 
486 486
 						<div class="lasso--postsettings__option story-tags-option">
487
-							<label><?php _e( 'Tags', 'lasso' );?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e( 'Type a tag name and press enter.', 'lasso' );?>"><i class="lasso-icon-help"></i></span></label>
488
-							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags;?>">
487
+							<label><?php _e('Tags', 'lasso'); ?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e('Type a tag name and press enter.', 'lasso'); ?>"><i class="lasso-icon-help"></i></span></label>
488
+							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags; ?>">
489 489
 						</div>
490 490
 						<?php 
491 491
 						if ($allow_change_date) { 
492
-						    $dateformat = get_option( 'date_format' ); 
492
+						    $dateformat = get_option('date_format'); 
493 493
 						?>
494
-						    <label><?php _e( 'Post Date', 'lasso' ); ?></label>
495
-							<input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid);?>"/>
494
+						    <label><?php _e('Post Date', 'lasso'); ?></label>
495
+							<input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid); ?>"/>
496 496
 						<?php
497 497
 						}?>
498 498
 
@@ -514,23 +514,23 @@  discard block
 block discarded – undo
514 514
 					?>
515 515
 					<!--/div-->
516 516
 
517
-					<?php do_action( 'lasso_modal_post_form' ); // action ?>
517
+					<?php do_action('lasso_modal_post_form'); // action ?>
518 518
 
519 519
 					<div class="lasso--postsettings__footer" >
520
-						<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
520
+						<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
521 521
 						<input type="hidden" name="status" value="">
522 522
 						<input type="hidden" name="categories" value="">
523
-						<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
523
+						<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
524 524
 						<input type="hidden" name="action" value="process_update-object_post">
525
-						<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
526
-						<?php do_action( 'lasso_modal_post_form_footer' ); // action ?>
527
-						<input type="submit" id="lasso--postsettings-submit" value="<?php esc_attr_e( 'Save', 'lasso' );?>">
525
+						<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
526
+						<?php do_action('lasso_modal_post_form_footer'); // action ?>
527
+						<input type="submit" id="lasso--postsettings-submit" value="<?php esc_attr_e('Save', 'lasso'); ?>">
528 528
 					</div>
529 529
 
530 530
 				</form>
531 531
 			</div>
532 532
 
533
-			<?php if( $tabs ) { echo $content; } ?>
533
+			<?php if ($tabs) { echo $content; } ?>
534 534
 
535 535
 		</div>
536 536
 
@@ -552,41 +552,41 @@  discard block
 block discarded – undo
552 552
 	ob_start();
553 553
 
554 554
 
555
-	$status = get_post_status( get_the_ID() );
555
+	$status = get_post_status(get_the_ID());
556 556
 
557
-	$nonce = wp_create_nonce( 'lasso-editor-new-post' );
557
+	$nonce = wp_create_nonce('lasso-editor-new-post');
558 558
 
559 559
 	// let users add custom css classes
560
-	$custom_classes = apply_filters( 'lasso_modal_post_classes', '' );
560
+	$custom_classes = apply_filters('lasso_modal_post_classes', '');
561 561
 
562 562
 	// return the post type
563
-	$type = get_post_type( get_the_ID() );
563
+	$type = get_post_type(get_the_ID());
564 564
 
565 565
 	$mobile_style = "";
566 566
 	if (wp_is_mobile()) {
567 567
 		$mobile_style = 'style="top:140px !important;"';
568 568
 	}
569 569
 	?>
570
-	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" <?php echo $mobile_style;?>">
570
+	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" <?php echo $mobile_style; ?>">
571 571
 		<div class="lasso--modal__inner lasso--hasnewform">
572 572
 
573 573
 			<form id="lasso--postnew__form" enctype="multipart/form-data" class="lasso--post-form">
574 574
 
575 575
 				<div class="lasso--postsettings__option story-slug-option lasso--last-option">
576
-					<label><?php esc_attr_e( 'New <span>post</span> title', 'lasso' );?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e( 'Specify title for new post, then save to edit.', 'lasso' );?>"><i class="lasso-icon-help"></i></span></label>
577
-					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e( 'Grump Wizards Make Toxic Brew', 'lasso' );?>">
576
+					<label><?php esc_attr_e('New <span>post</span> title', 'lasso'); ?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e('Specify title for new post, then save to edit.', 'lasso'); ?>"><i class="lasso-icon-help"></i></span></label>
577
+					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e('Grump Wizards Make Toxic Brew', 'lasso'); ?>">
578 578
 						<div class="lasso--select-wrap" style="width:90px">
579 579
 						<select id="lasso--select-type" name="story_type">
580 580
 
581 581
 							<?php
582 582
 								$types = lasso_post_types_names();
583
-								if ( !empty( $types ) ) {
584
-									foreach( $types as $name => $label ) {										
585
-										$type = preg_replace( '/s\b/','', $name );
583
+								if (!empty($types)) {
584
+									foreach ($types as $name => $label) {										
585
+										$type = preg_replace('/s\b/', '', $name);
586 586
 										if ($type == 'page' && !current_user_can('edit_pages')) {
587 587
 											continue;
588 588
 										}
589
-										printf( '<option value="%s">%s</option>', lcfirst( esc_attr( $type ) ) , ucfirst( esc_attr( $label ) ) );
589
+										printf('<option value="%s">%s</option>', lcfirst(esc_attr($type)), ucfirst(esc_attr($label)));
590 590
 									}
591 591
 
592 592
 								}
@@ -597,19 +597,19 @@  discard block
 block discarded – undo
597 597
 				</div>
598 598
 
599 599
 				<div class="lasso--postsettings__footer">
600
-					<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
600
+					<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
601 601
 					<input type="hidden" name="action" value="process_new-object_post">
602 602
 					<?php
603
-						if ( !empty( $types ) ) {
603
+						if (!empty($types)) {
604 604
 							// get the first element
605 605
 							$keys = array_keys($types);
606
-						    $type =$keys[0];						
607
-							$type = preg_replace( '/s\b/','', $type );
608
-							printf( '<input type="hidden" name="object" value="%s">', lcfirst( esc_attr( $type ) ) );		
606
+						    $type = $keys[0];						
607
+							$type = preg_replace('/s\b/', '', $type);
608
+							printf('<input type="hidden" name="object" value="%s">', lcfirst(esc_attr($type)));		
609 609
 						}
610 610
 					?>
611
-					<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
612
-					<input type="submit" value="<?php esc_attr_e( 'Create', 'lasso' );?>">
611
+					<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
612
+					<input type="submit" value="<?php esc_attr_e('Create', 'lasso'); ?>">
613 613
 				</div>
614 614
 
615 615
 			</form>
@@ -637,18 +637,18 @@  discard block
 block discarded – undo
637 637
 	ob_start();
638 638
 
639 639
 	// post status
640
-	$status = get_post_status( get_the_ID() );
640
+	$status = get_post_status(get_the_ID());
641 641
 
642 642
 	// let users add custom css classes
643
-	$custom_classes = apply_filters( 'lasso_modal_all_post_classes', '' );
643
+	$custom_classes = apply_filters('lasso_modal_all_post_classes', '');
644 644
 
645 645
 	?>
646
-	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" style="max-height:100%">
646
+	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" style="max-height:100%">
647 647
 		<div class="lasso--modal__inner">
648 648
 
649 649
 			<div class="lasso--post-filtering not-visible">
650 650
 				<div class="lasso--search__results">
651
-					<span id="lasso--results-found"></span><?php _e('results found','lasso');?>
651
+					<span id="lasso--results-found"></span><?php _e('results found', 'lasso'); ?>
652 652
 				</div>
653 653
 				<div class="lasso--search">
654 654
 					<i id="lasso--search__toggle" class="dashicons dashicons-search"></i>
@@ -662,18 +662,18 @@  discard block
 block discarded – undo
662 662
 				$post_types = lasso_post_types_names();
663 663
 				$rest_bases = lasso_post_types_rest_base();
664 664
 
665
-				if ( ! empty( $post_types ) ) {
665
+				if (!empty($post_types)) {
666 666
 					$first = 'active';
667
-					foreach( $post_types as $name => $label ) {
667
+					foreach ($post_types as $name => $label) {
668 668
 						if (array_key_exists($name, $rest_bases)) {
669
-							printf( '<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr( $first), esc_attr( $rest_bases[$name] ), esc_attr( $label ) );
669
+							printf('<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr($first), esc_attr($rest_bases[$name]), esc_attr($label));
670 670
 						}
671 671
 						$first = '';
672 672
 					}
673 673
 
674 674
 				}
675 675
 
676
-				do_action('lasso_modal_post_objects');?>
676
+				do_action('lasso_modal_post_objects'); ?>
677 677
 
678 678
 			</ul>
679 679
 			<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
@@ -693,14 +693,14 @@  discard block
 block discarded – undo
693 693
 
694 694
 
695 695
 	// let users add custom css classes
696
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
696
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
697 697
 
698 698
 	?>
699
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
700
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
701
-		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
702
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
703
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
699
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
700
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
701
+		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
702
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
703
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
704 704
 	</ul>
705 705
 
706 706
 	<?php return ob_get_clean();
@@ -712,14 +712,14 @@  discard block
 block discarded – undo
712 712
 
713 713
 
714 714
 	// let users add custom css classes
715
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
715
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
716 716
 
717 717
 	?>
718
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
719
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
720
-		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
721
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
722
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
718
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
719
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
720
+		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
721
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
722
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
723 723
 	</ul>
724 724
 
725 725
 	<?php return ob_get_clean();
@@ -732,16 +732,16 @@  discard block
 block discarded – undo
732 732
  */
733 733
 function lasso_map_form_footer() {
734 734
 
735
-	$nonce = wp_create_nonce( 'lasso-process-map' );
735
+	$nonce = wp_create_nonce('lasso-process-map');
736 736
 
737 737
 	ob_start();
738 738
 
739 739
 	?>
740 740
 	<div class="lasso--map-form__footer">
741
-		<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
742
-		<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
741
+		<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
742
+		<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
743 743
 		<input type="hidden" name="action" value="process_map_save">
744
-		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e( 'Save Locations', 'lasso' );?>">
744
+		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e('Save Locations', 'lasso'); ?>">
745 745
 	</div>
746 746
 
747 747
 	<?php return ob_get_clean();
@@ -759,7 +759,7 @@  discard block
 block discarded – undo
759 759
 
760 760
 	?>
761 761
 	<div id="lasso--pagerefresh" class="visible">
762
-		<?php _e( 'Save this post and refesh the page to see these changes.', 'lasso' );?>
762
+		<?php _e('Save this post and refesh the page to see these changes.', 'lasso'); ?>
763 763
 	</div>
764 764
 
765 765
 	<?php return ob_get_clean();
@@ -773,43 +773,43 @@  discard block
 block discarded – undo
773 773
  */
774 774
 function lasso_editor_options_blob() {
775 775
 
776
-	$codes   = function_exists( 'aesop_shortcodes' ) ? aesop_shortcodes() : apply_filters( 'lasso_custom_options', '' );
777
-	$galleries  = function_exists( 'lasso_editor_galleries_exist' ) && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
776
+	$codes = function_exists('aesop_shortcodes') ? aesop_shortcodes() : apply_filters('lasso_custom_options', '');
777
+	$galleries = function_exists('lasso_editor_galleries_exist') && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
778 778
 
779
-	$nonce = wp_create_nonce( 'lasso_gallery' );
779
+	$nonce = wp_create_nonce('lasso_gallery');
780 780
 
781 781
 	$blob = array();
782 782
 
783
-	if ( empty( $codes ) )
783
+	if (empty($codes))
784 784
 		return;
785 785
 
786
-	foreach ( $codes as $slug => $shortcode ) {
786
+	foreach ($codes as $slug => $shortcode) {
787 787
 		$return = '';
788 788
 		// Shortcode has atts
789 789
 
790
-		if ( count( $shortcode['atts'] ) && $shortcode['atts'] ) {
790
+		if (count($shortcode['atts']) && $shortcode['atts']) {
791 791
 
792
-			foreach ( $shortcode['atts'] as $attr_name => $attr_info ) {
792
+			foreach ($shortcode['atts'] as $attr_name => $attr_info) {
793 793
 
794 794
 
795
-				$prefix = isset( $attr_info['prefix'] ) ? sprintf( '<span class="lasso-option-prefix">%s</span>', $attr_info['prefix'] ) : null;
795
+				$prefix = isset($attr_info['prefix']) ? sprintf('<span class="lasso-option-prefix">%s</span>', $attr_info['prefix']) : null;
796 796
 
797 797
 				$return .= '<form id="lasso--component-settings-form" class="'.$galleries.'" method="post">';
798 798
 				$return .= '<p data-option="'.$attr_name.'" class="lasso-option aesop-'.$slug.'-'.$attr_name.'">';
799
-				$return .= '<label for="aesop-generator-attr-' . $attr_name . '">' . $attr_info['desc'] . '</label>';
799
+				$return .= '<label for="aesop-generator-attr-'.$attr_name.'">'.$attr_info['desc'].'</label>';
800 800
 				$return .= '<small class="lasso-option-desc">'.$attr_info['tip'].'</small>';
801 801
 				// Select
802 802
 
803
-				if ( isset( $attr_info['values'] ) ) {
803
+				if (isset($attr_info['values'])) {
804 804
 
805
-					$return .= '<select name="' . $attr_name . '" id="aesop-generator-attr-' . $attr_name . '" class="lasso-generator-attr">';
805
+					$return .= '<select name="'.$attr_name.'" id="aesop-generator-attr-'.$attr_name.'" class="lasso-generator-attr">';
806 806
 
807
-					$i=0;
807
+					$i = 0;
808 808
 
809
-					foreach ( $attr_info['values'] as $attr_value ) {
809
+					foreach ($attr_info['values'] as $attr_value) {
810 810
 						$attr_value_selected = $attr_info['default'] == $attr_value ? ' selected="selected"' : '';
811 811
 
812
-						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" ' . $attr_value_selected . '>'.$attr_info['values'][$i]['name'].'</option>';
812
+						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" '.$attr_value_selected.'>'.$attr_info['values'][$i]['name'].'</option>';
813 813
 
814 814
 						$i++;
815 815
 					}
@@ -818,24 +818,24 @@  discard block
 block discarded – undo
818 818
 
819 819
 				} else {
820 820
 
821
-					$attr_field_type = isset( $attr_info['type'] ) ? $attr_info['type'] : 'text';
821
+					$attr_field_type = isset($attr_info['type']) ? $attr_info['type'] : 'text';
822 822
 
823 823
 					// image upload
824
-					if ( 'media_upload' == $attr_info['type'] ) {
824
+					if ('media_upload' == $attr_info['type']) {
825 825
 
826
-						$return .= '<input type="' . $attr_field_type . '" name="' . $attr_name . '" value="'.$attr_info['default'].'" id="aesop-generator-attr-' . $attr_name . '" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" />';
826
+						$return .= '<input type="'.$attr_field_type.'" name="'.$attr_name.'" value="'.$attr_info['default'].'" id="aesop-generator-attr-'.$attr_name.'" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" />';
827 827
 						$return .= '<a href="#" id="lasso-upload-img" class="lasso-option-button" /></a>';
828 828
 
829
-					} elseif ( 'color' == $attr_info['type'] ) {
829
+					} elseif ('color' == $attr_info['type']) {
830 830
 
831
-						$return .= '<input type="color" name="' . $attr_name . '" value="'.$attr_info['default'].'" id="aesop-generator-attr-' . $attr_name . '" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" />';
831
+						$return .= '<input type="color" name="'.$attr_name.'" value="'.$attr_info['default'].'" id="aesop-generator-attr-'.$attr_name.'" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" />';
832 832
 
833
-					} elseif ( 'text_area' == $attr_info['type'] ) {
833
+					} elseif ('text_area' == $attr_info['type']) {
834 834
 
835
-						$return .= '<textarea name="' . $attr_name . '" id="aesop-generator-attr-' . $attr_name . '" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" placeholder="'.$attr_info['default'].'" /></textarea>'.$prefix.'';
835
+						$return .= '<textarea name="'.$attr_name.'" id="aesop-generator-attr-'.$attr_name.'" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" placeholder="'.$attr_info['default'].'" /></textarea>'.$prefix.'';
836 836
 
837 837
 					} else {
838
-						$return .= '<input type="' . $attr_field_type . '" name="' . $attr_name . '" value="'.$attr_info['default'].'" id="aesop-generator-attr-' . $attr_name . '" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" />'.$prefix.'';
838
+						$return .= '<input type="'.$attr_field_type.'" name="'.$attr_name.'" value="'.$attr_info['default'].'" id="aesop-generator-attr-'.$attr_name.'" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" />'.$prefix.'';
839 839
 					}
840 840
 				}
841 841
 				$return .= '</p>';
@@ -846,9 +846,9 @@  discard block
 block discarded – undo
846 846
 		///////////////////////////
847 847
 		// START GALLERY AND MAP FRONT END STUFFS
848 848
 		///////////////////////////
849
-		if ( isset( $shortcode['front'] ) && true == $shortcode['front'] ) {
849
+		if (isset($shortcode['front']) && true == $shortcode['front']) {
850 850
 
851
-			if ( 'gallery' == $shortcode['front_type'] ) {
851
+			if ('gallery' == $shortcode['front_type']) {
852 852
 
853 853
 				$return .= lasso_gallery_editor_module();
854 854
 
@@ -859,13 +859,13 @@  discard block
 block discarded – undo
859 859
 		///////////////////////////
860 860
 
861 861
 		// Single shortcode (not closed)
862
-		if ( 'single' == $shortcode['type'] ) {
862
+		if ('single' == $shortcode['type']) {
863 863
 
864 864
 			$return .= '<input type="hidden" name="lasso-generator-content" id="lasso-generator-content" value="false" />';
865 865
 
866 866
 		} else {
867 867
 
868
-			$return .= '<p data-option="content" class="lasso-option lasso-c-comp-text"><label>' . __( 'Content', 'lasso' ) . '</label><textarea type="text" name="lasso-generator-content" id="lasso-generator-content" value="' . $shortcode['content'] . '" /></textarea></p>';
868
+			$return .= '<p data-option="content" class="lasso-option lasso-c-comp-text"><label>'.__('Content', 'lasso').'</label><textarea type="text" name="lasso-generator-content" id="lasso-generator-content" value="'.$shortcode['content'].'" /></textarea></p>';
869 869
 		}
870 870
 
871 871
 		$return .= '<p class="lasso-buttoninsert-wrap"><a href="#" class="lasso-generator-cancel" id="lasso--sidebar__close">Cancel</a><input type="submit" id="lasso-generator-insert" value="Save Settings"></p>';
@@ -901,14 +901,14 @@  discard block
 block discarded – undo
901 901
 				<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
902 902
 				<div id="lasso--hide" style="display:none;" class="lasso--post-form">
903 903
 					<i class="lasso-icon lasso-icon-move"></i>
904
-					<label><?php _e( 'Revisions', 'lasso' );?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e( 'Use the slider to view the revision live on the page.', 'lasso' );?>"><i class="lasso-icon-help"></i></span></label>
904
+					<label><?php _e('Revisions', 'lasso'); ?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e('Use the slider to view the revision live on the page.', 'lasso'); ?>"><i class="lasso-icon-help"></i></span></label>
905 905
 					<div class="lasso--slider_wrap">
906 906
 						<div id="lasso--slider"></div>
907 907
 					</div>
908 908
 					<ul id="lasso--revision-list"></ul>
909 909
 					<div class="lasso--btn-group lasso--btn-group-small">
910
-						<a href="#" class="lasso--btn-secondary" id="lasso--close-modal"><?php _e( 'Cancel', 'lasso' );?></a>
911
-						<a href="#" class="lasso--btn-primary" id="lasso--select-revision"><?php _e( 'Select', 'lasso' );?></a>
910
+						<a href="#" class="lasso--btn-secondary" id="lasso--close-modal"><?php _e('Cancel', 'lasso'); ?></a>
911
+						<a href="#" class="lasso--btn-primary" id="lasso--select-revision"><?php _e('Select', 'lasso'); ?></a>
912 912
 					</div>
913 913
 				</div>
914 914
 
@@ -931,7 +931,7 @@  discard block
 block discarded – undo
931 931
     // Normalize into a six character long hex string
932 932
     $hex = str_replace('#', '', $hex);
933 933
     if (strlen($hex) == 3) {
934
-        $hex = str_repeat(substr($hex,0,1), 2).str_repeat(substr($hex,1,1), 2).str_repeat(substr($hex,2,1), 2);
934
+        $hex = str_repeat(substr($hex, 0, 1), 2).str_repeat(substr($hex, 1, 1), 2).str_repeat(substr($hex, 2, 1), 2);
935 935
     }
936 936
 
937 937
     // Split into three parts: R, G and B
@@ -940,7 +940,7 @@  discard block
 block discarded – undo
940 940
 
941 941
     foreach ($color_parts as $color) {
942 942
         $color   = hexdec($color); // Convert to decimal
943
-        $color   = max(0,min(255,$color + $steps)); // Adjust color
943
+        $color   = max(0, min(255, $color + $steps)); // Adjust color
944 944
         $return .= str_pad(dechex($color), 2, '0', STR_PAD_LEFT); // Make two char hex code
945 945
     }
946 946
 
Please login to merge, or discard this patch.
admin/includes/menus/settings.php 1 patch
Spacing   +132 added lines, -132 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,38 +95,38 @@  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
-		$article_object   = lasso_editor_get_option( 'article_class', 'lasso_editor' );
102
-		$featImgClass    = lasso_editor_get_option( 'featimg_class', 'lasso_editor' );
103
-		$titleClass    = lasso_editor_get_option( 'title_class', 'lasso_editor' );
104
-
105
-		$post_new_disabled   = lasso_editor_get_option( 'post_adding_disabled', 'lasso_editor' );
106
-		$save_to_post_disabled  = lasso_editor_get_option( 'post_save_disabled', 'lasso_editor' );
107
-		$post_settings_disabled = lasso_editor_get_option( 'post_settings_disabled', 'lasso_editor' );
108
-		$allow_change_date = lasso_editor_get_option( 'allow_change_date', 'lasso_editor' );
109
-		$allow_new_category = lasso_editor_get_option( 'allow_new_category', 'lasso_editor' );
110
-		$shortcodify_disabled  = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
111
-		$enable_autosave  = lasso_editor_get_option( 'enable_autosave', 'lasso_editor' );
112
-
113
-		$use_old_ui      = lasso_editor_get_option( 'use_old_ui', 'lasso_editor' );
114
-		$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
115
-		$toolbar_headings_h4      = lasso_editor_get_option( 'toolbar_headings_h4', 'lasso_editor' );
116
-		$toolbar_show_color      = lasso_editor_get_option( 'toolbar_show_color', 'lasso_editor' );
117
-		$toolbar_show_alignment  = lasso_editor_get_option( 'toolbar_show_alignment', 'lasso_editor' );
101
+		$article_object = lasso_editor_get_option('article_class', 'lasso_editor');
102
+		$featImgClass = lasso_editor_get_option('featimg_class', 'lasso_editor');
103
+		$titleClass = lasso_editor_get_option('title_class', 'lasso_editor');
104
+
105
+		$post_new_disabled = lasso_editor_get_option('post_adding_disabled', 'lasso_editor');
106
+		$save_to_post_disabled  = lasso_editor_get_option('post_save_disabled', 'lasso_editor');
107
+		$post_settings_disabled = lasso_editor_get_option('post_settings_disabled', 'lasso_editor');
108
+		$allow_change_date = lasso_editor_get_option('allow_change_date', 'lasso_editor');
109
+		$allow_new_category = lasso_editor_get_option('allow_new_category', 'lasso_editor');
110
+		$shortcodify_disabled = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor');
111
+		$enable_autosave = lasso_editor_get_option('enable_autosave', 'lasso_editor');
112
+
113
+		$use_old_ui = lasso_editor_get_option('use_old_ui', 'lasso_editor');
114
+		$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
115
+		$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
116
+		$toolbar_show_color      = lasso_editor_get_option('toolbar_show_color', 'lasso_editor');
117
+		$toolbar_show_alignment  = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor');
118 118
 		
119
-		$objectsNoSave  	= lasso_editor_get_option('dont_save', 'lasso_editor');
120
-		$objectsNonEditable  	= lasso_editor_get_option('non_editable', 'lasso_editor');
119
+		$objectsNoSave = lasso_editor_get_option('dont_save', 'lasso_editor');
120
+		$objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor');
121 121
 		$disable_tour = lasso_editor_get_option('disable_tour', 'lasso_editor');
122 122
 		$show_ignored_items = lasso_editor_get_option('show_ignored_items', 'lasso_editor');
123 123
 		$save_using_rest_disabled = lasso_editor_get_option('save_using_rest_disabled', 'lasso_editor');
124 124
 		
125
-		$default_post_types = apply_filters( 'lasso_allowed_post_types', array( 'post', 'page'));
126
-		$allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor',  $default_post_types);
125
+		$default_post_types = apply_filters('lasso_allowed_post_types', array('post', 'page'));
126
+		$allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', $default_post_types);
127 127
 		
128
-		$bold_tag = lasso_editor_get_option( 'bold_tag', 'lasso_editor',  "b");
129
-		$i_tag = lasso_editor_get_option( 'i_tag', 'lasso_editor',  "i");
128
+		$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor', "b");
129
+		$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor', "i");
130 130
 		
131 131
 		$insert_comp_ui = lasso_editor_get_option('insert_comp_ui', 'lasso_editor');
132 132
 		if (!$insert_comp_ui) {
@@ -136,31 +136,31 @@  discard block
 block discarded – undo
136 136
 ?>
137 137
 		<div class="wrap">
138 138
 
139
-	    	<h2><?php _e( 'Editus Settings', 'lasso' );?></h2>
139
+	    	<h2><?php _e('Editus Settings', 'lasso'); ?></h2>
140 140
 
141 141
 			<form id="lasso-editor-settings-form" class="lasso--form-settings" method="post" enctype="multipart/form-data">
142 142
 
143
-				<?php do_action('lasso_settings_before');?>
143
+				<?php do_action('lasso_settings_before'); ?>
144 144
 				
145 145
 				
146 146
 				
147
-				<h3><?php _e( 'Enable for:', 'lasso' );?></h3>
147
+				<h3><?php _e('Enable for:', 'lasso'); ?></h3>
148 148
 				<div class="lasso-editor-settings--option-wrap">
149 149
 					<div class="lasso-editor-settings--option-inner">
150 150
 						
151
-						<span class="lasso--setting-description"><?php _e( 'Enable Editus for the following post types.', 'lasso' );?></span>
151
+						<span class="lasso--setting-description"><?php _e('Enable Editus for the following post types.', 'lasso'); ?></span>
152 152
 						<?php
153 153
 						$args = array(
154 154
 							'public'   => true
155 155
 						);
156 156
 						 
157
-						$allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
158
-						$post_types = get_post_types( $args, 'objects' );
157
+						$allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
158
+						$post_types = get_post_types($args, 'objects');
159 159
 						 
160
-						foreach ( $post_types  as $post_type ) {
160
+						foreach ($post_types  as $post_type) {
161 161
 						   if ($post_type->name == 'attachment') continue;
162
-						   $checked ="";
163
-						   if (  in_array( $post_type->name, $allowed_post_types )  ) {
162
+						   $checked = "";
163
+						   if (in_array($post_type->name, $allowed_post_types)) {
164 164
 								$checked = 'checked="checked"';
165 165
 						   }
166 166
 						   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>';
@@ -170,97 +170,97 @@  discard block
 block discarded – undo
170 170
 				</div>
171 171
 				
172 172
 
173
-				<h3><?php _e( 'Internal Settings', 'lasso' );?></h3>
173
+				<h3><?php _e('Internal Settings', 'lasso'); ?></h3>
174 174
 				<div class="lasso-editor-settings--option-wrap">
175 175
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
176
-						<label><?php _e( 'Article Class', 'lasso' );?></label>
177
-						<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>
178
-						<input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr( $article_object );?>" placeholder=".entry-content">
176
+						<label><?php _e('Article Class', 'lasso'); ?></label>
177
+						<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>
178
+						<input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr($article_object); ?>" placeholder=".entry-content">
179 179
 					</div>
180 180
 				
181 181
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
182
-						<label><?php _e( 'Featured Image Class', 'lasso' );?></label>
183
-						<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>
184
-						<input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr( $featImgClass );?>" placeholder=".entry-content">
182
+						<label><?php _e('Featured Image Class', 'lasso'); ?></label>
183
+						<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>
184
+						<input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr($featImgClass); ?>" placeholder=".entry-content">
185 185
 					</div>
186 186
 				
187 187
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
188
-						<label><?php _e( 'Article Title Class', 'lasso' );?></label>
189
-						<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>
190
-						<input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr( $titleClass );?>" placeholder=".entry-content">
188
+						<label><?php _e('Article Title Class', 'lasso'); ?></label>
189
+						<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>
190
+						<input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr($titleClass); ?>" placeholder=".entry-content">
191 191
 					</div>
192 192
 				
193 193
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
194
-						<label><?php _e( 'Ignored Items to Save', 'lasso' );?></label>
195
-						<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>
196
-						<textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNoSave );?></textarea>
194
+						<label><?php _e('Ignored Items to Save', 'lasso'); ?></label>
195
+						<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>
196
+						<textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNoSave); ?></textarea>
197 197
 					</div>
198 198
 				
199 199
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
200
-						<label><?php _e( 'Read Only Items', 'lasso' );?></label>
201
-						<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>
202
-						<textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNonEditable );?></textarea>
200
+						<label><?php _e('Read Only Items', 'lasso'); ?></label>
201
+						<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>
202
+						<textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNonEditable); ?></textarea>
203 203
 					</div>
204 204
 				
205 205
 					<div class="lasso-editor-settings--option-inner" >
206
-						<input type="checkbox" class="checkbox" name="lasso_editor[show_ignored_items]" id="lasso_editor[show_ignored_items]" <?php echo checked( $show_ignored_items, 'on' );?> >
207
-						<label for="lasso_editor[show_ignored_items]"> <?php _e( 'Show Ignored Items', 'lasso' );?></label>
208
-						<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>
206
+						<input type="checkbox" class="checkbox" name="lasso_editor[show_ignored_items]" id="lasso_editor[show_ignored_items]" <?php echo checked($show_ignored_items, 'on'); ?> >
207
+						<label for="lasso_editor[show_ignored_items]"> <?php _e('Show Ignored Items', 'lasso'); ?></label>
208
+						<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>
209 209
 					</div>
210 210
 				</div>
211 211
 
212
-				<h3><?php _e( 'Editor UI', 'lasso' );?></h3>
212
+				<h3><?php _e('Editor UI', 'lasso'); ?></h3>
213 213
 				<div class="lasso-editor-settings--option-wrap">
214 214
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
215
-						<input type="checkbox" class="checkbox" name="lasso_editor[use_old_ui]" id="lasso_editor_use_old_ui" <?php echo checked( $use_old_ui, 'on' );?> >
216
-						<label for="lasso_editor[use_old_ui]"><?php _e( 'Use the Old Toolbar', 'lasso' );?></label>
217
-						<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>
215
+						<input type="checkbox" class="checkbox" name="lasso_editor[use_old_ui]" id="lasso_editor_use_old_ui" <?php echo checked($use_old_ui, 'on'); ?> >
216
+						<label for="lasso_editor[use_old_ui]"><?php _e('Use the Old Toolbar', 'lasso'); ?></label>
217
+						<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>
218 218
 					</div>
219 219
 				    <div id="lasso-editor-settings--colors">
220 220
 					<?php
221
-					self::create_section_for_color_picker('button-color1', _e( 'Editor Bar Color Top', 'lasso' ), '#0000ff');
222
-					self::create_section_for_color_picker('button-color2', _e( 'Editor Bar Color Bottom', 'lasso' ), '#000030');
223
-					self::create_section_for_color_picker('dialog-color', _e( 'Dialog Color', 'lasso' ), '#000055');
224
-					self::create_section_for_color_picker('text-color', _e( 'Icon/Text Color', 'lasso' ), '#ffffff');
221
+					self::create_section_for_color_picker('button-color1', _e('Editor Bar Color Top', 'lasso'), '#0000ff');
222
+					self::create_section_for_color_picker('button-color2', _e('Editor Bar Color Bottom', 'lasso'), '#000030');
223
+					self::create_section_for_color_picker('dialog-color', _e('Dialog Color', 'lasso'), '#000055');
224
+					self::create_section_for_color_picker('text-color', _e('Icon/Text Color', 'lasso'), '#ffffff');
225 225
 					?>
226
-					<button type="button" id="lasso-editor-settings--default-colors" ><?php _e( 'Default Colors', 'lasso' );?></button>
226
+					<button type="button" id="lasso-editor-settings--default-colors" ><?php _e('Default Colors', 'lasso'); ?></button>
227 227
 				    <div style="height:50px;"></div>
228 228
 					</div>
229 229
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
230
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked( $toolbar_headings, 'on' );?> >
231
-						<label for="lasso_editor[toolbar_headings]"><?php _e( 'Enable H2 and H3 Buttons', 'lasso' );?></label>
232
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set H2 and H3 settings.', 'lasso' );?></span>
230
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked($toolbar_headings, 'on'); ?> >
231
+						<label for="lasso_editor[toolbar_headings]"><?php _e('Enable H2 and H3 Buttons', 'lasso'); ?></label>
232
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set H2 and H3 settings.', 'lasso'); ?></span>
233 233
 
234 234
 					</div>
235 235
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
236
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings_h4]" id="lasso_editor[toolbar_headings_h4]" <?php echo checked( $toolbar_headings_h4, 'on' );?> >
237
-						<label for="lasso_editor[toolbar_headings_h4]"><?php _e( 'Enable H4/H5/H6 Buttons', 'lasso' );?></label>
238
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set H4/H5/H6 settings.', 'lasso' );?></span>
236
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings_h4]" id="lasso_editor[toolbar_headings_h4]" <?php echo checked($toolbar_headings_h4, 'on'); ?> >
237
+						<label for="lasso_editor[toolbar_headings_h4]"><?php _e('Enable H4/H5/H6 Buttons', 'lasso'); ?></label>
238
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set H4/H5/H6 settings.', 'lasso'); ?></span>
239 239
 
240 240
 					</div>
241 241
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
242
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked( $toolbar_show_color, 'on' );?> >
243
-						<label for="lasso_editor[toolbar_show_color]"><?php _e( 'Enable Text Color Buttons', 'lasso' );?></label>
244
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set text colors.', 'lasso' );?></span>
242
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked($toolbar_show_color, 'on'); ?> >
243
+						<label for="lasso_editor[toolbar_show_color]"><?php _e('Enable Text Color Buttons', 'lasso'); ?></label>
244
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set text colors.', 'lasso'); ?></span>
245 245
 
246 246
 					</div>
247 247
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
248
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked( $toolbar_show_alignment, 'on' );?> >
249
-						<label for="lasso_editor[toolbar_show_alignment]"><?php _e( 'Enable Text Align Buttons', 'lasso' );?></label>
250
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set text alignment.', 'lasso' );?></span>
248
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked($toolbar_show_alignment, 'on'); ?> >
249
+						<label for="lasso_editor[toolbar_show_alignment]"><?php _e('Enable Text Align Buttons', 'lasso'); ?></label>
250
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set text alignment.', 'lasso'); ?></span>
251 251
 
252 252
 					</div>
253 253
 					<div class="lasso-editor-settings--option-inner">
254
-					    <label for="lasso_editor[insert_comp_ui]"> <?php _e( 'Insert Component UI', 'lasso' );?></label>
255
-						<span class="lasso--setting-description"><?php _e( 'UI mechanism to insert components', 'lasso' );?></span>
254
+					    <label for="lasso_editor[insert_comp_ui]"> <?php _e('Insert Component UI', 'lasso'); ?></label>
255
+						<span class="lasso--setting-description"><?php _e('UI mechanism to insert components', 'lasso'); ?></span>
256 256
 						<div class="lasso-editor-settings--option-inner" style="border:none;">
257
-					       <input type="radio" name="lasso_editor[insert_comp_ui]" value='drag' <?php echo checked( $insert_comp_ui, 'drag' );?>> <?php _e( 'Drag and Drop', 'lasso' );?>
257
+					       <input type="radio" name="lasso_editor[insert_comp_ui]" value='drag' <?php echo checked($insert_comp_ui, 'drag'); ?>> <?php _e('Drag and Drop', 'lasso'); ?>
258 258
 						</div>
259 259
 						<div class="lasso-editor-settings--option-inner" style="border:none;">
260
-						<input type="radio" name="lasso_editor[insert_comp_ui]" value="click" <?php echo checked( $insert_comp_ui, 'click' );?>> <?php _e( 'Click', 'lasso' );?>
260
+						<input type="radio" name="lasso_editor[insert_comp_ui]" value="click" <?php echo checked($insert_comp_ui, 'click'); ?>> <?php _e('Click', 'lasso'); ?>
261 261
 						</div>
262 262
 						<div class="lasso-editor-settings--option-inner" style="border:none;">
263
-						<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' );?>
263
+						<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'); ?>
264 264
 						</div>
265 265
 					</div>
266 266
 				</div>
@@ -269,82 +269,82 @@  discard block
 block discarded – undo
269 269
 				
270 270
 				
271 271
 
272
-				<h3><?php _e( 'Post Settings UI', 'lasso' );?></h3>
272
+				<h3><?php _e('Post Settings UI', 'lasso'); ?></h3>
273 273
 				<div class="lasso-editor-settings--option-wrap"  >
274 274
 					<div class="lasso-editor-settings--option-inner" style="border:none">
275
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked( $post_settings_disabled, 'on' );?> >
276
-						<label for="lasso_editor[post_settings_disabled]"> <?php _e( 'Disable Post Settings', 'lasso' );?></label>
277
-						<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>
275
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked($post_settings_disabled, 'on'); ?> >
276
+						<label for="lasso_editor[post_settings_disabled]"> <?php _e('Disable Post Settings', 'lasso'); ?></label>
277
+						<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>
278 278
 					</div>
279 279
 					
280 280
 					<div class="lasso-editor-settings--option-inner" style="border:none">
281
-						<input type="checkbox" class="checkbox" name="lasso_editor[allow_change_date]" id="lasso_editor[allow_change_date]" <?php echo checked( $allow_change_date, 'on' );?> >
282
-						<label for="lasso_editor[allow_change_date]"> <?php _e( 'Allow Changing Post Date', 'lasso' );?></label>
283
-						<span class="lasso--setting-description"><?php _e( 'Add the date selector to change the post\'s date to the Post Setting dialog', 'lasso' );?></span>
281
+						<input type="checkbox" class="checkbox" name="lasso_editor[allow_change_date]" id="lasso_editor[allow_change_date]" <?php echo checked($allow_change_date, 'on'); ?> >
282
+						<label for="lasso_editor[allow_change_date]"> <?php _e('Allow Changing Post Date', 'lasso'); ?></label>
283
+						<span class="lasso--setting-description"><?php _e('Add the date selector to change the post\'s date to the Post Setting dialog', 'lasso'); ?></span>
284 284
 					</div>
285 285
 					
286 286
 					<div class="lasso-editor-settings--option-inner" style="border:none">
287
-						<input type="checkbox" class="checkbox" name="lasso_editor[allow_new_category]" id="lasso_editor[allow_new_category]" <?php echo checked( $allow_new_category, 'on' );?> >
288
-						<label for="lasso_editor[allow_new_category]"> <?php _e( 'Allow Adding New Category', 'lasso' );?></label>
289
-						<span class="lasso--setting-description"><?php _e( 'Add the user to create new, previously non-existing categories for posts.', 'lasso' );?></span>
287
+						<input type="checkbox" class="checkbox" name="lasso_editor[allow_new_category]" id="lasso_editor[allow_new_category]" <?php echo checked($allow_new_category, 'on'); ?> >
288
+						<label for="lasso_editor[allow_new_category]"> <?php _e('Allow Adding New Category', 'lasso'); ?></label>
289
+						<span class="lasso--setting-description"><?php _e('Add the user to create new, previously non-existing categories for posts.', 'lasso'); ?></span>
290 290
 					</div>
291 291
 				
292 292
 					<div class="lasso-editor-settings--option-inner" >
293
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked( $post_new_disabled, 'on' );?> >
294
-						<label for="lasso_editor[post_adding_disabled]"><?php _e( 'Disable Post Adding', 'lasso' );?></label>
295
-						<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>
293
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked($post_new_disabled, 'on'); ?> >
294
+						<label for="lasso_editor[post_adding_disabled]"><?php _e('Disable Post Adding', 'lasso'); ?></label>
295
+						<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>
296 296
 					</div>
297 297
 					
298 298
 
299 299
 				</div>
300 300
 				
301
-				<h3><?php _e( 'Misc', 'lasso' );?></h3>
301
+				<h3><?php _e('Misc', 'lasso'); ?></h3>
302 302
 				<div class="lasso-editor-settings--option-wrap">
303 303
 					<div class="lasso-editor-settings--option-inner" style="border:none">
304
-						<input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked( $disable_tour, 'on' );?> >
305
-						<label for="lasso_editor[disable_tour]"> <?php _e( 'Do Not Show Tour Dialog', 'lasso' );?></label>
306
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable the tour dialog box for all users.', 'lasso' );?></span>
304
+						<input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked($disable_tour, 'on'); ?> >
305
+						<label for="lasso_editor[disable_tour]"> <?php _e('Do Not Show Tour Dialog', 'lasso'); ?></label>
306
+						<span class="lasso--setting-description"><?php _e('Check this box to disable the tour dialog box for all users.', 'lasso'); ?></span>
307 307
 					</div>
308 308
 
309 309
 					<div class="lasso-editor-settings--option-inner" style="border:none">
310
-					    <label for="lasso_editor[bold_tag]"> <?php _e( '"Bold" Tag', 'lasso' );?></label>
311
-						<span class="lasso--setting-description"><?php _e( 'Choose the HTML tag used for the "Bold" style.', 'lasso' );?></span>
312
-					    <input type="radio" name="lasso_editor[bold_tag]" value='b' <?php echo checked( $bold_tag, 'b' );?>> b
313
-						<input type="radio" name="lasso_editor[bold_tag]" value="strong" <?php echo checked( $bold_tag, 'strong' );?>> strong
310
+					    <label for="lasso_editor[bold_tag]"> <?php _e('"Bold" Tag', 'lasso'); ?></label>
311
+						<span class="lasso--setting-description"><?php _e('Choose the HTML tag used for the "Bold" style.', 'lasso'); ?></span>
312
+					    <input type="radio" name="lasso_editor[bold_tag]" value='b' <?php echo checked($bold_tag, 'b'); ?>> b
313
+						<input type="radio" name="lasso_editor[bold_tag]" value="strong" <?php echo checked($bold_tag, 'strong'); ?>> strong
314 314
 					</div>
315 315
 					<div class="lasso-editor-settings--option-inner" >
316
-					    <label for="lasso_editor[i_tag]"> <?php _e( '"Italic" Tag', 'lasso' );?></label>
317
-						<span class="lasso--setting-description"><?php _e( 'Choose the HTML tag used for the "Italic" style.', 'lasso' );?></span>
318
-					    <input type="radio" name="lasso_editor[i_tag]" value='i' <?php echo checked( $i_tag, 'i' );?>> i
319
-						<input type="radio" name="lasso_editor[i_tag]" value="em" <?php echo checked( $i_tag, 'em' );?>> em
316
+					    <label for="lasso_editor[i_tag]"> <?php _e('"Italic" Tag', 'lasso'); ?></label>
317
+						<span class="lasso--setting-description"><?php _e('Choose the HTML tag used for the "Italic" style.', 'lasso'); ?></span>
318
+					    <input type="radio" name="lasso_editor[i_tag]" value='i' <?php echo checked($i_tag, 'i'); ?>> i
319
+						<input type="radio" name="lasso_editor[i_tag]" value="em" <?php echo checked($i_tag, 'em'); ?>> em
320 320
 					</div>
321 321
 				</div>
322 322
 
323
-				<h3><?php _e( 'Advanced', 'lasso' );?></h3>
323
+				<h3><?php _e('Advanced', 'lasso'); ?></h3>
324 324
 				<div class="lasso-editor-settings--option-wrap ">
325 325
 					<div class="lasso-editor-settings--option-inner" style="border:none">
326
-						<input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked( $shortcodify_disabled, 'on' );?> >
327
-						<label for="lasso_editor[shortcodify_disabled]"><?php _e( 'Disable Aesop Component Conversion', 'lasso' );?></label>
328
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso' );?></span>
326
+						<input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked($shortcodify_disabled, 'on'); ?> >
327
+						<label for="lasso_editor[shortcodify_disabled]"><?php _e('Disable Aesop Component Conversion', 'lasso'); ?></label>
328
+						<span class="lasso--setting-description"><?php _e('Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso'); ?></span>
329 329
 					</div>
330 330
 				
331 331
 					<div class="lasso-editor-settings--option-inner" style="border:none">
332
-						<input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked( $enable_autosave, 'on' );?> >
333
-						<label for="lasso_editor[enable_autosave]"><?php _e( 'Enable Auto Save', 'lasso' );?></label>
334
-						<span class="lasso--setting-description"><?php _e( 'Check this box to enable auto save.', 'lasso' );?></span>
332
+						<input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked($enable_autosave, 'on'); ?> >
333
+						<label for="lasso_editor[enable_autosave]"><?php _e('Enable Auto Save', 'lasso'); ?></label>
334
+						<span class="lasso--setting-description"><?php _e('Check this box to enable auto save.', 'lasso'); ?></span>
335 335
 					</div>
336 336
 				
337 337
 					<div class="lasso-editor-settings--option-inner" style="border:none">
338
-						<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' );?> >
339
-						<label for="lasso_editor[post_save_disabled]"><?php _e( 'Disable Post Saving', 'lasso' );?></label>
340
-						<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>
338
+						<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'); ?> >
339
+						<label for="lasso_editor[post_save_disabled]"><?php _e('Disable Post Saving', 'lasso'); ?></label>
340
+						<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>
341 341
 
342 342
 					</div>
343 343
 				
344 344
 					<div class="lasso-editor-settings--option-inner">
345
-						<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' );?> >
346
-						<label for="lasso_editor[save_using_rest_disabled]"><?php _e( "Don't Use REST API to Save", 'lasso' );?></label>
347
-						<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>
345
+						<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'); ?> >
346
+						<label for="lasso_editor[save_using_rest_disabled]"><?php _e("Don't Use REST API to Save", 'lasso'); ?></label>
347
+						<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>
348 348
 
349 349
 					</div>
350 350
 				</div>
@@ -354,11 +354,11 @@  discard block
 block discarded – undo
354 354
 
355 355
 				<div class="lasso-editor-settings--submit">
356 356
 				    <input type="hidden" name="action" value="lasso-editor-settings" />
357
-				    <input type="submit" class="button-primary" value="<?php esc_attr_e( 'Save Settings', 'lasso' );?>" />
358
-					<?php wp_nonce_field( 'nonce', 'lasso_editor_settings' ); ?>
357
+				    <input type="submit" class="button-primary" value="<?php esc_attr_e('Save Settings', 'lasso'); ?>" />
358
+					<?php wp_nonce_field('nonce', 'lasso_editor_settings'); ?>
359 359
 				</div>
360 360
 				
361
-				<?php do_action('lasso_settings_after');?>
361
+				<?php do_action('lasso_settings_after'); ?>
362 362
 			</form>
363 363
 
364 364
 		</div><?php
Please login to merge, or discard this patch.
public/includes/assets.php 1 patch
Spacing   +91 added lines, -91 removed lines patch added patch discarded remove patch
@@ -10,24 +10,24 @@  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
-	public function scripts(){
18
+	public function scripts() {
19 19
 
20 20
 	
21 21
 		global $post;
22
-		if ( lasso_user_can('edit_posts') && 
23
-		     !( function_exists( 'is_gutenberg_page' ) && has_blocks( $post->post_content) )) {// bail if the post has Gutenberg bloc
22
+		if (lasso_user_can('edit_posts') && 
23
+		     !(function_exists('is_gutenberg_page') && has_blocks($post->post_content))) {// bail if the post has Gutenberg bloc
24 24
 			
25 25
 			/**    Returns the time offset from UTC
26 26
 			*/
27 27
 			function get_UTC_offset() {
28
-				$timezone_string = get_option( 'timezone_string' );
29
-				if (empty( $timezone_string ) ) {
30
-					return get_option('gmt_offset')*3600;
28
+				$timezone_string = get_option('timezone_string');
29
+				if (empty($timezone_string)) {
30
+					return get_option('gmt_offset') * 3600;
31 31
 				}
32 32
 				
33 33
 				$origin_dtz = new \DateTimeZone($timezone_string);				
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
 			wp_enqueue_style('lasso-style', LASSO_URL.'/public/assets/css/lasso.css', LASSO_VERSION, true);
40 40
 
41 41
             //don't load autocomplete if it's a stockholm theme
42
-			$themename  	= wp_get_theme()->get('Name');
43
-			if ($themename !='Stockholm' ) {
42
+			$themename = wp_get_theme()->get('Name');
43
+			if ($themename != 'Stockholm') {
44 44
 				wp_enqueue_script('jquery-ui-autocomplete');
45 45
 			}
46 46
 			wp_enqueue_script('jquery-ui-draggable');
@@ -53,27 +53,27 @@  discard block
 block discarded – undo
53 53
 			// url for json api
54 54
 			$home_url = function_exists('json_get_url_prefix') ? json_get_url_prefix() : false;
55 55
 
56
-			$article_object 	= lasso_editor_get_option('article_class','lasso_editor');
56
+			$article_object 	= lasso_editor_get_option('article_class', 'lasso_editor');
57 57
 
58
-			$article_object 	= empty( $article_object ) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object;
58
+			$article_object 	= empty($article_object) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object;
59 59
 
60
-			$featImgClass 		= lasso_editor_get_option('featimg_class','lasso_editor');
61
-			if (empty( $featImgClass )) {
60
+			$featImgClass = lasso_editor_get_option('featimg_class', 'lasso_editor');
61
+			if (empty($featImgClass)) {
62 62
 				$featImgClass = lasso_get_supported_theme_featured_image_class();
63 63
 			}
64
-			$titleClass 		= lasso_editor_get_option('title_class','lasso_editor');
65
-			if (empty( $titleClass )) {
64
+			$titleClass = lasso_editor_get_option('title_class', 'lasso_editor');
65
+			if (empty($titleClass)) {
66 66
 				$titleClass = lasso_get_supported_theme_title_class();
67 67
 			}
68
-			$toolbar_headings  	= lasso_editor_get_option('toolbar_headings', 'lasso_editor');
69
-			$toolbar_headings_h4  	= lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
68
+			$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
69
+			$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
70 70
 			$objectsNoSave  	= lasso_editor_get_option('dont_save', 'lasso_editor');
71
-			$objectsNonEditable  	= lasso_editor_get_option('non_editable', 'lasso_editor');
71
+			$objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor');
72 72
 			$disableRESTSave = lasso_editor_get_option('save_using_rest_disabled', 'lasso_editor');
73
-			$save_to_post_disabled  = lasso_editor_get_option( 'post_save_disabled', 'lasso_editor' );
73
+			$save_to_post_disabled = lasso_editor_get_option('post_save_disabled', 'lasso_editor');
74 74
 			
75
-			$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor','b');
76
-			$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor','i');
75
+			$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor', 'b');
76
+			$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor', 'i');
77 77
 
78 78
 			
79 79
 			//text alignement
@@ -87,8 +87,8 @@  discard block
 block discarded – undo
87 87
 			
88 88
 			if ($show_color) {
89 89
 				//color picker
90
-				wp_enqueue_style( 'wp-color-picker' );
91
-				wp_enqueue_script( 'iris', admin_url( 'js/iris.min.js' ), array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), false, 1 );
90
+				wp_enqueue_style('wp-color-picker');
91
+				wp_enqueue_script('iris', admin_url('js/iris.min.js'), array('jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch'), false, 1);
92 92
 			}
93 93
 			
94 94
 			// click to insert components, not drag and drop
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 			
98 98
 			// custom fields
99 99
 			
100
-			$custom_fields = apply_filters( 'editus_custom_fields', null ); //array('testFieldName' => '#field1');
100
+			$custom_fields = apply_filters('editus_custom_fields', null); //array('testFieldName' => '#field1');
101 101
 
102 102
 
103 103
 
@@ -105,57 +105,57 @@  discard block
 block discarded – undo
105 105
 			$postid 			= get_the_ID();
106 106
 			$tz_offset = get_UTC_offset();
107 107
 			$post_date = get_the_time('U', $postid);
108
-			$time = (time()+$tz_offset);
108
+			$time = (time() + $tz_offset);
109 109
             $delta = $time - $post_date;
110 110
 
111 111
 			$strings = array(
112
-				'save' 				=> __('Save','lasso'),
113
-				'selectText'	  	=> __('Please Select Text First.','lasso'),
114
-				'cancel' 			=> __('Cancel','lasso'),
115
-				'exiteditor' 		=> __('Exit Editor','lasso'),
116
-				'saving' 			=> __('Saving...','lasso'),
117
-				'saved'				=> __('Saved!','lasso'),
118
-				'adding' 			=> __('Adding...','lasso'),
119
-				'added'				=> __('Added!','lasso'),
120
-				'loading' 			=> __('Loading...','lasso'),
121
-				'loadMore'			=> __('Load More','lasso'),
122
-				'close'			=> __('Close','lasso'),
123
-				'noPostsFound'		=> __('No more posts found','lasso'),
124
-				'fetchFail'	    	=> __('Fetching failed.','lasso'),
125
-				'galleryCreated' 	=> __('Gallery Created!','lasso'),
126
-				'galleryUpdated' 	=> __('Gallery Updated!','lasso'),
127
-				'justWrite'			=> __('Just write...','lasso'),
128
-				'chooseImage'		=> __('Choose an image','lasso'),
129
-				'updateImage'		=> __('Update Image','lasso'),
130
-				'insertImage'		=> __('Insert Image','lasso'),
131
-				'selectImage'		=> __('Select Image','lasso'),
132
-				'removeFeatImg'     => __('Remove featured image?','lasso'),
133
-				'updateSelectedImg' => __('Update Selected Image','lasso'),
134
-				'chooseImages'		=> __('Choose images','lasso'),
135
-				'editImage'			=> __('Edit Image','lasso'),
136
-				'addImages'			=> __('Add Images','lasso'),
137
-				'addNewGallery'		=> __('Add New Gallery','lasso'),
138
-				'selectGallery'		=> __('Select Editus Gallery Image','lasso'),
139
-				'useSelectedImages' => __('Use Selected Images','lasso'),
140
-				'publishPost'		=> __('Publish Post?','lasso'),
141
-				'publishYes'		=> __('Yes, publish it!','lasso'),
142
-				'deletePost'		=> __('Trash Post?','lasso'),
143
-				'deleteYes'			=> __('Yes, trash it!','lasso'),
144
-				'warning'			=> __('Oh snap!','laso'),
145
-				'cancelText'		=> __('O.K. got it!','lasso'),
146
-				'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'),
112
+				'save' 				=> __('Save', 'lasso'),
113
+				'selectText'	  	=> __('Please Select Text First.', 'lasso'),
114
+				'cancel' 			=> __('Cancel', 'lasso'),
115
+				'exiteditor' 		=> __('Exit Editor', 'lasso'),
116
+				'saving' 			=> __('Saving...', 'lasso'),
117
+				'saved'				=> __('Saved!', 'lasso'),
118
+				'adding' 			=> __('Adding...', 'lasso'),
119
+				'added'				=> __('Added!', 'lasso'),
120
+				'loading' 			=> __('Loading...', 'lasso'),
121
+				'loadMore'			=> __('Load More', 'lasso'),
122
+				'close'			=> __('Close', 'lasso'),
123
+				'noPostsFound'		=> __('No more posts found', 'lasso'),
124
+				'fetchFail'	    	=> __('Fetching failed.', 'lasso'),
125
+				'galleryCreated' 	=> __('Gallery Created!', 'lasso'),
126
+				'galleryUpdated' 	=> __('Gallery Updated!', 'lasso'),
127
+				'justWrite'			=> __('Just write...', 'lasso'),
128
+				'chooseImage'		=> __('Choose an image', 'lasso'),
129
+				'updateImage'		=> __('Update Image', 'lasso'),
130
+				'insertImage'		=> __('Insert Image', 'lasso'),
131
+				'selectImage'		=> __('Select Image', 'lasso'),
132
+				'removeFeatImg'     => __('Remove featured image?', 'lasso'),
133
+				'updateSelectedImg' => __('Update Selected Image', 'lasso'),
134
+				'chooseImages'		=> __('Choose images', 'lasso'),
135
+				'editImage'			=> __('Edit Image', 'lasso'),
136
+				'addImages'			=> __('Add Images', 'lasso'),
137
+				'addNewGallery'		=> __('Add New Gallery', 'lasso'),
138
+				'selectGallery'		=> __('Select Editus Gallery Image', 'lasso'),
139
+				'useSelectedImages' => __('Use Selected Images', 'lasso'),
140
+				'publishPost'		=> __('Publish Post?', 'lasso'),
141
+				'publishYes'		=> __('Yes, publish it!', 'lasso'),
142
+				'deletePost'		=> __('Trash Post?', 'lasso'),
143
+				'deleteYes'			=> __('Yes, trash it!', 'lasso'),
144
+				'warning'			=> __('Oh snap!', 'laso'),
145
+				'cancelText'		=> __('O.K. got it!', 'lasso'),
146
+				'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 147
 				'missingConfirm'	=> __('Update Settings', 'lasso'),
148
-				'helperText'		=> __('one more letter','lasso'),
148
+				'helperText'		=> __('one more letter', 'lasso'),
149 149
 				'editingBackup'  	=> __('You are currently editing a backup copy of this post.'),
150 150
 				
151 151
 				
152 152
 			);
153 153
 
154
-			$api_url = trailingslashit( home_url() ) . 'lasso-internal-api';
154
+			$api_url = trailingslashit(home_url()).'lasso-internal-api';
155 155
 
156 156
 			$gallery_class = new gallery();
157 157
 			$gallery_nonce_action = $gallery_class->nonce_action;
158
-			$gallery_nonce = wp_create_nonce( $gallery_nonce_action );
158
+			$gallery_nonce = wp_create_nonce($gallery_nonce_action);
159 159
 			
160 160
 			
161 161
             if ($allow_change_date) {
@@ -170,13 +170,13 @@  discard block
 block discarded – undo
170 170
 			  
171 171
 			if (function_exists('rest_url')) {
172 172
 				//$rest_root = esc_url_raw( rest_url());
173
-				$rest_nonce = wp_create_nonce( 'wp_rest' );
174
-				$settings = array( 'root' => $rest_root, 'nonce' => $rest_nonce );
175
-				wp_enqueue_script( 'wp-api', '', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
176
-				wp_localize_script( 'wp-api', 'wpApiSettings', $settings );
177
-				wp_localize_script( 'wp-api', 'WP_API_Settings', $settings );
173
+				$rest_nonce = wp_create_nonce('wp_rest');
174
+				$settings = array('root' => $rest_root, 'nonce' => $rest_nonce);
175
+				wp_enqueue_script('wp-api', '', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true);
176
+				wp_localize_script('wp-api', 'wpApiSettings', $settings);
177
+				wp_localize_script('wp-api', 'WP_API_Settings', $settings);
178 178
 				
179
-				if ( class_exists( 'WP_REST_Controller' )) {
179
+				if (class_exists('WP_REST_Controller')) {
180 180
 					// we are using REST API V2
181 181
 					$using_restapiv2 = true;
182 182
 				}
@@ -184,8 +184,8 @@  discard block
 block discarded – undo
184 184
 
185 185
 			// localized objects
186 186
 			$objects = array(
187
-				'ajaxurl' 			=> esc_url( $api_url ),
188
-				'ajaxurl2' 			=> esc_url( admin_url( 'admin-ajax.php' )),
187
+				'ajaxurl' 			=> esc_url($api_url),
188
+				'ajaxurl2' 			=> esc_url(admin_url('admin-ajax.php')),
189 189
 				'rest_root'         => $rest_root,
190 190
 				'rest_nonce'        => $rest_nonce,
191 191
 				'editor' 			=> 'lasso--content', // ID of editable content (without #) DONT CHANGE
@@ -193,13 +193,13 @@  discard block
 block discarded – undo
193 193
 				'featImgClass'		=> $featImgClass,
194 194
 				'titleClass'		=> $titleClass,
195 195
 				'strings'			=> $strings,
196
-				'settingsLink'		=> function_exists('is_multisite') && is_multisite() ? network_admin_url( 'settings.php?page=lasso-editor' ) : admin_url( 'admin.php?page=lasso-editor-settings' ),
197
-				'post_status'		=> get_post_status( $postid ),
196
+				'settingsLink'		=> function_exists('is_multisite') && is_multisite() ? network_admin_url('settings.php?page=lasso-editor') : admin_url('admin.php?page=lasso-editor-settings'),
197
+				'post_status'		=> get_post_status($postid),
198 198
 				'postid'			=> $postid,
199 199
 				'permalink'			=> $permalink,
200 200
 				'edit_others_pages'	=> current_user_can('edit_others_pages') ? true : false,
201 201
 				'edit_others_posts'	=> current_user_can('edit_others_posts') ? true : false,
202
-				'userCanEdit'		=> current_user_can('edit_post', $postid ),
202
+				'userCanEdit'		=> current_user_can('edit_post', $postid),
203 203
 				'can_publish'		=> is_page() ? current_user_can('publish_pages') : current_user_can('publish_posts'),
204 204
 				//'can_publish_posts'	=> current_user_can('publish_posts'),
205 205
 				//'can_publish_pages'	=> current_user_can('publish_pages'),
@@ -235,27 +235,27 @@  discard block
 block discarded – undo
235 235
 				'postTags'    		=> lasso_get_objects('tag'),
236 236
 				'noResultsDiv'		=> lasso_editor_empty_results(),
237 237
 				'noRevisionsDiv'	=> lasso_editor_empty_results('revision'),
238
-				'mapTileProvider'   => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider( $postid ) : false,
239
-				'mapLocations'		=> get_post_meta( $postid, 'ase_map_component_locations' ),
240
-				'mapStart'			=> get_post_meta( $postid, 'ase_map_component_start_point', true ),
241
-				'mapZoom'			=> get_post_meta( $postid, 'ase_map_component_zoom', true ),
238
+				'mapTileProvider'   => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider($postid) : false,
239
+				'mapLocations'		=> get_post_meta($postid, 'ase_map_component_locations'),
240
+				'mapStart'			=> get_post_meta($postid, 'ase_map_component_start_point', true),
241
+				'mapZoom'			=> get_post_meta($postid, 'ase_map_component_zoom', true),
242 242
 				'revisionModal' 	=> lasso_editor_revision_modal(),
243 243
 				'isMobile'          => wp_is_mobile(),
244
-				'enableAutoSave'    => lasso_editor_get_option( 'enable_autosave', 'lasso_editor' ),
244
+				'enableAutoSave'    => lasso_editor_get_option('enable_autosave', 'lasso_editor'),
245 245
 				'showColor'         => $show_color,
246 246
 				'showAlignment'     => $show_align,
247 247
 				'showIgnoredItems'  => lasso_editor_get_option('show_ignored_items', 'lasso_editor'),
248 248
 				'restapi2'          => $using_restapiv2,
249 249
 				'saveusingrest'     => $using_restapiv2 && !$disableRESTSave,
250
-				'newObjectContent'  => '<p>'.apply_filters( 'lasso_new_object_content', __( 'Once upon a time...','lasso') ).'</p>',
250
+				'newObjectContent'  => '<p>'.apply_filters('lasso_new_object_content', __('Once upon a time...', 'lasso')).'</p>',
251 251
 				'disableSavePost'   => $save_to_post_disabled,
252 252
 				'boldTag'           => $bold_tag,
253 253
 				'iTag'           	=> $i_tag,
254 254
 				'customFields'      => $custom_fields,
255
-				'clickToInsert'     => ($insert_comp_ui =='click'),
256
-				'buttonOnEmptyP'     => ($insert_comp_ui =='mediumcom'),      // auto show a button to insert components on an empty paragraph      
255
+				'clickToInsert'     => ($insert_comp_ui == 'click'),
256
+				'buttonOnEmptyP'     => ($insert_comp_ui == 'mediumcom'), // auto show a button to insert components on an empty paragraph      
257 257
                 'rtl'               => is_rtl(),				
258
-				'skipToEdit'        =>( $delta < 10 && $delta >=0 ), // if it's a new post, skip to edit mode
258
+				'skipToEdit'        =>($delta < 10 && $delta >= 0), // if it's a new post, skip to edit mode
259 259
 			);
260 260
 
261 261
 
@@ -264,9 +264,9 @@  discard block
 block discarded – undo
264 264
 			
265 265
 			if (!$using_restapiv2) {
266 266
                // enqueue REST API V1
267
-			   wp_enqueue_script( 'wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
268
-			   $settings = array( 'root' => home_url( $home_url ), 'nonce' => wp_create_nonce( 'wp_json' ) );
269
-			   wp_localize_script( 'wp-api-js', 'WP_API_Settings', $settings );
267
+			   wp_enqueue_script('wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true);
268
+			   $settings = array('root' => home_url($home_url), 'nonce' => wp_create_nonce('wp_json'));
269
+			   wp_localize_script('wp-api-js', 'WP_API_Settings', $settings);
270 270
 			}
271 271
 			
272 272
 			if ($allow_change_date) {
@@ -275,13 +275,13 @@  discard block
 block discarded – undo
275 275
 				wp_enqueue_style('jquery-ui');
276 276
 			}
277 277
 
278
-			$postfix = ( defined( 'SCRIPT_DEBUG' ) && true === SCRIPT_DEBUG ) ? '' : '.min';
278
+			$postfix = (defined('SCRIPT_DEBUG') && true === SCRIPT_DEBUG) ? '' : '.min';
279 279
 			if ($show_color) {
280
-				wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api','iris'), LASSO_VERSION, true);
280
+				wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api', 'iris'), LASSO_VERSION, true);
281 281
 			} else {
282
-			    wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
282
+			    wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
283 283
 			}
284
-			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects ) );
284
+			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects));
285 285
 
286 286
 
287 287
 		}
Please login to merge, or discard this patch.
internal-api/auth.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -52,28 +52,28 @@  discard block
 block discarded – undo
52 52
 	 * @param string $method The name of the callback method.
53 53
 
54 54
 	 */
55
-	public function __construct( $action, $callback_class) {
56
-		if ( ! is_object( $callback_class ) ) {
55
+	public function __construct($action, $callback_class) {
56
+		if (!is_object($callback_class)) {
57 57
 			$this->callback_instance = new $callback_class;
58
-		}else{
58
+		} else {
59 59
 			$this->callback_instance = $callback_class;
60 60
 		}
61 61
 
62
-		if ( $this->check_nonce() ) {
63
-			if ( is_object( $this->callback_instance ) && $this->if_implements() ) {
64
-				if ( $this->other_auth_checks( $action ) ) {
62
+		if ($this->check_nonce()) {
63
+			if (is_object($this->callback_instance) && $this->if_implements()) {
64
+				if ($this->other_auth_checks($action)) {
65 65
 					$this->status_code = 200;
66 66
 				} else {
67
-					$this->error_message = __( 'Unauthorized action', 'lasso' );
67
+					$this->error_message = __('Unauthorized action', 'lasso');
68 68
 					$this->status_code   = 401;
69 69
 				}
70 70
 			} else {
71
-				$this->error_message = __( 'All callback classes used for processing the Editus Internal API must implement the lasso\internal_api\api_action interface.', 'lasso' );
71
+				$this->error_message = __('All callback classes used for processing the Editus Internal API must implement the lasso\internal_api\api_action interface.', 'lasso');
72 72
 				$this->status_code   = 401;
73 73
 			}
74 74
 		} else {
75 75
 			$this->status_code   = 401;
76
-			$this->error_message = __( 'Nonce invalid', 'lasso' );
76
+			$this->error_message = __('Nonce invalid', 'lasso');
77 77
 		}
78 78
 
79 79
 	}
@@ -89,20 +89,20 @@  discard block
 block discarded – undo
89 89
 	 *
90 90
 	 * @return bool True if auth checks were all postive.
91 91
 	 */
92
-	protected function other_auth_checks( $action ) {
92
+	protected function other_auth_checks($action) {
93 93
 		$auth_callbacks = $this->callback_instance->auth_callbacks();
94 94
 
95
-		if ( is_array( $auth_callbacks ) && isset( $auth_callbacks[ $action ] ) && is_array( $auth_callbacks[ $action ] ) ) {
96
-			$checks = $auth_callbacks[ $action ];
97
-			if ( is_array( $checks ) ) {
98
-				foreach ( $checks as $check ) {
99
-					if ( is_array( $check ) ) {
100
-						$check = call_user_func( array( $check[0], $check[1] ) );
95
+		if (is_array($auth_callbacks) && isset($auth_callbacks[$action]) && is_array($auth_callbacks[$action])) {
96
+			$checks = $auth_callbacks[$action];
97
+			if (is_array($checks)) {
98
+				foreach ($checks as $check) {
99
+					if (is_array($check)) {
100
+						$check = call_user_func(array($check[0], $check[1]));
101 101
 					} else {
102
-						$check = call_user_func( $check );
102
+						$check = call_user_func($check);
103 103
 					}
104 104
 
105
-					if ( false === $check ) {
105
+					if (false === $check) {
106 106
 						return false;
107 107
 
108 108
 					}
@@ -127,8 +127,8 @@  discard block
 block discarded – undo
127 127
 	 */
128 128
 	protected function if_implements() {
129 129
 
130
-		$implements = class_implements( $this->callback_instance );
131
-		if ( is_array( $implements ) && in_array( 'lasso\internal_api\api_action', $implements ) ) {
130
+		$implements = class_implements($this->callback_instance);
131
+		if (is_array($implements) && in_array('lasso\internal_api\api_action', $implements)) {
132 132
 			return true;
133 133
 
134 134
 		}
@@ -147,13 +147,13 @@  discard block
 block discarded – undo
147 147
 	 * @return bool
148 148
 	 */
149 149
 	protected function check_nonce() {
150
-		if ( isset( $this->callback_instance->nonce_action ) ) {
150
+		if (isset($this->callback_instance->nonce_action)) {
151 151
 			$nonce = $this->callback_instance->nonce_action;
152
-		}else{
152
+		} else {
153 153
 			$nonce = 'lasso_editor';
154 154
 		}
155 155
 
156
-		return wp_verify_nonce( $_POST[ 'nonce' ], $nonce );
156
+		return wp_verify_nonce($_POST['nonce'], $nonce);
157 157
 
158 158
 	}
159 159
 
Please login to merge, or discard this patch.
internal-api/route.php 1 patch
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -24,35 +24,35 @@  discard block
 block discarded – undo
24 24
 		global $wp_query;
25 25
 
26 26
 		//get action, and if set, possibly act
27
-		$action = $wp_query->get( 'action' );
28
-		if ( $action && strpos( $_SERVER['REQUEST_URI'], 'lasso-internal-api' ) ) {
27
+		$action = $wp_query->get('action');
28
+		if ($action && strpos($_SERVER['REQUEST_URI'], 'lasso-internal-api')) {
29 29
 
30
-			$response = __( 'Editus API Error.', 'lasso' );
30
+			$response = __('Editus API Error.', 'lasso');
31 31
 			$code = 400;
32 32
 
33 33
 			//see if have a nonce. Will verify it in auth class.
34
-			if ( isset( $_POST[ 'nonce' ] ) ) {
34
+			if (isset($_POST['nonce'])) {
35 35
 
36
-				$callback = self::find_callback( strip_tags( $action ) );
37
-				if ( is_int( $callback )  ) {
36
+				$callback = self::find_callback(strip_tags($action));
37
+				if (is_int($callback)) {
38 38
 					$code = $callback;
39
-				}elseif( ! class_exists( $callback['class'] ) ) {
39
+				}elseif (!class_exists($callback['class'])) {
40 40
 					$code = 415;
41
-				}else {
42
-					$action = str_replace( '-', '_', $action );
41
+				} else {
42
+					$action = str_replace('-', '_', $action);
43 43
 					$callback_instance = new $callback['class'];
44
-					$auth              = self::auth( $action, $callback_instance, $callback['method'] );
45
-					if ( 200 == $auth->status_code && is_array( $callback ) ) {
44
+					$auth              = self::auth($action, $callback_instance, $callback['method']);
45
+					if (200 == $auth->status_code && is_array($callback)) {
46 46
 						$code = 200;
47
-						$data = new find_data( $callback_instance, $action );
48
-						if ( is_array( $data->data ) && ! empty( $data->data ) ) {
49
-							$response = self::route( $action, $callback_instance, $callback['method'], $data->data );
47
+						$data = new find_data($callback_instance, $action);
48
+						if (is_array($data->data) && !empty($data->data)) {
49
+							$response = self::route($action, $callback_instance, $callback['method'], $data->data);
50 50
 						} else {
51 51
 							$code = 500;
52 52
 						}
53 53
 
54 54
 					} else {
55
-						if ( isset( $auth->error_message ) && is_string( $auth->error_message ) ) {
55
+						if (isset($auth->error_message) && is_string($auth->error_message)) {
56 56
 							$response = $auth->error_message;
57 57
 						}
58 58
 
@@ -61,12 +61,12 @@  discard block
 block discarded – undo
61 61
 
62 62
 				}
63 63
 
64
-			}else{
64
+			} else {
65 65
 				$code = 401;
66
-				$response = __( 'Nonce not set.', 'lasso' );
66
+				$response = __('Nonce not set.', 'lasso');
67 67
 			}
68 68
 
69
-			self::respond( $response, $code );
69
+			self::respond($response, $code);
70 70
 
71 71
 		}
72 72
 
@@ -85,8 +85,8 @@  discard block
 block discarded – undo
85 85
 	 *
86 86
 	 * @return \lasso\internal_api\auth
87 87
 	 */
88
-	protected static function auth( $action, $callback ) {
89
-		return new auth( $action, $callback );
88
+	protected static function auth($action, $callback) {
89
+		return new auth($action, $callback);
90 90
 
91 91
 	}
92 92
 
@@ -99,15 +99,15 @@  discard block
 block discarded – undo
99 99
 	 *
100 100
 	 * @return array
101 101
 	 */
102
-	protected static function find_callback( $action ) {
103
-		if ( $action ) {
104
-			$parts = explode( '_', $action );
102
+	protected static function find_callback($action) {
103
+		if ($action) {
104
+			$parts = explode('_', $action);
105 105
 
106
-			if ( isset( $parts[0] ) && isset( $parts[1] ) && isset( $parts[2] ) ) {
107
-				$class     = str_replace( '-', '_', $parts[1] );
106
+			if (isset($parts[0]) && isset($parts[1]) && isset($parts[2])) {
107
+				$class     = str_replace('-', '_', $parts[1]);
108 108
 
109 109
 				$class = "\\lasso\\{$parts[0]}\\{$class}";
110
-				$callback  = str_replace( '-', '_', $parts[2] );
110
+				$callback  = str_replace('-', '_', $parts[2]);
111 111
 
112 112
 				return array(
113 113
 					'class'  => $class,
@@ -136,9 +136,9 @@  discard block
 block discarded – undo
136 136
 	 *
137 137
 	 * @return mixed
138 138
 	 */
139
-	protected static function route( $action, $callback, $method, $data ) {
140
-		if (  method_exists( $callback, $method ) ) {
141
-			$response = call_user_func( array( $callback, $method ), $data  );
139
+	protected static function route($action, $callback, $method, $data) {
140
+		if (method_exists($callback, $method)) {
141
+			$response = call_user_func(array($callback, $method), $data);
142 142
 
143 143
 			return $response;
144 144
 
@@ -156,29 +156,29 @@  discard block
 block discarded – undo
156 156
 	 * @param array|string $response The response message to send.
157 157
 	 * @param bool|int $code Response code or bool. If is bool, response code will be 200 or 401
158 158
 	 */
159
-	protected static function respond( $response, $code ) {
160
-		if ( true === $code ) {
159
+	protected static function respond($response, $code) {
160
+		if (true === $code) {
161 161
 			$code = 200;
162 162
 		}
163 163
 
164
-		if ( false == $code ) {
164
+		if (false == $code) {
165 165
 			$code = 401;
166 166
 		}
167 167
 
168
-		if ( is_string( $response ) ) {
168
+		if (is_string($response)) {
169 169
 			$data[] = $response;
170
-		}elseif( is_array( $response ) ) {
170
+		}elseif (is_array($response)) {
171 171
 			$data = $response;
172
-		}else{
172
+		} else {
173 173
 			$data[] = $code;
174 174
 		}
175 175
 
176
-		status_header( $code );
176
+		status_header($code);
177 177
 		nocache_headers();
178
-		if ( 200 == $code ) {
179
-			wp_send_json_success( $data );
180
-		}else{
181
-			wp_send_json_error( $data );
178
+		if (200 == $code) {
179
+			wp_send_json_success($data);
180
+		} else {
181
+			wp_send_json_error($data);
182 182
 		}
183 183
 
184 184
 	}
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 	 */
201 201
 	public static function init() {
202 202
 
203
-		if ( ! self::$instance ) {
203
+		if (!self::$instance) {
204 204
 			self::$instance = new self;
205 205
 		}
206 206
 
Please login to merge, or discard this patch.
lasso.php 1 patch
Spacing   +18 added lines, -18 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.0.0.2' );
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.0.0.2');
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
 
Please login to merge, or discard this patch.