Completed
Push — master ( 51d4c2...448b3d )
by
unknown
01:34
created
lasso.php 1 patch
Spacing   +24 added lines, -24 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.1.10' );
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.1.10');
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,16 +88,16 @@  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
 
Please login to merge, or discard this patch.
public/includes/editor-modules.php 1 patch
Spacing   +260 added lines, -260 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
 		</style>
63 63
 		
@@ -68,31 +68,31 @@  discard block
 block discarded – undo
68 68
 		<style>
69 69
 		
70 70
 		.lasso-editor-controls--wrap, #lasso--post-settings2,#lasso--save,#lasso--post-delete,#lasso--exit,#lasso--publish {
71
-			background-image: -webkit-linear-gradient(top,<?php echo $button_color1;?> 0,<?php echo $button_color2;?> 100%);
72
-			background-image: -o-linear-gradient(top,<?php echo $button_color1;?> 0,<?php echo $button_color2;?> 100%);
73
-			background-image: linear-gradient(to bottom,<?php echo $button_color1;?> 0,<?php echo $button_color2;?> 100%);
74
-			color: <?php echo $text_color;?>;
71
+			background-image: -webkit-linear-gradient(top,<?php echo $button_color1; ?> 0,<?php echo $button_color2; ?> 100%);
72
+			background-image: -o-linear-gradient(top,<?php echo $button_color1; ?> 0,<?php echo $button_color2; ?> 100%);
73
+			background-image: linear-gradient(to bottom,<?php echo $button_color1; ?> 0,<?php echo $button_color2; ?> 100%);
74
+			color: <?php echo $text_color; ?>;
75 75
 		}
76 76
 		
77 77
 		.lasso--controls__right a:before, #lasso-toolbar--html__footer_desc {
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) { ?>
@@ -122,48 +122,48 @@  discard block
 block discarded – undo
122 122
 		<?php
123 123
 		} 
124 124
 		?>
125
-		<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();?>" >
125
+		<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(); ?>" >
126 126
 
127
-			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class;?> "  <?php echo $mobile_style ?> >
127
+			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class; ?> "  <?php echo $mobile_style ?> >
128 128
 
129
-				<?php do_action( 'lasso_editor_controls_before' );
129
+				<?php do_action('lasso_editor_controls_before');
130 130
 
131
-				if ( $is_capable ) { ?>
131
+				if ($is_capable) { ?>
132 132
 
133
-					<li id="lasso--edit" title="<?php esc_attr_e( 'Edit Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
133
+					<li id="lasso--edit" title="<?php esc_attr_e('Edit Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
134 134
 
135
-					<?php if ( 'off' == $post_settings_disabled || empty( $post_settings_disabled ) ) { ?>
136
-						<li id="lasso--post-settings" title="<?php esc_attr_e( 'Post Settings', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
135
+					<?php if ('off' == $post_settings_disabled || empty($post_settings_disabled)) { ?>
136
+						<li id="lasso--post-settings" title="<?php esc_attr_e('Post Settings', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
137 137
 					<?php }
138 138
 
139 139
 				} ?>
140 140
 
141
-				<li id="lasso--post-all" title="<?php esc_attr_e( 'All Posts', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
141
+				<li id="lasso--post-all" title="<?php esc_attr_e('All Posts', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
142 142
 
143
-				<?php if ( $is_capable && wp_revisions_enabled( $post ) ) { ?>
144
-					<li id="lasso--post-revisions" title="<?php esc_attr_e( 'Revisions', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
143
+				<?php if ($is_capable && wp_revisions_enabled($post)) { ?>
144
+					<li id="lasso--post-revisions" title="<?php esc_attr_e('Revisions', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
145 145
 				<?php } ?>
146 146
 
147
-				<?php if ( ( 'off' == $post_new_disabled || empty( $post_new_disabled ) && lasso_user_can('edit_posts') ) ) { ?>
148
-					<li id="lasso--post-new" title="<?php esc_attr_e( 'Add Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
147
+				<?php if (('off' == $post_new_disabled || empty($post_new_disabled) && lasso_user_can('edit_posts'))) { ?>
148
+					<li id="lasso--post-new" title="<?php esc_attr_e('Add Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
149 149
 				<?php } ?>
150 150
 
151
-				<?php do_action( 'lasso_editor_controls_after' );?>
151
+				<?php do_action('lasso_editor_controls_after'); ?>
152 152
 
153 153
 			</ul>
154 154
 
155
-			<?php if ( is_singular() && !$is_mobile ) { ?>
155
+			<?php if (is_singular() && !$is_mobile) { ?>
156 156
 
157
-				<div class="lasso--controls__right" data-posttype="<?php echo get_post_type( get_the_ID() );?>" data-status="<?php echo $status;?>">
157
+				<div class="lasso--controls__right" data-posttype="<?php echo get_post_type(get_the_ID()); ?>" data-status="<?php echo $status; ?>">
158 158
 				
159
-					<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>
160
-					<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>
159
+					<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>
160
+					<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>
161 161
 
162 162
 
163
-					<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>
163
+					<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>
164 164
 
165
-					<?php if ( ('draft' == $status ) || ('pending' == $status && $can_publish) ) { ?>
166
-						<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>
165
+					<?php if (('draft' == $status) || ('pending' == $status && $can_publish)) { ?>
166
+						<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>
167 167
 					<?php } ?>
168 168
 					
169 169
 
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 		</div>
175 175
 		
176 176
 		
177
-		<?php do_action( 'lasso_editor_controls_after_outside' );?>
177
+		<?php do_action('lasso_editor_controls_after_outside'); ?>
178 178
 
179 179
 	<?php }
180 180
 }
@@ -192,9 +192,9 @@  discard block
 block discarded – undo
192 192
 
193 193
 
194 194
 	// let users add custom css classes
195
-	$custom_classes = apply_filters( 'lasso_sidebar_classes', '' );
195
+	$custom_classes = apply_filters('lasso_sidebar_classes', '');
196 196
 	?>
197
-	<div id="lasso--sidebar" class="<?php echo sanitize_html_class( $custom_classes );?>" >
197
+	<div id="lasso--sidebar" class="<?php echo sanitize_html_class($custom_classes); ?>" >
198 198
 		<div class="lasso--sidebar__inner">
199 199
 			<div id="aesop-generator-settings"><div id="lasso--component__settings"></div></div>
200 200
 		</div>
@@ -216,21 +216,21 @@  discard block
 block discarded – undo
216 216
 	$is_mobile = wp_is_mobile();
217 217
 
218 218
 	// check for lasso story engine and add a class doniting this
219
-	$ase_status = class_exists( 'Aesop_Core' ) || defined( 'LASSO_CUSTOM' ) ? 'ase-active' : 'ase-not-active';
219
+	$ase_status = class_exists('Aesop_Core') || defined('LASSO_CUSTOM') ? 'ase-active' : 'ase-not-active';
220 220
 
221 221
 	// let users add custom css classes
222
-	$custom_classes = apply_filters( 'lasso_toolbar_classes', '' );
222
+	$custom_classes = apply_filters('lasso_toolbar_classes', '');
223 223
 
224 224
 	// are toolbar headings enabled
225
-	$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
226
-	$toolbar_headings_h4      = lasso_editor_get_option( 'toolbar_headings_h4', 'lasso_editor' );
227
-	$toolbar_list      = lasso_editor_get_option( 'toolbar_list', 'lasso_editor' );
225
+	$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
226
+	$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
227
+	$toolbar_list = lasso_editor_get_option('toolbar_list', 'lasso_editor');
228 228
 
229
-	$toolbar_class  = $toolbar_headings ? 'toolbar-extended' : false;
229
+	$toolbar_class = $toolbar_headings ? 'toolbar-extended' : false;
230 230
 	
231 231
 	// mobile styles
232 232
     $mobile_class = $is_mobile ? 'lasso-mobile' : false;
233
-	$mobile_style =$is_mobile ? 'style="bottom:0px;"' : null;
233
+	$mobile_style = $is_mobile ? 'style="bottom:0px;"' : null;
234 234
 	
235 235
 	//show color
236 236
 	$show_color = lasso_editor_get_option('toolbar_show_color', 'lasso_editor');
@@ -238,126 +238,126 @@  discard block
 block discarded – undo
238 238
 	//show alignment
239 239
 	$show_align = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor');
240 240
 	
241
-	$status = get_post_status( get_the_ID() );
241
+	$status = get_post_status(get_the_ID());
242 242
 	
243
-	$shortcodify_disabled = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
243
+	$shortcodify_disabled = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor');
244 244
 	
245 245
 	$sc_saving_class = 'on' == $shortcodify_disabled ? 'shortcodify-disabled' : 'shortcodify-enabled';
246 246
 
247 247
 
248 248
 	?>
249
-	<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 ?>>
250
-		<ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"';}?>>
251
-			<?php do_action( 'lasso_toolbar_components_before' );?>
252
-		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e( 'Bold', 'lasso' );?>"></li>
253
-		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e( 'Underline', 'lasso' );?>"></li>
254
-		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e( 'Italicize', 'lasso' );?>"></li>
255
-		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e( 'Strikethrough', 'lasso' );?>"></li>
256
-			<li id="lasso-toolbar--components" class="lasso-toolbar--components" title="<?php esc_attr_e( 'Insert Component', 'lasso' );?>" style="color:#ffffa0;">
249
+	<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 ?>>
250
+		<ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"'; }?>>
251
+			<?php do_action('lasso_toolbar_components_before'); ?>
252
+		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e('Bold', 'lasso'); ?>"></li>
253
+		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e('Underline', 'lasso'); ?>"></li>
254
+		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e('Italicize', 'lasso'); ?>"></li>
255
+		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e('Strikethrough', 'lasso'); ?>"></li>
256
+			<li id="lasso-toolbar--components" class="lasso-toolbar--components" title="<?php esc_attr_e('Insert Component', 'lasso'); ?>" style="color:#ffffa0;">
257 257
 			    <ul id="lasso-toolbar--components__list" style="display:none;color:white;">
258
-			    	<?php if ( 'ase-active' == $ase_status ): ?>
259
-						<li data-type="image" title="<?php esc_attr_e( 'Image', 'lasso' );?>" class="lasso-toolbar--component__image"></li>
260
-						<li data-type="character" title="<?php esc_attr_e( 'Character', 'lasso' );?>" class="lasso-toolbar--component__character"></li>
261
-						<li data-type="quote" title="<?php esc_attr_e( 'Quote', 'lasso' );?>"  class="lasso-toolbar--component__quote"></li>
262
-						<li data-type="content" title="<?php esc_attr_e( 'Content', 'lasso' );?>"  class="lasso-toolbar--component__content"></li>
263
-						<li data-type="chapter" title="<?php esc_attr_e( 'Chapter', 'lasso' );?>"  class="lasso-toolbar--component__chapter"></li>
264
-						<li data-type="parallax" title="<?php esc_attr_e( 'Parallax', 'lasso' );?>"  class="lasso-toolbar--component__parallax"></li>
265
-						<li data-type="audio" title="<?php esc_attr_e( 'Audio', 'lasso' );?>"  class="lasso-toolbar--component__audio"></li>
266
-						<li data-type="video" title="<?php esc_attr_e( 'Video', 'lasso' );?>"  class="lasso-toolbar--component__video"></li>
267
-						<li data-type="map" title="<?php esc_attr_e( 'Map', 'lasso' );?>"  class="lasso-toolbar--component__map"></li>
268
-						<li data-type="timeline_stop" title="<?php esc_attr_e( 'Timeline', 'lasso' );?>"  class="lasso-toolbar--component__timeline"></li>
269
-						<li data-type="document" title="<?php esc_attr_e( 'Document', 'lasso' );?>"  class="lasso-toolbar--component__document"></li>
270
-						<li data-type="collection" title="<?php esc_attr_e( 'Collection', 'lasso' );?>"  class="lasso-toolbar--component__collection"></li>
271
-						<li data-type="gallery" title="<?php esc_attr_e( 'Gallery', 'lasso' );?>"  class="lasso-toolbar--component__gallery"></li>
272
-						<?php if ( class_exists ('Aesop_GalleryPop') ) { ?>
273
-						     <li data-type="gallery" title="<?php esc_attr_e( 'Gallery Pop', 'lasso' );?>"  class="lasso-toolbar--component__gallerypop"></li>
258
+			    	<?php if ('ase-active' == $ase_status): ?>
259
+						<li data-type="image" title="<?php esc_attr_e('Image', 'lasso'); ?>" class="lasso-toolbar--component__image"></li>
260
+						<li data-type="character" title="<?php esc_attr_e('Character', 'lasso'); ?>" class="lasso-toolbar--component__character"></li>
261
+						<li data-type="quote" title="<?php esc_attr_e('Quote', 'lasso'); ?>"  class="lasso-toolbar--component__quote"></li>
262
+						<li data-type="content" title="<?php esc_attr_e('Content', 'lasso'); ?>"  class="lasso-toolbar--component__content"></li>
263
+						<li data-type="chapter" title="<?php esc_attr_e('Chapter', 'lasso'); ?>"  class="lasso-toolbar--component__chapter"></li>
264
+						<li data-type="parallax" title="<?php esc_attr_e('Parallax', 'lasso'); ?>"  class="lasso-toolbar--component__parallax"></li>
265
+						<li data-type="audio" title="<?php esc_attr_e('Audio', 'lasso'); ?>"  class="lasso-toolbar--component__audio"></li>
266
+						<li data-type="video" title="<?php esc_attr_e('Video', 'lasso'); ?>"  class="lasso-toolbar--component__video"></li>
267
+						<li data-type="map" title="<?php esc_attr_e('Map', 'lasso'); ?>"  class="lasso-toolbar--component__map"></li>
268
+						<li data-type="timeline_stop" title="<?php esc_attr_e('Timeline', 'lasso'); ?>"  class="lasso-toolbar--component__timeline"></li>
269
+						<li data-type="document" title="<?php esc_attr_e('Document', 'lasso'); ?>"  class="lasso-toolbar--component__document"></li>
270
+						<li data-type="collection" title="<?php esc_attr_e('Collection', 'lasso'); ?>"  class="lasso-toolbar--component__collection"></li>
271
+						<li data-type="gallery" title="<?php esc_attr_e('Gallery', 'lasso'); ?>"  class="lasso-toolbar--component__gallery"></li>
272
+						<?php if (class_exists('Aesop_GalleryPop')) { ?>
273
+						     <li data-type="gallery" title="<?php esc_attr_e('Gallery Pop', 'lasso'); ?>"  class="lasso-toolbar--component__gallerypop"></li>
274 274
 						<?php }?>
275
-						<?php if ( class_exists ('Aesop_Events') ) { ?>
276
-						     <li data-type="events" title="<?php esc_attr_e( 'Event', 'lasso' );?>"  class="lasso-toolbar--component__event"></li>
275
+						<?php if (class_exists('Aesop_Events')) { ?>
276
+						     <li data-type="events" title="<?php esc_attr_e('Event', 'lasso'); ?>"  class="lasso-toolbar--component__event"></li>
277 277
 						<?php }?>
278 278
 					<?php else: ?>
279
-						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );?>" class="image lasso-toolbar--component__image"></li>
280
-						<li data-type="wpquote" title="<?php esc_attr_e( 'WordPress Quote', 'lasso' );?>" class="quote lasso-toolbar--component__quote"></li>
281
-						<!--li data-type="wpvideo" title="<?php esc_attr_e( 'WordPress Video', 'lasso' );?>" class="video lasso-toolbar--component__video"></li-->
279
+						<li data-type="wpimg" title="<?php esc_attr_e('WordPress Image', 'lasso'); ?>" class="image lasso-toolbar--component__image"></li>
280
+						<li data-type="wpquote" title="<?php esc_attr_e('WordPress Quote', 'lasso'); ?>" class="quote lasso-toolbar--component__quote"></li>
281
+						<!--li data-type="wpvideo" title="<?php esc_attr_e('WordPress Video', 'lasso'); ?>" class="video lasso-toolbar--component__video"></li-->
282 282
 					<?php endif; ?>
283
-					<?php do_action( 'lasso_toolbar_components' );?>
283
+					<?php do_action('lasso_toolbar_components'); ?>
284 284
 			    </ul>
285 285
 			</li>
286
-		    <?php if ( $toolbar_headings ): ?>
287
-		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>"></li>
288
-		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>"></li>
286
+		    <?php if ($toolbar_headings): ?>
287
+		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>"></li>
288
+		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>"></li>
289 289
 			<?php endif; ?>
290 290
 			
291 291
 			
292 292
 			
293
-			<?php if ( $toolbar_headings_h4 ): ?>
294
-		    <li id="lasso-toolbar--h4" title="<?php esc_attr_e( 'H4 Heading', 'lasso' );?>"></li>
295
-		    <li id="lasso-toolbar--h5" title="<?php esc_attr_e( 'H5 Heading', 'lasso' );?>"></li>
296
-			<li id="lasso-toolbar--h6" title="<?php esc_attr_e( 'H6 Heading', 'lasso' );?>"></li>
293
+			<?php if ($toolbar_headings_h4): ?>
294
+		    <li id="lasso-toolbar--h4" title="<?php esc_attr_e('H4 Heading', 'lasso'); ?>"></li>
295
+		    <li id="lasso-toolbar--h5" title="<?php esc_attr_e('H5 Heading', 'lasso'); ?>"></li>
296
+			<li id="lasso-toolbar--h6" title="<?php esc_attr_e('H6 Heading', 'lasso'); ?>"></li>
297 297
 			<?php endif; ?>
298 298
 			
299
-			<?php if ( $show_color ): ?>
300
-		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e( 'Set Color for Selected Text', 'lasso' );?>"></li>
301
-		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e( 'Choose Color', 'lasso' );?>"></li>
299
+			<?php if ($show_color): ?>
300
+		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e('Set Color for Selected Text', 'lasso'); ?>"></li>
301
+		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e('Choose Color', 'lasso'); ?>"></li>
302 302
 			<?php endif; ?>
303 303
 			
304
-			<?php if ( $toolbar_list ): ?>
305
-		    <li id="lasso-toolbar--ol" title="<?php esc_attr_e( 'Ordered List', 'lasso' );?>"></li>
306
-		    <li id="lasso-toolbar--ul" title="<?php esc_attr_e( 'Unordered List', 'lasso' );?>"></li>
304
+			<?php if ($toolbar_list): ?>
305
+		    <li id="lasso-toolbar--ol" title="<?php esc_attr_e('Ordered List', 'lasso'); ?>"></li>
306
+		    <li id="lasso-toolbar--ul" title="<?php esc_attr_e('Unordered List', 'lasso'); ?>"></li>
307 307
 			<?php endif; ?>
308 308
 					
309 309
 		    
310
-			<li id="lasso-toolbar--link" title="<?php esc_attr_e( 'Anchor Link', 'lasso' );?>">
310
+			<li id="lasso-toolbar--link" title="<?php esc_attr_e('Anchor Link', 'lasso'); ?>">
311 311
 		    	<div id="lasso-toolbar--link__wrap" <?php echo $mobile_style ?> >
312
-		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'http://url.com', 'lasso' );?>"></div>
313
-		    		<a href="#" title="<?php esc_attr_e( 'Create Link', 'lasso' );?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
312
+		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e('http://url.com', 'lasso'); ?>"></div>
313
+		    		<a href="#" title="<?php esc_attr_e('Create Link', 'lasso'); ?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
314 314
 					<input class="styled-checkbox" type="checkbox" id="aesop-toolbar--link_newtab" checked/>
315
-                    <label for="aesop-toolbar--link_newtab"><?php esc_attr_e( 'Open in a New Tab', 'lasso' );?></label>
315
+                    <label for="aesop-toolbar--link_newtab"><?php esc_attr_e('Open in a New Tab', 'lasso'); ?></label>
316 316
 		    	</div>
317 317
 		    </li>
318
-		    <?php do_action( 'lasso_toolbar_components_after' );?>
319
-		    <li id="lasso-toolbar--html" title="<?php esc_attr_e( 'Insert HTML or Code', 'lasso' );?>">
318
+		    <?php do_action('lasso_toolbar_components_after'); ?>
319
+		    <li id="lasso-toolbar--html" title="<?php esc_attr_e('Insert HTML or Code', 'lasso'); ?>">
320 320
 		    	<div id="lasso-toolbar--html__wrap" <?php echo $mobile_style ?>>
321
-		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?>"></div>
321
+		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?>"></div>
322 322
 		    		<div id="lasso-toolbar--html__footer">
323 323
 					<div id="lasso-toolbar--html__footer_desc" >
324
-					<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?><br>
325
-					<?php esc_attr_e( 'You can also use Shortcodes', 'lasso' );?><br>
326
-					<?php esc_attr_e( 'You can also enter a URL to embed, such as Youtube, Vimeo and Twitter URLs.', 'lasso' );?>
324
+					<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?><br>
325
+					<?php esc_attr_e('You can also use Shortcodes', 'lasso'); ?><br>
326
+					<?php esc_attr_e('You can also enter a URL to embed, such as Youtube, Vimeo and Twitter URLs.', 'lasso'); ?>
327 327
 					</div>
328 328
 		    			<ul class="lasso-toolbar--html-snips">
329 329
 						
330
-		    				<?php if ( !$toolbar_headings ): ?>
331
-		    				<li id="lasso-html--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>">
332
-		    				<li id="lasso-html--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>">
330
+		    				<?php if (!$toolbar_headings): ?>
331
+		    				<li id="lasso-html--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>">
332
+		    				<li id="lasso-html--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>">
333 333
 		    				<?php endif; ?>
334
-		    				<li id="lasso-html--ol" title="<?php esc_attr_e( 'Ordered List', 'lasso' );?>">
335
-							<li id="lasso-html--ul" title="<?php esc_attr_e( 'Unordered List', 'lasso' );?>">
334
+		    				<li id="lasso-html--ol" title="<?php esc_attr_e('Ordered List', 'lasso'); ?>">
335
+							<li id="lasso-html--ul" title="<?php esc_attr_e('Unordered List', 'lasso'); ?>">
336 336
 							
337
-							<li id="lasso-html--table" title="<?php esc_attr_e( 'Table', 'lasso' );?>">
337
+							<li id="lasso-html--table" title="<?php esc_attr_e('Table', 'lasso'); ?>">
338 338
 		    			</ul>
339
-		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e( 'Cancel', 'lasso' );?></a>
340
-		    			<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>
339
+		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e('Cancel', 'lasso'); ?></a>
340
+		    			<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>
341 341
 		    		</div>
342 342
 		    	</div>
343 343
 		    </li>
344
-			<?php if ( $show_align ): ?>
345
-		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e( 'Text Left Align', 'lasso' );?>"></li>
346
-		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e( 'Text Center Align', 'lasso' );?>"></li>
347
-			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e( 'Text Right Align', 'lasso' );?>"></li>
344
+			<?php if ($show_align): ?>
345
+		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e('Text Left Align', 'lasso'); ?>"></li>
346
+		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e('Text Center Align', 'lasso'); ?>"></li>
347
+			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e('Text Right Align', 'lasso'); ?>"></li>
348 348
 			<?php endif; ?>
349 349
 		</ul>
350
-		<?php if ( is_singular() && $is_mobile ) { ?>
350
+		<?php if (is_singular() && $is_mobile) { ?>
351 351
 
352
-				<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;">
352
+				<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;">
353 353
 
354
-					<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>
355
-					<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>
354
+					<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>
355
+					<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>
356 356
 
357
-					<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>
357
+					<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>
358 358
 
359
-					<?php if ( 'draft' == $status && ( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') )  ) { ?>
360
-						<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>
359
+					<?php if ('draft' == $status && (lasso_user_can('publish_posts') || lasso_user_can('publish_pages'))) { ?>
360
+						<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>
361 361
 					<?php } ?>
362 362
 
363 363
 				</div>
@@ -375,20 +375,20 @@  discard block
 block discarded – undo
375 375
  */
376 376
 function lasso_editor_settings_toolbar() {
377 377
 
378
-	$delete_nonce = wp_create_nonce( 'lasso-delete-nonce' );
378
+	$delete_nonce = wp_create_nonce('lasso-delete-nonce');
379 379
 
380 380
 	ob_start();
381 381
 
382 382
 
383 383
 	// let users add custom css classes
384
-	$custom_classes = apply_filters( 'lasso_component_classes', '' );
384
+	$custom_classes = apply_filters('lasso_component_classes', '');
385 385
 
386 386
 	?>
387
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
388
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
389
-		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
390
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
391
-		<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>
387
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
388
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
389
+		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
390
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
391
+		<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>
392 392
 	</ul>
393 393
 
394 394
 	<?php return ob_get_clean();
@@ -406,13 +406,13 @@  discard block
 block discarded – undo
406 406
 
407 407
 
408 408
 	// has post thumbnail
409
-	$has_thumbnail = has_post_thumbnail( get_the_ID() ) ? 'class="lasso--featImg--has-thumb"' : false;
409
+	$has_thumbnail = has_post_thumbnail(get_the_ID()) ? 'class="lasso--featImg--has-thumb"' : false;
410 410
 
411 411
 	?>
412
-	<ul id="lasso--featImgControls" <?php echo $has_thumbnail;?>>
413
-		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e( 'Replace Image', 'lasso' );?>" href="#"><i class="lasso-icon-image"></i></a></li>
414
-		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e( 'Delete Image', 'lasso' );?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
415
-		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e( 'save', 'lasso' );?></a></li>
412
+	<ul id="lasso--featImgControls" <?php echo $has_thumbnail; ?>>
413
+		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e('Replace Image', 'lasso'); ?>" href="#"><i class="lasso-icon-image"></i></a></li>
414
+		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e('Delete Image', 'lasso'); ?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
415
+		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e('save', 'lasso'); ?></a></li>
416 416
 	</ul>
417 417
 
418 418
 	<?php return ob_get_clean();
@@ -436,55 +436,55 @@  discard block
 block discarded – undo
436 436
 
437 437
 	$postid = get_the_ID();
438 438
 
439
-	$status = get_post_status( $postid );
440
-	$nonce = wp_create_nonce( 'lasso-update-post-settings' );
439
+	$status = get_post_status($postid);
440
+	$nonce = wp_create_nonce('lasso-update-post-settings');
441 441
 
442 442
 	// let users add custom css classes
443
-	$custom_classes = apply_filters( 'lasso_modal_settings_classes', '' );
443
+	$custom_classes = apply_filters('lasso_modal_settings_classes', '');
444 444
 
445 445
 	// objects categories
446
-	$categories 		= lasso_get_post_objects( $postid, 'category' );
447
-	$tags 				= lasso_get_post_objects( $postid, 'tag' );
446
+	$categories = lasso_get_post_objects($postid, 'category');
447
+	$tags = lasso_get_post_objects($postid, 'tag');
448 448
 
449 449
 	// modal tabs
450
-	$tabs  				= lasso_modal_addons('tab');
451
-	$content 			= lasso_modal_addons('content');
450
+	$tabs = lasso_modal_addons('tab');
451
+	$content = lasso_modal_addons('content');
452 452
 	
453 453
 	//editor options
454 454
 	$allow_change_date = lasso_editor_get_option('allow_change_date', 'lasso_editor');
455 455
 	$no_url_setting = lasso_editor_get_option('no_url_setting', 'lasso_editor');
456 456
 
457 457
 	// are we singular
458
-	$is_singular 		= is_singular();
458
+	$is_singular = is_singular();
459 459
 	$is_singular_class 	= $is_singular ? 'lasso--postsettings__2col' : 'lasso--postsettings__1col';
460 460
 	$has_thumb_class    = has_post_thumbnail() ? 'has-thumbnail' : 'no-thumbnail';
461 461
 	$theme_supports     = current_theme_supports('post-thumbnails');
462
-	$default_image 		= LASSO_URL.'/admin/assets/img/empty-img.png';
462
+	$default_image = LASSO_URL.'/admin/assets/img/empty-img.png';
463 463
 	
464 464
 	// do we support pending status
465 465
 	$no_pending_status = lasso_editor_get_option('no_pending_status', 'lasso_editor');
466 466
 
467 467
 ?>
468
-	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>">
468
+	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>">
469 469
 		<div class="lasso--modal__inner">
470 470
 
471
-			<?php if( $tabs ) { echo $tabs; } ?>
471
+			<?php if ($tabs) { echo $tabs; } ?>
472 472
 
473 473
 			<div class="lasso--modal__content modal__content--core visible" data-addon-content="core">
474
-				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class;?>" >
474
+				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class; ?>" >
475 475
 
476
-					<?php if ( $is_singular && $theme_supports ) : ?>
476
+					<?php if ($is_singular && $theme_supports) : ?>
477 477
 					<div class="lasso--postsettings__left">
478
-						<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>
479
-						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url( $default_image );?>">
478
+						<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>
479
+						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url($default_image); ?>">
480 480
 
481 481
 							<div id="lasso--post-thumb__controls" class="lasso--post-thumb__controls">
482
-								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image','lasso');?>" class="dashicons dashicons-edit"></i>
483
-								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image','lasso');?>" class="dashicons dashicons-no-alt"></i>
482
+								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image', 'lasso'); ?>" class="dashicons dashicons-edit"></i>
483
+								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image', 'lasso'); ?>" class="dashicons dashicons-no-alt"></i>
484 484
 								<i id="lasso--save-status" class="lasso-icon lasso-icon-spinner6 not-visible"></i>
485 485
 							</div>
486 486
 
487
-							<?php echo has_post_thumbnail() ? get_the_post_thumbnail( $post->ID, 'medium' ) : '<img src="'.$default_image.'">'; ?>
487
+							<?php echo has_post_thumbnail() ? get_the_post_thumbnail($post->ID, 'medium') : '<img src="'.$default_image.'">'; ?>
488 488
 
489 489
 						</div>
490 490
 						<div id="lasso--featImgSave"><a href="#" class="not-visible">Save</a></div>
@@ -494,15 +494,15 @@  discard block
 block discarded – undo
494 494
 
495 495
 					<div class="lasso--postsettings__right">
496 496
 
497
-						<?php if( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') ): ?>
497
+						<?php if (lasso_user_can('publish_posts') || lasso_user_can('publish_pages')): ?>
498 498
 						<div class="lasso--postsettings__option story-status-option">
499
-							<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>
500
-							<ul class="story-status story-status-<?php echo sanitize_html_class( $status );?>">
501
-								<li id="lasso--status-draft"><?php _e( 'Draft', 'lasso' );?></li>
502
-								<?php if( !$no_pending_status ): ?>								
503
-								<li id="lasso--status-pending"><?php _e( 'Pending', 'lasso' );?></li>
499
+							<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>
500
+							<ul class="story-status story-status-<?php echo sanitize_html_class($status); ?>">
501
+								<li id="lasso--status-draft"><?php _e('Draft', 'lasso'); ?></li>
502
+								<?php if (!$no_pending_status): ?>								
503
+								<li id="lasso--status-pending"><?php _e('Pending', 'lasso'); ?></li>
504 504
 								<?php endif; ?>
505
-								<li id="lasso--status-publish"><?php _e( 'Publish', 'lasso' );?></li>
505
+								<li id="lasso--status-publish"><?php _e('Publish', 'lasso'); ?></li>
506 506
 							</ul>
507 507
 							<div class="lasso--slider_wrap">
508 508
 								<div id="lasso--slider"></div>
@@ -510,10 +510,10 @@  discard block
 block discarded – undo
510 510
 						</div>
511 511
 						<?php endif; ?>
512 512
 
513
-						<?php if ( 'publish' == $status  && !$no_url_setting): ?>
513
+						<?php if ('publish' == $status && !$no_url_setting): ?>
514 514
 						<div class="lasso--postsettings__option story-slug-option">
515
-							<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>
516
-							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset( $post ) ? esc_attr( $post->post_name ) : false;?>">
515
+							<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>
516
+							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset($post) ? esc_attr($post->post_name) : false; ?>">
517 517
 						</div>
518 518
 						<?php endif; ?>
519 519
 
@@ -522,21 +522,21 @@  discard block
 block discarded – undo
522 522
 					<div class="lasso--postsettings__middle">
523 523
 
524 524
 						<div class="lasso--postsettings__option story-categories-option">
525
-							<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>
526
-							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories;?>">
525
+							<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>
526
+							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories; ?>">
527 527
 						</div>
528 528
 
529 529
 						<div class="lasso--postsettings__option story-tags-option">
530
-							<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>
531
-							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags;?>">
530
+							<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>
531
+							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags; ?>">
532 532
 						</div>
533 533
 						<?php 
534 534
 						if ($allow_change_date) { 
535
-						    $dateformat = get_option( 'date_format' ); 
535
+						    $dateformat = get_option('date_format'); 
536 536
 						?>
537
-						    <label><?php _e( 'Post Date', 'lasso' ); ?></label>
538
-							<input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid);?>"/>
539
-							<a href="#" id="lasso--postsettings-setnow"><?php _e( 'Set to Now', 'lasso' ); ?></a>
537
+						    <label><?php _e('Post Date', 'lasso'); ?></label>
538
+							<input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid); ?>"/>
539
+							<a href="#" id="lasso--postsettings-setnow"><?php _e('Set to Now', 'lasso'); ?></a>
540 540
 						<?php
541 541
 						}?>
542 542
 
@@ -558,23 +558,23 @@  discard block
 block discarded – undo
558 558
 					?>
559 559
 					<!--/div-->
560 560
 
561
-					<?php do_action( 'lasso_modal_post_form' ); // action ?>
561
+					<?php do_action('lasso_modal_post_form'); // action ?>
562 562
 
563 563
 					<div class="lasso--postsettings__footer" >
564
-						<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
564
+						<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
565 565
 						<input type="hidden" name="status" value="">
566 566
 						<input type="hidden" name="categories" value="">
567
-						<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
567
+						<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
568 568
 						<input type="hidden" name="action" value="process_update-object_post">
569
-						<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
570
-						<?php do_action( 'lasso_modal_post_form_footer' ); // action ?>
571
-						<input type="submit" id="lasso--postsettings-submit" value="<?php esc_attr_e( 'Save', 'lasso' );?>">
569
+						<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
570
+						<?php do_action('lasso_modal_post_form_footer'); // action ?>
571
+						<input type="submit" id="lasso--postsettings-submit" value="<?php esc_attr_e('Save', 'lasso'); ?>">
572 572
 					</div>
573 573
 
574 574
 				</form>
575 575
 			</div>
576 576
 
577
-			<?php if( $tabs ) { echo $content; } ?>
577
+			<?php if ($tabs) { echo $content; } ?>
578 578
 
579 579
 		</div>
580 580
 
@@ -596,41 +596,41 @@  discard block
 block discarded – undo
596 596
 	ob_start();
597 597
 
598 598
 
599
-	$status = get_post_status( get_the_ID() );
599
+	$status = get_post_status(get_the_ID());
600 600
 
601
-	$nonce = wp_create_nonce( 'lasso-editor-new-post' );
601
+	$nonce = wp_create_nonce('lasso-editor-new-post');
602 602
 
603 603
 	// let users add custom css classes
604
-	$custom_classes = apply_filters( 'lasso_modal_post_classes', '' );
604
+	$custom_classes = apply_filters('lasso_modal_post_classes', '');
605 605
 
606 606
 	// return the post type
607
-	$type = get_post_type( get_the_ID() );
607
+	$type = get_post_type(get_the_ID());
608 608
 
609 609
 	$mobile_style = "";
610 610
 	if (wp_is_mobile()) {
611 611
 		//$mobile_style = 'style="top:140px !important;"';
612 612
 	}
613 613
 	?>
614
-	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" <?php echo $mobile_style;?>">
614
+	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" <?php echo $mobile_style; ?>">
615 615
 		<div class="lasso--modal__inner lasso--hasnewform">
616 616
 
617 617
 			<form id="lasso--postnew__form" enctype="multipart/form-data" class="lasso--post-form">
618 618
 
619 619
 				<div class="lasso--postsettings__option story-slug-option lasso--last-option">
620
-					<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>
621
-					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e( 'Type Your Title Here', 'lasso' );?>">
620
+					<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>
621
+					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e('Type Your Title Here', 'lasso'); ?>">
622 622
 						<div class="lasso--select-wrap" style="width:90px">
623 623
 						<select id="lasso--select-type" name="story_type">
624 624
 
625 625
 							<?php
626 626
 								$types = lasso_post_types_names();
627
-								if ( !empty( $types ) ) {
628
-									foreach( $types as $name => $label ) {										
629
-										$type = preg_replace( '/s\b/','', $name );
627
+								if (!empty($types)) {
628
+									foreach ($types as $name => $label) {										
629
+										$type = preg_replace('/s\b/', '', $name);
630 630
 										if ($type == 'page' && !current_user_can('edit_pages')) {
631 631
 											continue;
632 632
 										}
633
-										printf( '<option value="%s">%s</option>', lcfirst( esc_attr( $type ) ) , ucfirst( esc_attr( $label ) ) );
633
+										printf('<option value="%s">%s</option>', lcfirst(esc_attr($type)), ucfirst(esc_attr($label)));
634 634
 									}
635 635
 
636 636
 								}
@@ -641,19 +641,19 @@  discard block
 block discarded – undo
641 641
 				</div>
642 642
 
643 643
 				<div class="lasso--postsettings__footer">
644
-					<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
644
+					<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
645 645
 					<input type="hidden" name="action" value="process_new-object_post">
646 646
 					<?php
647
-						if ( !empty( $types ) ) {
647
+						if (!empty($types)) {
648 648
 							// get the first element
649 649
 							$keys = array_keys($types);
650
-						    $type =$keys[0];						
651
-							$type = preg_replace( '/s\b/','', $type );
652
-							printf( '<input type="hidden" name="object" value="%s">', lcfirst( esc_attr( $type ) ) );		
650
+						    $type = $keys[0];						
651
+							$type = preg_replace('/s\b/', '', $type);
652
+							printf('<input type="hidden" name="object" value="%s">', lcfirst(esc_attr($type)));		
653 653
 						}
654 654
 					?>
655
-					<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
656
-					<input type="submit" value="<?php esc_attr_e( 'Create', 'lasso' );?>">
655
+					<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
656
+					<input type="submit" value="<?php esc_attr_e('Create', 'lasso'); ?>">
657 657
 				</div>
658 658
 
659 659
 			</form>
@@ -681,18 +681,18 @@  discard block
 block discarded – undo
681 681
 	ob_start();
682 682
 
683 683
 	// post status
684
-	$status = get_post_status( get_the_ID() );
684
+	$status = get_post_status(get_the_ID());
685 685
 
686 686
 	// let users add custom css classes
687
-	$custom_classes = apply_filters( 'lasso_modal_all_post_classes', '' );
687
+	$custom_classes = apply_filters('lasso_modal_all_post_classes', '');
688 688
 
689 689
 	?>
690
-	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" style="max-height:100%">
690
+	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" style="max-height:100%">
691 691
 		<div class="lasso--modal__inner">
692 692
 
693 693
 			<div class="lasso--post-filtering not-visible">
694 694
 				<div class="lasso--search__results">
695
-					<span id="lasso--results-found"></span><?php _e('results found','lasso');?>
695
+					<span id="lasso--results-found"></span><?php _e('results found', 'lasso'); ?>
696 696
 				</div>
697 697
 				<div class="lasso--search">
698 698
 					<i id="lasso--search__toggle" class="dashicons dashicons-search"></i>
@@ -706,18 +706,18 @@  discard block
 block discarded – undo
706 706
 				$post_types = lasso_post_types_names();
707 707
 				$rest_bases = lasso_post_types_rest_base();
708 708
 
709
-				if ( ! empty( $post_types ) ) {
709
+				if (!empty($post_types)) {
710 710
 					$first = 'active';
711
-					foreach( $post_types as $name => $label ) {
711
+					foreach ($post_types as $name => $label) {
712 712
 						if (array_key_exists($name, $rest_bases)) {
713
-							printf( '<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr( $first), esc_attr( $rest_bases[$name] ), esc_attr( $label ) );
713
+							printf('<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr($first), esc_attr($rest_bases[$name]), esc_attr($label));
714 714
 						}
715 715
 						$first = '';
716 716
 					}
717 717
 
718 718
 				}
719 719
 
720
-				do_action('lasso_modal_post_objects');?>
720
+				do_action('lasso_modal_post_objects'); ?>
721 721
 
722 722
 			</ul>
723 723
 			<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
@@ -737,14 +737,14 @@  discard block
 block discarded – undo
737 737
 
738 738
 
739 739
 	// let users add custom css classes
740
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
740
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
741 741
 
742 742
 	?>
743
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
744
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
745
-		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
746
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
747
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
743
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
744
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
745
+		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
746
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
747
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
748 748
 	</ul>
749 749
 
750 750
 	<?php return ob_get_clean();
@@ -756,14 +756,14 @@  discard block
 block discarded – undo
756 756
 
757 757
 
758 758
 	// let users add custom css classes
759
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
759
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
760 760
 
761 761
 	?>
762
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
763
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
764
-		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
765
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
766
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
762
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
763
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
764
+		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
765
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
766
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
767 767
 	</ul>
768 768
 
769 769
 	<?php return ob_get_clean();
@@ -776,16 +776,16 @@  discard block
 block discarded – undo
776 776
  */
777 777
 function lasso_map_form_footer() {
778 778
 
779
-	$nonce = wp_create_nonce( 'lasso-process-map' );
779
+	$nonce = wp_create_nonce('lasso-process-map');
780 780
 
781 781
 	ob_start();
782 782
 
783 783
 	?>
784 784
 	<div class="lasso--map-form__footer">
785
-		<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
786
-		<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
785
+		<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
786
+		<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
787 787
 		<input type="hidden" name="action" value="process_map_save">
788
-		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e( 'Save Locations', 'lasso' );?>">
788
+		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e('Save Locations', 'lasso'); ?>">
789 789
 	</div>
790 790
 
791 791
 	<?php return ob_get_clean();
@@ -803,7 +803,7 @@  discard block
 block discarded – undo
803 803
 
804 804
 	?>
805 805
 	<div id="lasso--pagerefresh" class="visible">
806
-		<?php _e( 'Save this post and refesh the page to see these changes.', 'lasso' );?>
806
+		<?php _e('Save this post and refesh the page to see these changes.', 'lasso'); ?>
807 807
 	</div>
808 808
 
809 809
 	<?php return ob_get_clean();
@@ -817,43 +817,43 @@  discard block
 block discarded – undo
817 817
  */
818 818
 function lasso_editor_options_blob() {
819 819
 
820
-	$codes   = function_exists( 'aesop_shortcodes' ) ? aesop_shortcodes() : apply_filters( 'lasso_custom_options', '' );
821
-	$galleries  = function_exists( 'lasso_editor_galleries_exist' ) && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
820
+	$codes = function_exists('aesop_shortcodes') ? aesop_shortcodes() : apply_filters('lasso_custom_options', '');
821
+	$galleries = function_exists('lasso_editor_galleries_exist') && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
822 822
 
823
-	$nonce = wp_create_nonce( 'lasso_gallery' );
823
+	$nonce = wp_create_nonce('lasso_gallery');
824 824
 
825 825
 	$blob = array();
826 826
 
827
-	if ( empty( $codes ) )
827
+	if (empty($codes))
828 828
 		return;
829 829
 
830
-	foreach ( $codes as $slug => $shortcode ) {
830
+	foreach ($codes as $slug => $shortcode) {
831 831
 		$return = '';
832 832
 		// Shortcode has atts
833 833
 
834
-		if ( count( $shortcode['atts'] ) && $shortcode['atts'] ) {
834
+		if (count($shortcode['atts']) && $shortcode['atts']) {
835 835
 
836
-			foreach ( $shortcode['atts'] as $attr_name => $attr_info ) {
836
+			foreach ($shortcode['atts'] as $attr_name => $attr_info) {
837 837
 
838 838
 
839
-				$prefix = isset( $attr_info['prefix'] ) ? sprintf( '<span class="lasso-option-prefix">%s</span>', $attr_info['prefix'] ) : null;
839
+				$prefix = isset($attr_info['prefix']) ? sprintf('<span class="lasso-option-prefix">%s</span>', $attr_info['prefix']) : null;
840 840
 
841 841
 				$return .= '<form id="aesop-generator-settings" class="lasso--component-settings-form" class="'.$galleries.'" method="post">';
842 842
 				$return .= '<p data-option="'.$attr_name.'" class="lasso-option aesop-'.$slug.'-'.$attr_name.'">';
843
-				$return .= '<label for="aesop-generator-attr-' . $attr_name . '">' . $attr_info['desc'] . '</label>';
843
+				$return .= '<label for="aesop-generator-attr-'.$attr_name.'">'.$attr_info['desc'].'</label>';
844 844
 				$return .= '<small class="lasso-option-desc">'.$attr_info['tip'].'</small>';
845 845
 				// Select
846 846
 
847
-				if ( isset( $attr_info['values'] ) ) {
847
+				if (isset($attr_info['values'])) {
848 848
 
849
-					$return .= '<select name="' . $attr_name . '" id="aesop-generator-attr-' . $attr_name . '" class="lasso-generator-attr">';
849
+					$return .= '<select name="'.$attr_name.'" id="aesop-generator-attr-'.$attr_name.'" class="lasso-generator-attr">';
850 850
 
851
-					$i=0;
851
+					$i = 0;
852 852
 
853
-					foreach ( $attr_info['values'] as $attr_value ) {
853
+					foreach ($attr_info['values'] as $attr_value) {
854 854
 						$attr_value_selected = $attr_info['default'] == $attr_value ? ' selected="selected"' : '';
855 855
 
856
-						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" ' . $attr_value_selected . '>'.$attr_info['values'][$i]['name'].'</option>';
856
+						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" '.$attr_value_selected.'>'.$attr_info['values'][$i]['name'].'</option>';
857 857
 
858 858
 						$i++;
859 859
 					}
@@ -862,24 +862,24 @@  discard block
 block discarded – undo
862 862
 
863 863
 				} else {
864 864
 
865
-					$attr_field_type = isset( $attr_info['type'] ) ? $attr_info['type'] : 'text';
865
+					$attr_field_type = isset($attr_info['type']) ? $attr_info['type'] : 'text';
866 866
 
867 867
 					// image upload
868
-					if ( 'media_upload' == $attr_info['type'] ) {
868
+					if ('media_upload' == $attr_info['type']) {
869 869
 
870
-						$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.'" />';
870
+						$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.'" />';
871 871
 						$return .= '<a href="#" id="lasso-upload-img" class="lasso-option-button" /></a>';
872 872
 
873
-					} elseif ( 'color' == $attr_info['type'] ) {
873
+					} elseif ('color' == $attr_info['type']) {
874 874
 
875
-						$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.'" />';
875
+						$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.'" />';
876 876
 
877
-					} elseif ( 'text_area' == $attr_info['type'] ) {
877
+					} elseif ('text_area' == $attr_info['type']) {
878 878
 
879
-						$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.'';
879
+						$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.'';
880 880
 
881 881
 					} else {
882
-						$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.'';
882
+						$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.'';
883 883
 					}
884 884
 				}
885 885
 				$return .= '</p>';
@@ -890,9 +890,9 @@  discard block
 block discarded – undo
890 890
 		///////////////////////////
891 891
 		// START GALLERY AND MAP FRONT END STUFFS
892 892
 		///////////////////////////
893
-		if ( isset( $shortcode['front'] ) && true == $shortcode['front'] ) {
893
+		if (isset($shortcode['front']) && true == $shortcode['front']) {
894 894
 
895
-			if ( 'gallery' == $shortcode['front_type'] ) {
895
+			if ('gallery' == $shortcode['front_type']) {
896 896
 
897 897
 				$return .= lasso_gallery_editor_module();
898 898
 
@@ -903,13 +903,13 @@  discard block
 block discarded – undo
903 903
 		///////////////////////////
904 904
 
905 905
 		// Single shortcode (not closed)
906
-		if ( 'single' == $shortcode['type'] ) {
906
+		if ('single' == $shortcode['type']) {
907 907
 
908 908
 			$return .= '<input type="hidden" name="lasso-generator-content" id="lasso-generator-content" value="false" />';
909 909
 
910 910
 		} else {
911 911
 
912
-			$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>';
912
+			$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>';
913 913
 		}
914 914
 
915 915
 		$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>';
@@ -945,14 +945,14 @@  discard block
 block discarded – undo
945 945
 				<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
946 946
 				<div id="lasso--hide" style="display:none;" class="lasso--post-form">
947 947
 					<i class="lasso-icon lasso-icon-move"></i>
948
-					<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>
948
+					<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>
949 949
 					<div class="lasso--slider_wrap">
950 950
 						<div id="lasso--slider"></div>
951 951
 					</div>
952 952
 					<ul id="lasso--revision-list"></ul>
953 953
 					<div class="lasso--btn-group lasso--btn-group-small">
954
-						<a href="#" class="lasso--btn-secondary" id="lasso--close-modal"><?php _e( 'Cancel', 'lasso' );?></a>
955
-						<a href="#" class="lasso--btn-primary" id="lasso--select-revision"><?php _e( 'Select', 'lasso' );?></a>
954
+						<a href="#" class="lasso--btn-secondary" id="lasso--close-modal"><?php _e('Cancel', 'lasso'); ?></a>
955
+						<a href="#" class="lasso--btn-primary" id="lasso--select-revision"><?php _e('Select', 'lasso'); ?></a>
956 956
 					</div>
957 957
 				</div>
958 958
 
@@ -975,7 +975,7 @@  discard block
 block discarded – undo
975 975
     // Normalize into a six character long hex string
976 976
     $hex = str_replace('#', '', $hex);
977 977
     if (strlen($hex) == 3) {
978
-        $hex = str_repeat(substr($hex,0,1), 2).str_repeat(substr($hex,1,1), 2).str_repeat(substr($hex,2,1), 2);
978
+        $hex = str_repeat(substr($hex, 0, 1), 2).str_repeat(substr($hex, 1, 1), 2).str_repeat(substr($hex, 2, 1), 2);
979 979
     }
980 980
 
981 981
     // Split into three parts: R, G and B
@@ -984,7 +984,7 @@  discard block
 block discarded – undo
984 984
 
985 985
     foreach ($color_parts as $color) {
986 986
         $color   = hexdec($color); // Convert to decimal
987
-        $color   = max(0,min(255,$color + $steps)); // Adjust color
987
+        $color   = max(0, min(255, $color + $steps)); // Adjust color
988 988
         $return .= str_pad(dechex($color), 2, '0', STR_PAD_LEFT); // Make two char hex code
989 989
     }
990 990
 
Please login to merge, or discard this patch.