Completed
Push — master ( c084e4...9556bf )
by
unknown
02:36
created
public/includes/editor-modules.php 1 patch
Spacing   +189 added lines, -189 removed lines patch added patch discarded remove patch
@@ -12,32 +12,32 @@  discard block
 block discarded – undo
12 12
  *
13 13
  * @since 1.0
14 14
  */
15
-add_action( 'wp_footer', 'lasso_editor_controls' );
15
+add_action('wp_footer', 'lasso_editor_controls');
16 16
 function lasso_editor_controls() {
17 17
 
18 18
 	global $post;
19 19
 
20
-	if ( lasso_user_can('edit_posts') ) {
20
+	if (lasso_user_can('edit_posts')) {
21 21
 
22
-		$status = get_post_status( get_the_ID() );
22
+		$status = get_post_status(get_the_ID());
23 23
 
24 24
 		// let users add custom css classes
25
-		$custom_classes = apply_filters( 'lasso_control_classes', '' );
25
+		$custom_classes = apply_filters('lasso_control_classes', '');
26 26
 
27 27
 		$post_access_class   = '';
28
-		$post_new_disabled   = lasso_editor_get_option( 'post_adding_disabled', 'lasso_editor' );
29
-		$post_settings_disabled = lasso_editor_get_option( 'post_settings_disabled', 'lasso_editor' );
30
-		$shortcodify_disabled = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
28
+		$post_new_disabled   = lasso_editor_get_option('post_adding_disabled', 'lasso_editor');
29
+		$post_settings_disabled = lasso_editor_get_option('post_settings_disabled', 'lasso_editor');
30
+		$shortcodify_disabled = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor');
31 31
 
32 32
 
33 33
 		// CSS class if adding new post objects is disabled
34
-		if ( 'on' == $post_new_disabled ) { $post_access_class = 'lasso--post-new-disabled'; }
34
+		if ('on' == $post_new_disabled) { $post_access_class = 'lasso--post-new-disabled'; }
35 35
 
36 36
 		// CSS class if adjust settings is disabled
37
-		if ( 'on' == $post_settings_disabled ) { $post_access_class = 'lasso--post-settings-disabled'; }
37
+		if ('on' == $post_settings_disabled) { $post_access_class = 'lasso--post-settings-disabled'; }
38 38
 
39 39
 		// CSS class if adding new post objects AND settings are disabled
40
-		if ( 'on' == $post_new_disabled && 'on' == $post_settings_disabled ) { $post_access_class = 'lasso--post-all-disabled'; }
40
+		if ('on' == $post_new_disabled && 'on' == $post_settings_disabled) { $post_access_class = 'lasso--post-all-disabled'; }
41 41
 
42 42
 		// CSS class if shortcodify or (Aesop Shortcode Conversion) is disabled
43 43
 		$sc_saving_class = 'on' == $shortcodify_disabled ? 'shortcodify-disabled' : 'shortcodify-enabled';
@@ -45,44 +45,44 @@  discard block
 block discarded – undo
45 45
 		// user is capable
46 46
 		$is_capable = is_singular() && lasso_user_can('edit_post');
47 47
 
48
-		?><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();?>" >
48
+		?><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(); ?>" >
49 49
 
50
-			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class;?> ">
50
+			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class; ?> ">
51 51
 
52
-				<?php do_action( 'lasso_editor_controls_before' );
52
+				<?php do_action('lasso_editor_controls_before');
53 53
 
54
-				if ( $is_capable ) { ?>
54
+				if ($is_capable) { ?>
55 55
 
56
-					<li id="lasso--edit" title="<?php esc_attr_e( 'Edit Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
56
+					<li id="lasso--edit" title="<?php esc_attr_e('Edit Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
57 57
 
58
-					<?php if ( 'off' == $post_settings_disabled || empty( $post_settings_disabled ) ) { ?>
59
-						<li id="lasso--post-settings" title="<?php esc_attr_e( 'Post Settings', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
58
+					<?php if ('off' == $post_settings_disabled || empty($post_settings_disabled)) { ?>
59
+						<li id="lasso--post-settings" title="<?php esc_attr_e('Post Settings', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
60 60
 					<?php }
61 61
 
62 62
 				} ?>
63 63
 
64
-				<li id="lasso--post-all" title="<?php esc_attr_e( 'All Posts', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
64
+				<li id="lasso--post-all" title="<?php esc_attr_e('All Posts', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
65 65
 
66
-				<?php if ( $is_capable && wp_revisions_enabled( $post ) ) { ?>
67
-					<li id="lasso--post-revisions" title="<?php esc_attr_e( 'Revisions', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
66
+				<?php if ($is_capable && wp_revisions_enabled($post)) { ?>
67
+					<li id="lasso--post-revisions" title="<?php esc_attr_e('Revisions', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
68 68
 				<?php } ?>
69 69
 
70
-				<?php if ( ( 'off' == $post_new_disabled || empty( $post_new_disabled ) && lasso_user_can('publish_posts') ) ) { ?>
71
-					<li id="lasso--post-new" title="<?php esc_attr_e( 'Add Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
70
+				<?php if (('off' == $post_new_disabled || empty($post_new_disabled) && lasso_user_can('publish_posts'))) { ?>
71
+					<li id="lasso--post-new" title="<?php esc_attr_e('Add Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
72 72
 				<?php } ?>
73 73
 
74
-				<?php do_action( 'lasso_editor_controls_after' );?>
74
+				<?php do_action('lasso_editor_controls_after'); ?>
75 75
 
76 76
 			</ul>
77 77
 
78
-			<?php if ( is_singular() ) { ?>
78
+			<?php if (is_singular()) { ?>
79 79
 
80 80
 				<div class="lasso--controls__right">
81 81
 
82
-					<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>
82
+					<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>
83 83
 
84
-					<?php if ( 'draft' == $status && ( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') )  ) { ?>
85
-						<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>
84
+					<?php if ('draft' == $status && (lasso_user_can('publish_posts') || lasso_user_can('publish_pages'))) { ?>
85
+						<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>
86 86
 					<?php } ?>
87 87
 
88 88
 				</div>
@@ -105,13 +105,13 @@  discard block
 block discarded – undo
105 105
 
106 106
 	ob_start();
107 107
 
108
-	if ( !lasso_user_can() )
108
+	if (!lasso_user_can())
109 109
 		return;
110 110
 
111 111
 	// let users add custom css classes
112
-	$custom_classes = apply_filters( 'lasso_sidebar_classes', '' );
112
+	$custom_classes = apply_filters('lasso_sidebar_classes', '');
113 113
 	?>
114
-	<div id="lasso--sidebar" class="<?php echo sanitize_html_class( $custom_classes );?>" >
114
+	<div id="lasso--sidebar" class="<?php echo sanitize_html_class($custom_classes); ?>" >
115 115
 		<div class="lasso--sidebar__inner">
116 116
 			<div id="lasso--component__settings"></div>
117 117
 		</div>
@@ -129,77 +129,77 @@  discard block
 block discarded – undo
129 129
 
130 130
 	ob_start();
131 131
 
132
-	if ( !lasso_user_can() )
132
+	if (!lasso_user_can())
133 133
 		return;
134 134
 
135 135
 	// check for lasso story engine and add a class doniting this
136
-	$ase_status = class_exists( 'Aesop_Core' ) || defined( 'LASSO_CUSTOM' ) ? 'ase-active' : 'ase-not-active';
136
+	$ase_status = class_exists('Aesop_Core') || defined('LASSO_CUSTOM') ? 'ase-active' : 'ase-not-active';
137 137
 
138 138
 	// let users add custom css classes
139
-	$custom_classes = apply_filters( 'lasso_toolbar_classes', '' );
139
+	$custom_classes = apply_filters('lasso_toolbar_classes', '');
140 140
 
141 141
 	// are toolbar headings enabled
142
-	$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
142
+	$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
143 143
 
144
-	$toolbar_class  = $toolbar_headings ? 'toolbar-extended' : false;
144
+	$toolbar_class = $toolbar_headings ? 'toolbar-extended' : false;
145 145
 
146 146
 	?>
147
-	<div class="lasso--toolbar_wrap lasso-editor-controls--wrap <?php echo $toolbar_class.' '.$ase_status.' '.sanitize_html_class( $custom_classes );?>">
147
+	<div class="lasso--toolbar_wrap lasso-editor-controls--wrap <?php echo $toolbar_class.' '.$ase_status.' '.sanitize_html_class($custom_classes); ?>">
148 148
 		<ul class="lasso--toolbar__inner lasso-editor-controls">
149
-			<?php do_action( 'lasso_toolbar_components_before' );?>
150
-		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e( 'Bold', 'lasso' );?>"></li>
151
-		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e( 'Underline', 'lasso' );?>"></li>
152
-		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e( 'Italicize', 'lasso' );?>"></li>
153
-		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e( 'Strikethrough', 'lasso' );?>"></li>
154
-		    <?php if ( $toolbar_headings ): ?>
155
-		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>"></li>
156
-		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>"></li>
149
+			<?php do_action('lasso_toolbar_components_before'); ?>
150
+		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e('Bold', 'lasso'); ?>"></li>
151
+		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e('Underline', 'lasso'); ?>"></li>
152
+		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e('Italicize', 'lasso'); ?>"></li>
153
+		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e('Strikethrough', 'lasso'); ?>"></li>
154
+		    <?php if ($toolbar_headings): ?>
155
+		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>"></li>
156
+		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>"></li>
157 157
 			<?php endif; ?>
158
-		    <li id="lasso-toolbar--link" title="<?php esc_attr_e( 'Anchor Link', 'lasso' );?>">
158
+		    <li id="lasso-toolbar--link" title="<?php esc_attr_e('Anchor Link', 'lasso'); ?>">
159 159
 		    	<div id="lasso-toolbar--link__wrap">
160
-		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'http://url.com', 'lasso' );?>"></div>
161
-		    		<a href="#" title="<?php esc_attr_e( 'Create Link', 'lasso' );?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
160
+		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e('http://url.com', 'lasso'); ?>"></div>
161
+		    		<a href="#" title="<?php esc_attr_e('Create Link', 'lasso'); ?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
162 162
 		    	</div>
163 163
 		    </li>
164
-		    <?php do_action( 'lasso_toolbar_components_after' );?>
165
-		    <li id="lasso-toolbar--html" title="<?php esc_attr_e( 'Insert HTML', 'lasso' );?>">
164
+		    <?php do_action('lasso_toolbar_components_after'); ?>
165
+		    <li id="lasso-toolbar--html" title="<?php esc_attr_e('Insert HTML', 'lasso'); ?>">
166 166
 		    	<div id="lasso-toolbar--html__wrap">
167
-		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?>"></div>
167
+		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?>"></div>
168 168
 		    		<div id="lasso-toolbar--html__footer">
169 169
 		    			<ul class="lasso-toolbar--html-snips">
170
-		    				<?php if ( !$toolbar_headings ): ?>
171
-		    				<li id="lasso-html--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>">
172
-		    				<li id="lasso-html--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>">
170
+		    				<?php if (!$toolbar_headings): ?>
171
+		    				<li id="lasso-html--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>">
172
+		    				<li id="lasso-html--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>">
173 173
 		    				<?php endif; ?>
174
-		    				<li id="lasso-html--ul" title="<?php esc_attr_e( 'Unordered List', 'lasso' );?>">
175
-		    				<li id="lasso-html--ol" title="<?php esc_attr_e( 'Ordered List', 'lasso' );?>">
174
+		    				<li id="lasso-html--ul" title="<?php esc_attr_e('Unordered List', 'lasso'); ?>">
175
+		    				<li id="lasso-html--ol" title="<?php esc_attr_e('Ordered List', 'lasso'); ?>">
176 176
 		    			</ul>
177
-		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e( 'Cancel', 'lasso' );?></a>
178
-		    			<a href="#" title="<?php esc_attr_e( 'Insert HTML', 'lasso' );?>" class="lasso-toolbar--html__control" id="lasso-toolbar--html__insert" ><?php _e( 'Insert', 'lasso' );?></a>
177
+		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e('Cancel', 'lasso'); ?></a>
178
+		    			<a href="#" title="<?php esc_attr_e('Insert HTML', 'lasso'); ?>" class="lasso-toolbar--html__control" id="lasso-toolbar--html__insert" ><?php _e('Insert', 'lasso'); ?></a>
179 179
 		    		</div>
180 180
 		    	</div>
181 181
 		    </li>
182
-		    <li id="lasso-toolbar--components" title="<?php esc_attr_e( 'Insert Component', 'lasso' );?>">
182
+		    <li id="lasso-toolbar--components" title="<?php esc_attr_e('Insert Component', 'lasso'); ?>">
183 183
 			    <ul id="lasso-toolbar--components__list">
184
-			    	<?php if ( 'ase-active' == $ase_status ): ?>
185
-						<li data-type="image" title="<?php esc_attr_e( 'Image', 'lasso' );?>" class="lasso-toolbar--component__image"></li>
186
-						<li data-type="character" title="<?php esc_attr_e( 'Character', 'lasso' );?>" class="lasso-toolbar--component__character"></li>
187
-						<li data-type="quote" title="<?php esc_attr_e( 'Quote', 'lasso' );?>"  class="lasso-toolbar--component__quote"></li>
188
-						<li data-type="content" title="<?php esc_attr_e( 'Content', 'lasso' );?>"  class="lasso-toolbar--component__content"></li>
189
-						<li data-type="chapter" title="<?php esc_attr_e( 'Chapter', 'lasso' );?>"  class="lasso-toolbar--component__chapter"></li>
190
-						<li data-type="parallax" title="<?php esc_attr_e( 'Parallax', 'lasso' );?>"  class="lasso-toolbar--component__parallax"></li>
191
-						<li data-type="audio" title="<?php esc_attr_e( 'Audio', 'lasso' );?>"  class="lasso-toolbar--component__audio"></li>
192
-						<li data-type="video" title="<?php esc_attr_e( 'Video', 'lasso' );?>"  class="lasso-toolbar--component__video"></li>
193
-						<li data-type="map" title="<?php esc_attr_e( 'Map', 'lasso' );?>"  class="lasso-toolbar--component__map"></li>
194
-						<li data-type="timeline_stop" title="<?php esc_attr_e( 'Timeline', 'lasso' );?>"  class="lasso-toolbar--component__timeline"></li>
195
-						<li data-type="document" title="<?php esc_attr_e( 'Document', 'lasso' );?>"  class="lasso-toolbar--component__document"></li>
196
-						<li data-type="collection" title="<?php esc_attr_e( 'Collection', 'lasso' );?>"  class="lasso-toolbar--component__collection"></li>
197
-						<li data-type="gallery" title="<?php esc_attr_e( 'Gallery', 'lasso' );?>"  class="lasso-toolbar--component__gallery"></li>
184
+			    	<?php if ('ase-active' == $ase_status): ?>
185
+						<li data-type="image" title="<?php esc_attr_e('Image', 'lasso'); ?>" class="lasso-toolbar--component__image"></li>
186
+						<li data-type="character" title="<?php esc_attr_e('Character', 'lasso'); ?>" class="lasso-toolbar--component__character"></li>
187
+						<li data-type="quote" title="<?php esc_attr_e('Quote', 'lasso'); ?>"  class="lasso-toolbar--component__quote"></li>
188
+						<li data-type="content" title="<?php esc_attr_e('Content', 'lasso'); ?>"  class="lasso-toolbar--component__content"></li>
189
+						<li data-type="chapter" title="<?php esc_attr_e('Chapter', 'lasso'); ?>"  class="lasso-toolbar--component__chapter"></li>
190
+						<li data-type="parallax" title="<?php esc_attr_e('Parallax', 'lasso'); ?>"  class="lasso-toolbar--component__parallax"></li>
191
+						<li data-type="audio" title="<?php esc_attr_e('Audio', 'lasso'); ?>"  class="lasso-toolbar--component__audio"></li>
192
+						<li data-type="video" title="<?php esc_attr_e('Video', 'lasso'); ?>"  class="lasso-toolbar--component__video"></li>
193
+						<li data-type="map" title="<?php esc_attr_e('Map', 'lasso'); ?>"  class="lasso-toolbar--component__map"></li>
194
+						<li data-type="timeline_stop" title="<?php esc_attr_e('Timeline', 'lasso'); ?>"  class="lasso-toolbar--component__timeline"></li>
195
+						<li data-type="document" title="<?php esc_attr_e('Document', 'lasso'); ?>"  class="lasso-toolbar--component__document"></li>
196
+						<li data-type="collection" title="<?php esc_attr_e('Collection', 'lasso'); ?>"  class="lasso-toolbar--component__collection"></li>
197
+						<li data-type="gallery" title="<?php esc_attr_e('Gallery', 'lasso'); ?>"  class="lasso-toolbar--component__gallery"></li>
198 198
 					<?php else: ?>
199
-						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );?>" class="image lasso-toolbar--component__image"></li>
200
-						<li data-type="wpquote" title="<?php esc_attr_e( 'WordPress Quote', 'lasso' );?>" class="quote lasso-toolbar--component__quote"></li>
199
+						<li data-type="wpimg" title="<?php esc_attr_e('WordPress Image', 'lasso'); ?>" class="image lasso-toolbar--component__image"></li>
200
+						<li data-type="wpquote" title="<?php esc_attr_e('WordPress Quote', 'lasso'); ?>" class="quote lasso-toolbar--component__quote"></li>
201 201
 					<?php endif; ?>
202
-					<?php do_action( 'lasso_toolbar_components' );?>
202
+					<?php do_action('lasso_toolbar_components'); ?>
203 203
 			    </ul>
204 204
 			</li>
205 205
 		</ul>
@@ -215,22 +215,22 @@  discard block
 block discarded – undo
215 215
  */
216 216
 function lasso_editor_settings_toolbar() {
217 217
 
218
-	$delete_nonce = wp_create_nonce( 'lasso-delete-nonce' );
218
+	$delete_nonce = wp_create_nonce('lasso-delete-nonce');
219 219
 
220 220
 	ob_start();
221 221
 
222
-	if ( !lasso_user_can() )
222
+	if (!lasso_user_can())
223 223
 		return;
224 224
 
225 225
 	// let users add custom css classes
226
-	$custom_classes = apply_filters( 'lasso_component_classes', '' );
226
+	$custom_classes = apply_filters('lasso_component_classes', '');
227 227
 
228 228
 	?>
229
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
230
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
231
-		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
232
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
233
-		<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>
229
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
230
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
231
+		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
232
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
233
+		<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>
234 234
 	</ul>
235 235
 
236 236
 	<?php return ob_get_clean();
@@ -246,17 +246,17 @@  discard block
 block discarded – undo
246 246
 
247 247
 	ob_start();
248 248
 
249
-	if ( !lasso_user_can() )
249
+	if (!lasso_user_can())
250 250
 		return;
251 251
 
252 252
 	// has post thumbnail
253
-	$has_thumbnail = has_post_thumbnail( get_the_ID() ) ? 'class="lasso--featImg--has-thumb"' : false;
253
+	$has_thumbnail = has_post_thumbnail(get_the_ID()) ? 'class="lasso--featImg--has-thumb"' : false;
254 254
 
255 255
 	?>
256
-	<ul id="lasso--featImgControls" <?php echo $has_thumbnail;?>>
257
-		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e( 'Replace Image', 'lasso' );?>" href="#"><i class="lasso-icon-image"></i></a></li>
258
-		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e( 'Delete Image', 'lasso' );?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
259
-		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e( 'save', 'lasso' );?></a></li>
256
+	<ul id="lasso--featImgControls" <?php echo $has_thumbnail; ?>>
257
+		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e('Replace Image', 'lasso'); ?>" href="#"><i class="lasso-icon-image"></i></a></li>
258
+		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e('Delete Image', 'lasso'); ?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
259
+		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e('save', 'lasso'); ?></a></li>
260 260
 	</ul>
261 261
 
262 262
 	<?php return ob_get_clean();
@@ -275,55 +275,55 @@  discard block
 block discarded – undo
275 275
 
276 276
 	ob_start();
277 277
 
278
-	if ( !lasso_user_can() )
278
+	if (!lasso_user_can())
279 279
 		return;
280 280
 
281 281
 	global $post;
282 282
 
283 283
 	$postid = get_the_ID();
284 284
 
285
-	$status = get_post_status( $postid );
286
-	$nonce = wp_create_nonce( 'lasso-update-post-settings' );
285
+	$status = get_post_status($postid);
286
+	$nonce = wp_create_nonce('lasso-update-post-settings');
287 287
 
288 288
 	// let users add custom css classes
289
-	$custom_classes = apply_filters( 'lasso_modal_settings_classes', '' );
289
+	$custom_classes = apply_filters('lasso_modal_settings_classes', '');
290 290
 
291 291
 	// objects categories
292
-	$categories 		= lasso_get_post_objects( $postid, 'category' );
293
-	$tags 				= lasso_get_post_objects( $postid, 'tag' );
292
+	$categories = lasso_get_post_objects($postid, 'category');
293
+	$tags = lasso_get_post_objects($postid, 'tag');
294 294
 
295 295
 	// modal tabs
296
-	$tabs  				= lasso_modal_addons('tab');
297
-	$content 			= lasso_modal_addons('content');
296
+	$tabs = lasso_modal_addons('tab');
297
+	$content = lasso_modal_addons('content');
298 298
 
299 299
 	// are we singular
300
-	$is_singular 		= is_singular();
300
+	$is_singular = is_singular();
301 301
 	$is_singular_class 	= $is_singular ? 'lasso--postsettings__2col' : 'lasso--postsettings__1col';
302 302
 	$has_thumb_class    = has_post_thumbnail() ? 'has-thumbnail' : 'no-thumbnail';
303 303
 	$theme_supports     = current_theme_supports('post-thumbnails');
304
-	$default_image 		= LASSO_URL.'/admin/assets/img/empty-img.png';
304
+	$default_image = LASSO_URL.'/admin/assets/img/empty-img.png';
305 305
 
306 306
 ?>
307
-	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>">
307
+	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>">
308 308
 		<div class="lasso--modal__inner">
309 309
 
310
-			<?php if( $tabs ) { echo $tabs; } ?>
310
+			<?php if ($tabs) { echo $tabs; } ?>
311 311
 
312 312
 			<div class="lasso--modal__content modal__content--core visible" data-addon-content="core">
313
-				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class;?>" >
313
+				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class; ?>" >
314 314
 
315
-					<?php if ( $is_singular && $theme_supports ) : ?>
315
+					<?php if ($is_singular && $theme_supports) : ?>
316 316
 					<div class="lasso--postsettings__left">
317
-						<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>
318
-						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url( $default_image );?>">
317
+						<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>
318
+						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url($default_image); ?>">
319 319
 
320 320
 							<div id="lasso--post-thumb__controls" class="lasso--post-thumb__controls">
321
-								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image','lasso');?>" class="dashicons dashicons-edit"></i>
322
-								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image','lasso');?>" class="dashicons dashicons-no-alt"></i>
321
+								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image', 'lasso'); ?>" class="dashicons dashicons-edit"></i>
322
+								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image', 'lasso'); ?>" class="dashicons dashicons-no-alt"></i>
323 323
 								<i id="lasso--save-status" class="lasso-icon lasso-icon-spinner6 not-visible"></i>
324 324
 							</div>
325 325
 
326
-							<?php echo has_post_thumbnail() ? get_the_post_thumbnail( $post->ID, 'medium' ) : '<img src="'.$default_image.'">'; ?>
326
+							<?php echo has_post_thumbnail() ? get_the_post_thumbnail($post->ID, 'medium') : '<img src="'.$default_image.'">'; ?>
327 327
 
328 328
 						</div>
329 329
 						<div id="lasso--featImgSave"><a href="#" class="not-visible">Save</a></div>
@@ -333,12 +333,12 @@  discard block
 block discarded – undo
333 333
 
334 334
 					<div class="lasso--postsettings__right">
335 335
 
336
-						<?php if( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') ): ?>
336
+						<?php if (lasso_user_can('publish_posts') || lasso_user_can('publish_pages')): ?>
337 337
 						<div class="lasso--postsettings__option story-status-option">
338
-							<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>
339
-							<ul class="story-status story-status-<?php echo sanitize_html_class( $status );?>">
340
-								<li id="lasso--status-draft"><?php _e( 'Draft', 'lasso' );?></li>
341
-								<li id="lasso--status-publish"><?php _e( 'Publish', 'lasso' );?></li>
338
+							<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>
339
+							<ul class="story-status story-status-<?php echo sanitize_html_class($status); ?>">
340
+								<li id="lasso--status-draft"><?php _e('Draft', 'lasso'); ?></li>
341
+								<li id="lasso--status-publish"><?php _e('Publish', 'lasso'); ?></li>
342 342
 							</ul>
343 343
 							<div class="lasso--slider_wrap">
344 344
 								<div id="lasso--slider"></div>
@@ -346,10 +346,10 @@  discard block
 block discarded – undo
346 346
 						</div>
347 347
 						<?php endif; ?>
348 348
 
349
-						<?php if ( 'publish' == $status ): ?>
349
+						<?php if ('publish' == $status): ?>
350 350
 						<div class="lasso--postsettings__option story-slug-option">
351
-							<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>
352
-							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset( $post ) ? esc_attr( $post->post_name ) : false;?>">
351
+							<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>
352
+							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset($post) ? esc_attr($post->post_name) : false; ?>">
353 353
 						</div>
354 354
 						<?php endif; ?>
355 355
 
@@ -358,34 +358,34 @@  discard block
 block discarded – undo
358 358
 					<div class="lasso--postsettings__middle">
359 359
 
360 360
 						<div class="lasso--postsettings__option story-categories-option">
361
-							<label><?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>
362
-							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories;?>">
361
+							<label><?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>
362
+							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories; ?>">
363 363
 						</div>
364 364
 
365 365
 						<div class="lasso--postsettings__option story-tags-option">
366
-							<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>
367
-							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags;?>">
366
+							<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>
367
+							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags; ?>">
368 368
 						</div>
369 369
 
370 370
 					</div>
371 371
 
372
-					<?php do_action( 'lasso_modal_post_form' ); // action ?>
372
+					<?php do_action('lasso_modal_post_form'); // action ?>
373 373
 
374 374
 					<div class="lasso--postsettings__footer" style="display:none;">
375
-						<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
375
+						<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
376 376
 						<input type="hidden" name="status" value="">
377 377
 						<input type="hidden" name="categories" value="">
378
-						<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
378
+						<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
379 379
 						<input type="hidden" name="action" value="process_update-object_post">
380
-						<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
381
-						<?php do_action( 'lasso_modal_post_form_footer' ); // action ?>
382
-						<input type="submit" value="<?php esc_attr_e( 'Save', 'lasso' );?>">
380
+						<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
381
+						<?php do_action('lasso_modal_post_form_footer'); // action ?>
382
+						<input type="submit" value="<?php esc_attr_e('Save', 'lasso'); ?>">
383 383
 					</div>
384 384
 
385 385
 				</form>
386 386
 			</div>
387 387
 
388
-			<?php if( $tabs ) { echo $content; } ?>
388
+			<?php if ($tabs) { echo $content; } ?>
389 389
 
390 390
 		</div>
391 391
 
@@ -406,41 +406,41 @@  discard block
 block discarded – undo
406 406
 
407 407
 	ob_start();
408 408
 
409
-	if ( !lasso_user_can('edit_posts') )
409
+	if (!lasso_user_can('edit_posts'))
410 410
 		return;
411 411
 
412
-	$status = get_post_status( get_the_ID() );
412
+	$status = get_post_status(get_the_ID());
413 413
 
414
-	$nonce = wp_create_nonce( 'lasso-editor-new-post' );
414
+	$nonce = wp_create_nonce('lasso-editor-new-post');
415 415
 
416 416
 	// let users add custom css classes
417
-	$custom_classes = apply_filters( 'lasso_modal_post_classes', '' );
417
+	$custom_classes = apply_filters('lasso_modal_post_classes', '');
418 418
 
419 419
 	// return the post type
420
-	$type = get_post_type( get_the_ID() );
420
+	$type = get_post_type(get_the_ID());
421 421
 
422 422
 	?>
423
-	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>">
423
+	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>">
424 424
 		<div class="lasso--modal__inner">
425 425
 
426 426
 			<form id="lasso--postnew__form" enctype="multipart/form-data" class="lasso--post-form">
427 427
 
428 428
 				<div class="lasso--postsettings__option story-slug-option lasso--last-option">
429
-					<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>
430
-					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e( 'Grump Wizards Make Toxic Brew', 'lasso' );?>">
429
+					<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>
430
+					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e('Grump Wizards Make Toxic Brew', 'lasso'); ?>">
431 431
 						<div class="lasso--select-wrap">
432 432
 						<select id="lasso--select-type" name="story_type">
433 433
 
434 434
 							<?php
435 435
 								$types = lasso_post_types();
436 436
 
437
-								if ( !empty( $types ) ) {
437
+								if (!empty($types)) {
438 438
 
439
-									foreach( $types as $type ) {
439
+									foreach ($types as $type) {
440 440
 
441
-										$type = preg_replace( '/s\b/','', $type );
441
+										$type = preg_replace('/s\b/', '', $type);
442 442
 
443
-										printf( '<option value="%s">%s</option>', lcfirst( esc_attr( $type ) ) , ucfirst( esc_attr( $type ) ) );
443
+										printf('<option value="%s">%s</option>', lcfirst(esc_attr($type)), ucfirst(esc_attr($type)));
444 444
 									}
445 445
 
446 446
 								}
@@ -451,11 +451,11 @@  discard block
 block discarded – undo
451 451
 				</div>
452 452
 
453 453
 				<div class="lasso--postsettings__footer" style="display:none;">
454
-					<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
454
+					<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
455 455
 					<input type="hidden" name="action" value="process_new-object_post">
456 456
 					<input type="hidden" name="object" value="post">
457
-					<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
458
-					<input type="submit" value="<?php esc_attr_e( 'Create', 'lasso' );?>">
457
+					<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
458
+					<input type="submit" value="<?php esc_attr_e('Create', 'lasso'); ?>">
459 459
 				</div>
460 460
 
461 461
 			</form>
@@ -479,18 +479,18 @@  discard block
 block discarded – undo
479 479
 	ob_start();
480 480
 
481 481
 	// post status
482
-	$status = get_post_status( get_the_ID() );
482
+	$status = get_post_status(get_the_ID());
483 483
 
484 484
 	// let users add custom css classes
485
-	$custom_classes = apply_filters( 'lasso_modal_all_post_classes', '' );
485
+	$custom_classes = apply_filters('lasso_modal_all_post_classes', '');
486 486
 
487 487
 	?>
488
-	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>">
488
+	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>">
489 489
 		<div class="lasso--modal__inner">
490 490
 
491 491
 			<div class="lasso--post-filtering not-visible">
492 492
 				<div class="lasso--search__results">
493
-					<span id="lasso--results-found"></span><?php _e('results found','lasso');?>
493
+					<span id="lasso--results-found"></span><?php _e('results found', 'lasso'); ?>
494 494
 				</div>
495 495
 				<div class="lasso--search">
496 496
 					<i id="lasso--search__toggle" class="dashicons dashicons-search"></i>
@@ -503,16 +503,16 @@  discard block
 block discarded – undo
503 503
 
504 504
 				$post_types = lasso_post_types();
505 505
 
506
-				if ( ! empty( $post_types ) ) {
506
+				if (!empty($post_types)) {
507 507
 					$first = 'active';
508
-					foreach( $post_types as $name => $label ) {
509
-						printf( '<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr( $first), esc_attr( $name ), esc_attr( $label ) );
508
+					foreach ($post_types as $name => $label) {
509
+						printf('<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr($first), esc_attr($name), esc_attr($label));
510 510
 						$first = '';
511 511
 					}
512 512
 
513 513
 				}
514 514
 
515
-				do_action('lasso_modal_post_objects');?>
515
+				do_action('lasso_modal_post_objects'); ?>
516 516
 
517 517
 			</ul>
518 518
 			<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
@@ -530,18 +530,18 @@  discard block
 block discarded – undo
530 530
 
531 531
 	ob_start();
532 532
 
533
-	if ( !lasso_user_can() )
533
+	if (!lasso_user_can())
534 534
 		return;
535 535
 
536 536
 	// let users add custom css classes
537
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
537
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
538 538
 
539 539
 	?>
540
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
541
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
542
-		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
543
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
544
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
540
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
541
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
542
+		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
543
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
544
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
545 545
 	</ul>
546 546
 
547 547
 	<?php return ob_get_clean();
@@ -554,16 +554,16 @@  discard block
 block discarded – undo
554 554
  */
555 555
 function lasso_map_form_footer() {
556 556
 
557
-	$nonce = wp_create_nonce( 'lasso-process-map' );
557
+	$nonce = wp_create_nonce('lasso-process-map');
558 558
 
559 559
 	ob_start();
560 560
 
561 561
 	?>
562 562
 	<div class="lasso--map-form__footer">
563
-		<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
564
-		<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
563
+		<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
564
+		<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
565 565
 		<input type="hidden" name="action" value="process_map_save">
566
-		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e( 'Save Locations', 'lasso' );?>">
566
+		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e('Save Locations', 'lasso'); ?>">
567 567
 	</div>
568 568
 
569 569
 	<?php return ob_get_clean();
@@ -581,7 +581,7 @@  discard block
 block discarded – undo
581 581
 
582 582
 	?>
583 583
 	<div id="lasso--pagerefresh" class="visible">
584
-		<?php _e( 'Save this post and refesh the page to see these changes.', 'lasso' );?>
584
+		<?php _e('Save this post and refesh the page to see these changes.', 'lasso'); ?>
585 585
 	</div>
586 586
 
587 587
 	<?php return ob_get_clean();
@@ -595,43 +595,43 @@  discard block
 block discarded – undo
595 595
  */
596 596
 function lasso_editor_options_blob() {
597 597
 
598
-	$codes   = function_exists( 'aesop_shortcodes' ) ? aesop_shortcodes() : apply_filters( 'lasso_custom_options', '' );
599
-	$galleries  = function_exists( 'lasso_editor_galleries_exist' ) && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
598
+	$codes = function_exists('aesop_shortcodes') ? aesop_shortcodes() : apply_filters('lasso_custom_options', '');
599
+	$galleries = function_exists('lasso_editor_galleries_exist') && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
600 600
 
601
-	$nonce = wp_create_nonce( 'lasso_gallery' );
601
+	$nonce = wp_create_nonce('lasso_gallery');
602 602
 
603 603
 	$blob = array();
604 604
 
605
-	if ( empty( $codes ) )
605
+	if (empty($codes))
606 606
 		return;
607 607
 
608
-	foreach ( $codes as $slug => $shortcode ) {
608
+	foreach ($codes as $slug => $shortcode) {
609 609
 		$return = '';
610 610
 		// Shortcode has atts
611 611
 
612
-		if ( count( $shortcode['atts'] ) && $shortcode['atts'] ) {
612
+		if (count($shortcode['atts']) && $shortcode['atts']) {
613 613
 
614
-			foreach ( $shortcode['atts'] as $attr_name => $attr_info ) {
614
+			foreach ($shortcode['atts'] as $attr_name => $attr_info) {
615 615
 
616 616
 
617
-				$prefix = isset( $attr_info['prefix'] ) ? sprintf( '<span class="lasso-option-prefix">%s</span>', $attr_info['prefix'] ) : null;
617
+				$prefix = isset($attr_info['prefix']) ? sprintf('<span class="lasso-option-prefix">%s</span>', $attr_info['prefix']) : null;
618 618
 
619 619
 				$return .= '<form id="lasso--component-settings-form" class="'.$galleries.'" method="post">';
620 620
 				$return .= '<p data-option="'.$attr_name.'" class="lasso-option lasso-'.$slug.'-'.$attr_name.'">';
621
-				$return .= '<label for="lasso-generator-attr-' . $attr_name . '">' . $attr_info['desc'] . '</label>';
621
+				$return .= '<label for="lasso-generator-attr-'.$attr_name.'">'.$attr_info['desc'].'</label>';
622 622
 				$return .= '<small class="lasso-option-desc">'.$attr_info['tip'].'</small>';
623 623
 				// Select
624 624
 
625
-				if ( isset( $attr_info['values'] ) ) {
625
+				if (isset($attr_info['values'])) {
626 626
 
627
-					$return .= '<select name="' . $attr_name . '" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr">';
627
+					$return .= '<select name="'.$attr_name.'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr">';
628 628
 
629
-					$i=0;
629
+					$i = 0;
630 630
 
631
-					foreach ( $attr_info['values'] as $attr_value ) {
631
+					foreach ($attr_info['values'] as $attr_value) {
632 632
 						$attr_value_selected = $attr_info['default'] == $attr_value ? ' selected="selected"' : '';
633 633
 
634
-						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" ' . $attr_value_selected . '>'.$attr_info['values'][$i]['name'].'</option>';
634
+						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" '.$attr_value_selected.'>'.$attr_info['values'][$i]['name'].'</option>';
635 635
 
636 636
 						$i++;
637 637
 					}
@@ -640,24 +640,24 @@  discard block
 block discarded – undo
640 640
 
641 641
 				} else {
642 642
 
643
-					$attr_field_type = isset( $attr_info['type'] ) ? $attr_info['type'] : 'text';
643
+					$attr_field_type = isset($attr_info['type']) ? $attr_info['type'] : 'text';
644 644
 
645 645
 					// image upload
646
-					if ( 'media_upload' == $attr_info['type'] ) {
646
+					if ('media_upload' == $attr_info['type']) {
647 647
 
648
-						$return .= '<input type="' . $attr_field_type . '" name="' . $attr_name . '" value="'.$attr_info['default'].'" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />';
648
+						$return .= '<input type="'.$attr_field_type.'" name="'.$attr_name.'" value="'.$attr_info['default'].'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />';
649 649
 						$return .= '<a href="#" id="lasso-upload-img" class="lasso-option-button" /></a>';
650 650
 
651
-					} elseif ( 'color' == $attr_info['type'] ) {
651
+					} elseif ('color' == $attr_info['type']) {
652 652
 
653
-						$return .= '<input type="color" name="' . $attr_name . '" value="'.$attr_info['default'].'" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />';
653
+						$return .= '<input type="color" name="'.$attr_name.'" value="'.$attr_info['default'].'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />';
654 654
 
655
-					} elseif ( 'text_area' == $attr_info['type'] ) {
655
+					} elseif ('text_area' == $attr_info['type']) {
656 656
 
657
-						$return .= '<textarea name="' . $attr_name . '" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" placeholder="'.$attr_info['default'].'" /></textarea>'.$prefix.'';
657
+						$return .= '<textarea name="'.$attr_name.'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" placeholder="'.$attr_info['default'].'" /></textarea>'.$prefix.'';
658 658
 
659 659
 					} else {
660
-						$return .= '<input type="' . $attr_field_type . '" name="' . $attr_name . '" value="'.$attr_info['default'].'" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />'.$prefix.'';
660
+						$return .= '<input type="'.$attr_field_type.'" name="'.$attr_name.'" value="'.$attr_info['default'].'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />'.$prefix.'';
661 661
 					}
662 662
 				}
663 663
 				$return .= '</p>';
@@ -668,9 +668,9 @@  discard block
 block discarded – undo
668 668
 		///////////////////////////
669 669
 		// START GALLERY AND MAP FRONT END STUFFS
670 670
 		///////////////////////////
671
-		if ( isset( $shortcode['front'] ) && true == $shortcode['front'] ) {
671
+		if (isset($shortcode['front']) && true == $shortcode['front']) {
672 672
 
673
-			if ( 'gallery' == $shortcode['front_type'] ) {
673
+			if ('gallery' == $shortcode['front_type']) {
674 674
 
675 675
 				$return .= lasso_gallery_editor_module();
676 676
 
@@ -681,13 +681,13 @@  discard block
 block discarded – undo
681 681
 		///////////////////////////
682 682
 
683 683
 		// Single shortcode (not closed)
684
-		if ( 'single' == $shortcode['type'] ) {
684
+		if ('single' == $shortcode['type']) {
685 685
 
686 686
 			$return .= '<input type="hidden" name="lasso-generator-content" id="lasso-generator-content" value="false" />';
687 687
 
688 688
 		} else {
689 689
 
690
-			$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>';
690
+			$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>';
691 691
 		}
692 692
 
693 693
 		$return .= '<p class="lasso-buttoninsert-wrap"><a href="#" class="lasso-generator-cancel" id="lasso--sidebar__close">Cancel
@@ -720,7 +720,7 @@  discard block
 block discarded – undo
720 720
 				<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
721 721
 				<div id="lasso--hide" style="display:none;" class="lasso--post-form">
722 722
 					<i class="lasso-icon lasso-icon-move"></i>
723
-					<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>
723
+					<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>
724 724
 					<div class="lasso--slider_wrap">
725 725
 						<div id="lasso--slider"></div>
726 726
 					</div>
Please login to merge, or discard this patch.