Completed
Push — master ( 9bf33c...60f764 )
by
unknown
02:47
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';
@@ -47,44 +47,44 @@  discard block
 block discarded – undo
47 47
 		
48 48
 		$mobile_style = wp_is_mobile() ? 'style="top:40px;"' : null;
49 49
 
50
-		?><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();?>" >
50
+		?><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(); ?>" >
51 51
 
52
-			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class;?> "  <?php echo $mobile_style ?> >
52
+			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class; ?> "  <?php echo $mobile_style ?> >
53 53
 
54
-				<?php do_action( 'lasso_editor_controls_before' );
54
+				<?php do_action('lasso_editor_controls_before');
55 55
 
56
-				if ( $is_capable ) { ?>
56
+				if ($is_capable) { ?>
57 57
 
58
-					<li id="lasso--edit" title="<?php esc_attr_e( 'Edit Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
58
+					<li id="lasso--edit" title="<?php esc_attr_e('Edit Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
59 59
 
60
-					<?php if ( 'off' == $post_settings_disabled || empty( $post_settings_disabled ) ) { ?>
61
-						<li id="lasso--post-settings" title="<?php esc_attr_e( 'Post Settings', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
60
+					<?php if ('off' == $post_settings_disabled || empty($post_settings_disabled)) { ?>
61
+						<li id="lasso--post-settings" title="<?php esc_attr_e('Post Settings', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
62 62
 					<?php }
63 63
 
64 64
 				} ?>
65 65
 
66
-				<li id="lasso--post-all" title="<?php esc_attr_e( 'All Posts', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
66
+				<li id="lasso--post-all" title="<?php esc_attr_e('All Posts', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
67 67
 
68
-				<?php if ( $is_capable && wp_revisions_enabled( $post ) ) { ?>
69
-					<li id="lasso--post-revisions" title="<?php esc_attr_e( 'Revisions', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
68
+				<?php if ($is_capable && wp_revisions_enabled($post)) { ?>
69
+					<li id="lasso--post-revisions" title="<?php esc_attr_e('Revisions', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
70 70
 				<?php } ?>
71 71
 
72
-				<?php if ( ( 'off' == $post_new_disabled || empty( $post_new_disabled ) && lasso_user_can('publish_posts') ) ) { ?>
73
-					<li id="lasso--post-new" title="<?php esc_attr_e( 'Add Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
72
+				<?php if (('off' == $post_new_disabled || empty($post_new_disabled) && lasso_user_can('publish_posts'))) { ?>
73
+					<li id="lasso--post-new" title="<?php esc_attr_e('Add Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
74 74
 				<?php } ?>
75 75
 
76
-				<?php do_action( 'lasso_editor_controls_after' );?>
76
+				<?php do_action('lasso_editor_controls_after'); ?>
77 77
 
78 78
 			</ul>
79 79
 
80
-			<?php if ( is_singular() ) { ?>
80
+			<?php if (is_singular()) { ?>
81 81
 
82 82
 				<div class="lasso--controls__right">
83 83
 
84
-					<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>
84
+					<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>
85 85
 
86
-					<?php if ( 'draft' == $status && ( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') )  ) { ?>
87
-						<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
+					<?php if ('draft' == $status && (lasso_user_can('publish_posts') || lasso_user_can('publish_pages'))) { ?>
87
+						<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>
88 88
 					<?php } ?>
89 89
 
90 90
 				</div>
@@ -107,13 +107,13 @@  discard block
 block discarded – undo
107 107
 
108 108
 	ob_start();
109 109
 
110
-	if ( !lasso_user_can() )
110
+	if (!lasso_user_can())
111 111
 		return;
112 112
 
113 113
 	// let users add custom css classes
114
-	$custom_classes = apply_filters( 'lasso_sidebar_classes', '' );
114
+	$custom_classes = apply_filters('lasso_sidebar_classes', '');
115 115
 	?>
116
-	<div id="lasso--sidebar" class="<?php echo sanitize_html_class( $custom_classes );?>" >
116
+	<div id="lasso--sidebar" class="<?php echo sanitize_html_class($custom_classes); ?>" >
117 117
 		<div class="lasso--sidebar__inner">
118 118
 			<div id="lasso--component__settings"></div>
119 119
 		</div>
@@ -131,82 +131,82 @@  discard block
 block discarded – undo
131 131
 
132 132
 	ob_start();
133 133
 
134
-	if ( !lasso_user_can() )
134
+	if (!lasso_user_can())
135 135
 		return;
136 136
 
137 137
 	// check for lasso story engine and add a class doniting this
138
-	$ase_status = class_exists( 'Aesop_Core' ) || defined( 'LASSO_CUSTOM' ) ? 'ase-active' : 'ase-not-active';
138
+	$ase_status = class_exists('Aesop_Core') || defined('LASSO_CUSTOM') ? 'ase-active' : 'ase-not-active';
139 139
 
140 140
 	// let users add custom css classes
141
-	$custom_classes = apply_filters( 'lasso_toolbar_classes', '' );
141
+	$custom_classes = apply_filters('lasso_toolbar_classes', '');
142 142
 
143 143
 	// are toolbar headings enabled
144
-	$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
144
+	$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
145 145
 
146
-	$toolbar_class  = $toolbar_headings ? 'toolbar-extended' : false;
146
+	$toolbar_class = $toolbar_headings ? 'toolbar-extended' : false;
147 147
 	
148 148
 	$mobile_style = wp_is_mobile() ? 'style="top:40px;"' : null;
149 149
 
150 150
 
151 151
 	?>
152
-	<div class="lasso--toolbar_wrap lasso-editor-controls--wrap <?php echo $toolbar_class.' '.$ase_status.' '.sanitize_html_class( $custom_classes );?>" <?php echo $mobile_style ?>>
152
+	<div class="lasso--toolbar_wrap lasso-editor-controls--wrap <?php echo $toolbar_class.' '.$ase_status.' '.sanitize_html_class($custom_classes); ?>" <?php echo $mobile_style ?>>
153 153
 		<ul class="lasso--toolbar__inner lasso-editor-controls">
154
-			<?php do_action( 'lasso_toolbar_components_before' );?>
155
-		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e( 'Bold', 'lasso' );?>"></li>
156
-		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e( 'Underline', 'lasso' );?>"></li>
157
-		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e( 'Italicize', 'lasso' );?>"></li>
158
-		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e( 'Strikethrough', 'lasso' );?>"></li>
159
-		    <?php if ( $toolbar_headings ): ?>
160
-		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>"></li>
161
-		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>"></li>
154
+			<?php do_action('lasso_toolbar_components_before'); ?>
155
+		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e('Bold', 'lasso'); ?>"></li>
156
+		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e('Underline', 'lasso'); ?>"></li>
157
+		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e('Italicize', 'lasso'); ?>"></li>
158
+		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e('Strikethrough', 'lasso'); ?>"></li>
159
+		    <?php if ($toolbar_headings): ?>
160
+		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>"></li>
161
+		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>"></li>
162 162
 			<?php endif; ?>
163
-		    <li id="lasso-toolbar--link" title="<?php esc_attr_e( 'Anchor Link', 'lasso' );?>">
163
+		    <li id="lasso-toolbar--link" title="<?php esc_attr_e('Anchor Link', 'lasso'); ?>">
164 164
 		    	<div id="lasso-toolbar--link__wrap" <?php echo $mobile_style ?> >
165
-		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'http://url.com', 'lasso' );?>"></div>
166
-		    		<a href="#" title="<?php esc_attr_e( 'Create Link', 'lasso' );?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
165
+		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e('http://url.com', 'lasso'); ?>"></div>
166
+		    		<a href="#" title="<?php esc_attr_e('Create Link', 'lasso'); ?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
167 167
 					<input type="checkbox" />
168 168
                     <label>Styled Check Box</label>
169 169
 		    	</div>
170 170
 		    </li>
171
-		    <?php do_action( 'lasso_toolbar_components_after' );?>
172
-		    <li id="lasso-toolbar--html" title="<?php esc_attr_e( 'Insert HTML', 'lasso' );?>">
171
+		    <?php do_action('lasso_toolbar_components_after'); ?>
172
+		    <li id="lasso-toolbar--html" title="<?php esc_attr_e('Insert HTML', 'lasso'); ?>">
173 173
 		    	<div id="lasso-toolbar--html__wrap" <?php echo $mobile_style ?>>
174
-		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?>"></div>
174
+		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?>"></div>
175 175
 		    		<div id="lasso-toolbar--html__footer">
176 176
 		    			<ul class="lasso-toolbar--html-snips">
177
-		    				<?php if ( !$toolbar_headings ): ?>
178
-		    				<li id="lasso-html--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>">
179
-		    				<li id="lasso-html--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>">
177
+		    				<?php if (!$toolbar_headings): ?>
178
+		    				<li id="lasso-html--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>">
179
+		    				<li id="lasso-html--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>">
180 180
 		    				<?php endif; ?>
181
-		    				<li id="lasso-html--ul" title="<?php esc_attr_e( 'Unordered List', 'lasso' );?>">
182
-		    				<li id="lasso-html--ol" title="<?php esc_attr_e( 'Ordered List', 'lasso' );?>">
181
+		    				<li id="lasso-html--ul" title="<?php esc_attr_e('Unordered List', 'lasso'); ?>">
182
+		    				<li id="lasso-html--ol" title="<?php esc_attr_e('Ordered List', 'lasso'); ?>">
183 183
 		    			</ul>
184
-		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e( 'Cancel', 'lasso' );?></a>
185
-		    			<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>
184
+		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e('Cancel', 'lasso'); ?></a>
185
+		    			<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>
186 186
 		    		</div>
187 187
 		    	</div>
188 188
 		    </li>
189
-		    <li id="lasso-toolbar--components" title="<?php esc_attr_e( 'Insert Component', 'lasso' );?>">
189
+		    <li id="lasso-toolbar--components" title="<?php esc_attr_e('Insert Component', 'lasso'); ?>">
190 190
 			    <ul id="lasso-toolbar--components__list" top=50px >
191
-			    	<?php if ( 'ase-active' == $ase_status ): ?>
192
-						<li data-type="image" title="<?php esc_attr_e( 'Image', 'lasso' );?>" class="lasso-toolbar--component__image"></li>
193
-						<li data-type="character" title="<?php esc_attr_e( 'Character', 'lasso' );?>" class="lasso-toolbar--component__character"></li>
194
-						<li data-type="quote" title="<?php esc_attr_e( 'Quote', 'lasso' );?>"  class="lasso-toolbar--component__quote"></li>
195
-						<li data-type="content" title="<?php esc_attr_e( 'Content', 'lasso' );?>"  class="lasso-toolbar--component__content"></li>
196
-						<li data-type="chapter" title="<?php esc_attr_e( 'Chapter', 'lasso' );?>"  class="lasso-toolbar--component__chapter"></li>
197
-						<li data-type="parallax" title="<?php esc_attr_e( 'Parallax', 'lasso' );?>"  class="lasso-toolbar--component__parallax"></li>
198
-						<li data-type="audio" title="<?php esc_attr_e( 'Audio', 'lasso' );?>"  class="lasso-toolbar--component__audio"></li>
199
-						<li data-type="video" title="<?php esc_attr_e( 'Video', 'lasso' );?>"  class="lasso-toolbar--component__video"></li>
200
-						<li data-type="map" title="<?php esc_attr_e( 'Map', 'lasso' );?>"  class="lasso-toolbar--component__map"></li>
201
-						<li data-type="timeline_stop" title="<?php esc_attr_e( 'Timeline', 'lasso' );?>"  class="lasso-toolbar--component__timeline"></li>
202
-						<li data-type="document" title="<?php esc_attr_e( 'Document', 'lasso' );?>"  class="lasso-toolbar--component__document"></li>
203
-						<li data-type="collection" title="<?php esc_attr_e( 'Collection', 'lasso' );?>"  class="lasso-toolbar--component__collection"></li>
204
-						<li data-type="gallery" title="<?php esc_attr_e( 'Gallery', 'lasso' );?>"  class="lasso-toolbar--component__gallery"></li>
191
+			    	<?php if ('ase-active' == $ase_status): ?>
192
+						<li data-type="image" title="<?php esc_attr_e('Image', 'lasso'); ?>" class="lasso-toolbar--component__image"></li>
193
+						<li data-type="character" title="<?php esc_attr_e('Character', 'lasso'); ?>" class="lasso-toolbar--component__character"></li>
194
+						<li data-type="quote" title="<?php esc_attr_e('Quote', 'lasso'); ?>"  class="lasso-toolbar--component__quote"></li>
195
+						<li data-type="content" title="<?php esc_attr_e('Content', 'lasso'); ?>"  class="lasso-toolbar--component__content"></li>
196
+						<li data-type="chapter" title="<?php esc_attr_e('Chapter', 'lasso'); ?>"  class="lasso-toolbar--component__chapter"></li>
197
+						<li data-type="parallax" title="<?php esc_attr_e('Parallax', 'lasso'); ?>"  class="lasso-toolbar--component__parallax"></li>
198
+						<li data-type="audio" title="<?php esc_attr_e('Audio', 'lasso'); ?>"  class="lasso-toolbar--component__audio"></li>
199
+						<li data-type="video" title="<?php esc_attr_e('Video', 'lasso'); ?>"  class="lasso-toolbar--component__video"></li>
200
+						<li data-type="map" title="<?php esc_attr_e('Map', 'lasso'); ?>"  class="lasso-toolbar--component__map"></li>
201
+						<li data-type="timeline_stop" title="<?php esc_attr_e('Timeline', 'lasso'); ?>"  class="lasso-toolbar--component__timeline"></li>
202
+						<li data-type="document" title="<?php esc_attr_e('Document', 'lasso'); ?>"  class="lasso-toolbar--component__document"></li>
203
+						<li data-type="collection" title="<?php esc_attr_e('Collection', 'lasso'); ?>"  class="lasso-toolbar--component__collection"></li>
204
+						<li data-type="gallery" title="<?php esc_attr_e('Gallery', 'lasso'); ?>"  class="lasso-toolbar--component__gallery"></li>
205 205
 					<?php else: ?>
206
-						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );?>" class="image lasso-toolbar--component__image"></li>
207
-						<li data-type="wpquote" title="<?php esc_attr_e( 'WordPress Quote', 'lasso' );?>" class="quote lasso-toolbar--component__quote"></li>
206
+						<li data-type="wpimg" title="<?php esc_attr_e('WordPress Image', 'lasso'); ?>" class="image lasso-toolbar--component__image"></li>
207
+						<li data-type="wpquote" title="<?php esc_attr_e('WordPress Quote', 'lasso'); ?>" class="quote lasso-toolbar--component__quote"></li>
208 208
 					<?php endif; ?>
209
-					<?php do_action( 'lasso_toolbar_components' );?>
209
+					<?php do_action('lasso_toolbar_components'); ?>
210 210
 			    </ul>
211 211
 			</li>
212 212
 		</ul>
@@ -222,22 +222,22 @@  discard block
 block discarded – undo
222 222
  */
223 223
 function lasso_editor_settings_toolbar() {
224 224
 
225
-	$delete_nonce = wp_create_nonce( 'lasso-delete-nonce' );
225
+	$delete_nonce = wp_create_nonce('lasso-delete-nonce');
226 226
 
227 227
 	ob_start();
228 228
 
229
-	if ( !lasso_user_can() )
229
+	if (!lasso_user_can())
230 230
 		return;
231 231
 
232 232
 	// let users add custom css classes
233
-	$custom_classes = apply_filters( 'lasso_component_classes', '' );
233
+	$custom_classes = apply_filters('lasso_component_classes', '');
234 234
 
235 235
 	?>
236
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
237
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
238
-		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
239
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
240
-		<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>
236
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
237
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
238
+		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
239
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
240
+		<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>
241 241
 	</ul>
242 242
 
243 243
 	<?php return ob_get_clean();
@@ -253,17 +253,17 @@  discard block
 block discarded – undo
253 253
 
254 254
 	ob_start();
255 255
 
256
-	if ( !lasso_user_can() )
256
+	if (!lasso_user_can())
257 257
 		return;
258 258
 
259 259
 	// has post thumbnail
260
-	$has_thumbnail = has_post_thumbnail( get_the_ID() ) ? 'class="lasso--featImg--has-thumb"' : false;
260
+	$has_thumbnail = has_post_thumbnail(get_the_ID()) ? 'class="lasso--featImg--has-thumb"' : false;
261 261
 
262 262
 	?>
263
-	<ul id="lasso--featImgControls" <?php echo $has_thumbnail;?>>
264
-		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e( 'Replace Image', 'lasso' );?>" href="#"><i class="lasso-icon-image"></i></a></li>
265
-		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e( 'Delete Image', 'lasso' );?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
266
-		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e( 'save', 'lasso' );?></a></li>
263
+	<ul id="lasso--featImgControls" <?php echo $has_thumbnail; ?>>
264
+		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e('Replace Image', 'lasso'); ?>" href="#"><i class="lasso-icon-image"></i></a></li>
265
+		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e('Delete Image', 'lasso'); ?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
266
+		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e('save', 'lasso'); ?></a></li>
267 267
 	</ul>
268 268
 
269 269
 	<?php return ob_get_clean();
@@ -282,55 +282,55 @@  discard block
 block discarded – undo
282 282
 
283 283
 	ob_start();
284 284
 
285
-	if ( !lasso_user_can() )
285
+	if (!lasso_user_can())
286 286
 		return;
287 287
 
288 288
 	global $post;
289 289
 
290 290
 	$postid = get_the_ID();
291 291
 
292
-	$status = get_post_status( $postid );
293
-	$nonce = wp_create_nonce( 'lasso-update-post-settings' );
292
+	$status = get_post_status($postid);
293
+	$nonce = wp_create_nonce('lasso-update-post-settings');
294 294
 
295 295
 	// let users add custom css classes
296
-	$custom_classes = apply_filters( 'lasso_modal_settings_classes', '' );
296
+	$custom_classes = apply_filters('lasso_modal_settings_classes', '');
297 297
 
298 298
 	// objects categories
299
-	$categories 		= lasso_get_post_objects( $postid, 'category' );
300
-	$tags 				= lasso_get_post_objects( $postid, 'tag' );
299
+	$categories = lasso_get_post_objects($postid, 'category');
300
+	$tags = lasso_get_post_objects($postid, 'tag');
301 301
 
302 302
 	// modal tabs
303
-	$tabs  				= lasso_modal_addons('tab');
304
-	$content 			= lasso_modal_addons('content');
303
+	$tabs = lasso_modal_addons('tab');
304
+	$content = lasso_modal_addons('content');
305 305
 
306 306
 	// are we singular
307
-	$is_singular 		= is_singular();
307
+	$is_singular = is_singular();
308 308
 	$is_singular_class 	= $is_singular ? 'lasso--postsettings__2col' : 'lasso--postsettings__1col';
309 309
 	$has_thumb_class    = has_post_thumbnail() ? 'has-thumbnail' : 'no-thumbnail';
310 310
 	$theme_supports     = current_theme_supports('post-thumbnails');
311
-	$default_image 		= LASSO_URL.'/admin/assets/img/empty-img.png';
311
+	$default_image = LASSO_URL.'/admin/assets/img/empty-img.png';
312 312
 
313 313
 ?>
314
-	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>">
314
+	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>">
315 315
 		<div class="lasso--modal__inner">
316 316
 
317
-			<?php if( $tabs ) { echo $tabs; } ?>
317
+			<?php if ($tabs) { echo $tabs; } ?>
318 318
 
319 319
 			<div class="lasso--modal__content modal__content--core visible" data-addon-content="core">
320
-				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class;?>" >
320
+				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class; ?>" >
321 321
 
322
-					<?php if ( $is_singular && $theme_supports ) : ?>
322
+					<?php if ($is_singular && $theme_supports) : ?>
323 323
 					<div class="lasso--postsettings__left">
324
-						<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>
325
-						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url( $default_image );?>">
324
+						<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>
325
+						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url($default_image); ?>">
326 326
 
327 327
 							<div id="lasso--post-thumb__controls" class="lasso--post-thumb__controls">
328
-								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image','lasso');?>" class="dashicons dashicons-edit"></i>
329
-								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image','lasso');?>" class="dashicons dashicons-no-alt"></i>
328
+								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image', 'lasso'); ?>" class="dashicons dashicons-edit"></i>
329
+								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image', 'lasso'); ?>" class="dashicons dashicons-no-alt"></i>
330 330
 								<i id="lasso--save-status" class="lasso-icon lasso-icon-spinner6 not-visible"></i>
331 331
 							</div>
332 332
 
333
-							<?php echo has_post_thumbnail() ? get_the_post_thumbnail( $post->ID, 'medium' ) : '<img src="'.$default_image.'">'; ?>
333
+							<?php echo has_post_thumbnail() ? get_the_post_thumbnail($post->ID, 'medium') : '<img src="'.$default_image.'">'; ?>
334 334
 
335 335
 						</div>
336 336
 						<div id="lasso--featImgSave"><a href="#" class="not-visible">Save</a></div>
@@ -340,12 +340,12 @@  discard block
 block discarded – undo
340 340
 
341 341
 					<div class="lasso--postsettings__right">
342 342
 
343
-						<?php if( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') ): ?>
343
+						<?php if (lasso_user_can('publish_posts') || lasso_user_can('publish_pages')): ?>
344 344
 						<div class="lasso--postsettings__option story-status-option">
345
-							<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>
346
-							<ul class="story-status story-status-<?php echo sanitize_html_class( $status );?>">
347
-								<li id="lasso--status-draft"><?php _e( 'Draft', 'lasso' );?></li>
348
-								<li id="lasso--status-publish"><?php _e( 'Publish', 'lasso' );?></li>
345
+							<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>
346
+							<ul class="story-status story-status-<?php echo sanitize_html_class($status); ?>">
347
+								<li id="lasso--status-draft"><?php _e('Draft', 'lasso'); ?></li>
348
+								<li id="lasso--status-publish"><?php _e('Publish', 'lasso'); ?></li>
349 349
 							</ul>
350 350
 							<div class="lasso--slider_wrap">
351 351
 								<div id="lasso--slider"></div>
@@ -353,10 +353,10 @@  discard block
 block discarded – undo
353 353
 						</div>
354 354
 						<?php endif; ?>
355 355
 
356
-						<?php if ( 'publish' == $status ): ?>
356
+						<?php if ('publish' == $status): ?>
357 357
 						<div class="lasso--postsettings__option story-slug-option">
358
-							<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>
359
-							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset( $post ) ? esc_attr( $post->post_name ) : false;?>">
358
+							<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>
359
+							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset($post) ? esc_attr($post->post_name) : false; ?>">
360 360
 						</div>
361 361
 						<?php endif; ?>
362 362
 
@@ -365,34 +365,34 @@  discard block
 block discarded – undo
365 365
 					<div class="lasso--postsettings__middle">
366 366
 
367 367
 						<div class="lasso--postsettings__option story-categories-option">
368
-							<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>
369
-							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories;?>">
368
+							<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>
369
+							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories; ?>">
370 370
 						</div>
371 371
 
372 372
 						<div class="lasso--postsettings__option story-tags-option">
373
-							<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>
374
-							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags;?>">
373
+							<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>
374
+							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags; ?>">
375 375
 						</div>
376 376
 
377 377
 					</div>
378 378
 
379
-					<?php do_action( 'lasso_modal_post_form' ); // action ?>
379
+					<?php do_action('lasso_modal_post_form'); // action ?>
380 380
 
381 381
 					<div class="lasso--postsettings__footer" style="display:none;">
382
-						<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
382
+						<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
383 383
 						<input type="hidden" name="status" value="">
384 384
 						<input type="hidden" name="categories" value="">
385
-						<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
385
+						<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
386 386
 						<input type="hidden" name="action" value="process_update-object_post">
387
-						<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
388
-						<?php do_action( 'lasso_modal_post_form_footer' ); // action ?>
389
-						<input type="submit" value="<?php esc_attr_e( 'Save', 'lasso' );?>">
387
+						<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
388
+						<?php do_action('lasso_modal_post_form_footer'); // action ?>
389
+						<input type="submit" value="<?php esc_attr_e('Save', 'lasso'); ?>">
390 390
 					</div>
391 391
 
392 392
 				</form>
393 393
 			</div>
394 394
 
395
-			<?php if( $tabs ) { echo $content; } ?>
395
+			<?php if ($tabs) { echo $content; } ?>
396 396
 
397 397
 		</div>
398 398
 
@@ -413,41 +413,41 @@  discard block
 block discarded – undo
413 413
 
414 414
 	ob_start();
415 415
 
416
-	if ( !lasso_user_can('edit_posts') )
416
+	if (!lasso_user_can('edit_posts'))
417 417
 		return;
418 418
 
419
-	$status = get_post_status( get_the_ID() );
419
+	$status = get_post_status(get_the_ID());
420 420
 
421
-	$nonce = wp_create_nonce( 'lasso-editor-new-post' );
421
+	$nonce = wp_create_nonce('lasso-editor-new-post');
422 422
 
423 423
 	// let users add custom css classes
424
-	$custom_classes = apply_filters( 'lasso_modal_post_classes', '' );
424
+	$custom_classes = apply_filters('lasso_modal_post_classes', '');
425 425
 
426 426
 	// return the post type
427
-	$type = get_post_type( get_the_ID() );
427
+	$type = get_post_type(get_the_ID());
428 428
 
429 429
 	?>
430
-	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>">
430
+	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>">
431 431
 		<div class="lasso--modal__inner">
432 432
 
433 433
 			<form id="lasso--postnew__form" enctype="multipart/form-data" class="lasso--post-form">
434 434
 
435 435
 				<div class="lasso--postsettings__option story-slug-option lasso--last-option">
436
-					<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>
437
-					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e( 'Grump Wizards Make Toxic Brew', 'lasso' );?>">
436
+					<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>
437
+					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e('Grump Wizards Make Toxic Brew', 'lasso'); ?>">
438 438
 						<div class="lasso--select-wrap" style="width:90px">
439 439
 						<select id="lasso--select-type" name="story_type">
440 440
 
441 441
 							<?php
442 442
 								$types = lasso_post_types();
443 443
 
444
-								if ( !empty( $types ) ) {
444
+								if (!empty($types)) {
445 445
 
446
-									foreach( $types as $type ) {
446
+									foreach ($types as $type) {
447 447
 
448
-										$type = preg_replace( '/s\b/','', $type );
448
+										$type = preg_replace('/s\b/', '', $type);
449 449
 
450
-										printf( '<option value="%s">%s</option>', lcfirst( esc_attr( $type ) ) , ucfirst( esc_attr( $type ) ) );
450
+										printf('<option value="%s">%s</option>', lcfirst(esc_attr($type)), ucfirst(esc_attr($type)));
451 451
 									}
452 452
 
453 453
 								}
@@ -458,11 +458,11 @@  discard block
 block discarded – undo
458 458
 				</div>
459 459
 
460 460
 				<div class="lasso--postsettings__footer" style="display:none;">
461
-					<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
461
+					<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
462 462
 					<input type="hidden" name="action" value="process_new-object_post">
463 463
 					<input type="hidden" name="object" value="post">
464
-					<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
465
-					<input type="submit" value="<?php esc_attr_e( 'Create', 'lasso' );?>">
464
+					<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
465
+					<input type="submit" value="<?php esc_attr_e('Create', 'lasso'); ?>">
466 466
 				</div>
467 467
 
468 468
 			</form>
@@ -486,18 +486,18 @@  discard block
 block discarded – undo
486 486
 	ob_start();
487 487
 
488 488
 	// post status
489
-	$status = get_post_status( get_the_ID() );
489
+	$status = get_post_status(get_the_ID());
490 490
 
491 491
 	// let users add custom css classes
492
-	$custom_classes = apply_filters( 'lasso_modal_all_post_classes', '' );
492
+	$custom_classes = apply_filters('lasso_modal_all_post_classes', '');
493 493
 
494 494
 	?>
495
-	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>">
495
+	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>">
496 496
 		<div class="lasso--modal__inner">
497 497
 
498 498
 			<div class="lasso--post-filtering not-visible">
499 499
 				<div class="lasso--search__results">
500
-					<span id="lasso--results-found"></span><?php _e('results found','lasso');?>
500
+					<span id="lasso--results-found"></span><?php _e('results found', 'lasso'); ?>
501 501
 				</div>
502 502
 				<div class="lasso--search">
503 503
 					<i id="lasso--search__toggle" class="dashicons dashicons-search"></i>
@@ -510,16 +510,16 @@  discard block
 block discarded – undo
510 510
 
511 511
 				$post_types = lasso_post_types_names();
512 512
 
513
-				if ( ! empty( $post_types ) ) {
513
+				if (!empty($post_types)) {
514 514
 					$first = 'active';
515
-					foreach( $post_types as $name => $label ) {
516
-						printf( '<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr( $first), esc_attr( $name ), esc_attr( $label ) );
515
+					foreach ($post_types as $name => $label) {
516
+						printf('<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr($first), esc_attr($name), esc_attr($label));
517 517
 						$first = '';
518 518
 					}
519 519
 
520 520
 				}
521 521
 
522
-				do_action('lasso_modal_post_objects');?>
522
+				do_action('lasso_modal_post_objects'); ?>
523 523
 
524 524
 			</ul>
525 525
 			<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
@@ -537,18 +537,18 @@  discard block
 block discarded – undo
537 537
 
538 538
 	ob_start();
539 539
 
540
-	if ( !lasso_user_can() )
540
+	if (!lasso_user_can())
541 541
 		return;
542 542
 
543 543
 	// let users add custom css classes
544
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
544
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
545 545
 
546 546
 	?>
547
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
548
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
549
-		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
550
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
551
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
547
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
548
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
549
+		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
550
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
551
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
552 552
 	</ul>
553 553
 
554 554
 	<?php return ob_get_clean();
@@ -561,16 +561,16 @@  discard block
 block discarded – undo
561 561
  */
562 562
 function lasso_map_form_footer() {
563 563
 
564
-	$nonce = wp_create_nonce( 'lasso-process-map' );
564
+	$nonce = wp_create_nonce('lasso-process-map');
565 565
 
566 566
 	ob_start();
567 567
 
568 568
 	?>
569 569
 	<div class="lasso--map-form__footer">
570
-		<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
571
-		<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
570
+		<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
571
+		<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
572 572
 		<input type="hidden" name="action" value="process_map_save">
573
-		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e( 'Save Locations', 'lasso' );?>">
573
+		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e('Save Locations', 'lasso'); ?>">
574 574
 	</div>
575 575
 
576 576
 	<?php return ob_get_clean();
@@ -588,7 +588,7 @@  discard block
 block discarded – undo
588 588
 
589 589
 	?>
590 590
 	<div id="lasso--pagerefresh" class="visible">
591
-		<?php _e( 'Save this post and refesh the page to see these changes.', 'lasso' );?>
591
+		<?php _e('Save this post and refesh the page to see these changes.', 'lasso'); ?>
592 592
 	</div>
593 593
 
594 594
 	<?php return ob_get_clean();
@@ -602,43 +602,43 @@  discard block
 block discarded – undo
602 602
  */
603 603
 function lasso_editor_options_blob() {
604 604
 
605
-	$codes   = function_exists( 'aesop_shortcodes' ) ? aesop_shortcodes() : apply_filters( 'lasso_custom_options', '' );
606
-	$galleries  = function_exists( 'lasso_editor_galleries_exist' ) && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
605
+	$codes = function_exists('aesop_shortcodes') ? aesop_shortcodes() : apply_filters('lasso_custom_options', '');
606
+	$galleries = function_exists('lasso_editor_galleries_exist') && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
607 607
 
608
-	$nonce = wp_create_nonce( 'lasso_gallery' );
608
+	$nonce = wp_create_nonce('lasso_gallery');
609 609
 
610 610
 	$blob = array();
611 611
 
612
-	if ( empty( $codes ) )
612
+	if (empty($codes))
613 613
 		return;
614 614
 
615
-	foreach ( $codes as $slug => $shortcode ) {
615
+	foreach ($codes as $slug => $shortcode) {
616 616
 		$return = '';
617 617
 		// Shortcode has atts
618 618
 
619
-		if ( count( $shortcode['atts'] ) && $shortcode['atts'] ) {
619
+		if (count($shortcode['atts']) && $shortcode['atts']) {
620 620
 
621
-			foreach ( $shortcode['atts'] as $attr_name => $attr_info ) {
621
+			foreach ($shortcode['atts'] as $attr_name => $attr_info) {
622 622
 
623 623
 
624
-				$prefix = isset( $attr_info['prefix'] ) ? sprintf( '<span class="lasso-option-prefix">%s</span>', $attr_info['prefix'] ) : null;
624
+				$prefix = isset($attr_info['prefix']) ? sprintf('<span class="lasso-option-prefix">%s</span>', $attr_info['prefix']) : null;
625 625
 
626 626
 				$return .= '<form id="lasso--component-settings-form" class="'.$galleries.'" method="post">';
627 627
 				$return .= '<p data-option="'.$attr_name.'" class="lasso-option lasso-'.$slug.'-'.$attr_name.'">';
628
-				$return .= '<label for="lasso-generator-attr-' . $attr_name . '">' . $attr_info['desc'] . '</label>';
628
+				$return .= '<label for="lasso-generator-attr-'.$attr_name.'">'.$attr_info['desc'].'</label>';
629 629
 				$return .= '<small class="lasso-option-desc">'.$attr_info['tip'].'</small>';
630 630
 				// Select
631 631
 
632
-				if ( isset( $attr_info['values'] ) ) {
632
+				if (isset($attr_info['values'])) {
633 633
 
634
-					$return .= '<select name="' . $attr_name . '" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr">';
634
+					$return .= '<select name="'.$attr_name.'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr">';
635 635
 
636
-					$i=0;
636
+					$i = 0;
637 637
 
638
-					foreach ( $attr_info['values'] as $attr_value ) {
638
+					foreach ($attr_info['values'] as $attr_value) {
639 639
 						$attr_value_selected = $attr_info['default'] == $attr_value ? ' selected="selected"' : '';
640 640
 
641
-						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" ' . $attr_value_selected . '>'.$attr_info['values'][$i]['name'].'</option>';
641
+						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" '.$attr_value_selected.'>'.$attr_info['values'][$i]['name'].'</option>';
642 642
 
643 643
 						$i++;
644 644
 					}
@@ -647,24 +647,24 @@  discard block
 block discarded – undo
647 647
 
648 648
 				} else {
649 649
 
650
-					$attr_field_type = isset( $attr_info['type'] ) ? $attr_info['type'] : 'text';
650
+					$attr_field_type = isset($attr_info['type']) ? $attr_info['type'] : 'text';
651 651
 
652 652
 					// image upload
653
-					if ( 'media_upload' == $attr_info['type'] ) {
653
+					if ('media_upload' == $attr_info['type']) {
654 654
 
655
-						$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.'" />';
655
+						$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.'" />';
656 656
 						$return .= '<a href="#" id="lasso-upload-img" class="lasso-option-button" /></a>';
657 657
 
658
-					} elseif ( 'color' == $attr_info['type'] ) {
658
+					} elseif ('color' == $attr_info['type']) {
659 659
 
660
-						$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.'" />';
660
+						$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.'" />';
661 661
 
662
-					} elseif ( 'text_area' == $attr_info['type'] ) {
662
+					} elseif ('text_area' == $attr_info['type']) {
663 663
 
664
-						$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.'';
664
+						$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.'';
665 665
 
666 666
 					} else {
667
-						$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.'';
667
+						$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.'';
668 668
 					}
669 669
 				}
670 670
 				$return .= '</p>';
@@ -675,9 +675,9 @@  discard block
 block discarded – undo
675 675
 		///////////////////////////
676 676
 		// START GALLERY AND MAP FRONT END STUFFS
677 677
 		///////////////////////////
678
-		if ( isset( $shortcode['front'] ) && true == $shortcode['front'] ) {
678
+		if (isset($shortcode['front']) && true == $shortcode['front']) {
679 679
 
680
-			if ( 'gallery' == $shortcode['front_type'] ) {
680
+			if ('gallery' == $shortcode['front_type']) {
681 681
 
682 682
 				$return .= lasso_gallery_editor_module();
683 683
 
@@ -688,13 +688,13 @@  discard block
 block discarded – undo
688 688
 		///////////////////////////
689 689
 
690 690
 		// Single shortcode (not closed)
691
-		if ( 'single' == $shortcode['type'] ) {
691
+		if ('single' == $shortcode['type']) {
692 692
 
693 693
 			$return .= '<input type="hidden" name="lasso-generator-content" id="lasso-generator-content" value="false" />';
694 694
 
695 695
 		} else {
696 696
 
697
-			$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>';
697
+			$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>';
698 698
 		}
699 699
 
700 700
 		$return .= '<p class="lasso-buttoninsert-wrap"><a href="#" class="lasso-generator-cancel" id="lasso--sidebar__close">Cancel
@@ -727,7 +727,7 @@  discard block
 block discarded – undo
727 727
 				<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
728 728
 				<div id="lasso--hide" style="display:none;" class="lasso--post-form">
729 729
 					<i class="lasso-icon lasso-icon-move"></i>
730
-					<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>
730
+					<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>
731 731
 					<div class="lasso--slider_wrap">
732 732
 						<div id="lasso--slider"></div>
733 733
 					</div>
Please login to merge, or discard this patch.