Completed
Push — master ( 605b3f...454469 )
by
unknown
01:28
created
public/includes/editor-modules.php 1 patch
Spacing   +261 added lines, -261 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';
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 		?>
58 58
 		<style>
59 59
 		#lasso-html--table:before {
60
-			content: "<?php esc_attr_e( 'Table', 'lasso' );?>";
60
+			content: "<?php esc_attr_e('Table', 'lasso'); ?>";
61 61
 		}
62 62
 		
63 63
 		
@@ -67,32 +67,32 @@  discard block
 block discarded – undo
67 67
 		?>
68 68
 		
69 69
 		.lasso-editor-controls--wrap, #lasso--post-settings2,#lasso--save,#lasso--post-delete,#lasso--exit,#lasso--publish {
70
-			background-image: -webkit-linear-gradient(top,<?php echo $button_color1;?> 0,<?php echo $button_color2;?> 100%);
71
-			background-image: -o-linear-gradient(top,<?php echo $button_color1;?> 0,<?php echo $button_color2;?> 100%);
72
-			background-image: linear-gradient(to bottom,<?php echo $button_color1;?> 0,<?php echo $button_color2;?> 100%);
73
-			color: <?php echo $text_color;?>;
70
+			background-image: -webkit-linear-gradient(top,<?php echo $button_color1; ?> 0,<?php echo $button_color2; ?> 100%);
71
+			background-image: -o-linear-gradient(top,<?php echo $button_color1; ?> 0,<?php echo $button_color2; ?> 100%);
72
+			background-image: linear-gradient(to bottom,<?php echo $button_color1; ?> 0,<?php echo $button_color2; ?> 100%);
73
+			color: <?php echo $text_color; ?>;
74 74
 		}
75 75
 		
76 76
 		.lasso--controls__right a:before, #lasso-toolbar--html__footer_desc, ul.lasso-editor-controls li:before,#lasso-side-comp-button.toolbar--side li:before
77 77
         {
78
-			color: <?php echo $text_color;?> !important;
78
+			color: <?php echo $text_color; ?> !important;
79 79
 		}
80 80
 		
81 81
 		
82 82
 		
83 83
 		ul.lasso-editor-controls li:hover, #lasso--exit:hover,#lasso--post-settings2:hover,#lasso--post-delete:hover,#lasso--publish:hover,#lasso--save:hover {
84
-			background-image: -webkit-linear-gradient(top,<?php echo $hover_color1;?> 0,<?php echo $hover_color2;?> 100%);
85
-			background-image: -o-linear-gradient(top,<?php echo $hover_color1;?> 0,<?php echo $hover_color2;?> 100%);
86
-			background-image: linear-gradient(to bottom,<?php echo $hover_color1;?> 0,<?php echo $hover_color2;?> 100%);
84
+			background-image: -webkit-linear-gradient(top,<?php echo $hover_color1; ?> 0,<?php echo $hover_color2; ?> 100%);
85
+			background-image: -o-linear-gradient(top,<?php echo $hover_color1; ?> 0,<?php echo $hover_color2; ?> 100%);
86
+			background-image: linear-gradient(to bottom,<?php echo $hover_color1; ?> 0,<?php echo $hover_color2; ?> 100%);
87 87
 		}
88 88
 		
89 89
 		.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,
90 90
 		#lasso-toolbar--link.link--drop-up #lasso-toolbar--link__wrap		{
91
-			background: <?php echo $dialog_color;?>;
92
-			color: <?php echo $text_color;?>;
91
+			background: <?php echo $dialog_color; ?>;
92
+			color: <?php echo $text_color; ?>;
93 93
 		}
94 94
 		.sweet-alert p,.lasso--modal__inner label,.lasso--toolbar__inner label {
95
-			color: <?php echo $text_color;?> !important;
95
+			color: <?php echo $text_color; ?> !important;
96 96
 		}
97 97
 		
98 98
 		<?php if (!$is_mobile) { ?>
@@ -126,48 +126,48 @@  discard block
 block discarded – undo
126 126
         }
127 127
         ?>
128 128
         </style>
129
-		<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();?>" >
129
+		<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(); ?>" >
130 130
 
131
-			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class;?> "  <?php echo $mobile_style ?> >
131
+			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class; ?> "  <?php echo $mobile_style ?> >
132 132
 
133
-				<?php do_action( 'lasso_editor_controls_before' );
133
+				<?php do_action('lasso_editor_controls_before');
134 134
 
135
-				if ( $is_capable ) { ?>
135
+				if ($is_capable) { ?>
136 136
 
137
-					<li id="lasso--edit" title="<?php esc_attr_e( 'Edit Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
137
+					<li id="lasso--edit" title="<?php esc_attr_e('Edit Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
138 138
 
139
-					<?php if ( 'off' == $post_settings_disabled || empty( $post_settings_disabled ) ) { ?>
140
-						<li id="lasso--post-settings" title="<?php esc_attr_e( 'Post Settings', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
139
+					<?php if ('off' == $post_settings_disabled || empty($post_settings_disabled)) { ?>
140
+						<li id="lasso--post-settings" title="<?php esc_attr_e('Post Settings', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
141 141
 					<?php }
142 142
 
143 143
 				} ?>
144 144
 
145
-				<li id="lasso--post-all" title="<?php esc_attr_e( 'All Posts', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
145
+				<li id="lasso--post-all" title="<?php esc_attr_e('All Posts', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
146 146
 
147
-				<?php if ( $is_capable && wp_revisions_enabled( $post ) ) { ?>
148
-					<li id="lasso--post-revisions" title="<?php esc_attr_e( 'Revisions', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
147
+				<?php if ($is_capable && wp_revisions_enabled($post)) { ?>
148
+					<li id="lasso--post-revisions" title="<?php esc_attr_e('Revisions', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
149 149
 				<?php } ?>
150 150
 
151
-				<?php if ( ( 'off' == $post_new_disabled || empty( $post_new_disabled ) && lasso_user_can('edit_posts') ) ) { ?>
152
-					<li id="lasso--post-new" title="<?php esc_attr_e( 'Add Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
151
+				<?php if (('off' == $post_new_disabled || empty($post_new_disabled) && lasso_user_can('edit_posts'))) { ?>
152
+					<li id="lasso--post-new" title="<?php esc_attr_e('Add Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
153 153
 				<?php } ?>
154 154
 
155
-				<?php do_action( 'lasso_editor_controls_after' );?>
155
+				<?php do_action('lasso_editor_controls_after'); ?>
156 156
 
157 157
 			</ul>
158 158
 
159
-			<?php if ( is_singular() && !$is_mobile ) { ?>
159
+			<?php if (is_singular() && !$is_mobile) { ?>
160 160
 
161
-				<div class="lasso--controls__right" data-posttype="<?php echo get_post_type( get_the_ID() );?>" data-status="<?php echo $status;?>">
161
+				<div class="lasso--controls__right" data-posttype="<?php echo get_post_type(get_the_ID()); ?>" data-status="<?php echo $status; ?>">
162 162
 				
163
-					<a href="#" title="<?php esc_attr_e( 'Delete Post', 'lasso' );?>" id="lasso--post-delete" class="lasso-save-post lasso--button <?php echo $sc_saving_class;?>"></a>
164
-					<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>
163
+					<a href="#" title="<?php esc_attr_e('Delete Post', 'lasso'); ?>" id="lasso--post-delete" class="lasso-save-post lasso--button <?php echo $sc_saving_class; ?>"></a>
164
+					<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>
165 165
 
166 166
 
167
-					<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>
167
+					<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>
168 168
 
169
-					<?php if ( ('draft' == $status ) || ('pending' == $status && $can_publish) ) { ?>
170
-						<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>
169
+					<?php if (('draft' == $status) || ('pending' == $status && $can_publish)) { ?>
170
+						<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>
171 171
 					<?php } ?>
172 172
 					
173 173
 
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 		</div>
179 179
 		
180 180
 		
181
-		<?php do_action( 'lasso_editor_controls_after_outside' );?>
181
+		<?php do_action('lasso_editor_controls_after_outside'); ?>
182 182
 
183 183
 	<?php }
184 184
 }
@@ -196,9 +196,9 @@  discard block
 block discarded – undo
196 196
 
197 197
 
198 198
 	// let users add custom css classes
199
-	$custom_classes = apply_filters( 'lasso_sidebar_classes', '' );
199
+	$custom_classes = apply_filters('lasso_sidebar_classes', '');
200 200
 	?>
201
-	<div id="lasso--sidebar" class="<?php echo sanitize_html_class( $custom_classes );?>" >
201
+	<div id="lasso--sidebar" class="<?php echo sanitize_html_class($custom_classes); ?>" >
202 202
 		<div class="lasso--sidebar__inner">
203 203
 			<div id="aesop-generator-settings"><div id="lasso--component__settings"></div></div>
204 204
 		</div>
@@ -220,21 +220,21 @@  discard block
 block discarded – undo
220 220
 	$is_mobile = wp_is_mobile();
221 221
 
222 222
 	// check for lasso story engine and add a class doniting this
223
-	$ase_status = class_exists( 'Aesop_Core' ) || defined( 'LASSO_CUSTOM' ) ? 'ase-active' : 'ase-not-active';
223
+	$ase_status = class_exists('Aesop_Core') || defined('LASSO_CUSTOM') ? 'ase-active' : 'ase-not-active';
224 224
 
225 225
 	// let users add custom css classes
226
-	$custom_classes = apply_filters( 'lasso_toolbar_classes', '' );
226
+	$custom_classes = apply_filters('lasso_toolbar_classes', '');
227 227
 
228 228
 	// are toolbar headings enabled
229
-	$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
230
-	$toolbar_headings_h4      = lasso_editor_get_option( 'toolbar_headings_h4', 'lasso_editor' );
231
-	$toolbar_list      = lasso_editor_get_option( 'toolbar_list', 'lasso_editor' );
229
+	$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
230
+	$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
231
+	$toolbar_list = lasso_editor_get_option('toolbar_list', 'lasso_editor');
232 232
 
233
-	$toolbar_class  = $toolbar_headings ? 'toolbar-extended' : false;
233
+	$toolbar_class = $toolbar_headings ? 'toolbar-extended' : false;
234 234
 	
235 235
 	// mobile styles
236 236
     $mobile_class = $is_mobile ? 'lasso-mobile' : false;
237
-	$mobile_style =$is_mobile ? 'style="bottom:0px;"' : null;
237
+	$mobile_style = $is_mobile ? 'style="bottom:0px;"' : null;
238 238
 	
239 239
 	//show color
240 240
 	$show_color = lasso_editor_get_option('toolbar_show_color', 'lasso_editor');
@@ -242,126 +242,126 @@  discard block
 block discarded – undo
242 242
 	//show alignment
243 243
 	$show_align = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor');
244 244
 	
245
-	$status = get_post_status( get_the_ID() );
245
+	$status = get_post_status(get_the_ID());
246 246
 	
247
-	$shortcodify_disabled = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
247
+	$shortcodify_disabled = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor');
248 248
 	
249
-	$sc_saving_class = ('on' == $shortcodify_disabled || $ase_status == 'ase-not-active')  ? 'shortcodify-disabled' : 'shortcodify-enabled';
249
+	$sc_saving_class = ('on' == $shortcodify_disabled || $ase_status == 'ase-not-active') ? 'shortcodify-disabled' : 'shortcodify-enabled';
250 250
 
251 251
 
252 252
 	?>
253
-	<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 ?>>
254
-		<ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"';}?>>
255
-			<?php do_action( 'lasso_toolbar_components_before' );?>
256
-		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e( 'Bold', 'lasso' );?>"></li>
257
-		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e( 'Underline', 'lasso' );?>"></li>
258
-		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e( 'Italicize', 'lasso' );?>"></li>
259
-		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e( 'Strikethrough', 'lasso' );?>"></li>
260
-			<li id="lasso-toolbar--components" class="lasso-toolbar--components" title="<?php esc_attr_e( 'Insert Component', 'lasso' );?>" style="color:#ffffa0;">
253
+	<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 ?>>
254
+		<ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"'; }?>>
255
+			<?php do_action('lasso_toolbar_components_before'); ?>
256
+		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e('Bold', 'lasso'); ?>"></li>
257
+		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e('Underline', 'lasso'); ?>"></li>
258
+		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e('Italicize', 'lasso'); ?>"></li>
259
+		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e('Strikethrough', 'lasso'); ?>"></li>
260
+			<li id="lasso-toolbar--components" class="lasso-toolbar--components" title="<?php esc_attr_e('Insert Component', 'lasso'); ?>" style="color:#ffffa0;">
261 261
 			    <ul id="lasso-toolbar--components__list" style="display:none;color:white;">
262
-			    	<?php if ( 'ase-active' == $ase_status ): ?>
263
-						<li data-type="image" title="<?php esc_attr_e( 'Image', 'lasso' );?>" class="lasso-toolbar--component__image"></li>
264
-						<li data-type="character" title="<?php esc_attr_e( 'Character', 'lasso' );?>" class="lasso-toolbar--component__character"></li>
265
-						<li data-type="quote" title="<?php esc_attr_e( 'Quote', 'lasso' );?>"  class="lasso-toolbar--component__quote"></li>
266
-						<li data-type="content" title="<?php esc_attr_e( 'Content', 'lasso' );?>"  class="lasso-toolbar--component__content"></li>
267
-						<li data-type="chapter" title="<?php esc_attr_e( 'Chapter', 'lasso' );?>"  class="lasso-toolbar--component__chapter"></li>
268
-						<li data-type="parallax" title="<?php esc_attr_e( 'Parallax', 'lasso' );?>"  class="lasso-toolbar--component__parallax"></li>
269
-						<li data-type="audio" title="<?php esc_attr_e( 'Audio', 'lasso' );?>"  class="lasso-toolbar--component__audio"></li>
270
-						<li data-type="video" title="<?php esc_attr_e( 'Video', 'lasso' );?>"  class="lasso-toolbar--component__video"></li>
271
-						<li data-type="map" title="<?php esc_attr_e( 'Map', 'lasso' );?>"  class="lasso-toolbar--component__map"></li>
272
-						<li data-type="timeline_stop" title="<?php esc_attr_e( 'Timeline', 'lasso' );?>"  class="lasso-toolbar--component__timeline"></li>
273
-						<li data-type="document" title="<?php esc_attr_e( 'Document', 'lasso' );?>"  class="lasso-toolbar--component__document"></li>
274
-						<li data-type="collection" title="<?php esc_attr_e( 'Collection', 'lasso' );?>"  class="lasso-toolbar--component__collection"></li>
275
-						<li data-type="gallery" title="<?php esc_attr_e( 'Gallery', 'lasso' );?>"  class="lasso-toolbar--component__gallery"></li>
276
-						<?php if ( class_exists ('Aesop_GalleryPop') ) { ?>
277
-						     <li data-type="gallery" title="<?php esc_attr_e( 'Gallery Pop', 'lasso' );?>"  class="lasso-toolbar--component__gallerypop"></li>
262
+			    	<?php if ('ase-active' == $ase_status): ?>
263
+						<li data-type="image" title="<?php esc_attr_e('Image', 'lasso'); ?>" class="lasso-toolbar--component__image"></li>
264
+						<li data-type="character" title="<?php esc_attr_e('Character', 'lasso'); ?>" class="lasso-toolbar--component__character"></li>
265
+						<li data-type="quote" title="<?php esc_attr_e('Quote', 'lasso'); ?>"  class="lasso-toolbar--component__quote"></li>
266
+						<li data-type="content" title="<?php esc_attr_e('Content', 'lasso'); ?>"  class="lasso-toolbar--component__content"></li>
267
+						<li data-type="chapter" title="<?php esc_attr_e('Chapter', 'lasso'); ?>"  class="lasso-toolbar--component__chapter"></li>
268
+						<li data-type="parallax" title="<?php esc_attr_e('Parallax', 'lasso'); ?>"  class="lasso-toolbar--component__parallax"></li>
269
+						<li data-type="audio" title="<?php esc_attr_e('Audio', 'lasso'); ?>"  class="lasso-toolbar--component__audio"></li>
270
+						<li data-type="video" title="<?php esc_attr_e('Video', 'lasso'); ?>"  class="lasso-toolbar--component__video"></li>
271
+						<li data-type="map" title="<?php esc_attr_e('Map', 'lasso'); ?>"  class="lasso-toolbar--component__map"></li>
272
+						<li data-type="timeline_stop" title="<?php esc_attr_e('Timeline', 'lasso'); ?>"  class="lasso-toolbar--component__timeline"></li>
273
+						<li data-type="document" title="<?php esc_attr_e('Document', 'lasso'); ?>"  class="lasso-toolbar--component__document"></li>
274
+						<li data-type="collection" title="<?php esc_attr_e('Collection', 'lasso'); ?>"  class="lasso-toolbar--component__collection"></li>
275
+						<li data-type="gallery" title="<?php esc_attr_e('Gallery', 'lasso'); ?>"  class="lasso-toolbar--component__gallery"></li>
276
+						<?php if (class_exists('Aesop_GalleryPop')) { ?>
277
+						     <li data-type="gallery" title="<?php esc_attr_e('Gallery Pop', 'lasso'); ?>"  class="lasso-toolbar--component__gallerypop"></li>
278 278
 						<?php }?>
279
-						<?php if ( class_exists ('Aesop_Events') ) { ?>
280
-						     <li data-type="events" title="<?php esc_attr_e( 'Event', 'lasso' );?>"  class="lasso-toolbar--component__event"></li>
279
+						<?php if (class_exists('Aesop_Events')) { ?>
280
+						     <li data-type="events" title="<?php esc_attr_e('Event', 'lasso'); ?>"  class="lasso-toolbar--component__event"></li>
281 281
 						<?php }?>
282 282
 					<?php else: ?>
283
-						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );?>" class="image lasso-toolbar--component__image"></li>
284
-						<li data-type="wpquote" title="<?php esc_attr_e( 'WordPress Quote', 'lasso' );?>" class="quote lasso-toolbar--component__quote"></li>
285
-						<!--li data-type="wpvideo" title="<?php esc_attr_e( 'WordPress Video', 'lasso' );?>" class="video lasso-toolbar--component__video"></li-->
283
+						<li data-type="wpimg" title="<?php esc_attr_e('WordPress Image', 'lasso'); ?>" class="image lasso-toolbar--component__image"></li>
284
+						<li data-type="wpquote" title="<?php esc_attr_e('WordPress Quote', 'lasso'); ?>" class="quote lasso-toolbar--component__quote"></li>
285
+						<!--li data-type="wpvideo" title="<?php esc_attr_e('WordPress Video', 'lasso'); ?>" class="video lasso-toolbar--component__video"></li-->
286 286
 					<?php endif; ?>
287
-					<?php do_action( 'lasso_toolbar_components' );?>
287
+					<?php do_action('lasso_toolbar_components'); ?>
288 288
 			    </ul>
289 289
 			</li>
290
-		    <?php if ( $toolbar_headings ): ?>
291
-		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>"></li>
292
-		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>"></li>
290
+		    <?php if ($toolbar_headings): ?>
291
+		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>"></li>
292
+		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>"></li>
293 293
 			<?php endif; ?>
294 294
 			
295 295
 			
296 296
 			
297
-			<?php if ( $toolbar_headings_h4 ): ?>
298
-		    <li id="lasso-toolbar--h4" title="<?php esc_attr_e( 'H4 Heading', 'lasso' );?>"></li>
299
-		    <li id="lasso-toolbar--h5" title="<?php esc_attr_e( 'H5 Heading', 'lasso' );?>"></li>
300
-			<li id="lasso-toolbar--h6" title="<?php esc_attr_e( 'H6 Heading', 'lasso' );?>"></li>
297
+			<?php if ($toolbar_headings_h4): ?>
298
+		    <li id="lasso-toolbar--h4" title="<?php esc_attr_e('H4 Heading', 'lasso'); ?>"></li>
299
+		    <li id="lasso-toolbar--h5" title="<?php esc_attr_e('H5 Heading', 'lasso'); ?>"></li>
300
+			<li id="lasso-toolbar--h6" title="<?php esc_attr_e('H6 Heading', 'lasso'); ?>"></li>
301 301
 			<?php endif; ?>
302 302
 			
303
-			<?php if ( $show_color ): ?>
304
-		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e( 'Set Color for Selected Text', 'lasso' );?>"></li>
305
-		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e( 'Choose Color', 'lasso' );?>"></li>
303
+			<?php if ($show_color): ?>
304
+		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e('Set Color for Selected Text', 'lasso'); ?>"></li>
305
+		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e('Choose Color', 'lasso'); ?>"></li>
306 306
 			<?php endif; ?>
307 307
 			
308
-			<?php if ( $toolbar_list ): ?>
309
-		    <li id="lasso-toolbar--ol" title="<?php esc_attr_e( 'Ordered List', 'lasso' );?>"></li>
310
-		    <li id="lasso-toolbar--ul" title="<?php esc_attr_e( 'Unordered List', 'lasso' );?>"></li>
308
+			<?php if ($toolbar_list): ?>
309
+		    <li id="lasso-toolbar--ol" title="<?php esc_attr_e('Ordered List', 'lasso'); ?>"></li>
310
+		    <li id="lasso-toolbar--ul" title="<?php esc_attr_e('Unordered List', 'lasso'); ?>"></li>
311 311
 			<?php endif; ?>
312 312
 					
313 313
 		    
314
-			<li id="lasso-toolbar--link" title="<?php esc_attr_e( 'Anchor Link', 'lasso' );?>">
314
+			<li id="lasso-toolbar--link" title="<?php esc_attr_e('Anchor Link', 'lasso'); ?>">
315 315
 		    	<div id="lasso-toolbar--link__wrap" <?php echo $mobile_style ?> >
316
-		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'http://url.com', 'lasso' );?>"></div>
317
-		    		<a href="#" title="<?php esc_attr_e( 'Create Link', 'lasso' );?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
316
+		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e('http://url.com', 'lasso'); ?>"></div>
317
+		    		<a href="#" title="<?php esc_attr_e('Create Link', 'lasso'); ?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
318 318
 					<input class="styled-checkbox" type="checkbox" id="aesop-toolbar--link_newtab" checked/>
319
-                    <label for="aesop-toolbar--link_newtab"><?php esc_attr_e( 'Open in a New Tab', 'lasso' );?></label>
319
+                    <label for="aesop-toolbar--link_newtab"><?php esc_attr_e('Open in a New Tab', 'lasso'); ?></label>
320 320
 		    	</div>
321 321
 		    </li>
322
-		    <?php do_action( 'lasso_toolbar_components_after' );?>
323
-		    <li id="lasso-toolbar--html" title="<?php esc_attr_e( 'Insert HTML or Code', 'lasso' );?>">
322
+		    <?php do_action('lasso_toolbar_components_after'); ?>
323
+		    <li id="lasso-toolbar--html" title="<?php esc_attr_e('Insert HTML or Code', 'lasso'); ?>">
324 324
 		    	<div id="lasso-toolbar--html__wrap" <?php echo $mobile_style ?>>
325
-		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?>"></div>
325
+		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?>"></div>
326 326
 		    		<div id="lasso-toolbar--html__footer">
327 327
 					<div id="lasso-toolbar--html__footer_desc" >
328
-					<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?><br>
329
-					<?php esc_attr_e( 'You can also use Shortcodes', 'lasso' );?><br>
330
-					<?php esc_attr_e( 'You can also enter a URL to embed, such as Youtube, Vimeo and Twitter URLs.', 'lasso' );?>
328
+					<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?><br>
329
+					<?php esc_attr_e('You can also use Shortcodes', 'lasso'); ?><br>
330
+					<?php esc_attr_e('You can also enter a URL to embed, such as Youtube, Vimeo and Twitter URLs.', 'lasso'); ?>
331 331
 					</div>
332 332
 		    			<ul class="lasso-toolbar--html-snips">
333 333
 						
334
-		    				<?php if ( !$toolbar_headings ): ?>
335
-		    				<li id="lasso-html--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>">
336
-		    				<li id="lasso-html--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>">
334
+		    				<?php if (!$toolbar_headings): ?>
335
+		    				<li id="lasso-html--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>">
336
+		    				<li id="lasso-html--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>">
337 337
 		    				<?php endif; ?>
338
-		    				<li id="lasso-html--ol" title="<?php esc_attr_e( 'Ordered List', 'lasso' );?>">
339
-							<li id="lasso-html--ul" title="<?php esc_attr_e( 'Unordered List', 'lasso' );?>">
338
+		    				<li id="lasso-html--ol" title="<?php esc_attr_e('Ordered List', 'lasso'); ?>">
339
+							<li id="lasso-html--ul" title="<?php esc_attr_e('Unordered List', 'lasso'); ?>">
340 340
 							
341
-							<li id="lasso-html--table" title="<?php esc_attr_e( 'Table', 'lasso' );?>">
341
+							<li id="lasso-html--table" title="<?php esc_attr_e('Table', 'lasso'); ?>">
342 342
 		    			</ul>
343
-		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e( 'Cancel', 'lasso' );?></a>
344
-		    			<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>
343
+		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e('Cancel', 'lasso'); ?></a>
344
+		    			<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>
345 345
 		    		</div>
346 346
 		    	</div>
347 347
 		    </li>
348
-			<?php if ( $show_align ): ?>
349
-		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e( 'Text Left Align', 'lasso' );?>"></li>
350
-		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e( 'Text Center Align', 'lasso' );?>"></li>
351
-			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e( 'Text Right Align', 'lasso' );?>"></li>
348
+			<?php if ($show_align): ?>
349
+		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e('Text Left Align', 'lasso'); ?>"></li>
350
+		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e('Text Center Align', 'lasso'); ?>"></li>
351
+			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e('Text Right Align', 'lasso'); ?>"></li>
352 352
 			<?php endif; ?>
353 353
 		</ul>
354
-		<?php if ( is_singular() && $is_mobile ) { ?>
354
+		<?php if (is_singular() && $is_mobile) { ?>
355 355
 
356
-				<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;">
356
+				<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;">
357 357
 
358
-					<a href="#" title="<?php esc_attr_e( 'Delete Post', 'lasso' );?>" id="lasso--post-delete" class="lasso-save-post lasso--button <?php echo $sc_saving_class;?>"></a>
359
-					<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>
358
+					<a href="#" title="<?php esc_attr_e('Delete Post', 'lasso'); ?>" id="lasso--post-delete" class="lasso-save-post lasso--button <?php echo $sc_saving_class; ?>"></a>
359
+					<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>
360 360
 
361
-					<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>
361
+					<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>
362 362
 
363
-					<?php if ( 'draft' == $status && ( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') )  ) { ?>
364
-						<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>
363
+					<?php if ('draft' == $status && (lasso_user_can('publish_posts') || lasso_user_can('publish_pages'))) { ?>
364
+						<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>
365 365
 					<?php } ?>
366 366
 
367 367
 				</div>
@@ -379,20 +379,20 @@  discard block
 block discarded – undo
379 379
  */
380 380
 function lasso_editor_settings_toolbar() {
381 381
 
382
-	$delete_nonce = wp_create_nonce( 'lasso-delete-nonce' );
382
+	$delete_nonce = wp_create_nonce('lasso-delete-nonce');
383 383
 
384 384
 	ob_start();
385 385
 
386 386
 
387 387
 	// let users add custom css classes
388
-	$custom_classes = apply_filters( 'lasso_component_classes', '' );
388
+	$custom_classes = apply_filters('lasso_component_classes', '');
389 389
 
390 390
 	?>
391
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
392
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
393
-		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
394
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
395
-		<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>
391
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
392
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
393
+		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
394
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
395
+		<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>
396 396
 	</ul>
397 397
 
398 398
 	<?php return ob_get_clean();
@@ -410,13 +410,13 @@  discard block
 block discarded – undo
410 410
 
411 411
 
412 412
 	// has post thumbnail
413
-	$has_thumbnail = has_post_thumbnail( get_the_ID() ) ? 'class="lasso--featImg--has-thumb"' : false;
413
+	$has_thumbnail = has_post_thumbnail(get_the_ID()) ? 'class="lasso--featImg--has-thumb"' : false;
414 414
 
415 415
 	?>
416
-	<ul id="lasso--featImgControls" <?php echo $has_thumbnail;?>>
417
-		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e( 'Replace Image', 'lasso' );?>" href="#"><i class="lasso-icon-image"></i></a></li>
418
-		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e( 'Delete Image', 'lasso' );?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
419
-		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e( 'save', 'lasso' );?></a></li>
416
+	<ul id="lasso--featImgControls" <?php echo $has_thumbnail; ?>>
417
+		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e('Replace Image', 'lasso'); ?>" href="#"><i class="lasso-icon-image"></i></a></li>
418
+		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e('Delete Image', 'lasso'); ?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
419
+		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e('save', 'lasso'); ?></a></li>
420 420
 	</ul>
421 421
 
422 422
 	<?php return ob_get_clean();
@@ -440,55 +440,55 @@  discard block
 block discarded – undo
440 440
 
441 441
 	$postid = get_the_ID();
442 442
 
443
-	$status = get_post_status( $postid );
444
-	$nonce = wp_create_nonce( 'lasso-update-post-settings' );
443
+	$status = get_post_status($postid);
444
+	$nonce = wp_create_nonce('lasso-update-post-settings');
445 445
 
446 446
 	// let users add custom css classes
447
-	$custom_classes = apply_filters( 'lasso_modal_settings_classes', '' );
447
+	$custom_classes = apply_filters('lasso_modal_settings_classes', '');
448 448
 
449 449
 	// objects categories
450
-	$categories 		= lasso_get_post_objects( $postid, 'category' );
451
-	$tags 				= lasso_get_post_objects( $postid, 'tag' );
450
+	$categories = lasso_get_post_objects($postid, 'category');
451
+	$tags = lasso_get_post_objects($postid, 'tag');
452 452
 
453 453
 	// modal tabs
454
-	$tabs  				= lasso_modal_addons('tab');
455
-	$content 			= lasso_modal_addons('content');
454
+	$tabs = lasso_modal_addons('tab');
455
+	$content = lasso_modal_addons('content');
456 456
 	
457 457
 	//editor options
458 458
 	$allow_change_date = lasso_editor_get_option('allow_change_date', 'lasso_editor');
459 459
 	$no_url_setting = lasso_editor_get_option('no_url_setting', 'lasso_editor');
460 460
 
461 461
 	// are we singular
462
-	$is_singular 		= is_singular();
462
+	$is_singular = is_singular();
463 463
 	$is_singular_class 	= $is_singular ? 'lasso--postsettings__2col' : 'lasso--postsettings__1col';
464 464
 	$has_thumb_class    = has_post_thumbnail() ? 'has-thumbnail' : 'no-thumbnail';
465 465
 	$theme_supports     = current_theme_supports('post-thumbnails');
466
-	$default_image 		= LASSO_URL.'/admin/assets/img/empty-img.png';
466
+	$default_image = LASSO_URL.'/admin/assets/img/empty-img.png';
467 467
 	
468 468
 	// do we support pending status
469 469
 	$no_pending_status = lasso_editor_get_option('no_pending_status', 'lasso_editor');
470 470
 
471 471
 ?>
472
-	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>">
472
+	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>">
473 473
 		<div class="lasso--modal__inner">
474 474
 
475
-			<?php if( $tabs ) { echo $tabs; } ?>
475
+			<?php if ($tabs) { echo $tabs; } ?>
476 476
 
477 477
 			<div class="lasso--modal__content modal__content--core visible" data-addon-content="core">
478
-				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class;?>" >
478
+				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class; ?>" >
479 479
 
480
-					<?php if ( $is_singular && $theme_supports ) : ?>
480
+					<?php if ($is_singular && $theme_supports) : ?>
481 481
 					<div class="lasso--postsettings__left">
482
-						<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>
483
-						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url( $default_image );?>">
482
+						<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>
483
+						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url($default_image); ?>">
484 484
 
485 485
 							<div id="lasso--post-thumb__controls" class="lasso--post-thumb__controls">
486
-								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image','lasso');?>" class="dashicons dashicons-edit"></i>
487
-								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image','lasso');?>" class="dashicons dashicons-no-alt"></i>
486
+								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image', 'lasso'); ?>" class="dashicons dashicons-edit"></i>
487
+								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image', 'lasso'); ?>" class="dashicons dashicons-no-alt"></i>
488 488
 								<i id="lasso--save-status" class="lasso-icon lasso-icon-spinner6 not-visible"></i>
489 489
 							</div>
490 490
 
491
-							<?php echo has_post_thumbnail() ? get_the_post_thumbnail( $post->ID, 'medium' ) : '<img src="'.$default_image.'">'; ?>
491
+							<?php echo has_post_thumbnail() ? get_the_post_thumbnail($post->ID, 'medium') : '<img src="'.$default_image.'">'; ?>
492 492
 
493 493
 						</div>
494 494
 						<div id="lasso--featImgSave"><a href="#" class="not-visible">Save</a></div>
@@ -498,15 +498,15 @@  discard block
 block discarded – undo
498 498
 
499 499
 					<div class="lasso--postsettings__right">
500 500
 
501
-						<?php if( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') ): ?>
501
+						<?php if (lasso_user_can('publish_posts') || lasso_user_can('publish_pages')): ?>
502 502
 						<div class="lasso--postsettings__option story-status-option">
503
-							<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>
504
-							<ul class="story-status story-status-<?php echo sanitize_html_class( $status );?>">
505
-								<li id="lasso--status-draft"><?php _e( 'Draft', 'lasso' );?></li>
506
-								<?php if( !$no_pending_status ): ?>								
507
-								<li id="lasso--status-pending"><?php _e( 'Pending', 'lasso' );?></li>
503
+							<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>
504
+							<ul class="story-status story-status-<?php echo sanitize_html_class($status); ?>">
505
+								<li id="lasso--status-draft"><?php _e('Draft', 'lasso'); ?></li>
506
+								<?php if (!$no_pending_status): ?>								
507
+								<li id="lasso--status-pending"><?php _e('Pending', 'lasso'); ?></li>
508 508
 								<?php endif; ?>
509
-								<li id="lasso--status-publish"><?php _e( 'Publish', 'lasso' );?></li>
509
+								<li id="lasso--status-publish"><?php _e('Publish', 'lasso'); ?></li>
510 510
 							</ul>
511 511
 							<div class="lasso--slider_wrap">
512 512
 								<div id="lasso--slider"></div>
@@ -514,10 +514,10 @@  discard block
 block discarded – undo
514 514
 						</div>
515 515
 						<?php endif; ?>
516 516
 
517
-						<?php if ( 'publish' == $status  && !$no_url_setting): ?>
517
+						<?php if ('publish' == $status && !$no_url_setting): ?>
518 518
 						<div class="lasso--postsettings__option story-slug-option">
519
-							<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>
520
-							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset( $post ) ? esc_attr( $post->post_name ) : false;?>">
519
+							<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>
520
+							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset($post) ? esc_attr($post->post_name) : false; ?>">
521 521
 						</div>
522 522
 						<?php endif; ?>
523 523
 
@@ -526,21 +526,21 @@  discard block
 block discarded – undo
526 526
 					<div class="lasso--postsettings__middle">
527 527
 
528 528
 						<div class="lasso--postsettings__option story-categories-option">
529
-							<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>
530
-							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories;?>">
529
+							<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>
530
+							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories; ?>">
531 531
 						</div>
532 532
 
533 533
 						<div class="lasso--postsettings__option story-tags-option">
534
-							<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>
535
-							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags;?>">
534
+							<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>
535
+							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags; ?>">
536 536
 						</div>
537 537
 						<?php 
538 538
 						if ($allow_change_date) { 
539
-						    $dateformat = get_option( 'date_format' ); 
539
+						    $dateformat = get_option('date_format'); 
540 540
 						?>
541
-						    <label><?php _e( 'Post Date', 'lasso' ); ?></label>
542
-							<input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid);?>"/>
543
-							<a href="#" id="lasso--postsettings-setnow"><?php _e( 'Set to Now', 'lasso' ); ?></a>
541
+						    <label><?php _e('Post Date', 'lasso'); ?></label>
542
+							<input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid); ?>"/>
543
+							<a href="#" id="lasso--postsettings-setnow"><?php _e('Set to Now', 'lasso'); ?></a>
544 544
 						<?php
545 545
 						}?>
546 546
 
@@ -562,23 +562,23 @@  discard block
 block discarded – undo
562 562
 					?>
563 563
 					<!--/div-->
564 564
 
565
-					<?php do_action( 'lasso_modal_post_form' ); // action ?>
565
+					<?php do_action('lasso_modal_post_form'); // action ?>
566 566
 
567 567
 					<div class="lasso--postsettings__footer" >
568
-						<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
568
+						<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
569 569
 						<input type="hidden" name="status" value="">
570 570
 						<input type="hidden" name="categories" value="">
571
-						<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
571
+						<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
572 572
 						<input type="hidden" name="action" value="process_update-object_post">
573
-						<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
574
-						<?php do_action( 'lasso_modal_post_form_footer' ); // action ?>
575
-						<input type="submit" id="lasso--postsettings-submit" value="<?php esc_attr_e( 'Save', 'lasso' );?>">
573
+						<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
574
+						<?php do_action('lasso_modal_post_form_footer'); // action ?>
575
+						<input type="submit" id="lasso--postsettings-submit" value="<?php esc_attr_e('Save', 'lasso'); ?>">
576 576
 					</div>
577 577
 
578 578
 				</form>
579 579
 			</div>
580 580
 
581
-			<?php if( $tabs ) { echo $content; } ?>
581
+			<?php if ($tabs) { echo $content; } ?>
582 582
 
583 583
 		</div>
584 584
 
@@ -600,41 +600,41 @@  discard block
 block discarded – undo
600 600
 	ob_start();
601 601
 
602 602
 
603
-	$status = get_post_status( get_the_ID() );
603
+	$status = get_post_status(get_the_ID());
604 604
 
605
-	$nonce = wp_create_nonce( 'lasso-editor-new-post' );
605
+	$nonce = wp_create_nonce('lasso-editor-new-post');
606 606
 
607 607
 	// let users add custom css classes
608
-	$custom_classes = apply_filters( 'lasso_modal_post_classes', '' );
608
+	$custom_classes = apply_filters('lasso_modal_post_classes', '');
609 609
 
610 610
 	// return the post type
611
-	$type = get_post_type( get_the_ID() );
611
+	$type = get_post_type(get_the_ID());
612 612
 
613 613
 	$mobile_style = "";
614 614
 	if (wp_is_mobile()) {
615 615
 		//$mobile_style = 'style="top:140px !important;"';
616 616
 	}
617 617
 	?>
618
-	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" <?php echo $mobile_style;?>">
618
+	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" <?php echo $mobile_style; ?>">
619 619
 		<div class="lasso--modal__inner lasso--hasnewform">
620 620
 
621 621
 			<form id="lasso--postnew__form" enctype="multipart/form-data" class="lasso--post-form">
622 622
 
623 623
 				<div class="lasso--postsettings__option story-slug-option lasso--last-option">
624
-					<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>
625
-					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e( 'Type Your Title Here', 'lasso' );?>">
624
+					<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>
625
+					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e('Type Your Title Here', 'lasso'); ?>">
626 626
 						<div class="lasso--select-wrap" style="width:90px">
627 627
 						<select id="lasso--select-type" name="story_type">
628 628
 
629 629
 							<?php
630 630
 								$types = lasso_post_types_names();
631
-								if ( !empty( $types ) ) {
632
-									foreach( $types as $name => $label ) {										
633
-										$type = preg_replace( '/s\b/','', $name );
631
+								if (!empty($types)) {
632
+									foreach ($types as $name => $label) {										
633
+										$type = preg_replace('/s\b/', '', $name);
634 634
 										if ($type == 'page' && !current_user_can('edit_pages')) {
635 635
 											continue;
636 636
 										}
637
-										printf( '<option value="%s">%s</option>', lcfirst( esc_attr( $type ) ) , ucfirst( esc_attr( $label ) ) );
637
+										printf('<option value="%s">%s</option>', lcfirst(esc_attr($type)), ucfirst(esc_attr($label)));
638 638
 									}
639 639
 
640 640
 								}
@@ -645,19 +645,19 @@  discard block
 block discarded – undo
645 645
 				</div>
646 646
 
647 647
 				<div class="lasso--postsettings__footer">
648
-					<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
648
+					<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
649 649
 					<input type="hidden" name="action" value="process_new-object_post">
650 650
 					<?php
651
-						if ( !empty( $types ) ) {
651
+						if (!empty($types)) {
652 652
 							// get the first element
653 653
 							$keys = array_keys($types);
654
-						    $type =$keys[0];						
655
-							$type = preg_replace( '/s\b/','', $type );
656
-							printf( '<input type="hidden" name="object" value="%s">', lcfirst( esc_attr( $type ) ) );		
654
+						    $type = $keys[0];						
655
+							$type = preg_replace('/s\b/', '', $type);
656
+							printf('<input type="hidden" name="object" value="%s">', lcfirst(esc_attr($type)));		
657 657
 						}
658 658
 					?>
659
-					<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
660
-					<input type="submit" value="<?php esc_attr_e( 'Create', 'lasso' );?>">
659
+					<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
660
+					<input type="submit" value="<?php esc_attr_e('Create', 'lasso'); ?>">
661 661
 				</div>
662 662
 
663 663
 			</form>
@@ -685,18 +685,18 @@  discard block
 block discarded – undo
685 685
 	ob_start();
686 686
 
687 687
 	// post status
688
-	$status = get_post_status( get_the_ID() );
688
+	$status = get_post_status(get_the_ID());
689 689
 
690 690
 	// let users add custom css classes
691
-	$custom_classes = apply_filters( 'lasso_modal_all_post_classes', '' );
691
+	$custom_classes = apply_filters('lasso_modal_all_post_classes', '');
692 692
 
693 693
 	?>
694
-	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" style="max-height:100%">
694
+	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" style="max-height:100%">
695 695
 		<div class="lasso--modal__inner">
696 696
 
697 697
 			<div class="lasso--post-filtering not-visible">
698 698
 				<div class="lasso--search__results">
699
-					<span id="lasso--results-found"></span><?php _e('results found','lasso');?>
699
+					<span id="lasso--results-found"></span><?php _e('results found', 'lasso'); ?>
700 700
 				</div>
701 701
 				<div class="lasso--search">
702 702
 					<i id="lasso--search__toggle" class="dashicons dashicons-search"></i>
@@ -710,18 +710,18 @@  discard block
 block discarded – undo
710 710
 				$post_types = lasso_post_types_names();
711 711
 				$rest_bases = lasso_post_types_rest_base();
712 712
 
713
-				if ( ! empty( $post_types ) ) {
713
+				if (!empty($post_types)) {
714 714
 					$first = 'active';
715
-					foreach( $post_types as $name => $label ) {
715
+					foreach ($post_types as $name => $label) {
716 716
 						if (array_key_exists($name, $rest_bases)) {
717
-							printf( '<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr( $first), esc_attr( $rest_bases[$name] ), esc_attr( $label ) );
717
+							printf('<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr($first), esc_attr($rest_bases[$name]), esc_attr($label));
718 718
 						}
719 719
 						$first = '';
720 720
 					}
721 721
 
722 722
 				}
723 723
 
724
-				do_action('lasso_modal_post_objects');?>
724
+				do_action('lasso_modal_post_objects'); ?>
725 725
 
726 726
 			</ul>
727 727
 			<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
@@ -741,14 +741,14 @@  discard block
 block discarded – undo
741 741
 
742 742
 
743 743
 	// let users add custom css classes
744
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
744
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
745 745
 
746 746
 	?>
747
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
748
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
749
-		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
750
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
751
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
747
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
748
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
749
+		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
750
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
751
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
752 752
 	</ul>
753 753
 
754 754
 	<?php return ob_get_clean();
@@ -760,14 +760,14 @@  discard block
 block discarded – undo
760 760
 
761 761
 
762 762
 	// let users add custom css classes
763
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
763
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
764 764
 
765 765
 	?>
766
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
767
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
768
-		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
769
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
770
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
766
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
767
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
768
+		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
769
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
770
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
771 771
 	</ul>
772 772
 
773 773
 	<?php return ob_get_clean();
@@ -780,16 +780,16 @@  discard block
 block discarded – undo
780 780
  */
781 781
 function lasso_map_form_footer() {
782 782
 
783
-	$nonce = wp_create_nonce( 'lasso-process-map' );
783
+	$nonce = wp_create_nonce('lasso-process-map');
784 784
 
785 785
 	ob_start();
786 786
 
787 787
 	?>
788 788
 	<div class="lasso--map-form__footer">
789
-		<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
790
-		<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
789
+		<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
790
+		<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
791 791
 		<input type="hidden" name="action" value="process_map_save">
792
-		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e( 'Save Locations', 'lasso' );?>">
792
+		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e('Save Locations', 'lasso'); ?>">
793 793
 	</div>
794 794
 
795 795
 	<?php return ob_get_clean();
@@ -807,7 +807,7 @@  discard block
 block discarded – undo
807 807
 
808 808
 	?>
809 809
 	<div id="lasso--pagerefresh" class="visible">
810
-		<?php _e( 'Save this post and refesh the page to see these changes.', 'lasso' );?>
810
+		<?php _e('Save this post and refesh the page to see these changes.', 'lasso'); ?>
811 811
 	</div>
812 812
 
813 813
 	<?php return ob_get_clean();
@@ -821,43 +821,43 @@  discard block
 block discarded – undo
821 821
  */
822 822
 function lasso_editor_options_blob() {
823 823
 
824
-	$codes   = function_exists( 'aesop_shortcodes' ) ? aesop_shortcodes() : apply_filters( 'lasso_custom_options', '' );
825
-	$galleries  = function_exists( 'lasso_editor_galleries_exist' ) && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
824
+	$codes = function_exists('aesop_shortcodes') ? aesop_shortcodes() : apply_filters('lasso_custom_options', '');
825
+	$galleries = function_exists('lasso_editor_galleries_exist') && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
826 826
 
827
-	$nonce = wp_create_nonce( 'lasso_gallery' );
827
+	$nonce = wp_create_nonce('lasso_gallery');
828 828
 
829 829
 	$blob = array();
830 830
 
831
-	if ( empty( $codes ) )
831
+	if (empty($codes))
832 832
 		return;
833 833
 
834
-	foreach ( $codes as $slug => $shortcode ) {
834
+	foreach ($codes as $slug => $shortcode) {
835 835
 		$return = '';
836 836
 		// Shortcode has atts
837 837
 
838
-		if ( count( $shortcode['atts'] ) && $shortcode['atts'] ) {
838
+		if (count($shortcode['atts']) && $shortcode['atts']) {
839 839
 
840
-			foreach ( $shortcode['atts'] as $attr_name => $attr_info ) {
840
+			foreach ($shortcode['atts'] as $attr_name => $attr_info) {
841 841
 
842 842
 
843
-				$prefix = isset( $attr_info['prefix'] ) ? sprintf( '<span class="lasso-option-prefix">%s</span>', $attr_info['prefix'] ) : null;
843
+				$prefix = isset($attr_info['prefix']) ? sprintf('<span class="lasso-option-prefix">%s</span>', $attr_info['prefix']) : null;
844 844
 
845 845
 				$return .= '<form id="aesop-generator-settings" class="lasso--component-settings-form" class="'.$galleries.'" method="post">';
846 846
 				$return .= '<p data-option="'.$attr_name.'" class="lasso-option aesop-'.$slug.'-'.$attr_name.'">';
847
-				$return .= '<label for="aesop-generator-attr-' . $attr_name . '">' . $attr_info['desc'] . '</label>';
847
+				$return .= '<label for="aesop-generator-attr-'.$attr_name.'">'.$attr_info['desc'].'</label>';
848 848
 				$return .= '<small class="lasso-option-desc">'.$attr_info['tip'].'</small>';
849 849
 				// Select
850 850
 
851
-				if ( isset( $attr_info['values'] ) ) {
851
+				if (isset($attr_info['values'])) {
852 852
 
853
-					$return .= '<select name="' . $attr_name . '" id="aesop-generator-attr-' . $attr_name . '" class="lasso-generator-attr">';
853
+					$return .= '<select name="'.$attr_name.'" id="aesop-generator-attr-'.$attr_name.'" class="lasso-generator-attr">';
854 854
 
855
-					$i=0;
855
+					$i = 0;
856 856
 
857
-					foreach ( $attr_info['values'] as $attr_value ) {
857
+					foreach ($attr_info['values'] as $attr_value) {
858 858
 						$attr_value_selected = $attr_info['default'] == $attr_value ? ' selected="selected"' : '';
859 859
 
860
-						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" ' . $attr_value_selected . '>'.$attr_info['values'][$i]['name'].'</option>';
860
+						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" '.$attr_value_selected.'>'.$attr_info['values'][$i]['name'].'</option>';
861 861
 
862 862
 						$i++;
863 863
 					}
@@ -866,24 +866,24 @@  discard block
 block discarded – undo
866 866
 
867 867
 				} else {
868 868
 
869
-					$attr_field_type = isset( $attr_info['type'] ) ? $attr_info['type'] : 'text';
869
+					$attr_field_type = isset($attr_info['type']) ? $attr_info['type'] : 'text';
870 870
 
871 871
 					// image upload
872
-					if ( 'media_upload' == $attr_info['type'] ) {
872
+					if ('media_upload' == $attr_info['type']) {
873 873
 
874
-						$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.'" />';
874
+						$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.'" />';
875 875
 						$return .= '<a href="#" id="lasso-upload-img" class="lasso-option-button" /></a>';
876 876
 
877
-					} elseif ( 'color' == $attr_info['type'] ) {
877
+					} elseif ('color' == $attr_info['type']) {
878 878
 
879
-						$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.'" />';
879
+						$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.'" />';
880 880
 
881
-					} elseif ( 'text_area' == $attr_info['type'] ) {
881
+					} elseif ('text_area' == $attr_info['type']) {
882 882
 
883
-						$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.'';
883
+						$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.'';
884 884
 
885 885
 					} else {
886
-						$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.'';
886
+						$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.'';
887 887
 					}
888 888
 				}
889 889
 				$return .= '</p>';
@@ -894,9 +894,9 @@  discard block
 block discarded – undo
894 894
 		///////////////////////////
895 895
 		// START GALLERY AND MAP FRONT END STUFFS
896 896
 		///////////////////////////
897
-		if ( isset( $shortcode['front'] ) && true == $shortcode['front'] ) {
897
+		if (isset($shortcode['front']) && true == $shortcode['front']) {
898 898
 
899
-			if ( 'gallery' == $shortcode['front_type'] ) {
899
+			if ('gallery' == $shortcode['front_type']) {
900 900
 
901 901
 				$return .= lasso_gallery_editor_module();
902 902
 
@@ -907,13 +907,13 @@  discard block
 block discarded – undo
907 907
 		///////////////////////////
908 908
 
909 909
 		// Single shortcode (not closed)
910
-		if ( 'single' == $shortcode['type'] ) {
910
+		if ('single' == $shortcode['type']) {
911 911
 
912 912
 			$return .= '<input type="hidden" name="lasso-generator-content" id="lasso-generator-content" value="false" />';
913 913
 
914 914
 		} else {
915 915
 
916
-			$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>';
916
+			$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>';
917 917
 		}
918 918
 
919 919
 		$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>';
@@ -949,14 +949,14 @@  discard block
 block discarded – undo
949 949
 				<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
950 950
 				<div id="lasso--hide" style="display:none;" class="lasso--post-form">
951 951
 					<i class="lasso-icon lasso-icon-move"></i>
952
-					<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>
952
+					<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>
953 953
 					<div class="lasso--slider_wrap">
954 954
 						<div id="lasso--slider"></div>
955 955
 					</div>
956 956
 					<ul id="lasso--revision-list"></ul>
957 957
 					<div class="lasso--btn-group lasso--btn-group-small">
958
-						<a href="#" class="lasso--btn-secondary" id="lasso--close-modal"><?php _e( 'Cancel', 'lasso' );?></a>
959
-						<a href="#" class="lasso--btn-primary" id="lasso--select-revision"><?php _e( 'Select', 'lasso' );?></a>
958
+						<a href="#" class="lasso--btn-secondary" id="lasso--close-modal"><?php _e('Cancel', 'lasso'); ?></a>
959
+						<a href="#" class="lasso--btn-primary" id="lasso--select-revision"><?php _e('Select', 'lasso'); ?></a>
960 960
 					</div>
961 961
 				</div>
962 962
 
@@ -979,7 +979,7 @@  discard block
 block discarded – undo
979 979
     // Normalize into a six character long hex string
980 980
     $hex = str_replace('#', '', $hex);
981 981
     if (strlen($hex) == 3) {
982
-        $hex = str_repeat(substr($hex,0,1), 2).str_repeat(substr($hex,1,1), 2).str_repeat(substr($hex,2,1), 2);
982
+        $hex = str_repeat(substr($hex, 0, 1), 2).str_repeat(substr($hex, 1, 1), 2).str_repeat(substr($hex, 2, 1), 2);
983 983
     }
984 984
 
985 985
     // Split into three parts: R, G and B
@@ -988,7 +988,7 @@  discard block
 block discarded – undo
988 988
 
989 989
     foreach ($color_parts as $color) {
990 990
         $color   = hexdec($color); // Convert to decimal
991
-        $color   = max(0,min(255,$color + $steps)); // Adjust color
991
+        $color   = max(0, min(255, $color + $steps)); // Adjust color
992 992
         $return .= str_pad(dechex($color), 2, '0', STR_PAD_LEFT); // Make two char hex code
993 993
     }
994 994
 
Please login to merge, or discard this patch.
public/includes/lasso.php 2 patches
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 		
60 60
 		add_action( 'wp_ajax_get_aesop_component',     array( $this, 'get_aesop_component' ) );
61 61
 		add_action( 'wp_ajax_editus_do_shortcode',     array( $this, 'editus_do_shortcode' ) );
62
-        add_action( 'wp_ajax_editus_do_block',     array( $this, 'editus_do_block' ) );
62
+		add_action( 'wp_ajax_editus_do_block',     array( $this, 'editus_do_block' ) );
63 63
 		add_action( 'wp_ajax_editus_lock_post',     array( $this, 'editus_lock_post' ) );
64 64
 		add_action( 'wp_ajax_editus_unlock_post',     array( $this, 'editus_unlock_post' ) );
65 65
 		add_action( 'wp_ajax_editus_hide_tour',     array( $this, 'editus_hide_tour' ) );
@@ -69,10 +69,10 @@  discard block
 block discarded – undo
69 69
 		add_action( 'wp_ajax_editus_featured_img',     array( $this, 'set_featured_img' ) );
70 70
 		add_action( 'wp_ajax_editus_del_featured_img',     array( $this, 'del_featured_img' ) );
71 71
         
72
-        add_action( 'wp_ajax_editus_publish_post',     array( $this, 'on_publish_post' ) );
72
+		add_action( 'wp_ajax_editus_publish_post',     array( $this, 'on_publish_post' ) );
73 73
         
74
-        add_action( 'wp_ajax_editus_create_gallery',     array( $this, 'create_gallery' ) );
75
-        add_action( 'wp_ajax_editus_update_gallery',     array( $this, 'update_gallery' ) );
74
+		add_action( 'wp_ajax_editus_create_gallery',     array( $this, 'create_gallery' ) );
75
+		add_action( 'wp_ajax_editus_update_gallery',     array( $this, 'update_gallery' ) );
76 76
 
77 77
 		// enable saving custom fields through REST API
78 78
 		self::enable_metasave('post');
@@ -272,14 +272,14 @@  discard block
 block discarded – undo
272 272
 		$out = load_textdomain( $domain, trailingslashit( LASSO_DIR ). 'languages/' . $domain . '-' . $locale . '.mo' );
273 273
 	}
274 274
 	
275
-    // new ajax function to lock post for editing
275
+	// new ajax function to lock post for editing
276 276
 	public function editus_lock_post()
277 277
 	{
278 278
 		$post_id= $_POST["postid"];
279 279
 		$locked = wp_check_post_lock($post_id);
280 280
 		
281 281
 		if (!$locked) {
282
-		    wp_set_post_lock($post_id);
282
+			wp_set_post_lock($post_id);
283 283
 			echo "true";
284 284
 		} else {
285 285
 			$user_info = get_userdata($locked);
@@ -292,9 +292,9 @@  discard block
 block discarded – undo
292 292
 	{
293 293
 		$post_id= $_POST["postid"];
294 294
 		$locked = wp_check_post_lock($post_id);
295
-        if (!$locked) {
296
-            delete_post_meta( $post_id, '_edit_lock');
297
-        }
295
+		if (!$locked) {
296
+			delete_post_meta( $post_id, '_edit_lock');
297
+		}
298 298
 		echo "true";
299 299
 		
300 300
 		exit;
@@ -397,12 +397,12 @@  discard block
 block discarded – undo
397 397
 		exit;
398 398
 	}
399 399
     
400
-    public function editus_do_block()
400
+	public function editus_do_block()
401 401
 	{
402 402
 		
403 403
 		$code= $_POST["code"];
404 404
 
405
-        $out = do_blocks( $code );
405
+		$out = do_blocks( $code );
406 406
 		
407 407
 		echo $out;
408 408
 		exit;
@@ -417,59 +417,59 @@  discard block
 block discarded – undo
417 417
 		 );
418 418
 		foreach ($_POST as $key => $value) {
419 419
 			if ($key !="code" && $key !="action") {
420
-			    //$shortcode = $shortcode.$key.'="'.$value.'" ';
420
+				//$shortcode = $shortcode.$key.'="'.$value.'" ';
421 421
 				$atts[$key] = $value;
422 422
 			}
423 423
 		}
424 424
 		if ($code == "aesop_video") {
425
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-video.php');
426
-		    echo aesop_video_shortcode($atts);
425
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-video.php');
426
+			echo aesop_video_shortcode($atts);
427 427
 		}
428 428
 		else if ($code == "aesop_image") {
429
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php');
430
-		    echo aesop_image_shortcode($atts);
429
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php');
430
+			echo aesop_image_shortcode($atts);
431 431
 		}
432 432
 		else if ($code == "aesop_quote") {
433
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php');
434
-		    echo aesop_quote_shortcode($atts);
433
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php');
434
+			echo aesop_quote_shortcode($atts);
435 435
 		}
436 436
 		else if ($code == "aesop_parallax") {
437
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php');
438
-		    echo aesop_parallax_shortcode($atts);
437
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php');
438
+			echo aesop_parallax_shortcode($atts);
439 439
 		}
440 440
 		else if ($code == "aesop_character") {
441
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php');
442
-		    echo aesop_character_shortcode($atts);
441
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php');
442
+			echo aesop_character_shortcode($atts);
443 443
 		}
444 444
 		else if ($code == "aesop_collection") {
445
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php');
446
-		    echo aesop_collection_shortcode($atts);
445
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php');
446
+			echo aesop_collection_shortcode($atts);
447 447
 		}
448 448
 		else if ($code == "aesop_chapter") {
449
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php');
450
-		    echo aesop_chapter_shortcode($atts);
449
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php');
450
+			echo aesop_chapter_shortcode($atts);
451 451
 		}
452 452
 		else if ($code == "aesop_content") {
453
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php');
454
-		    echo aesop_content_shortcode($atts, $atts['content_data']);
453
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php');
454
+			echo aesop_content_shortcode($atts, $atts['content_data']);
455 455
 		}
456 456
 		else if ($code == "aesop_gallery") {
457
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
458
-		    echo do_shortcode( '[aesop_gallery id="'.$atts["id"].'"]');
457
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
458
+			echo do_shortcode( '[aesop_gallery id="'.$atts["id"].'"]');
459 459
 		}
460 460
 		else if ($code == "aesop_audio") {
461
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-audio.php');
462
-		    echo aesop_audio_shortcode($atts);
461
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-audio.php');
462
+			echo aesop_audio_shortcode($atts);
463 463
 		}
464 464
 		else {
465 465
 			$code = '['.$code.' ';
466 466
 			foreach ($atts as $key => $value) {
467
-			    $code = ''.$key.'="'.$value.'" ';
467
+				$code = ''.$key.'="'.$value.'" ';
468 468
 			}
469 469
 			$code = $code.']';
470 470
 			echo do_shortcode($code);
471
-		    //require_once( ABSPATH . '/wp-content/plugins/aesop-events/public/includes/shortcode.php');
472
-		    //echo aesop_audio_shortcode($atts);
471
+			//require_once( ABSPATH . '/wp-content/plugins/aesop-events/public/includes/shortcode.php');
472
+			//echo aesop_audio_shortcode($atts);
473 473
 		}
474 474
 		
475 475
 		exit; 
@@ -509,12 +509,12 @@  discard block
 block discarded – undo
509 509
 		exit;
510 510
 	}
511 511
     
512
-    /* This function doesn't actually publish post, but should be called when a post is published */
513
-    public function on_publish_post( ) {
512
+	/* This function doesn't actually publish post, but should be called when a post is published */
513
+	public function on_publish_post( ) {
514 514
 
515 515
 		$post_id = isset( $_POST['postid'] ) ? $_POST['postid'] : false;
516 516
         
517
-        do_action( 'transition_post_status', 'publish', 'draft', get_post( $post_id ) );
517
+		do_action( 'transition_post_status', 'publish', 'draft', get_post( $post_id ) );
518 518
 
519 519
 		exit;
520 520
 	}
@@ -572,14 +572,14 @@  discard block
 block discarded – undo
572 572
 			$allow_new_category = lasso_editor_get_option( 'allow_new_category', 'lasso_editor' );
573 573
 			
574 574
 			if ($taxonomy =='category') {
575
-                // convert from names to category ids
575
+				// convert from names to category ids
576 576
 				$cats = array();
577 577
 				foreach ($value as $cat) {
578 578
 					$cat_id = get_cat_ID($cat);
579 579
 					if ($cat_id !=0) {
580 580
 						$cats [] = $cat_id;
581 581
 					} else if ($allow_new_category) {
582
-					    $cats [] = wp_create_category($cat);
582
+						$cats [] = wp_create_category($cat);
583 583
 					}
584 584
 				}
585 585
 				$value = $cats;
@@ -599,7 +599,7 @@  discard block
 block discarded – undo
599 599
 		}
600 600
 	}
601 601
     
602
-    public function create_gallery( ) {
602
+	public function create_gallery( ) {
603 603
 
604 604
 		$postid  	= isset( $_POST['postid'] ) ? $_POST['postid'] : false;
605 605
         
@@ -653,10 +653,10 @@  discard block
 block discarded – undo
653 653
 			'message' => 'gallery-created',
654 654
 			'id' => $postid)
655 655
 		);
656
-        exit;
656
+		exit;
657 657
 	}
658 658
     
659
-    public function update_gallery( ) {
659
+	public function update_gallery( ) {
660 660
         
661 661
 		$options      = isset( $_POST['fields'] ) ? $_POST['fields'] : false;
662 662
         
@@ -672,12 +672,12 @@  discard block
 block discarded – undo
672 672
 
673 673
 		self::save_gallery_options( $postid, $gallery_ids, $options, $type );
674 674
 
675
-        echo json_encode( array('message' => 'gallery-updated') );
675
+		echo json_encode( array('message' => 'gallery-updated') );
676 676
 
677
-        exit;
677
+		exit;
678 678
 	}
679 679
     
680
-    public function save_gallery_options( $postid, $gallery_ids, $options, $type = false ) {
680
+	public function save_gallery_options( $postid, $gallery_ids, $options, $type = false ) {
681 681
 
682 682
 		// gallery width
683 683
 		$gallery_width = isset( $options['width'] ) ? $options['width'] : false;
@@ -761,7 +761,7 @@  discard block
 block discarded – undo
761 761
 	public function set_date( $postid, $value) {
762 762
 		if( $value ) {
763 763
 			$value = self::getEnglishMonthName($value)." ".date("H:i:s", current_time( 'timestamp', 1 ));
764
-            wp_update_post(
764
+			wp_update_post(
765 765
 				array (
766 766
 					'ID'            => $postid, // ID of the post to update
767 767
 					'post_date'     => date( 'Y-m-d H:i:s',  strtotime($value) ),
Please login to merge, or discard this patch.
Spacing   +169 added lines, -169 removed lines patch added patch discarded remove patch
@@ -52,27 +52,27 @@  discard block
 block discarded – undo
52 52
 		require_once LASSO_DIR.'/public/includes/wrap-shortcodes.php';
53 53
 
54 54
 		// Activate plugin when new blog is added
55
-		add_action( 'wpmu_new_blog', array( $this, 'activate_new_site' ) );
55
+		add_action('wpmu_new_blog', array($this, 'activate_new_site'));
56 56
 
57 57
 		// Load plugin text domain
58
-		add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
58
+		add_action('init', array($this, 'load_plugin_textdomain'));
59 59
 		
60
-		add_action( 'wp_ajax_get_aesop_component',     array( $this, 'get_aesop_component' ) );
61
-		add_action( 'wp_ajax_editus_do_shortcode',     array( $this, 'editus_do_shortcode' ) );
62
-        add_action( 'wp_ajax_editus_do_block',     array( $this, 'editus_do_block' ) );
63
-		add_action( 'wp_ajax_editus_lock_post',     array( $this, 'editus_lock_post' ) );
64
-		add_action( 'wp_ajax_editus_unlock_post',     array( $this, 'editus_unlock_post' ) );
65
-		add_action( 'wp_ajax_editus_hide_tour',     array( $this, 'editus_hide_tour' ) );
66
-		add_action( 'wp_ajax_editus_set_post_setting',     array( $this, 'editus_set_post_setting' ) );
67
-		add_action( 'wp_ajax_editus_get_ase_options',     array( $this, 'get_ase_options' ) );
68
-		add_action( 'wp_ajax_editus_delete_post',     array( $this, 'delete_post' ) );
69
-		add_action( 'wp_ajax_editus_featured_img',     array( $this, 'set_featured_img' ) );
70
-		add_action( 'wp_ajax_editus_del_featured_img',     array( $this, 'del_featured_img' ) );
60
+		add_action('wp_ajax_get_aesop_component', array($this, 'get_aesop_component'));
61
+		add_action('wp_ajax_editus_do_shortcode', array($this, 'editus_do_shortcode'));
62
+        add_action('wp_ajax_editus_do_block', array($this, 'editus_do_block'));
63
+		add_action('wp_ajax_editus_lock_post', array($this, 'editus_lock_post'));
64
+		add_action('wp_ajax_editus_unlock_post', array($this, 'editus_unlock_post'));
65
+		add_action('wp_ajax_editus_hide_tour', array($this, 'editus_hide_tour'));
66
+		add_action('wp_ajax_editus_set_post_setting', array($this, 'editus_set_post_setting'));
67
+		add_action('wp_ajax_editus_get_ase_options', array($this, 'get_ase_options'));
68
+		add_action('wp_ajax_editus_delete_post', array($this, 'delete_post'));
69
+		add_action('wp_ajax_editus_featured_img', array($this, 'set_featured_img'));
70
+		add_action('wp_ajax_editus_del_featured_img', array($this, 'del_featured_img'));
71 71
         
72
-        add_action( 'wp_ajax_editus_publish_post',     array( $this, 'on_publish_post' ) );
72
+        add_action('wp_ajax_editus_publish_post', array($this, 'on_publish_post'));
73 73
         
74
-        add_action( 'wp_ajax_editus_create_gallery',     array( $this, 'create_gallery' ) );
75
-        add_action( 'wp_ajax_editus_update_gallery',     array( $this, 'update_gallery' ) );
74
+        add_action('wp_ajax_editus_create_gallery', array($this, 'create_gallery'));
75
+        add_action('wp_ajax_editus_update_gallery', array($this, 'update_gallery'));
76 76
 
77 77
 		// enable saving custom fields through REST API
78 78
 		self::enable_metasave('post');
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	public static function get_instance() {
104 104
 
105 105
 		// If the single instance hasn't been set, set it now.
106
-		if ( null == self::$instance ) {
106
+		if (null == self::$instance) {
107 107
 			self::$instance = new self;
108 108
 		}
109 109
 
@@ -120,18 +120,18 @@  discard block
 block discarded – undo
120 120
 	 *                                       WPMU is disabled or plugin is
121 121
 	 *                                       activated on an individual blog.
122 122
 	 */
123
-	public static function activate( $network_wide ) {
123
+	public static function activate($network_wide) {
124 124
 
125
-		if ( function_exists( 'is_multisite' ) && is_multisite() ) {
125
+		if (function_exists('is_multisite') && is_multisite()) {
126 126
 
127
-			if ( $network_wide  ) {
127
+			if ($network_wide) {
128 128
 
129 129
 				// Get all blog ids
130 130
 				$blog_ids = self::get_blog_ids();
131 131
 
132
-				foreach ( $blog_ids as $blog_id ) {
132
+				foreach ($blog_ids as $blog_id) {
133 133
 
134
-					switch_to_blog( $blog_id );
134
+					switch_to_blog($blog_id);
135 135
 					self::single_activate();
136 136
 				}
137 137
 
@@ -157,18 +157,18 @@  discard block
 block discarded – undo
157 157
 	 *                                       WPMU is disabled or plugin is
158 158
 	 *                                       deactivated on an individual blog.
159 159
 	 */
160
-	public static function deactivate( $network_wide ) {
160
+	public static function deactivate($network_wide) {
161 161
 
162
-		if ( function_exists( 'is_multisite' ) && is_multisite() ) {
162
+		if (function_exists('is_multisite') && is_multisite()) {
163 163
 
164
-			if ( $network_wide ) {
164
+			if ($network_wide) {
165 165
 
166 166
 				// Get all blog ids
167 167
 				$blog_ids = self::get_blog_ids();
168 168
 
169
-				foreach ( $blog_ids as $blog_id ) {
169
+				foreach ($blog_ids as $blog_id) {
170 170
 
171
-					switch_to_blog( $blog_id );
171
+					switch_to_blog($blog_id);
172 172
 					self::single_deactivate();
173 173
 
174 174
 				}
@@ -192,13 +192,13 @@  discard block
 block discarded – undo
192 192
 	 *
193 193
 	 * @param int     $blog_id ID of the new blog.
194 194
 	 */
195
-	public function activate_new_site( $blog_id ) {
195
+	public function activate_new_site($blog_id) {
196 196
 
197
-		if ( 1 !== did_action( 'wpmu_new_blog' ) ) {
197
+		if (1 !== did_action('wpmu_new_blog')) {
198 198
 			return;
199 199
 		}
200 200
 
201
-		switch_to_blog( $blog_id );
201
+		switch_to_blog($blog_id);
202 202
 		self::single_activate();
203 203
 		restore_current_blog();
204 204
 
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 			WHERE archived = '0' AND spam = '0'
224 224
 			AND deleted = '0'";
225 225
 
226
-		return $wpdb->get_col( $sql );
226
+		return $wpdb->get_col($sql);
227 227
 
228 228
 	}
229 229
 
@@ -234,18 +234,18 @@  discard block
 block discarded – undo
234 234
 	 */
235 235
 	private static function single_activate() {
236 236
 
237
-		$curr_version = get_option( 'lasso_version' );
237
+		$curr_version = get_option('lasso_version');
238 238
 
239 239
 		// update upgraded from
240
-		if ( $curr_version ) {
241
-			update_option( 'lasso_updated_from', $curr_version );
240
+		if ($curr_version) {
241
+			update_option('lasso_updated_from', $curr_version);
242 242
 		}
243 243
 
244 244
 		// update lasso version option
245
-		update_option( 'lasso_version', LASSO_VERSION );
245
+		update_option('lasso_version', LASSO_VERSION);
246 246
 
247 247
 		// set transietn for activation welcome
248
-		set_transient( '_lasso_welcome_redirect', true, 30 );
248
+		set_transient('_lasso_welcome_redirect', true, 30);
249 249
 
250 250
 
251 251
 	}
@@ -267,15 +267,15 @@  discard block
 block discarded – undo
267 267
 	public function load_plugin_textdomain() {
268 268
 
269 269
 		$domain = $this->plugin_slug;
270
-		$locale = apply_filters( 'plugin_locale', get_locale(), $domain );
270
+		$locale = apply_filters('plugin_locale', get_locale(), $domain);
271 271
 
272
-		$out = load_textdomain( $domain, trailingslashit( LASSO_DIR ). 'languages/' . $domain . '-' . $locale . '.mo' );
272
+		$out = load_textdomain($domain, trailingslashit(LASSO_DIR).'languages/'.$domain.'-'.$locale.'.mo');
273 273
 	}
274 274
 	
275 275
     // new ajax function to lock post for editing
276 276
 	public function editus_lock_post()
277 277
 	{
278
-		$post_id= $_POST["postid"];
278
+		$post_id = $_POST["postid"];
279 279
 		$locked = wp_check_post_lock($post_id);
280 280
 		
281 281
 		if (!$locked) {
@@ -283,17 +283,17 @@  discard block
 block discarded – undo
283 283
 			echo "true";
284 284
 		} else {
285 285
 			$user_info = get_userdata($locked);
286
-			echo _e( 'Post being edited by ', 'lasso' ).$user_info->first_name .  " " . $user_info->last_name;
286
+			echo _e('Post being edited by ', 'lasso').$user_info->first_name." ".$user_info->last_name;
287 287
 		}
288 288
 		exit;
289 289
 	}
290 290
 	
291 291
 	public function editus_unlock_post()
292 292
 	{
293
-		$post_id= $_POST["postid"];
293
+		$post_id = $_POST["postid"];
294 294
 		$locked = wp_check_post_lock($post_id);
295 295
         if (!$locked) {
296
-            delete_post_meta( $post_id, '_edit_lock');
296
+            delete_post_meta($post_id, '_edit_lock');
297 297
         }
298 298
 		echo "true";
299 299
 		
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
 	{
306 306
 		$user_id = get_current_user_ID();
307 307
 				
308
-		update_user_meta( $user_id, 'lasso_hide_tour', true );
308
+		update_user_meta($user_id, 'lasso_hide_tour', true);
309 309
 		exit;
310 310
 	}
311 311
 	
@@ -316,14 +316,14 @@  discard block
 block discarded – undo
316 316
 		$data = array();
317 317
 		parse_str($_POST['data'], $data);
318 318
 		
319
-		if (!wp_verify_nonce( $data[ 'nonce' ], 'lasso-update-post-settings' )) {
319
+		if (!wp_verify_nonce($data['nonce'], 'lasso-update-post-settings')) {
320 320
 			wp_send_json_error();
321 321
 			exit;
322 322
 		}
323 323
 		
324
-		$status = isset( $data['status'] ) ? $data['status'] : false;
325
-		$postid = isset( $data['postid'] ) ? $data['postid'] : false;
326
-		$slug   = isset( $data['story_slug'] ) ? $data['story_slug'] : false;
324
+		$status = isset($data['status']) ? $data['status'] : false;
325
+		$postid = isset($data['postid']) ? $data['postid'] : false;
326
+		$slug   = isset($data['story_slug']) ? $data['story_slug'] : false;
327 327
 	
328 328
 
329 329
 		$args = array(
@@ -334,24 +334,24 @@  discard block
 block discarded – undo
334 334
 		
335 335
 		
336 336
 
337
-		wp_update_post( apply_filters( 'lasso_object_status_update_args', $args ) );
337
+		wp_update_post(apply_filters('lasso_object_status_update_args', $args));
338 338
 		
339 339
 		// update categories
340
-		$cats  = isset( $data['story_cats'] ) ? $data['story_cats'] : false;
340
+		$cats = isset($data['story_cats']) ? $data['story_cats'] : false;
341 341
 		
342
-		self::set_post_terms( $postid, $cats, 'category' );
342
+		self::set_post_terms($postid, $cats, 'category');
343 343
 		
344 344
 		// update tags
345
-		$tags = isset( $data['story_tags'] ) ? $data['story_tags'] : false;
346
-		self::set_post_terms( $postid, $tags, 'post_tag' );
345
+		$tags = isset($data['story_tags']) ? $data['story_tags'] : false;
346
+		self::set_post_terms($postid, $tags, 'post_tag');
347 347
 		
348 348
 		//update date
349
-		$date  = isset( $data['post_date'] ) ? $data['post_date'] : false;
350
-		self::set_date( $postid, $date );
349
+		$date = isset($data['post_date']) ? $data['post_date'] : false;
350
+		self::set_date($postid, $date);
351 351
 		
352
-		do_action( 'lasso_post_updated', $postid, $slug, $status, get_current_user_ID() );
353
-		$response= array(
354
-			'link'   => get_permalink($postid). (($status=='publish') ? '' : '&preview=true')
352
+		do_action('lasso_post_updated', $postid, $slug, $status, get_current_user_ID());
353
+		$response = array(
354
+			'link'   => get_permalink($postid).(($status == 'publish') ? '' : '&preview=true')
355 355
 		);
356 356
 		wp_send_json_success($response);
357 357
 		exit;
@@ -359,11 +359,11 @@  discard block
 block discarded – undo
359 359
 	
360 360
 	public static function enable_metasave($type)
361 361
 	{
362
-		register_rest_field( $type, 'metadata', array(
363
-			'get_callback' => function ( $data ) {
364
-				return get_post_meta( $data['id']);//, '', '' );
362
+		register_rest_field($type, 'metadata', array(
363
+			'get_callback' => function($data) {
364
+				return get_post_meta($data['id']); //, '', '' );
365 365
 			}, 
366
-			'update_callback' => function( $data, $post ) {
366
+			'update_callback' => function($data, $post) {
367 367
 				foreach ($data as $key => $value) {
368 368
 					update_post_meta($post->ID, $key, $value);
369 369
 				}
@@ -375,13 +375,13 @@  discard block
 block discarded – undo
375 375
 	public function editus_do_shortcode()
376 376
 	{
377 377
 		
378
-		$code= $_POST["code"];
378
+		$code = $_POST["code"];
379 379
 		$code = str_replace('\"', '"', $code);
380 380
 		
381
-		$code_wrapped = lasso_wrap_shortcodes( $code);
382
-		$out =  do_shortcode($code);
381
+		$code_wrapped = lasso_wrap_shortcodes($code);
382
+		$out = do_shortcode($code);
383 383
 		if ($out != '') {
384
-			$out =  do_shortcode($code_wrapped);
384
+			$out = do_shortcode($code_wrapped);
385 385
 			echo $out;
386 386
 			exit;
387 387
 		}
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
 		/** @var \WP_Embed $wp_embed */
392 392
 		global $wp_embed;
393 393
 		$wp_embed->post_ID = $_POST["ID"];
394
-		$out =$wp_embed->run_shortcode( $code_wrapped );
394
+		$out = $wp_embed->run_shortcode($code_wrapped);
395 395
 		
396 396
 		echo $out;
397 397
 		exit;
@@ -400,9 +400,9 @@  discard block
 block discarded – undo
400 400
     public function editus_do_block()
401 401
 	{
402 402
 		
403
-		$code= $_POST["code"];
403
+		$code = $_POST["code"];
404 404
 
405
-        $out = do_blocks( $code );
405
+        $out = do_blocks($code);
406 406
 		
407 407
 		echo $out;
408 408
 		exit;
@@ -412,53 +412,53 @@  discard block
 block discarded – undo
412 412
 	{
413 413
 		
414 414
 		
415
-		$code= $_POST["code"];
415
+		$code = $_POST["code"];
416 416
 		$atts = array(
417 417
 		 );
418 418
 		foreach ($_POST as $key => $value) {
419
-			if ($key !="code" && $key !="action") {
419
+			if ($key != "code" && $key != "action") {
420 420
 			    //$shortcode = $shortcode.$key.'="'.$value.'" ';
421 421
 				$atts[$key] = $value;
422 422
 			}
423 423
 		}
424 424
 		if ($code == "aesop_video") {
425
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-video.php');
425
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-video.php');
426 426
 		    echo aesop_video_shortcode($atts);
427 427
 		}
428 428
 		else if ($code == "aesop_image") {
429
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php');
429
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php');
430 430
 		    echo aesop_image_shortcode($atts);
431 431
 		}
432 432
 		else if ($code == "aesop_quote") {
433
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php');
433
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php');
434 434
 		    echo aesop_quote_shortcode($atts);
435 435
 		}
436 436
 		else if ($code == "aesop_parallax") {
437
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php');
437
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php');
438 438
 		    echo aesop_parallax_shortcode($atts);
439 439
 		}
440 440
 		else if ($code == "aesop_character") {
441
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php');
441
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php');
442 442
 		    echo aesop_character_shortcode($atts);
443 443
 		}
444 444
 		else if ($code == "aesop_collection") {
445
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php');
445
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php');
446 446
 		    echo aesop_collection_shortcode($atts);
447 447
 		}
448 448
 		else if ($code == "aesop_chapter") {
449
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php');
449
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php');
450 450
 		    echo aesop_chapter_shortcode($atts);
451 451
 		}
452 452
 		else if ($code == "aesop_content") {
453
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php');
453
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php');
454 454
 		    echo aesop_content_shortcode($atts, $atts['content_data']);
455 455
 		}
456 456
 		else if ($code == "aesop_gallery") {
457
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
458
-		    echo do_shortcode( '[aesop_gallery id="'.$atts["id"].'"]');
457
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
458
+		    echo do_shortcode('[aesop_gallery id="'.$atts["id"].'"]');
459 459
 		}
460 460
 		else if ($code == "aesop_audio") {
461
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-audio.php');
461
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-audio.php');
462 462
 		    echo aesop_audio_shortcode($atts);
463 463
 		}
464 464
 		else {
@@ -479,20 +479,20 @@  discard block
 block discarded – undo
479 479
 	public function get_ase_options()
480 480
 	{
481 481
 		$blob = lasso_editor_options_blob();
482
-		$code= $_POST["component"];
482
+		$code = $_POST["component"];
483 483
 		echo $blob[$code];
484 484
 		exit; 
485 485
 	}
486 486
 	
487 487
 	public function delete_post( ) {
488 488
 
489
-		$postid = isset( $_POST['postid'] ) ? $_POST['postid'] : false;
489
+		$postid = isset($_POST['postid']) ? $_POST['postid'] : false;
490 490
 
491 491
 		// bail out if the current user can't publish posts
492
-		if ( !lasso_user_can( 'delete_post', $postid ) )
492
+		if (!lasso_user_can('delete_post', $postid))
493 493
 			return;
494 494
 		
495
-		if (!wp_verify_nonce( $_POST[ 'nonce' ], 'lasso_delete_post' )) {
495
+		if (!wp_verify_nonce($_POST['nonce'], 'lasso_delete_post')) {
496 496
 			wp_send_json_error();
497 497
 			exit;
498 498
 		}
@@ -502,9 +502,9 @@  discard block
 block discarded – undo
502 502
 			'post_status' 	=> 'trash'
503 503
 		);
504 504
 
505
-		wp_update_post( apply_filters( 'lasso_object_deleted_args', $args ) );
505
+		wp_update_post(apply_filters('lasso_object_deleted_args', $args));
506 506
 
507
-		do_action( 'lasso_object_deleted', $postid, get_current_user_ID() );
507
+		do_action('lasso_object_deleted', $postid, get_current_user_ID());
508 508
 
509 509
 		exit;
510 510
 	}
@@ -512,40 +512,40 @@  discard block
 block discarded – undo
512 512
     /* This function doesn't actually publish post, but should be called when a post is published */
513 513
     public function on_publish_post( ) {
514 514
 
515
-		$post_id = isset( $_POST['postid'] ) ? $_POST['postid'] : false;
515
+		$post_id = isset($_POST['postid']) ? $_POST['postid'] : false;
516 516
         
517
-        do_action( 'transition_post_status', 'publish', 'draft', get_post( $post_id ) );
517
+        do_action('transition_post_status', 'publish', 'draft', get_post($post_id));
518 518
 
519 519
 		exit;
520 520
 	}
521 521
 	
522 522
 	public function set_featured_img( ) {
523 523
 
524
-		$postid  	= isset( $_POST['postid'] ) ? $_POST['postid'] : false;
525
-		$image_id  	= isset( $_POST['image_id'] ) ? absint( $_POST['image_id'] ) : false;
526
-		if (!wp_verify_nonce( $_POST[ 'nonce' ], 'lasso_gallery' )) {
524
+		$postid = isset($_POST['postid']) ? $_POST['postid'] : false;
525
+		$image_id = isset($_POST['image_id']) ? absint($_POST['image_id']) : false;
526
+		if (!wp_verify_nonce($_POST['nonce'], 'lasso_gallery')) {
527 527
 			wp_send_json_error();
528 528
 			exit;
529 529
 		}	
530 530
 
531
-		set_post_thumbnail( $postid, $image_id );
531
+		set_post_thumbnail($postid, $image_id);
532 532
 
533
-		do_action( 'lasso_featured_image_set', $postid, $image_id, get_current_user_ID() );
533
+		do_action('lasso_featured_image_set', $postid, $image_id, get_current_user_ID());
534 534
 
535 535
 		exit;
536 536
 	}
537 537
 	
538 538
 	public function del_featured_img( ) {
539 539
 
540
-		$postid  = isset( $_POST['postid'] ) ? $_POST['postid'] : false;
541
-		if (!wp_verify_nonce( $_POST[ 'nonce' ], 'lasso_gallery' )) {
540
+		$postid = isset($_POST['postid']) ? $_POST['postid'] : false;
541
+		if (!wp_verify_nonce($_POST['nonce'], 'lasso_gallery')) {
542 542
 			wp_send_json_error();
543 543
 			exit;
544 544
 		}	
545 545
 
546
-		delete_post_thumbnail( $postid );
546
+		delete_post_thumbnail($postid);
547 547
 
548
-		do_action( 'lasso_featured_image_deleted', $postid, get_current_user_ID() );
548
+		do_action('lasso_featured_image_deleted', $postid, get_current_user_ID());
549 549
 
550 550
 		exit;
551 551
 	}
@@ -566,17 +566,17 @@  discard block
 block discarded – undo
566 566
 		return self::$revisions;
567 567
 	}*/
568 568
 	
569
-	public function set_post_terms( $postid, $value, $taxonomy ) {
570
-		if( $value ) {
571
-			$value = explode( ',', $value );
572
-			$allow_new_category = lasso_editor_get_option( 'allow_new_category', 'lasso_editor' );
569
+	public function set_post_terms($postid, $value, $taxonomy) {
570
+		if ($value) {
571
+			$value = explode(',', $value);
572
+			$allow_new_category = lasso_editor_get_option('allow_new_category', 'lasso_editor');
573 573
 			
574
-			if ($taxonomy =='category') {
574
+			if ($taxonomy == 'category') {
575 575
                 // convert from names to category ids
576 576
 				$cats = array();
577 577
 				foreach ($value as $cat) {
578 578
 					$cat_id = get_cat_ID($cat);
579
-					if ($cat_id !=0) {
579
+					if ($cat_id != 0) {
580 580
 						$cats [] = $cat_id;
581 581
 					} else if ($allow_new_category) {
582 582
 					    $cats [] = wp_create_category($cat);
@@ -585,71 +585,71 @@  discard block
 block discarded – undo
585 585
 				$value = $cats;
586 586
 			}
587 587
 	
588
-			$result = wp_set_object_terms( $postid, $value, $taxonomy );
588
+			$result = wp_set_object_terms($postid, $value, $taxonomy);
589 589
 		}
590
-		else  {
590
+		else {
591 591
 			//remove all terms from post
592
-			$result = wp_set_object_terms( $postid, null, $taxonomy );
592
+			$result = wp_set_object_terms($postid, null, $taxonomy);
593 593
 		}
594 594
 
595
-		if ( ! is_wp_error( $result ) ) {
595
+		if (!is_wp_error($result)) {
596 596
 			return true;
597
-		}else{
597
+		} else {
598 598
 			return false;
599 599
 		}
600 600
 	}
601 601
     
602 602
     public function create_gallery( ) {
603 603
 
604
-		$postid  	= isset( $_POST['postid'] ) ? $_POST['postid'] : false;
604
+		$postid = isset($_POST['postid']) ? $_POST['postid'] : false;
605 605
         
606
-		if (!wp_verify_nonce( $_POST[ 'nonce' ], 'lasso_gallery' )) {
606
+		if (!wp_verify_nonce($_POST['nonce'], 'lasso_gallery')) {
607 607
 			wp_send_json_error();
608 608
 			exit;
609 609
 		}	
610 610
 
611
-		if (  ! lasso_user_can( 'publish_posts' ) ) {
611
+		if (!lasso_user_can('publish_posts')) {
612 612
 			return false;
613 613
 
614 614
 		}
615 615
 
616
-		$gallery_ids = isset( $_POST['gallery_ids'] ) ? $_POST['gallery_ids'] : false;
616
+		$gallery_ids = isset($_POST['gallery_ids']) ? $_POST['gallery_ids'] : false;
617 617
 
618 618
 		// bail if no gallery ids
619
-		if ( empty( $gallery_ids ) ) {
619
+		if (empty($gallery_ids)) {
620 620
 			return false;
621 621
 		}
622 622
 
623
-		$type   		 = isset( $_POST['gallery_type'] ) ? $_POST['gallery_type'] : false;
624
-		$edgallerytitle	 = isset( $_POST['edgallerytitle'] ) ? $_POST['edgallerytitle'] : $postid.'-'.rand();
623
+		$type = isset($_POST['gallery_type']) ? $_POST['gallery_type'] : false;
624
+		$edgallerytitle = isset($_POST['edgallerytitle']) ? $_POST['edgallerytitle'] : $postid.'-'.rand();
625 625
 
626 626
 		// insert a new gallery
627 627
 		$args = array(
628
-			'post_title'    => $edgallerytitle ,
628
+			'post_title'    => $edgallerytitle,
629 629
 			'post_status'   => 'publish',
630 630
 			'post_type'     => 'ai_galleries'
631 631
 		);
632 632
 
633
-		$postid = wp_insert_post( apply_filters( 'lasso_insert_gallery_args', $args ) );
633
+		$postid = wp_insert_post(apply_filters('lasso_insert_gallery_args', $args));
634 634
 
635 635
 		// update gallery ids
636
-		if ( $gallery_ids ) {
636
+		if ($gallery_ids) {
637 637
 
638
-			update_post_meta( $postid, '_ase_gallery_images', $gallery_ids );
638
+			update_post_meta($postid, '_ase_gallery_images', $gallery_ids);
639 639
 
640 640
 		}
641 641
 
642 642
 		// update the gallery type
643
-		if ( !empty( $type ) ) {
643
+		if (!empty($type)) {
644 644
 
645
-			update_post_meta( $postid, 'aesop_gallery_type', $type );
645
+			update_post_meta($postid, 'aesop_gallery_type', $type);
646 646
 
647 647
 		}
648 648
 
649
-		do_action( 'lasso_gallery_published', $postid, $gallery_ids, get_current_user_ID() );
649
+		do_action('lasso_gallery_published', $postid, $gallery_ids, get_current_user_ID());
650 650
 
651 651
 
652
-		echo json_encode( array(
652
+		echo json_encode(array(
653 653
 			'message' => 'gallery-created',
654 654
 			'id' => $postid)
655 655
 		);
@@ -658,114 +658,114 @@  discard block
 block discarded – undo
658 658
     
659 659
     public function update_gallery( ) {
660 660
         
661
-		$options      = isset( $_POST['fields'] ) ? $_POST['fields'] : false;
661
+		$options      = isset($_POST['fields']) ? $_POST['fields'] : false;
662 662
         
663
-		$postid   	  = !empty( $options ) ? (int) $options['id'] : false;
664
-		$gallery_ids  = isset( $_POST['gallery_ids'] ) ? $_POST['gallery_ids'] : false;
665
-		if ( $_POST[ 'gallery_type' ] ) {
666
-			$type = $_POST[ 'gallery_type' ];
667
-		}elseif ( ! empty( $options ) && $options[ 'galleryType' ] ) {
668
-			$type = $options[ 'galleryType' ];
669
-		}else{
663
+		$postid = !empty($options) ? (int) $options['id'] : false;
664
+		$gallery_ids  = isset($_POST['gallery_ids']) ? $_POST['gallery_ids'] : false;
665
+		if ($_POST['gallery_type']) {
666
+			$type = $_POST['gallery_type'];
667
+		}elseif (!empty($options) && $options['galleryType']) {
668
+			$type = $options['galleryType'];
669
+		} else {
670 670
 			$type = false;
671 671
 		}
672 672
 
673
-		self::save_gallery_options( $postid, $gallery_ids, $options, $type );
673
+		self::save_gallery_options($postid, $gallery_ids, $options, $type);
674 674
 
675
-        echo json_encode( array('message' => 'gallery-updated') );
675
+        echo json_encode(array('message' => 'gallery-updated'));
676 676
 
677 677
         exit;
678 678
 	}
679 679
     
680
-    public function save_gallery_options( $postid, $gallery_ids, $options, $type = false ) {
680
+    public function save_gallery_options($postid, $gallery_ids, $options, $type = false) {
681 681
 
682 682
 		// gallery width
683
-		$gallery_width = isset( $options['width'] ) ? $options['width'] : false;
683
+		$gallery_width = isset($options['width']) ? $options['width'] : false;
684 684
 
685 685
 		// gallery grid item width
686
-		$item_width = isset( $options['itemwidth'] ) ? $options['itemwidth'] : false;
686
+		$item_width = isset($options['itemwidth']) ? $options['itemwidth'] : false;
687 687
 
688 688
 		// caption
689
-		$caption = isset( $options['caption'] ) ? $options['caption'] : false;
689
+		$caption = isset($options['caption']) ? $options['caption'] : false;
690 690
 
691 691
 		// gallery transition
692
-		$transition = isset( $options['transition'] ) ? $options['transition'] : false;
692
+		$transition = isset($options['transition']) ? $options['transition'] : false;
693 693
 
694 694
 		// gallery transition speed
695
-		$transitionSpeed = isset( $options['speed'] ) ? $options['speed'] : false;
695
+		$transitionSpeed = isset($options['speed']) ? $options['speed'] : false;
696 696
 
697 697
 		// gallery hide thumbs
698
-		$hideThumbs = isset( $options['hideThumbs'] ) ? $options['hideThumbs'] : false;
698
+		$hideThumbs = isset($options['hideThumbs']) ? $options['hideThumbs'] : false;
699 699
 
700 700
 		// photoset layout hardwired to on for now
701
-		$psLayout = isset( $options['pslayout'] ) ? $options['pslayout'] : false;
701
+		$psLayout = isset($options['pslayout']) ? $options['pslayout'] : false;
702 702
 
703 703
 		// photoset layout
704
-		$psLightbox = 'on';//isset( $options['pslightbox'] ) ? $options['pslightbox'] : false;
704
+		$psLightbox = 'on'; //isset( $options['pslightbox'] ) ? $options['pslightbox'] : false;
705 705
 		
706 706
 		// hero gallery height
707
-		$gallery_height = isset( $options['height'] ) ? $options['height'] : false;
707
+		$gallery_height = isset($options['height']) ? $options['height'] : false;
708 708
 
709 709
 		// update gallery ids
710
-		if ( !empty( $gallery_ids ) ) {
710
+		if (!empty($gallery_ids)) {
711 711
 
712
-			update_post_meta( $postid, '_ase_gallery_images', $gallery_ids );
712
+			update_post_meta($postid, '_ase_gallery_images', $gallery_ids);
713 713
 
714 714
 		}
715 715
 
716
-		update_post_meta( $postid, 'aesop_gallery_type', sanitize_text_field( trim( $type ) ) );
716
+		update_post_meta($postid, 'aesop_gallery_type', sanitize_text_field(trim($type)));
717 717
 
718
-		update_post_meta( $postid, 'aesop_gallery_width', sanitize_text_field( trim( $gallery_width ) ) );
718
+		update_post_meta($postid, 'aesop_gallery_width', sanitize_text_field(trim($gallery_width)));
719 719
 
720
-		update_post_meta( $postid, 'aesop_grid_gallery_width', sanitize_text_field( trim( $item_width ) ) );
720
+		update_post_meta($postid, 'aesop_grid_gallery_width', sanitize_text_field(trim($item_width)));
721 721
 
722
-		update_post_meta( $postid, 'aesop_gallery_caption', sanitize_text_field( trim( $caption ) ) );
722
+		update_post_meta($postid, 'aesop_gallery_caption', sanitize_text_field(trim($caption)));
723 723
 
724
-		update_post_meta( $postid, 'aesop_thumb_gallery_transition', sanitize_text_field( trim( $transition ) ) );
724
+		update_post_meta($postid, 'aesop_thumb_gallery_transition', sanitize_text_field(trim($transition)));
725 725
 
726
-		update_post_meta( $postid, 'aesop_thumb_gallery_transition_speed', absint( trim( $transitionSpeed ) ) );
726
+		update_post_meta($postid, 'aesop_thumb_gallery_transition_speed', absint(trim($transitionSpeed)));
727 727
 
728
-		update_post_meta( $postid, 'aesop_thumb_gallery_hide_thumbs', sanitize_text_field( trim( $hideThumbs ) ) );
728
+		update_post_meta($postid, 'aesop_thumb_gallery_hide_thumbs', sanitize_text_field(trim($hideThumbs)));
729 729
 
730
-		update_post_meta( $postid, 'aesop_photoset_gallery_layout', sanitize_text_field( trim( $psLayout ) ) );
730
+		update_post_meta($postid, 'aesop_photoset_gallery_layout', sanitize_text_field(trim($psLayout)));
731 731
 
732
-		update_post_meta( $postid, 'aesop_photoset_gallery_lightbox', sanitize_text_field( trim( $psLightbox ) ) );
732
+		update_post_meta($postid, 'aesop_photoset_gallery_lightbox', sanitize_text_field(trim($psLightbox)));
733 733
 		
734
-		update_post_meta( $postid, 'aesop_hero_gallery_height', sanitize_text_field( trim( $gallery_height ) ) );
734
+		update_post_meta($postid, 'aesop_hero_gallery_height', sanitize_text_field(trim($gallery_height)));
735 735
 		
736 736
 		//hardwired for now
737 737
 		
738
-		update_post_meta( $postid, 'aesop_hero_gallery_transition_speed', 300 );
738
+		update_post_meta($postid, 'aesop_hero_gallery_transition_speed', 300);
739 739
 
740 740
 	}
741 741
 	
742
-	function getEnglishMonthName($foreignMonthName){
742
+	function getEnglishMonthName($foreignMonthName) {
743 743
 
744 744
 		  setlocale(LC_ALL, 'en_US');
745 745
 
746
-		  $month_numbers = range(1,12);
746
+		  $month_numbers = range(1, 12);
747 747
 
748
-		  foreach($month_numbers as $month)
749
-			$english_months[] = strftime('%B',mktime(0,0,0,$month,1,2011));
748
+		  foreach ($month_numbers as $month)
749
+			$english_months[] = strftime('%B', mktime(0, 0, 0, $month, 1, 2011));
750 750
 
751 751
 		  setlocale(LC_ALL, get_locale());
752 752
 
753
-		  foreach($month_numbers as $month)
754
-			$foreign_months[] = utf8_encode(strftime('%B',mktime(0,0,0,$month,1,2011)));
753
+		  foreach ($month_numbers as $month)
754
+			$foreign_months[] = utf8_encode(strftime('%B', mktime(0, 0, 0, $month, 1, 2011)));
755 755
 
756 756
 		  return str_replace($foreign_months, $english_months, $foreignMonthName);
757 757
 	}
758 758
 
759 759
 
760 760
 	
761
-	public function set_date( $postid, $value) {
762
-		if( $value ) {
763
-			$value = self::getEnglishMonthName($value)." ".date("H:i:s", current_time( 'timestamp', 1 ));
761
+	public function set_date($postid, $value) {
762
+		if ($value) {
763
+			$value = self::getEnglishMonthName($value)." ".date("H:i:s", current_time('timestamp', 1));
764 764
             wp_update_post(
765
-				array (
765
+				array(
766 766
 					'ID'            => $postid, // ID of the post to update
767
-					'post_date'     => date( 'Y-m-d H:i:s',  strtotime($value) ),
768
-					'post_date_gmt'     => gmdate( 'Y-m-d H:i:s',  strtotime($value) ),
767
+					'post_date'     => date('Y-m-d H:i:s', strtotime($value)),
768
+					'post_date_gmt'     => gmdate('Y-m-d H:i:s', strtotime($value)),
769 769
 				)
770 770
 			);
771 771
 		}
Please login to merge, or discard this patch.
lasso.php 1 patch
Spacing   +39 added lines, -39 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.2.9' );
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.2.9');
27
+define('LASSO_DIR', plugin_dir_path(__FILE__));
28
+define('LASSO_URL', plugins_url('', __FILE__));
29
+define('LASSO_FILE', __FILE__);
30 30
 
31 31
 /**
32 32
  * Load plugin if PHP version is 5.4 or later.
33 33
  */
34
-if ( version_compare( PHP_VERSION, '5.4.0', '>=' ) ) {
34
+if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
35 35
 
36
-	include_once( LASSO_DIR . '/bootstrap.php' );
36
+	include_once(LASSO_DIR.'/bootstrap.php');
37 37
 
38 38
 } else {
39 39
 
40 40
 	add_action('admin_head', 'lasso_fail_notice');
41
-	function lasso_fail_notice(){
41
+	function lasso_fail_notice() {
42 42
 
43 43
 		printf('<div class="error"><p>Editus requires PHP 5.4 or higher.</p></div>');
44 44
 
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
 }
47 47
 
48 48
 add_filter('register_post_type_args', 'lasso_show_in_rest', 10, 2);
49
-function lasso_show_in_rest($args, $post_type){
49
+function lasso_show_in_rest($args, $post_type) {
50 50
  
51
-    $allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor', array( ) );
52
-	$allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
53
-	if (in_array( $post_type,$allowed_post_types)) {
51
+    $allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', array( ));
52
+	$allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
53
+	if (in_array($post_type, $allowed_post_types)) {
54 54
 		$args['show_in_rest'] = true;
55 55
 		if ($post_type != 'post' && $post_type != 'page') {
56 56
 			$args['rest_base'] = $post_type;
@@ -61,21 +61,21 @@  discard block
 block discarded – undo
61 61
 }
62 62
 
63 63
 
64
-function lasso_editor_get_option( $option, $section, $default = '' ) {
64
+function lasso_editor_get_option($option, $section, $default = '') {
65 65
 
66
-	if ( empty( $option ) )
66
+	if (empty($option))
67 67
 		return;
68 68
 
69
-	if ( function_exists( 'is_multisite' ) && is_multisite() ) {
69
+	if (function_exists('is_multisite') && is_multisite()) {
70 70
 
71
-		$options = get_site_option( $section );
71
+		$options = get_site_option($section);
72 72
 
73 73
 	} else {
74 74
 
75
-		$options = get_option( $section );
75
+		$options = get_option($section);
76 76
 	}
77 77
 
78
-	if ( isset( $options[$option] ) ) {
78
+	if (isset($options[$option])) {
79 79
 		return $options[$option];
80 80
 	}
81 81
 
@@ -88,17 +88,17 @@  discard block
 block discarded – undo
88 88
 ));
89 89
 
90 90
 // Gutenberg
91
-if( function_exists( 'is_gutenberg_page' ) ) {
92
-	function add_raw_to_post( $response, $post, $request ) {
91
+if (function_exists('is_gutenberg_page')) {
92
+	function add_raw_to_post($response, $post, $request) {
93 93
 		$response_data = $response->get_data();
94
-		if ( is_array( $response_data['content'] )) {
95
-			$response_data['content']['raw'] =  $post->post_content ;
96
-			$response->set_data( $response_data );
94
+		if (is_array($response_data['content'])) {
95
+			$response_data['content']['raw'] = $post->post_content;
96
+			$response->set_data($response_data);
97 97
 		}
98 98
 
99 99
 		return $response;
100 100
 	}
101
-	add_filter( "rest_prepare_post", 'add_raw_to_post', 10, 3 );
101
+	add_filter("rest_prepare_post", 'add_raw_to_post', 10, 3);
102 102
 }
103 103
 
104 104
 
@@ -106,31 +106,31 @@  discard block
 block discarded – undo
106 106
 //table codes to be added
107 107
 class editus_table {
108 108
     
109
-    public function __construct(){
109
+    public function __construct() {
110 110
         $add_table = lasso_editor_get_option('add_table', 'lasso_editor', false);
111 111
         if ($add_table) {
112
-            add_action('wp_enqueue_scripts', array($this,'scripts'));
112
+            add_action('wp_enqueue_scripts', array($this, 'scripts'));
113 113
             
114 114
         }
115 115
 	}
116 116
     
117 117
     function scripts()
118 118
     {
119
-        add_action('lasso_editor_controls_after_outside', array($this,'editus_table_edit_menu'));
120
-            add_filter('lasso_components',array($this,'editus_components_add_table'),10,1);
121
-            add_action( 'lasso_toolbar_components', array($this,'editus_toolbar_components_add_table'), 10 );
122
-            wp_enqueue_style( 'editus-table-style', LASSO_URL.  '/public/assets/css/editus-table-edit-public.css', LASSO_VERSION, true );
123
-            wp_enqueue_script( 'editus_table',  LASSO_URL. '/public/assets/js/editus-table-edit-public.js', array( 'jquery' ), LASSO_VERSION, true );
119
+        add_action('lasso_editor_controls_after_outside', array($this, 'editus_table_edit_menu'));
120
+            add_filter('lasso_components', array($this, 'editus_components_add_table'), 10, 1);
121
+            add_action('lasso_toolbar_components', array($this, 'editus_toolbar_components_add_table'), 10);
122
+            wp_enqueue_style('editus-table-style', LASSO_URL.'/public/assets/css/editus-table-edit-public.css', LASSO_VERSION, true);
123
+            wp_enqueue_script('editus_table', LASSO_URL.'/public/assets/js/editus-table-edit-public.js', array('jquery'), LASSO_VERSION, true);
124 124
     }
125 125
     
126 126
     function editus_table_edit_menu()
127 127
     { ?>
128 128
 
129 129
         <ul class='editus-table-menu'>
130
-          <li data-action="insertcol"><?php echo __('Insert Column','lasso')?></li>
131
-          <li data-action="insertrow"><?php echo __('Insert Row','lasso')?></li>
132
-          <li data-action="delcol"><?php echo __('Delete Column','lasso')?></li>
133
-          <li data-action="delrow"><?php echo __('Delete Row','lasso')?></li>
130
+          <li data-action="insertcol"><?php echo __('Insert Column', 'lasso')?></li>
131
+          <li data-action="insertrow"><?php echo __('Insert Row', 'lasso')?></li>
132
+          <li data-action="delcol"><?php echo __('Delete Column', 'lasso')?></li>
133
+          <li data-action="delrow"><?php echo __('Delete Row', 'lasso')?></li>
134 134
         </ul>
135 135
     <?php
136 136
     }
@@ -142,20 +142,20 @@  discard block
 block discarded – undo
142 142
     }
143 143
 
144 144
 
145
-    function editus_components_add_table( $array ){
145
+    function editus_components_add_table($array) {
146 146
         $custom = array(
147 147
                'htmltable' => array(
148
-                         'name'    => __('HTML Table','lasso'),
148
+                         'name'    => __('HTML Table', 'lasso'),
149 149
                           'content' => self::editus_html_table(),
150 150
                 )
151 151
         );
152
-        return array_merge( $array, $custom );
152
+        return array_merge($array, $custom);
153 153
     }
154 154
 
155 155
 
156 156
     function editus_toolbar_components_add_table( ) {
157 157
           ?>
158
-          <li data-type="htmltable" title="<?php esc_attr_e( 'HTML Table', 'lasso' );?>" class="quote lasso-toolbar--component__htmltable dashicons dashicons-grid-view"></li>
158
+          <li data-type="htmltable" title="<?php esc_attr_e('HTML Table', 'lasso'); ?>" class="quote lasso-toolbar--component__htmltable dashicons dashicons-grid-view"></li>
159 159
           <?php
160 160
     }
161 161
 }
Please login to merge, or discard this patch.
admin/includes/menus/settings.php 1 patch
Spacing   +154 added lines, -154 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,41 +95,41 @@  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
-		$edit_post_disabled  = lasso_editor_get_option( 'post_edit_disabled', 'lasso_editor' );
108
-		$post_settings_disabled = lasso_editor_get_option( 'post_settings_disabled', 'lasso_editor' );
109
-		$allow_change_date = lasso_editor_get_option( 'allow_change_date', 'lasso_editor' );
110
-		$allow_new_category = lasso_editor_get_option( 'allow_new_category', 'lasso_editor' );
111
-		$shortcodify_disabled  = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
112
-		$enable_autosave  = lasso_editor_get_option( 'enable_autosave', 'lasso_editor' );
113
-
114
-		$use_old_ui      = lasso_editor_get_option( 'use_old_ui', 'lasso_editor' );
115
-		$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
116
-		$toolbar_headings_h4      = lasso_editor_get_option( 'toolbar_headings_h4', 'lasso_editor' );
117
-		$toolbar_list      = lasso_editor_get_option( 'toolbar_list', 'lasso_editor' );
118
-		$toolbar_show_color      = lasso_editor_get_option( 'toolbar_show_color', 'lasso_editor' );
119
-		$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
+		$edit_post_disabled  = lasso_editor_get_option('post_edit_disabled', 'lasso_editor');
108
+		$post_settings_disabled = lasso_editor_get_option('post_settings_disabled', 'lasso_editor');
109
+		$allow_change_date = lasso_editor_get_option('allow_change_date', 'lasso_editor');
110
+		$allow_new_category = lasso_editor_get_option('allow_new_category', 'lasso_editor');
111
+		$shortcodify_disabled = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor');
112
+		$enable_autosave = lasso_editor_get_option('enable_autosave', 'lasso_editor');
113
+
114
+		$use_old_ui = lasso_editor_get_option('use_old_ui', 'lasso_editor');
115
+		$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
116
+		$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
117
+		$toolbar_list = lasso_editor_get_option('toolbar_list', 'lasso_editor');
118
+		$toolbar_show_color      = lasso_editor_get_option('toolbar_show_color', 'lasso_editor');
119
+		$toolbar_show_alignment  = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor');
120 120
 		
121
-		$objectsNoSave  	= lasso_editor_get_option('dont_save', 'lasso_editor');
122
-		$objectsNonEditable  	= lasso_editor_get_option('non_editable', 'lasso_editor');
121
+		$objectsNoSave = lasso_editor_get_option('dont_save', 'lasso_editor');
122
+		$objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor');
123 123
 		$disable_tour = lasso_editor_get_option('disable_tour', 'lasso_editor');
124 124
 		$show_ignored_items = lasso_editor_get_option('show_ignored_items', 'lasso_editor');
125 125
 		$save_using_rest_disabled = lasso_editor_get_option('save_using_rest_disabled', 'lasso_editor');
126 126
 		
127
-		$default_post_types = apply_filters( 'lasso_allowed_post_types', array( 'post', 'page'));
128
-		$allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor',  $default_post_types);
127
+		$default_post_types = apply_filters('lasso_allowed_post_types', array('post', 'page'));
128
+		$allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', $default_post_types);
129 129
 		
130 130
 		$links_editable = lasso_editor_get_option('links_editable', 'lasso_editor', false);
131
-		$bold_tag = lasso_editor_get_option( 'bold_tag', 'lasso_editor',  "b");
132
-		$i_tag = lasso_editor_get_option( 'i_tag', 'lasso_editor',  "i");
131
+		$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor', "b");
132
+		$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor', "i");
133 133
         
134 134
         $add_table = lasso_editor_get_option('add_table', 'lasso_editor', false);
135 135
 		
@@ -146,31 +146,31 @@  discard block
 block discarded – undo
146 146
 ?>
147 147
 		<div class="wrap">
148 148
 
149
-	    	<h2><?php _e( 'Editus Settings', 'lasso' );?></h2>
149
+	    	<h2><?php _e('Editus Settings', 'lasso'); ?></h2>
150 150
 
151 151
 			<form id="lasso-editor-settings-form" class="lasso--form-settings" method="post" enctype="multipart/form-data">
152 152
 
153
-				<?php do_action('lasso_settings_before');?>
153
+				<?php do_action('lasso_settings_before'); ?>
154 154
 				
155 155
 				
156 156
 				
157
-				<h3><?php _e( 'Enable for:', 'lasso' );?></h3>
157
+				<h3><?php _e('Enable for:', 'lasso'); ?></h3>
158 158
 				<div class="lasso-editor-settings--option-wrap">
159 159
 					<div class="lasso-editor-settings--option-inner">
160 160
 						
161
-						<span class="lasso--setting-description"><?php _e( 'Enable Editus for the following post types.', 'lasso' );?></span>
161
+						<span class="lasso--setting-description"><?php _e('Enable Editus for the following post types.', 'lasso'); ?></span>
162 162
 						<?php
163 163
 						$args = array(
164 164
 							'public'   => true
165 165
 						);
166 166
 						 
167
-						$allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
168
-						$post_types = get_post_types( $args, 'objects' );
167
+						$allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
168
+						$post_types = get_post_types($args, 'objects');
169 169
 						 
170
-						foreach ( $post_types  as $post_type ) {
170
+						foreach ($post_types  as $post_type) {
171 171
 						   if ($post_type->name == 'attachment') continue;
172
-						   $checked ="";
173
-						   if (  in_array( $post_type->name, $allowed_post_types )  ) {
172
+						   $checked = "";
173
+						   if (in_array($post_type->name, $allowed_post_types)) {
174 174
 								$checked = 'checked="checked"';
175 175
 						   }
176 176
 						   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>';
@@ -180,224 +180,224 @@  discard block
 block discarded – undo
180 180
 				</div>
181 181
 				
182 182
 
183
-				<h3><?php _e( 'Internal Settings', 'lasso' );?></h3>
183
+				<h3><?php _e('Internal Settings', 'lasso'); ?></h3>
184 184
 				<div class="lasso-editor-settings--option-wrap">
185 185
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
186
-						<label><?php _e( 'Article Class', 'lasso' );?></label>
187
-						<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>
188
-						<input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr( $article_object );?>" placeholder=".entry-content">
186
+						<label><?php _e('Article Class', 'lasso'); ?></label>
187
+						<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>
188
+						<input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr($article_object); ?>" placeholder=".entry-content">
189 189
 					</div>
190 190
 				
191 191
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
192
-						<label><?php _e( 'Featured Image Class', 'lasso' );?></label>
193
-						<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>
194
-						<input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr( $featImgClass );?>" placeholder=".entry-content">
192
+						<label><?php _e('Featured Image Class', 'lasso'); ?></label>
193
+						<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>
194
+						<input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr($featImgClass); ?>" placeholder=".entry-content">
195 195
 					</div>
196 196
 				
197 197
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
198
-						<label><?php _e( 'Article Title Class', 'lasso' );?></label>
199
-						<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>
200
-						<input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr( $titleClass );?>" placeholder=".entry-content">
198
+						<label><?php _e('Article Title Class', 'lasso'); ?></label>
199
+						<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>
200
+						<input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr($titleClass); ?>" placeholder=".entry-content">
201 201
 					</div>
202 202
 				
203 203
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
204
-						<label><?php _e( 'Ignored Items to Save', 'lasso' );?></label>
205
-						<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>
206
-						<textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNoSave );?></textarea>
204
+						<label><?php _e('Ignored Items to Save', 'lasso'); ?></label>
205
+						<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>
206
+						<textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNoSave); ?></textarea>
207 207
 					</div>
208 208
 				
209 209
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
210
-						<label><?php _e( 'Read Only Items', 'lasso' );?></label>
211
-						<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>
212
-						<textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNonEditable );?></textarea>
210
+						<label><?php _e('Read Only Items', 'lasso'); ?></label>
211
+						<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>
212
+						<textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNonEditable); ?></textarea>
213 213
 					</div>
214 214
 				
215 215
 					<div class="lasso-editor-settings--option-inner" >
216
-						<input type="checkbox" class="checkbox" name="lasso_editor[show_ignored_items]" id="lasso_editor[show_ignored_items]" <?php echo checked( $show_ignored_items, 'on' );?> >
217
-						<label for="lasso_editor[show_ignored_items]"> <?php _e( 'Show Ignored Items', 'lasso' );?></label>
218
-						<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>
216
+						<input type="checkbox" class="checkbox" name="lasso_editor[show_ignored_items]" id="lasso_editor[show_ignored_items]" <?php echo checked($show_ignored_items, 'on'); ?> >
217
+						<label for="lasso_editor[show_ignored_items]"> <?php _e('Show Ignored Items', 'lasso'); ?></label>
218
+						<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>
219 219
 					</div>
220 220
 				</div>
221 221
 
222
-				<h3><?php _e( 'Editor UI', 'lasso' );?></h3>
222
+				<h3><?php _e('Editor UI', 'lasso'); ?></h3>
223 223
 				<div class="lasso-editor-settings--option-wrap">
224 224
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
225
-						<input type="checkbox" class="checkbox" name="lasso_editor[use_old_ui]" id="lasso_editor_use_old_ui" <?php echo checked( $use_old_ui, 'on' );?> >
226
-						<label for="lasso_editor[use_old_ui]"><?php _e( 'Use the Old Toolbar', 'lasso' );?></label>
227
-						<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>
225
+						<input type="checkbox" class="checkbox" name="lasso_editor[use_old_ui]" id="lasso_editor_use_old_ui" <?php echo checked($use_old_ui, 'on'); ?> >
226
+						<label for="lasso_editor[use_old_ui]"><?php _e('Use the Old Toolbar', 'lasso'); ?></label>
227
+						<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>
228 228
 					</div>
229 229
 				    <div id="lasso-editor-settings--colors">
230 230
 					<?php
231
-					self::create_section_for_color_picker('button-color1', _e( 'Editor Bar Color Top', 'lasso' ), '#0000ff');
232
-					self::create_section_for_color_picker('button-color2', _e( 'Editor Bar Color Bottom', 'lasso' ), '#000030');
233
-					self::create_section_for_color_picker('dialog-color', _e( 'Dialog Color', 'lasso' ), '#000055');
234
-					self::create_section_for_color_picker('text-color', _e( 'Icon/Text Color', 'lasso' ), '#ffffff');
231
+					self::create_section_for_color_picker('button-color1', _e('Editor Bar Color Top', 'lasso'), '#0000ff');
232
+					self::create_section_for_color_picker('button-color2', _e('Editor Bar Color Bottom', 'lasso'), '#000030');
233
+					self::create_section_for_color_picker('dialog-color', _e('Dialog Color', 'lasso'), '#000055');
234
+					self::create_section_for_color_picker('text-color', _e('Icon/Text Color', 'lasso'), '#ffffff');
235 235
 					?>
236
-					<button type="button" id="lasso-editor-settings--default-colors" ><?php _e( 'Default Colors', 'lasso' );?></button>
236
+					<button type="button" id="lasso-editor-settings--default-colors" ><?php _e('Default Colors', 'lasso'); ?></button>
237 237
 				    <div style="height:50px;"></div>
238 238
 					</div>
239 239
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
240
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked( $toolbar_headings, 'on' );?> >
241
-						<label for="lasso_editor[toolbar_headings]"><?php _e( 'Enable H2 and H3 Buttons', 'lasso' );?></label>
242
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set H2 and H3 settings.', 'lasso' );?></span>
240
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked($toolbar_headings, 'on'); ?> >
241
+						<label for="lasso_editor[toolbar_headings]"><?php _e('Enable H2 and H3 Buttons', 'lasso'); ?></label>
242
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set H2 and H3 settings.', 'lasso'); ?></span>
243 243
 
244 244
 					</div>
245 245
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
246
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings_h4]" id="lasso_editor[toolbar_headings_h4]" <?php echo checked( $toolbar_headings_h4, 'on' );?> >
247
-						<label for="lasso_editor[toolbar_headings_h4]"><?php _e( 'Enable H4/H5/H6 Buttons', 'lasso' );?></label>
248
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set H4/H5/H6 settings.', 'lasso' );?></span>
246
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings_h4]" id="lasso_editor[toolbar_headings_h4]" <?php echo checked($toolbar_headings_h4, 'on'); ?> >
247
+						<label for="lasso_editor[toolbar_headings_h4]"><?php _e('Enable H4/H5/H6 Buttons', 'lasso'); ?></label>
248
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set H4/H5/H6 settings.', 'lasso'); ?></span>
249 249
 
250 250
 					</div>
251 251
 					
252 252
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
253
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_list]" id="lasso_editor[toolbar_list]" <?php echo checked( $toolbar_list, 'on' );?> >
254
-						<label for="lasso_editor[toolbar_list]"><?php _e( 'Enable OL/UL Buttons', 'lasso' );?></label>
255
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to create Ordered and Unordered Lists from text selection.', 'lasso' );?></span>
253
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_list]" id="lasso_editor[toolbar_list]" <?php echo checked($toolbar_list, 'on'); ?> >
254
+						<label for="lasso_editor[toolbar_list]"><?php _e('Enable OL/UL Buttons', 'lasso'); ?></label>
255
+						<span class="lasso--setting-description"><?php _e('Show the buttons to create Ordered and Unordered Lists from text selection.', 'lasso'); ?></span>
256 256
 					</div>
257 257
 					
258 258
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
259
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked( $toolbar_show_color, 'on' );?> >
260
-						<label for="lasso_editor[toolbar_show_color]"><?php _e( 'Enable Text Color Buttons', 'lasso' );?></label>
261
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set text colors.', 'lasso' );?></span>
259
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked($toolbar_show_color, 'on'); ?> >
260
+						<label for="lasso_editor[toolbar_show_color]"><?php _e('Enable Text Color Buttons', 'lasso'); ?></label>
261
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set text colors.', 'lasso'); ?></span>
262 262
 
263 263
 					</div>
264 264
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
265
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked( $toolbar_show_alignment, 'on' );?> >
266
-						<label for="lasso_editor[toolbar_show_alignment]"><?php _e( 'Enable Text Align Buttons', 'lasso' );?></label>
267
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set text alignment.', 'lasso' );?></span>
265
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked($toolbar_show_alignment, 'on'); ?> >
266
+						<label for="lasso_editor[toolbar_show_alignment]"><?php _e('Enable Text Align Buttons', 'lasso'); ?></label>
267
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set text alignment.', 'lasso'); ?></span>
268 268
 
269 269
 					</div>
270 270
 					
271 271
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
272
-						<input type="checkbox" class="checkbox" name="lasso_editor[links_editable]" id="lasso_editor[links_editable]" <?php echo checked( $links_editable, 'on' );?> >
273
-						<label for="lasso_editor[links_editable]"><?php _e( 'Make links editable under the Editing Mode', 'lasso' );?></label>
274
-						<span class="lasso--setting-description"><?php _e( 'Make links editable under the Editing Mode. Turning this on will make the links non-clickable while editing.', 'lasso' );?></span>
272
+						<input type="checkbox" class="checkbox" name="lasso_editor[links_editable]" id="lasso_editor[links_editable]" <?php echo checked($links_editable, 'on'); ?> >
273
+						<label for="lasso_editor[links_editable]"><?php _e('Make links editable under the Editing Mode', 'lasso'); ?></label>
274
+						<span class="lasso--setting-description"><?php _e('Make links editable under the Editing Mode. Turning this on will make the links non-clickable while editing.', 'lasso'); ?></span>
275 275
 
276 276
 					</div>
277 277
 					<div class="lasso-editor-settings--option-inner">
278
-					    <label for="lasso_editor[insert_comp_ui]"> <?php _e( 'Insert Component UI', 'lasso' );?></label>
279
-						<span class="lasso--setting-description"><?php _e( 'UI mechanism to insert components', 'lasso' );?></span>
278
+					    <label for="lasso_editor[insert_comp_ui]"> <?php _e('Insert Component UI', 'lasso'); ?></label>
279
+						<span class="lasso--setting-description"><?php _e('UI mechanism to insert components', 'lasso'); ?></span>
280 280
 						<div class="lasso-editor-settings--option-inner" style="border:none;">
281
-					       <input type="radio" name="lasso_editor[insert_comp_ui]" value='drag' <?php echo checked( $insert_comp_ui, 'drag' );?>> <?php _e( 'Drag and Drop', 'lasso' );?>
281
+					       <input type="radio" name="lasso_editor[insert_comp_ui]" value='drag' <?php echo checked($insert_comp_ui, 'drag'); ?>> <?php _e('Drag and Drop', 'lasso'); ?>
282 282
 						</div>
283 283
 						<div class="lasso-editor-settings--option-inner" style="border:none;">
284
-						<input type="radio" name="lasso_editor[insert_comp_ui]" value="click" <?php echo checked( $insert_comp_ui, 'click' );?>> <?php _e( 'Click', 'lasso' );?>
284
+						<input type="radio" name="lasso_editor[insert_comp_ui]" value="click" <?php echo checked($insert_comp_ui, 'click'); ?>> <?php _e('Click', 'lasso'); ?>
285 285
 						</div>
286 286
 						<div class="lasso-editor-settings--option-inner" style="border:none;">
287
-						<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' );?>
287
+						<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'); ?>
288 288
 						</div>
289 289
 					</div>
290 290
                     
291 291
 				</div>
292 292
 				
293
-				<h3><?php _e( 'Extra Component', 'lasso' );?></h3>
293
+				<h3><?php _e('Extra Component', 'lasso'); ?></h3>
294 294
                 <div class="lasso-editor-settings--option-wrap" style="border:none;" >
295 295
                     <div class="lasso-editor-settings--option-inner" >
296
-						<input type="checkbox" class="checkbox" name="lasso_editor[add_table]" id="lasso_editor[add_table]" <?php echo checked( $add_table, 'on' );?> >
297
-						<label for="lasso_editor[add_table]"><?php _e( 'Additional Component: Table', 'lasso' );?></label>
298
-						<span class="lasso--setting-description"><?php _e( 'Allow user to add and edit tables.', 'lasso' );?></span>
296
+						<input type="checkbox" class="checkbox" name="lasso_editor[add_table]" id="lasso_editor[add_table]" <?php echo checked($add_table, 'on'); ?> >
297
+						<label for="lasso_editor[add_table]"><?php _e('Additional Component: Table', 'lasso'); ?></label>
298
+						<span class="lasso--setting-description"><?php _e('Allow user to add and edit tables.', 'lasso'); ?></span>
299 299
 
300 300
 					</div>
301 301
                 </div>
302 302
 				
303 303
 
304
-				<h3><?php _e( 'Post Settings UI', 'lasso' );?></h3>
304
+				<h3><?php _e('Post Settings UI', 'lasso'); ?></h3>
305 305
 				<div class="lasso-editor-settings--option-wrap"  >
306 306
 					<div class="lasso-editor-settings--option-inner" style="border:none">
307
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked( $post_settings_disabled, 'on' );?> >
308
-						<label for="lasso_editor[post_settings_disabled]"> <?php _e( 'Disable Post Settings', 'lasso' );?></label>
309
-						<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>
307
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked($post_settings_disabled, 'on'); ?> >
308
+						<label for="lasso_editor[post_settings_disabled]"> <?php _e('Disable Post Settings', 'lasso'); ?></label>
309
+						<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>
310 310
 					</div>
311 311
 					
312 312
 					<div class="lasso-editor-settings--option-inner" style="border:none">
313
-						<input type="checkbox" class="checkbox" name="lasso_editor[allow_change_date]" id="lasso_editor[allow_change_date]" <?php echo checked( $allow_change_date, 'on' );?> >
314
-						<label for="lasso_editor[allow_change_date]"> <?php _e( 'Allow Changing Post Date', 'lasso' );?></label>
315
-						<span class="lasso--setting-description"><?php _e( 'Add the date selector to change the post\'s date to the Post Setting dialog', 'lasso' );?></span>
313
+						<input type="checkbox" class="checkbox" name="lasso_editor[allow_change_date]" id="lasso_editor[allow_change_date]" <?php echo checked($allow_change_date, 'on'); ?> >
314
+						<label for="lasso_editor[allow_change_date]"> <?php _e('Allow Changing Post Date', 'lasso'); ?></label>
315
+						<span class="lasso--setting-description"><?php _e('Add the date selector to change the post\'s date to the Post Setting dialog', 'lasso'); ?></span>
316 316
 					</div>
317 317
 					
318 318
 					<div class="lasso-editor-settings--option-inner" style="border:none">
319
-						<input type="checkbox" class="checkbox" name="lasso_editor[allow_new_category]" id="lasso_editor[allow_new_category]" <?php echo checked( $allow_new_category, 'on' );?> >
320
-						<label for="lasso_editor[allow_new_category]"> <?php _e( 'Allow Adding New Category', 'lasso' );?></label>
321
-						<span class="lasso--setting-description"><?php _e( 'Add the user to create new, previously non-existing categories for posts.', 'lasso' );?></span>
319
+						<input type="checkbox" class="checkbox" name="lasso_editor[allow_new_category]" id="lasso_editor[allow_new_category]" <?php echo checked($allow_new_category, 'on'); ?> >
320
+						<label for="lasso_editor[allow_new_category]"> <?php _e('Allow Adding New Category', 'lasso'); ?></label>
321
+						<span class="lasso--setting-description"><?php _e('Add the user to create new, previously non-existing categories for posts.', 'lasso'); ?></span>
322 322
 					</div>
323 323
 					
324 324
 					<div class="lasso-editor-settings--option-inner" style="border:none">
325
-						<input type="checkbox" class="checkbox" name="lasso_editor[no_pending_status]" id="lasso_editor[no_pending_status]" <?php echo checked( $no_pending_status, 'on' );?> >
326
-						<label for="lasso_editor[no_pending_status]"> <?php _e( 'Do Not Allow "Pending" Status', 'lasso' );?></label>
327
-						<span class="lasso--setting-description"><?php _e( 'Remove the Option to Set the Status to Pending.', 'lasso' );?></span>
325
+						<input type="checkbox" class="checkbox" name="lasso_editor[no_pending_status]" id="lasso_editor[no_pending_status]" <?php echo checked($no_pending_status, 'on'); ?> >
326
+						<label for="lasso_editor[no_pending_status]"> <?php _e('Do Not Allow "Pending" Status', 'lasso'); ?></label>
327
+						<span class="lasso--setting-description"><?php _e('Remove the Option to Set the Status to Pending.', 'lasso'); ?></span>
328 328
 					</div>
329 329
 					
330 330
 					<div class="lasso-editor-settings--option-inner" style="border:none">
331
-						<input type="checkbox" class="checkbox" name="lasso_editor[no_url_setting]" id="lasso_editor[no_slug_setting]" <?php echo checked( $no_url_setting, 'on' );?> >
332
-						<label for="lasso_editor[no_url_setting]"> <?php _e( 'Remove POST URL Option', 'lasso' );?></label>
333
-						<span class="lasso--setting-description"><?php _e( 'Remove the Option to Set the URL for the Post.', 'lasso' );?></span>
331
+						<input type="checkbox" class="checkbox" name="lasso_editor[no_url_setting]" id="lasso_editor[no_slug_setting]" <?php echo checked($no_url_setting, 'on'); ?> >
332
+						<label for="lasso_editor[no_url_setting]"> <?php _e('Remove POST URL Option', 'lasso'); ?></label>
333
+						<span class="lasso--setting-description"><?php _e('Remove the Option to Set the URL for the Post.', 'lasso'); ?></span>
334 334
 					</div>
335 335
 				
336 336
 					<div class="lasso-editor-settings--option-inner" >
337
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked( $post_new_disabled, 'on' );?> >
338
-						<label for="lasso_editor[post_adding_disabled]"><?php _e( 'Disable Post Adding', 'lasso' );?></label>
339
-						<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>
337
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked($post_new_disabled, 'on'); ?> >
338
+						<label for="lasso_editor[post_adding_disabled]"><?php _e('Disable Post Adding', 'lasso'); ?></label>
339
+						<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>
340 340
 					</div>
341 341
 					
342 342
 
343 343
 				</div>
344 344
 				
345
-				<h3><?php _e( 'Misc', 'lasso' );?></h3>
345
+				<h3><?php _e('Misc', 'lasso'); ?></h3>
346 346
 				<div class="lasso-editor-settings--option-wrap">
347 347
 					<div class="lasso-editor-settings--option-inner" style="border:none">
348
-						<input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked( $disable_tour, 'on' );?> >
349
-						<label for="lasso_editor[disable_tour]"> <?php _e( 'Do Not Show Tour Dialog', 'lasso' );?></label>
350
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable the tour dialog box for all users.', 'lasso' );?></span>
348
+						<input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked($disable_tour, 'on'); ?> >
349
+						<label for="lasso_editor[disable_tour]"> <?php _e('Do Not Show Tour Dialog', 'lasso'); ?></label>
350
+						<span class="lasso--setting-description"><?php _e('Check this box to disable the tour dialog box for all users.', 'lasso'); ?></span>
351 351
 					</div>
352 352
 
353 353
 					<div class="lasso-editor-settings--option-inner" style="border:none">
354
-					    <label for="lasso_editor[bold_tag]"> <?php _e( '"Bold" Tag', 'lasso' );?></label>
355
-						<span class="lasso--setting-description"><?php _e( 'Choose the HTML tag used for the "Bold" style.', 'lasso' );?></span>
356
-					    <input type="radio" name="lasso_editor[bold_tag]" value='b' <?php echo checked( $bold_tag, 'b' );?>> b
357
-						<input type="radio" name="lasso_editor[bold_tag]" value="strong" <?php echo checked( $bold_tag, 'strong' );?>> strong
354
+					    <label for="lasso_editor[bold_tag]"> <?php _e('"Bold" Tag', 'lasso'); ?></label>
355
+						<span class="lasso--setting-description"><?php _e('Choose the HTML tag used for the "Bold" style.', 'lasso'); ?></span>
356
+					    <input type="radio" name="lasso_editor[bold_tag]" value='b' <?php echo checked($bold_tag, 'b'); ?>> b
357
+						<input type="radio" name="lasso_editor[bold_tag]" value="strong" <?php echo checked($bold_tag, 'strong'); ?>> strong
358 358
 					</div>
359 359
 					<div class="lasso-editor-settings--option-inner" >
360
-					    <label for="lasso_editor[i_tag]"> <?php _e( '"Italic" Tag', 'lasso' );?></label>
361
-						<span class="lasso--setting-description"><?php _e( 'Choose the HTML tag used for the "Italic" style.', 'lasso' );?></span>
362
-					    <input type="radio" name="lasso_editor[i_tag]" value='i' <?php echo checked( $i_tag, 'i' );?>> i
363
-						<input type="radio" name="lasso_editor[i_tag]" value="em" <?php echo checked( $i_tag, 'em' );?>> em
360
+					    <label for="lasso_editor[i_tag]"> <?php _e('"Italic" Tag', 'lasso'); ?></label>
361
+						<span class="lasso--setting-description"><?php _e('Choose the HTML tag used for the "Italic" style.', 'lasso'); ?></span>
362
+					    <input type="radio" name="lasso_editor[i_tag]" value='i' <?php echo checked($i_tag, 'i'); ?>> i
363
+						<input type="radio" name="lasso_editor[i_tag]" value="em" <?php echo checked($i_tag, 'em'); ?>> em
364 364
 					</div>
365 365
 				</div>
366 366
 
367
-				<h3><?php _e( 'Advanced Options', 'lasso' );?></h3>
368
-                <span class="lasso--setting-description"><?php _e( 'Suggested not to turn these options on without consulting the developer.', 'lasso' );?></span>
367
+				<h3><?php _e('Advanced Options', 'lasso'); ?></h3>
368
+                <span class="lasso--setting-description"><?php _e('Suggested not to turn these options on without consulting the developer.', 'lasso'); ?></span>
369 369
                 <span class="lasso--setting-description"> </span>
370 370
 				<div class="lasso-editor-settings--option-wrap ">
371 371
 					<div class="lasso-editor-settings--option-inner" style="border:none">
372
-						<input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked( $shortcodify_disabled, 'on' );?> >
373
-						<label for="lasso_editor[shortcodify_disabled]"><?php _e( 'Disable Aesop Component Conversion', 'lasso' );?></label>
374
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso' );?></span>
372
+						<input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked($shortcodify_disabled, 'on'); ?> >
373
+						<label for="lasso_editor[shortcodify_disabled]"><?php _e('Disable Aesop Component Conversion', 'lasso'); ?></label>
374
+						<span class="lasso--setting-description"><?php _e('Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso'); ?></span>
375 375
 					</div>
376 376
 				
377 377
 					<div class="lasso-editor-settings--option-inner" style="border:none">
378
-						<input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked( $enable_autosave, 'on' );?> >
379
-						<label for="lasso_editor[enable_autosave]"><?php _e( 'Enable Auto Save', 'lasso' );?></label>
380
-						<span class="lasso--setting-description"><?php _e( 'Check this box to enable auto save.', 'lasso' );?></span>
378
+						<input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked($enable_autosave, 'on'); ?> >
379
+						<label for="lasso_editor[enable_autosave]"><?php _e('Enable Auto Save', 'lasso'); ?></label>
380
+						<span class="lasso--setting-description"><?php _e('Check this box to enable auto save.', 'lasso'); ?></span>
381 381
 					</div>
382 382
 				
383 383
 					<div class="lasso-editor-settings--option-inner" style="border:none">
384
-						<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' );?> >
385
-						<label for="lasso_editor[post_save_disabled]"><?php _e( 'Disable Post Saving', 'lasso' );?></label>
386
-						<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>
384
+						<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'); ?> >
385
+						<label for="lasso_editor[post_save_disabled]"><?php _e('Disable Post Saving', 'lasso'); ?></label>
386
+						<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>
387 387
 
388 388
 					</div>
389 389
 					
390 390
 					<div class="lasso-editor-settings--option-inner" style="border:none">
391
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_edit_disabled]" id="lasso_editor[post_edit_disabled]" <?php echo checked( $edit_post_disabled, 'on' );?> >
392
-						<label for="lasso_editor[post_edit_disabled]"><?php _e( 'Disable Post Editing', 'lasso' );?></label>
393
-						<span class="lasso--setting-description"><?php _e( 'You may use this option if you only want to edit custom fields. Refer <a href="https://edituswp.com/editing-and-updating-custom-fields-from-frontend/">here</a> for more information. The custom fields you specify will be still editable under the editing mode.', 'lasso' );?></span>
391
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_edit_disabled]" id="lasso_editor[post_edit_disabled]" <?php echo checked($edit_post_disabled, 'on'); ?> >
392
+						<label for="lasso_editor[post_edit_disabled]"><?php _e('Disable Post Editing', 'lasso'); ?></label>
393
+						<span class="lasso--setting-description"><?php _e('You may use this option if you only want to edit custom fields. Refer <a href="https://edituswp.com/editing-and-updating-custom-fields-from-frontend/">here</a> for more information. The custom fields you specify will be still editable under the editing mode.', 'lasso'); ?></span>
394 394
 
395 395
 					</div>
396 396
 				
397 397
 					<div class="lasso-editor-settings--option-inner">
398
-						<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' );?> >
399
-						<label for="lasso_editor[save_using_rest_disabled]"><?php _e( "Don't Use REST API to Save", 'lasso' );?></label>
400
-						<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>
398
+						<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'); ?> >
399
+						<label for="lasso_editor[save_using_rest_disabled]"><?php _e("Don't Use REST API to Save", 'lasso'); ?></label>
400
+						<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>
401 401
 
402 402
 					</div>
403 403
 				</div>
@@ -407,11 +407,11 @@  discard block
 block discarded – undo
407 407
 
408 408
 				<div class="lasso-editor-settings--submit">
409 409
 				    <input type="hidden" name="action" value="lasso-editor-settings" />
410
-				    <input type="submit" class="button-primary" value="<?php esc_attr_e( 'Save Settings', 'lasso' );?>" />
411
-					<?php wp_nonce_field( 'nonce', 'lasso_editor_settings' ); ?>
410
+				    <input type="submit" class="button-primary" value="<?php esc_attr_e('Save Settings', 'lasso'); ?>" />
411
+					<?php wp_nonce_field('nonce', 'lasso_editor_settings'); ?>
412 412
 				</div>
413 413
 				
414
-				<?php do_action('lasso_settings_after');?>
414
+				<?php do_action('lasso_settings_after'); ?>
415 415
 			</form>
416 416
 
417 417
 		</div><?php
Please login to merge, or discard this patch.