Completed
Push — master ( a6086b...51c0b5 )
by
unknown
01:57
created
public/includes/editor-modules.php 2 patches
Spacing   +226 added lines, -226 removed lines patch added patch discarded remove patch
@@ -11,32 +11,32 @@  discard block
 block discarded – undo
11 11
  *
12 12
  * @since 1.0
13 13
  */
14
-add_action( 'wp_footer', 'lasso_editor_controls' );
14
+add_action('wp_footer', 'lasso_editor_controls');
15 15
 function lasso_editor_controls() {
16 16
 
17 17
 	global $post;
18 18
 
19
-	if ( lasso_user_can('edit_posts') ) {
19
+	if (lasso_user_can('edit_posts')) {
20 20
 
21
-		$status = get_post_status( get_the_ID() );
21
+		$status = get_post_status(get_the_ID());
22 22
 
23 23
 		// let users add custom css classes
24
-		$custom_classes = apply_filters( 'lasso_control_classes', '' );
24
+		$custom_classes = apply_filters('lasso_control_classes', '');
25 25
 
26 26
 		$post_access_class   = '';
27
-		$post_new_disabled   = lasso_editor_get_option( 'post_adding_disabled', 'lasso_editor' );
28
-		$post_settings_disabled = lasso_editor_get_option( 'post_settings_disabled', 'lasso_editor' );
29
-		$shortcodify_disabled = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
27
+		$post_new_disabled   = lasso_editor_get_option('post_adding_disabled', 'lasso_editor');
28
+		$post_settings_disabled = lasso_editor_get_option('post_settings_disabled', 'lasso_editor');
29
+		$shortcodify_disabled = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor');
30 30
 
31 31
 
32 32
 		// CSS class if adding new post objects is disabled
33
-		if ( 'on' == $post_new_disabled ) { $post_access_class = 'lasso--post-new-disabled'; }
33
+		if ('on' == $post_new_disabled) { $post_access_class = 'lasso--post-new-disabled'; }
34 34
 
35 35
 		// CSS class if adjust settings is disabled
36
-		if ( 'on' == $post_settings_disabled ) { $post_access_class = 'lasso--post-settings-disabled'; }
36
+		if ('on' == $post_settings_disabled) { $post_access_class = 'lasso--post-settings-disabled'; }
37 37
 
38 38
 		// CSS class if adding new post objects AND settings are disabled
39
-		if ( 'on' == $post_new_disabled && 'on' == $post_settings_disabled ) { $post_access_class = 'lasso--post-all-disabled'; }
39
+		if ('on' == $post_new_disabled && 'on' == $post_settings_disabled) { $post_access_class = 'lasso--post-all-disabled'; }
40 40
 
41 41
 		// CSS class if shortcodify or (Aesop Shortcode Conversion) is disabled
42 42
 		$sc_saving_class = 'on' == $shortcodify_disabled ? 'shortcodify-disabled' : 'shortcodify-enabled';
@@ -48,44 +48,44 @@  discard block
 block discarded – undo
48 48
 		$mobile_style = $is_mobile ? 'style="bottom:0px;"' : null;
49 49
 		
50 50
 
51
-		?><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
+		?><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(); ?>" >
52 52
 
53
-			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class;?> "  <?php echo $mobile_style ?> >
53
+			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class; ?> "  <?php echo $mobile_style ?> >
54 54
 
55
-				<?php do_action( 'lasso_editor_controls_before' );
55
+				<?php do_action('lasso_editor_controls_before');
56 56
 
57
-				if ( $is_capable ) { ?>
57
+				if ($is_capable) { ?>
58 58
 
59
-					<li id="lasso--edit" title="<?php esc_attr_e( 'Edit Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
59
+					<li id="lasso--edit" title="<?php esc_attr_e('Edit Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
60 60
 
61
-					<?php if ( 'off' == $post_settings_disabled || empty( $post_settings_disabled ) ) { ?>
62
-						<li id="lasso--post-settings" title="<?php esc_attr_e( 'Post Settings', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
61
+					<?php if ('off' == $post_settings_disabled || empty($post_settings_disabled)) { ?>
62
+						<li id="lasso--post-settings" title="<?php esc_attr_e('Post Settings', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
63 63
 					<?php }
64 64
 
65 65
 				} ?>
66 66
 
67
-				<li id="lasso--post-all" title="<?php esc_attr_e( 'All Posts', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
67
+				<li id="lasso--post-all" title="<?php esc_attr_e('All Posts', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
68 68
 
69
-				<?php if ( $is_capable && wp_revisions_enabled( $post ) ) { ?>
70
-					<li id="lasso--post-revisions" title="<?php esc_attr_e( 'Revisions', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
69
+				<?php if ($is_capable && wp_revisions_enabled($post)) { ?>
70
+					<li id="lasso--post-revisions" title="<?php esc_attr_e('Revisions', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
71 71
 				<?php } ?>
72 72
 
73
-				<?php if ( ( 'off' == $post_new_disabled || empty( $post_new_disabled ) && lasso_user_can('publish_posts') ) ) { ?>
74
-					<li id="lasso--post-new" title="<?php esc_attr_e( 'Add Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
73
+				<?php if (('off' == $post_new_disabled || empty($post_new_disabled) && lasso_user_can('publish_posts'))) { ?>
74
+					<li id="lasso--post-new" title="<?php esc_attr_e('Add Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
75 75
 				<?php } ?>
76 76
 
77
-				<?php do_action( 'lasso_editor_controls_after' );?>
77
+				<?php do_action('lasso_editor_controls_after'); ?>
78 78
 
79 79
 			</ul>
80 80
 
81
-			<?php if ( is_singular() && !$is_mobile ) { ?>
81
+			<?php if (is_singular() && !$is_mobile) { ?>
82 82
 
83
-				<div class="lasso--controls__right" data-posttype="<?php echo get_post_type( get_the_ID() );?>" data-status="<?php echo $status;?>">
83
+				<div class="lasso--controls__right" data-posttype="<?php echo get_post_type(get_the_ID()); ?>" data-status="<?php echo $status; ?>">
84 84
 
85
-					<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
+					<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>
86 86
 
87
-					<?php if ( 'draft' == $status && ( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') )  ) { ?>
88
-						<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>
87
+					<?php if ('draft' == $status && (lasso_user_can('publish_posts') || lasso_user_can('publish_pages'))) { ?>
88
+						<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>
89 89
 					<?php } ?>
90 90
 
91 91
 				</div>
@@ -110,9 +110,9 @@  discard block
 block discarded – undo
110 110
 
111 111
 
112 112
 	// let users add custom css classes
113
-	$custom_classes = apply_filters( 'lasso_sidebar_classes', '' );
113
+	$custom_classes = apply_filters('lasso_sidebar_classes', '');
114 114
 	?>
115
-	<div id="lasso--sidebar" class="<?php echo sanitize_html_class( $custom_classes );?>" >
115
+	<div id="lasso--sidebar" class="<?php echo sanitize_html_class($custom_classes); ?>" >
116 116
 		<div class="lasso--sidebar__inner">
117 117
 			<div id="lasso--component__settings"></div>
118 118
 		</div>
@@ -134,20 +134,20 @@  discard block
 block discarded – undo
134 134
 	$is_mobile = wp_is_mobile();
135 135
 
136 136
 	// check for lasso story engine and add a class doniting this
137
-	$ase_status = class_exists( 'Aesop_Core' ) || defined( 'LASSO_CUSTOM' ) ? 'ase-active' : 'ase-not-active';
137
+	$ase_status = class_exists('Aesop_Core') || defined('LASSO_CUSTOM') ? 'ase-active' : 'ase-not-active';
138 138
 
139 139
 	// let users add custom css classes
140
-	$custom_classes = apply_filters( 'lasso_toolbar_classes', '' );
140
+	$custom_classes = apply_filters('lasso_toolbar_classes', '');
141 141
 
142 142
 	// are toolbar headings enabled
143
-	$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
144
-	$toolbar_headings_h4      = lasso_editor_get_option( 'toolbar_headings_h4', 'lasso_editor' );
143
+	$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
144
+	$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', '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 styles
149 149
     $mobile_class = $is_mobile ? 'lasso-mobile' : false;
150
-	$mobile_style =$is_mobile ? 'style="bottom:0px;"' : null;
150
+	$mobile_style = $is_mobile ? 'style="bottom:0px;"' : null;
151 151
 	
152 152
 	//show color
153 153
 	$show_color = lasso_editor_get_option('toolbar_show_color', 'lasso_editor');
@@ -155,109 +155,109 @@  discard block
 block discarded – undo
155 155
 	//show alignment
156 156
 	$show_align = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor');
157 157
 	
158
-	$status = get_post_status( get_the_ID() );
158
+	$status = get_post_status(get_the_ID());
159 159
 
160 160
 
161 161
 	?>
162
-	<div class="lasso--toolbar_wrap lasso-editor-controls--wrap <?php echo $toolbar_class.' '.$mobile_class.' '.$ase_status.' '.sanitize_html_class( $custom_classes );?>" <?php echo $mobile_style ?>>
163
-		<ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"';}?>>
164
-			<?php do_action( 'lasso_toolbar_components_before' );?>
165
-		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e( 'Bold', 'lasso' );?>"></li>
166
-		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e( 'Underline', 'lasso' );?>"></li>
167
-		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e( 'Italicize', 'lasso' );?>"></li>
168
-		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e( 'Strikethrough', 'lasso' );?>"></li>
169
-			<li id="lasso-toolbar--components" title="<?php esc_attr_e( 'Insert Component', 'lasso' );?>" style="color:#ffffa0;">
162
+	<div class="lasso--toolbar_wrap lasso-editor-controls--wrap <?php echo $toolbar_class.' '.$mobile_class.' '.$ase_status.' '.sanitize_html_class($custom_classes); ?>" <?php echo $mobile_style ?>>
163
+		<ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"'; }?>>
164
+			<?php do_action('lasso_toolbar_components_before'); ?>
165
+		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e('Bold', 'lasso'); ?>"></li>
166
+		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e('Underline', 'lasso'); ?>"></li>
167
+		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e('Italicize', 'lasso'); ?>"></li>
168
+		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e('Strikethrough', 'lasso'); ?>"></li>
169
+			<li id="lasso-toolbar--components" title="<?php esc_attr_e('Insert Component', 'lasso'); ?>" style="color:#ffffa0;">
170 170
 			    <ul id="lasso-toolbar--components__list" style="display:none;color:white;">
171
-			    	<?php if ( 'ase-active' == $ase_status ): ?>
172
-						<li data-type="image" title="<?php esc_attr_e( 'Image', 'lasso' );?>" class="lasso-toolbar--component__image"></li>
173
-						<li data-type="character" title="<?php esc_attr_e( 'Character', 'lasso' );?>" class="lasso-toolbar--component__character"></li>
174
-						<li data-type="quote" title="<?php esc_attr_e( 'Quote', 'lasso' );?>"  class="lasso-toolbar--component__quote"></li>
175
-						<li data-type="content" title="<?php esc_attr_e( 'Content', 'lasso' );?>"  class="lasso-toolbar--component__content"></li>
176
-						<li data-type="chapter" title="<?php esc_attr_e( 'Chapter', 'lasso' );?>"  class="lasso-toolbar--component__chapter"></li>
177
-						<li data-type="parallax" title="<?php esc_attr_e( 'Parallax', 'lasso' );?>"  class="lasso-toolbar--component__parallax"></li>
178
-						<li data-type="audio" title="<?php esc_attr_e( 'Audio', 'lasso' );?>"  class="lasso-toolbar--component__audio"></li>
179
-						<li data-type="video" title="<?php esc_attr_e( 'Video', 'lasso' );?>"  class="lasso-toolbar--component__video"></li>
180
-						<li data-type="map" title="<?php esc_attr_e( 'Map', 'lasso' );?>"  class="lasso-toolbar--component__map"></li>
181
-						<li data-type="timeline_stop" title="<?php esc_attr_e( 'Timeline', 'lasso' );?>"  class="lasso-toolbar--component__timeline"></li>
182
-						<li data-type="document" title="<?php esc_attr_e( 'Document', 'lasso' );?>"  class="lasso-toolbar--component__document"></li>
183
-						<li data-type="collection" title="<?php esc_attr_e( 'Collection', 'lasso' );?>"  class="lasso-toolbar--component__collection"></li>
184
-						<li data-type="gallery" title="<?php esc_attr_e( 'Gallery', 'lasso' );?>"  class="lasso-toolbar--component__gallery"></li>
185
-						<?php if ( class_exists ('Aesop_GalleryPop') ) { ?>
186
-						     <li data-type="gallery" title="<?php esc_attr_e( 'Gallery Pop', 'lasso' );?>"  class="lasso-toolbar--component__gallerypop"></li>
171
+			    	<?php if ('ase-active' == $ase_status): ?>
172
+						<li data-type="image" title="<?php esc_attr_e('Image', 'lasso'); ?>" class="lasso-toolbar--component__image"></li>
173
+						<li data-type="character" title="<?php esc_attr_e('Character', 'lasso'); ?>" class="lasso-toolbar--component__character"></li>
174
+						<li data-type="quote" title="<?php esc_attr_e('Quote', 'lasso'); ?>"  class="lasso-toolbar--component__quote"></li>
175
+						<li data-type="content" title="<?php esc_attr_e('Content', 'lasso'); ?>"  class="lasso-toolbar--component__content"></li>
176
+						<li data-type="chapter" title="<?php esc_attr_e('Chapter', 'lasso'); ?>"  class="lasso-toolbar--component__chapter"></li>
177
+						<li data-type="parallax" title="<?php esc_attr_e('Parallax', 'lasso'); ?>"  class="lasso-toolbar--component__parallax"></li>
178
+						<li data-type="audio" title="<?php esc_attr_e('Audio', 'lasso'); ?>"  class="lasso-toolbar--component__audio"></li>
179
+						<li data-type="video" title="<?php esc_attr_e('Video', 'lasso'); ?>"  class="lasso-toolbar--component__video"></li>
180
+						<li data-type="map" title="<?php esc_attr_e('Map', 'lasso'); ?>"  class="lasso-toolbar--component__map"></li>
181
+						<li data-type="timeline_stop" title="<?php esc_attr_e('Timeline', 'lasso'); ?>"  class="lasso-toolbar--component__timeline"></li>
182
+						<li data-type="document" title="<?php esc_attr_e('Document', 'lasso'); ?>"  class="lasso-toolbar--component__document"></li>
183
+						<li data-type="collection" title="<?php esc_attr_e('Collection', 'lasso'); ?>"  class="lasso-toolbar--component__collection"></li>
184
+						<li data-type="gallery" title="<?php esc_attr_e('Gallery', 'lasso'); ?>"  class="lasso-toolbar--component__gallery"></li>
185
+						<?php if (class_exists('Aesop_GalleryPop')) { ?>
186
+						     <li data-type="gallery" title="<?php esc_attr_e('Gallery Pop', 'lasso'); ?>"  class="lasso-toolbar--component__gallerypop"></li>
187 187
 						<?php }?>
188
-						<?php if ( class_exists ('Aesop_Events') ) { ?>
189
-						     <li data-type="events" title="<?php esc_attr_e( 'Event', 'lasso' );?>"  class="lasso-toolbar--component__event"></li>
188
+						<?php if (class_exists('Aesop_Events')) { ?>
189
+						     <li data-type="events" title="<?php esc_attr_e('Event', 'lasso'); ?>"  class="lasso-toolbar--component__event"></li>
190 190
 						<?php }?>
191 191
 					<?php else: ?>
192
-						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );?>" class="image lasso-toolbar--component__image"></li>
193
-						<li data-type="wpquote" title="<?php esc_attr_e( 'WordPress Quote', 'lasso' );?>" class="quote lasso-toolbar--component__quote"></li>
194
-						<!--li data-type="wpvideo" title="<?php esc_attr_e( 'WordPress Video', 'lasso' );?>" class="video lasso-toolbar--component__video"></li-->
192
+						<li data-type="wpimg" title="<?php esc_attr_e('WordPress Image', 'lasso'); ?>" class="image lasso-toolbar--component__image"></li>
193
+						<li data-type="wpquote" title="<?php esc_attr_e('WordPress Quote', 'lasso'); ?>" class="quote lasso-toolbar--component__quote"></li>
194
+						<!--li data-type="wpvideo" title="<?php esc_attr_e('WordPress Video', 'lasso'); ?>" class="video lasso-toolbar--component__video"></li-->
195 195
 					<?php endif; ?>
196
-					<?php do_action( 'lasso_toolbar_components' );?>
196
+					<?php do_action('lasso_toolbar_components'); ?>
197 197
 			    </ul>
198 198
 			</li>
199
-		    <?php if ( $toolbar_headings ): ?>
200
-		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>"></li>
201
-		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>"></li>
199
+		    <?php if ($toolbar_headings): ?>
200
+		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>"></li>
201
+		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>"></li>
202 202
 			<?php endif; ?>
203
-			<?php if ( $toolbar_headings_h4 ): ?>
204
-		    <li id="lasso-toolbar--h4" title="<?php esc_attr_e( 'H4 Heading', 'lasso' );?>"></li>
205
-		    <li id="lasso-toolbar--h5" title="<?php esc_attr_e( 'H5 Heading', 'lasso' );?>"></li>
206
-			<li id="lasso-toolbar--h6" title="<?php esc_attr_e( 'H6 Heading', 'lasso' );?>"></li>
203
+			<?php if ($toolbar_headings_h4): ?>
204
+		    <li id="lasso-toolbar--h4" title="<?php esc_attr_e('H4 Heading', 'lasso'); ?>"></li>
205
+		    <li id="lasso-toolbar--h5" title="<?php esc_attr_e('H5 Heading', 'lasso'); ?>"></li>
206
+			<li id="lasso-toolbar--h6" title="<?php esc_attr_e('H6 Heading', 'lasso'); ?>"></li>
207 207
 			<?php endif; ?>
208 208
 			
209
-			<?php if ( $show_color ): ?>
210
-		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e( 'Set Color for Selected Text', 'lasso' );?>"></li>
211
-		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e( 'Choose Color', 'lasso' );?>"></li>
209
+			<?php if ($show_color): ?>
210
+		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e('Set Color for Selected Text', 'lasso'); ?>"></li>
211
+		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e('Choose Color', 'lasso'); ?>"></li>
212 212
 			<?php endif; ?>
213 213
 					
214 214
 		    
215
-			<li id="lasso-toolbar--link" title="<?php esc_attr_e( 'Anchor Link', 'lasso' );?>">
215
+			<li id="lasso-toolbar--link" title="<?php esc_attr_e('Anchor Link', 'lasso'); ?>">
216 216
 		    	<div id="lasso-toolbar--link__wrap" <?php echo $mobile_style ?> >
217
-		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'http://url.com', 'lasso' );?>"></div>
218
-		    		<a href="#" title="<?php esc_attr_e( 'Create Link', 'lasso' );?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
217
+		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e('http://url.com', 'lasso'); ?>"></div>
218
+		    		<a href="#" title="<?php esc_attr_e('Create Link', 'lasso'); ?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
219 219
 					<input class="styled-checkbox" type="checkbox" id="aesop-toolbar--link_newtab" checked/>
220
-                    <label for="aesop-toolbar--link_newtab"><?php esc_attr_e( 'Open in a New Tab', 'lasso' );?></label>
220
+                    <label for="aesop-toolbar--link_newtab"><?php esc_attr_e('Open in a New Tab', 'lasso'); ?></label>
221 221
 		    	</div>
222 222
 		    </li>
223
-		    <?php do_action( 'lasso_toolbar_components_after' );?>
224
-		    <li id="lasso-toolbar--html" title="<?php esc_attr_e( 'Insert HTML or Code', 'lasso' );?>">
223
+		    <?php do_action('lasso_toolbar_components_after'); ?>
224
+		    <li id="lasso-toolbar--html" title="<?php esc_attr_e('Insert HTML or Code', 'lasso'); ?>">
225 225
 		    	<div id="lasso-toolbar--html__wrap" <?php echo $mobile_style ?>>
226
-		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?>"></div>
226
+		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?>"></div>
227 227
 		    		<div id="lasso-toolbar--html__footer">
228 228
 					<div id="lasso-toolbar--html__footer_desc" >
229
-					<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?><br>
230
-					<?php esc_attr_e( 'You can also use Shortcodes', 'lasso' );?><br>
231
-					<?php esc_attr_e( 'You can also enter a URL to embed, such as Youtube, Vimeo and Twitter URLs.', 'lasso' );?>
229
+					<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?><br>
230
+					<?php esc_attr_e('You can also use Shortcodes', 'lasso'); ?><br>
231
+					<?php esc_attr_e('You can also enter a URL to embed, such as Youtube, Vimeo and Twitter URLs.', 'lasso'); ?>
232 232
 					</div>
233 233
 		    			<ul class="lasso-toolbar--html-snips">
234 234
 						
235
-		    				<?php if ( !$toolbar_headings ): ?>
236
-		    				<li id="lasso-html--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>">
237
-		    				<li id="lasso-html--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>">
235
+		    				<?php if (!$toolbar_headings): ?>
236
+		    				<li id="lasso-html--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>">
237
+		    				<li id="lasso-html--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>">
238 238
 		    				<?php endif; ?>
239
-		    				<li id="lasso-html--ul" title="<?php esc_attr_e( 'Unordered List', 'lasso' );?>">
240
-		    				<li id="lasso-html--ol" title="<?php esc_attr_e( 'Ordered List', 'lasso' );?>">
239
+		    				<li id="lasso-html--ul" title="<?php esc_attr_e('Unordered List', 'lasso'); ?>">
240
+		    				<li id="lasso-html--ol" title="<?php esc_attr_e('Ordered List', 'lasso'); ?>">
241 241
 		    			</ul>
242
-		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e( 'Cancel', 'lasso' );?></a>
243
-		    			<a href="#" title="<?php esc_attr_e( 'Insert HTML or Code', 'lasso' );?>" class="lasso-toolbar--html__control" id="lasso-toolbar--html__insert" ><?php _e( 'Insert', 'lasso' );?></a>
242
+		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e('Cancel', 'lasso'); ?></a>
243
+		    			<a href="#" title="<?php esc_attr_e('Insert HTML or Code', 'lasso'); ?>" class="lasso-toolbar--html__control" id="lasso-toolbar--html__insert" ><?php _e('Insert', 'lasso'); ?></a>
244 244
 		    		</div>
245 245
 		    	</div>
246 246
 		    </li>
247
-			<?php if ( $show_align ): ?>
248
-		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e( 'Text Left Align', 'lasso' );?>"></li>
249
-		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e( 'Text Center Align', 'lasso' );?>"></li>
250
-			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e( 'Text Right Align', 'lasso' );?>"></li>
247
+			<?php if ($show_align): ?>
248
+		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e('Text Left Align', 'lasso'); ?>"></li>
249
+		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e('Text Center Align', 'lasso'); ?>"></li>
250
+			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e('Text Right Align', 'lasso'); ?>"></li>
251 251
 			<?php endif; ?>
252 252
 		</ul>
253
-		<?php if ( is_singular() && $is_mobile ) { ?>
253
+		<?php if (is_singular() && $is_mobile) { ?>
254 254
 
255
-				<div class="lasso--controls__right" data-posttype="<?php echo get_post_type( get_the_ID() );?>" data-status="<?php echo $status;?>" style="position:static;bottom:0px;right;0px;left:auto;">
255
+				<div class="lasso--controls__right" data-posttype="<?php echo get_post_type(get_the_ID()); ?>" data-status="<?php echo $status; ?>" style="position:static;bottom:0px;right;0px;left:auto;">
256 256
 
257
-					<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>
257
+					<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>
258 258
 
259
-					<?php if ( 'draft' == $status && ( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') )  ) { ?>
260
-						<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>
259
+					<?php if ('draft' == $status && (lasso_user_can('publish_posts') || lasso_user_can('publish_pages'))) { ?>
260
+						<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>
261 261
 					<?php } ?>
262 262
 
263 263
 				</div>
@@ -275,20 +275,20 @@  discard block
 block discarded – undo
275 275
  */
276 276
 function lasso_editor_settings_toolbar() {
277 277
 
278
-	$delete_nonce = wp_create_nonce( 'lasso-delete-nonce' );
278
+	$delete_nonce = wp_create_nonce('lasso-delete-nonce');
279 279
 
280 280
 	ob_start();
281 281
 
282 282
 
283 283
 	// let users add custom css classes
284
-	$custom_classes = apply_filters( 'lasso_component_classes', '' );
284
+	$custom_classes = apply_filters('lasso_component_classes', '');
285 285
 
286 286
 	?>
287
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
288
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
289
-		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
290
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
291
-		<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>
287
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
288
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
289
+		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
290
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
291
+		<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>
292 292
 	</ul>
293 293
 
294 294
 	<?php return ob_get_clean();
@@ -306,13 +306,13 @@  discard block
 block discarded – undo
306 306
 
307 307
 
308 308
 	// has post thumbnail
309
-	$has_thumbnail = has_post_thumbnail( get_the_ID() ) ? 'class="lasso--featImg--has-thumb"' : false;
309
+	$has_thumbnail = has_post_thumbnail(get_the_ID()) ? 'class="lasso--featImg--has-thumb"' : false;
310 310
 
311 311
 	?>
312
-	<ul id="lasso--featImgControls" <?php echo $has_thumbnail;?>>
313
-		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e( 'Replace Image', 'lasso' );?>" href="#"><i class="lasso-icon-image"></i></a></li>
314
-		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e( 'Delete Image', 'lasso' );?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
315
-		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e( 'save', 'lasso' );?></a></li>
312
+	<ul id="lasso--featImgControls" <?php echo $has_thumbnail; ?>>
313
+		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e('Replace Image', 'lasso'); ?>" href="#"><i class="lasso-icon-image"></i></a></li>
314
+		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e('Delete Image', 'lasso'); ?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
315
+		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e('save', 'lasso'); ?></a></li>
316 316
 	</ul>
317 317
 
318 318
 	<?php return ob_get_clean();
@@ -336,51 +336,51 @@  discard block
 block discarded – undo
336 336
 
337 337
 	$postid = get_the_ID();
338 338
 
339
-	$status = get_post_status( $postid );
340
-	$nonce = wp_create_nonce( 'lasso-update-post-settings' );
339
+	$status = get_post_status($postid);
340
+	$nonce = wp_create_nonce('lasso-update-post-settings');
341 341
 
342 342
 	// let users add custom css classes
343
-	$custom_classes = apply_filters( 'lasso_modal_settings_classes', '' );
343
+	$custom_classes = apply_filters('lasso_modal_settings_classes', '');
344 344
 
345 345
 	// objects categories
346
-	$categories 		= lasso_get_post_objects( $postid, 'category' );
347
-	$tags 				= lasso_get_post_objects( $postid, 'tag' );
346
+	$categories = lasso_get_post_objects($postid, 'category');
347
+	$tags = lasso_get_post_objects($postid, 'tag');
348 348
 
349 349
 	// modal tabs
350
-	$tabs  				= lasso_modal_addons('tab');
351
-	$content 			= lasso_modal_addons('content');
350
+	$tabs = lasso_modal_addons('tab');
351
+	$content = lasso_modal_addons('content');
352 352
 	
353 353
 	//editor options
354 354
 	$allow_change_date = lasso_editor_get_option('allow_change_date', 'lasso_editor');
355 355
 
356 356
 	// are we singular
357
-	$is_singular 		= is_singular();
357
+	$is_singular = is_singular();
358 358
 	$is_singular_class 	= $is_singular ? 'lasso--postsettings__2col' : 'lasso--postsettings__1col';
359 359
 	$has_thumb_class    = has_post_thumbnail() ? 'has-thumbnail' : 'no-thumbnail';
360 360
 	$theme_supports     = current_theme_supports('post-thumbnails');
361
-	$default_image 		= LASSO_URL.'/admin/assets/img/empty-img.png';
361
+	$default_image = LASSO_URL.'/admin/assets/img/empty-img.png';
362 362
 
363 363
 ?>
364
-	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>">
364
+	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>">
365 365
 		<div class="lasso--modal__inner">
366 366
 
367
-			<?php if( $tabs ) { echo $tabs; } ?>
367
+			<?php if ($tabs) { echo $tabs; } ?>
368 368
 
369 369
 			<div class="lasso--modal__content modal__content--core visible" data-addon-content="core">
370
-				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class;?>" >
370
+				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class; ?>" >
371 371
 
372
-					<?php if ( $is_singular && $theme_supports ) : ?>
372
+					<?php if ($is_singular && $theme_supports) : ?>
373 373
 					<div class="lasso--postsettings__left">
374
-						<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>
375
-						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url( $default_image );?>">
374
+						<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>
375
+						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url($default_image); ?>">
376 376
 
377 377
 							<div id="lasso--post-thumb__controls" class="lasso--post-thumb__controls">
378
-								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image','lasso');?>" class="dashicons dashicons-edit"></i>
379
-								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image','lasso');?>" class="dashicons dashicons-no-alt"></i>
378
+								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image', 'lasso'); ?>" class="dashicons dashicons-edit"></i>
379
+								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image', 'lasso'); ?>" class="dashicons dashicons-no-alt"></i>
380 380
 								<i id="lasso--save-status" class="lasso-icon lasso-icon-spinner6 not-visible"></i>
381 381
 							</div>
382 382
 
383
-							<?php echo has_post_thumbnail() ? get_the_post_thumbnail( $post->ID, 'medium' ) : '<img src="'.$default_image.'">'; ?>
383
+							<?php echo has_post_thumbnail() ? get_the_post_thumbnail($post->ID, 'medium') : '<img src="'.$default_image.'">'; ?>
384 384
 
385 385
 						</div>
386 386
 						<div id="lasso--featImgSave"><a href="#" class="not-visible">Save</a></div>
@@ -390,12 +390,12 @@  discard block
 block discarded – undo
390 390
 
391 391
 					<div class="lasso--postsettings__right">
392 392
 
393
-						<?php if( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') ): ?>
393
+						<?php if (lasso_user_can('publish_posts') || lasso_user_can('publish_pages')): ?>
394 394
 						<div class="lasso--postsettings__option story-status-option">
395
-							<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>
396
-							<ul class="story-status story-status-<?php echo sanitize_html_class( $status );?>">
397
-								<li id="lasso--status-draft"><?php _e( 'Draft', 'lasso' );?></li>
398
-								<li id="lasso--status-publish"><?php _e( 'Publish', 'lasso' );?></li>
395
+							<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>
396
+							<ul class="story-status story-status-<?php echo sanitize_html_class($status); ?>">
397
+								<li id="lasso--status-draft"><?php _e('Draft', 'lasso'); ?></li>
398
+								<li id="lasso--status-publish"><?php _e('Publish', 'lasso'); ?></li>
399 399
 							</ul>
400 400
 							<div class="lasso--slider_wrap">
401 401
 								<div id="lasso--slider"></div>
@@ -403,10 +403,10 @@  discard block
 block discarded – undo
403 403
 						</div>
404 404
 						<?php endif; ?>
405 405
 
406
-						<?php if ( 'publish' == $status ): ?>
406
+						<?php if ('publish' == $status): ?>
407 407
 						<div class="lasso--postsettings__option story-slug-option">
408
-							<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>
409
-							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset( $post ) ? esc_attr( $post->post_name ) : false;?>">
408
+							<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>
409
+							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset($post) ? esc_attr($post->post_name) : false; ?>">
410 410
 						</div>
411 411
 						<?php endif; ?>
412 412
 
@@ -415,20 +415,20 @@  discard block
 block discarded – undo
415 415
 					<div class="lasso--postsettings__middle">
416 416
 
417 417
 						<div class="lasso--postsettings__option story-categories-option">
418
-							<label style="width:120px;"><?php _e( 'Categories', 'lasso' );?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e( 'Type a category name and press enter.', 'lasso' );?>"><i class="lasso-icon-help"></i></span></label>
419
-							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories;?>">
418
+							<label style="width:120px;"><?php _e('Categories', 'lasso'); ?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e('Type a category name and press enter.', 'lasso'); ?>"><i class="lasso-icon-help"></i></span></label>
419
+							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories; ?>">
420 420
 						</div>
421 421
 
422 422
 						<div class="lasso--postsettings__option story-tags-option">
423
-							<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>
424
-							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags;?>">
423
+							<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>
424
+							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags; ?>">
425 425
 						</div>
426 426
 						<?php 
427 427
 						if ($allow_change_date) { 
428
-						    $dateformat = get_option( 'date_format' ); 
428
+						    $dateformat = get_option('date_format'); 
429 429
 						?>
430
-						    <label><?php _e( 'Post Date', 'lasso' ); ?></label>
431
-							<input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid);?>"/>
430
+						    <label><?php _e('Post Date', 'lasso'); ?></label>
431
+							<input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid); ?>"/>
432 432
 						<?php
433 433
 						}?>
434 434
 
@@ -450,23 +450,23 @@  discard block
 block discarded – undo
450 450
 					?>
451 451
 					<!--/div-->
452 452
 
453
-					<?php do_action( 'lasso_modal_post_form' ); // action ?>
453
+					<?php do_action('lasso_modal_post_form'); // action ?>
454 454
 
455 455
 					<div class="lasso--postsettings__footer" >
456
-						<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
456
+						<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
457 457
 						<input type="hidden" name="status" value="">
458 458
 						<input type="hidden" name="categories" value="">
459
-						<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
459
+						<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
460 460
 						<input type="hidden" name="action" value="process_update-object_post">
461
-						<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
462
-						<?php do_action( 'lasso_modal_post_form_footer' ); // action ?>
463
-						<input type="submit" value="<?php esc_attr_e( 'Save', 'lasso' );?>">
461
+						<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
462
+						<?php do_action('lasso_modal_post_form_footer'); // action ?>
463
+						<input type="submit" value="<?php esc_attr_e('Save', 'lasso'); ?>">
464 464
 					</div>
465 465
 
466 466
 				</form>
467 467
 			</div>
468 468
 
469
-			<?php if( $tabs ) { echo $content; } ?>
469
+			<?php if ($tabs) { echo $content; } ?>
470 470
 
471 471
 		</div>
472 472
 
@@ -488,38 +488,38 @@  discard block
 block discarded – undo
488 488
 	ob_start();
489 489
 
490 490
 
491
-	$status = get_post_status( get_the_ID() );
491
+	$status = get_post_status(get_the_ID());
492 492
 
493
-	$nonce = wp_create_nonce( 'lasso-editor-new-post' );
493
+	$nonce = wp_create_nonce('lasso-editor-new-post');
494 494
 
495 495
 	// let users add custom css classes
496
-	$custom_classes = apply_filters( 'lasso_modal_post_classes', '' );
496
+	$custom_classes = apply_filters('lasso_modal_post_classes', '');
497 497
 
498 498
 	// return the post type
499
-	$type = get_post_type( get_the_ID() );
499
+	$type = get_post_type(get_the_ID());
500 500
 
501 501
 	$mobile_style = "";
502 502
 	if (wp_is_mobile()) {
503 503
 		$mobile_style = 'style="top:140px !important;"';
504 504
 	}
505 505
 	?>
506
-	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" <?php echo $mobile_style;?>">
506
+	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" <?php echo $mobile_style; ?>">
507 507
 		<div class="lasso--modal__inner lasso--hasnewform">
508 508
 
509 509
 			<form id="lasso--postnew__form" enctype="multipart/form-data" class="lasso--post-form">
510 510
 
511 511
 				<div class="lasso--postsettings__option story-slug-option lasso--last-option">
512
-					<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>
513
-					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e( 'Grump Wizards Make Toxic Brew', 'lasso' );?>">
512
+					<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>
513
+					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e('Grump Wizards Make Toxic Brew', 'lasso'); ?>">
514 514
 						<div class="lasso--select-wrap" style="width:90px">
515 515
 						<select id="lasso--select-type" name="story_type">
516 516
 
517 517
 							<?php
518 518
 								$types = lasso_post_types();
519
-								if ( !empty( $types ) ) {
520
-									foreach( $types as $type ) {					
521
-										$type = preg_replace( '/s\b/','', $type );
522
-										printf( '<option value="%s">%s</option>', lcfirst( esc_attr( $type ) ) , ucfirst( esc_attr( $type ) ) );
519
+								if (!empty($types)) {
520
+									foreach ($types as $type) {					
521
+										$type = preg_replace('/s\b/', '', $type);
522
+										printf('<option value="%s">%s</option>', lcfirst(esc_attr($type)), ucfirst(esc_attr($type)));
523 523
 									}
524 524
 
525 525
 								}
@@ -530,18 +530,18 @@  discard block
 block discarded – undo
530 530
 				</div>
531 531
 
532 532
 				<div class="lasso--postsettings__footer">
533
-					<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
533
+					<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
534 534
 					<input type="hidden" name="action" value="process_new-object_post">
535 535
 					<?php
536
-						if ( !empty( $types ) ) {
536
+						if (!empty($types)) {
537 537
 							// get the first element
538 538
 						    $type = reset($types);							
539
-							$type = preg_replace( '/s\b/','', $type );
540
-							printf( '<input type="hidden" name="object" value="%s">', lcfirst( esc_attr( $type ) ) );		
539
+							$type = preg_replace('/s\b/', '', $type);
540
+							printf('<input type="hidden" name="object" value="%s">', lcfirst(esc_attr($type)));		
541 541
 						}
542 542
 					?>
543
-					<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
544
-					<input type="submit" value="<?php esc_attr_e( 'Create', 'lasso' );?>">
543
+					<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
544
+					<input type="submit" value="<?php esc_attr_e('Create', 'lasso'); ?>">
545 545
 				</div>
546 546
 
547 547
 			</form>
@@ -569,18 +569,18 @@  discard block
 block discarded – undo
569 569
 	ob_start();
570 570
 
571 571
 	// post status
572
-	$status = get_post_status( get_the_ID() );
572
+	$status = get_post_status(get_the_ID());
573 573
 
574 574
 	// let users add custom css classes
575
-	$custom_classes = apply_filters( 'lasso_modal_all_post_classes', '' );
575
+	$custom_classes = apply_filters('lasso_modal_all_post_classes', '');
576 576
 
577 577
 	?>
578
-	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" style="max-height:100%">
578
+	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" style="max-height:100%">
579 579
 		<div class="lasso--modal__inner">
580 580
 
581 581
 			<div class="lasso--post-filtering not-visible">
582 582
 				<div class="lasso--search__results">
583
-					<span id="lasso--results-found"></span><?php _e('results found','lasso');?>
583
+					<span id="lasso--results-found"></span><?php _e('results found', 'lasso'); ?>
584 584
 				</div>
585 585
 				<div class="lasso--search">
586 586
 					<i id="lasso--search__toggle" class="dashicons dashicons-search"></i>
@@ -594,18 +594,18 @@  discard block
 block discarded – undo
594 594
 				$post_types = lasso_post_types_names();
595 595
 				$rest_bases = lasso_post_types_rest_base();
596 596
 
597
-				if ( ! empty( $post_types ) ) {
597
+				if (!empty($post_types)) {
598 598
 					$first = 'active';
599
-					foreach( $post_types as $name => $label ) {
599
+					foreach ($post_types as $name => $label) {
600 600
 						if (array_key_exists($name, $rest_bases)) {
601
-							printf( '<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr( $first), esc_attr( $rest_bases[$name] ), esc_attr( $label ) );
601
+							printf('<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr($first), esc_attr($rest_bases[$name]), esc_attr($label));
602 602
 						}
603 603
 						$first = '';
604 604
 					}
605 605
 
606 606
 				}
607 607
 
608
-				do_action('lasso_modal_post_objects');?>
608
+				do_action('lasso_modal_post_objects'); ?>
609 609
 
610 610
 			</ul>
611 611
 			<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
@@ -625,14 +625,14 @@  discard block
 block discarded – undo
625 625
 
626 626
 
627 627
 	// let users add custom css classes
628
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
628
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
629 629
 
630 630
 	?>
631
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
632
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
633
-		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
634
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
635
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
631
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
632
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
633
+		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
634
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
635
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
636 636
 	</ul>
637 637
 
638 638
 	<?php return ob_get_clean();
@@ -644,14 +644,14 @@  discard block
 block discarded – undo
644 644
 
645 645
 
646 646
 	// let users add custom css classes
647
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
647
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
648 648
 
649 649
 	?>
650
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
651
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
652
-		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
653
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
654
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
650
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
651
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
652
+		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
653
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
654
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
655 655
 	</ul>
656 656
 
657 657
 	<?php return ob_get_clean();
@@ -664,16 +664,16 @@  discard block
 block discarded – undo
664 664
  */
665 665
 function lasso_map_form_footer() {
666 666
 
667
-	$nonce = wp_create_nonce( 'lasso-process-map' );
667
+	$nonce = wp_create_nonce('lasso-process-map');
668 668
 
669 669
 	ob_start();
670 670
 
671 671
 	?>
672 672
 	<div class="lasso--map-form__footer">
673
-		<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
674
-		<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
673
+		<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
674
+		<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
675 675
 		<input type="hidden" name="action" value="process_map_save">
676
-		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e( 'Save Locations', 'lasso' );?>">
676
+		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e('Save Locations', 'lasso'); ?>">
677 677
 	</div>
678 678
 
679 679
 	<?php return ob_get_clean();
@@ -691,7 +691,7 @@  discard block
 block discarded – undo
691 691
 
692 692
 	?>
693 693
 	<div id="lasso--pagerefresh" class="visible">
694
-		<?php _e( 'Save this post and refesh the page to see these changes.', 'lasso' );?>
694
+		<?php _e('Save this post and refesh the page to see these changes.', 'lasso'); ?>
695 695
 	</div>
696 696
 
697 697
 	<?php return ob_get_clean();
@@ -705,43 +705,43 @@  discard block
 block discarded – undo
705 705
  */
706 706
 function lasso_editor_options_blob() {
707 707
 
708
-	$codes   = function_exists( 'aesop_shortcodes' ) ? aesop_shortcodes() : apply_filters( 'lasso_custom_options', '' );
709
-	$galleries  = function_exists( 'lasso_editor_galleries_exist' ) && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
708
+	$codes = function_exists('aesop_shortcodes') ? aesop_shortcodes() : apply_filters('lasso_custom_options', '');
709
+	$galleries = function_exists('lasso_editor_galleries_exist') && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
710 710
 
711
-	$nonce = wp_create_nonce( 'lasso_gallery' );
711
+	$nonce = wp_create_nonce('lasso_gallery');
712 712
 
713 713
 	$blob = array();
714 714
 
715
-	if ( empty( $codes ) )
715
+	if (empty($codes))
716 716
 		return;
717 717
 
718
-	foreach ( $codes as $slug => $shortcode ) {
718
+	foreach ($codes as $slug => $shortcode) {
719 719
 		$return = '';
720 720
 		// Shortcode has atts
721 721
 
722
-		if ( count( $shortcode['atts'] ) && $shortcode['atts'] ) {
722
+		if (count($shortcode['atts']) && $shortcode['atts']) {
723 723
 
724
-			foreach ( $shortcode['atts'] as $attr_name => $attr_info ) {
724
+			foreach ($shortcode['atts'] as $attr_name => $attr_info) {
725 725
 
726 726
 
727
-				$prefix = isset( $attr_info['prefix'] ) ? sprintf( '<span class="lasso-option-prefix">%s</span>', $attr_info['prefix'] ) : null;
727
+				$prefix = isset($attr_info['prefix']) ? sprintf('<span class="lasso-option-prefix">%s</span>', $attr_info['prefix']) : null;
728 728
 
729 729
 				$return .= '<form id="lasso--component-settings-form" class="'.$galleries.'" method="post">';
730 730
 				$return .= '<p data-option="'.$attr_name.'" class="lasso-option aesop-'.$slug.'-'.$attr_name.'">';
731
-				$return .= '<label for="aesop-generator-attr-' . $attr_name . '">' . $attr_info['desc'] . '</label>';
731
+				$return .= '<label for="aesop-generator-attr-'.$attr_name.'">'.$attr_info['desc'].'</label>';
732 732
 				$return .= '<small class="lasso-option-desc">'.$attr_info['tip'].'</small>';
733 733
 				// Select
734 734
 
735
-				if ( isset( $attr_info['values'] ) ) {
735
+				if (isset($attr_info['values'])) {
736 736
 
737
-					$return .= '<select name="' . $attr_name . '" id="aesop-generator-attr-' . $attr_name . '" class="lasso-generator-attr">';
737
+					$return .= '<select name="'.$attr_name.'" id="aesop-generator-attr-'.$attr_name.'" class="lasso-generator-attr">';
738 738
 
739
-					$i=0;
739
+					$i = 0;
740 740
 
741
-					foreach ( $attr_info['values'] as $attr_value ) {
741
+					foreach ($attr_info['values'] as $attr_value) {
742 742
 						$attr_value_selected = $attr_info['default'] == $attr_value ? ' selected="selected"' : '';
743 743
 
744
-						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" ' . $attr_value_selected . '>'.$attr_info['values'][$i]['name'].'</option>';
744
+						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" '.$attr_value_selected.'>'.$attr_info['values'][$i]['name'].'</option>';
745 745
 
746 746
 						$i++;
747 747
 					}
@@ -750,24 +750,24 @@  discard block
 block discarded – undo
750 750
 
751 751
 				} else {
752 752
 
753
-					$attr_field_type = isset( $attr_info['type'] ) ? $attr_info['type'] : 'text';
753
+					$attr_field_type = isset($attr_info['type']) ? $attr_info['type'] : 'text';
754 754
 
755 755
 					// image upload
756
-					if ( 'media_upload' == $attr_info['type'] ) {
756
+					if ('media_upload' == $attr_info['type']) {
757 757
 
758
-						$return .= '<input type="' . $attr_field_type . '" name="' . $attr_name . '" value="'.$attr_info['default'].'" id="aesop-generator-attr-' . $attr_name . '" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" />';
758
+						$return .= '<input type="'.$attr_field_type.'" name="'.$attr_name.'" value="'.$attr_info['default'].'" id="aesop-generator-attr-'.$attr_name.'" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" />';
759 759
 						$return .= '<a href="#" id="lasso-upload-img" class="lasso-option-button" /></a>';
760 760
 
761
-					} elseif ( 'color' == $attr_info['type'] ) {
761
+					} elseif ('color' == $attr_info['type']) {
762 762
 
763
-						$return .= '<input type="color" name="' . $attr_name . '" value="'.$attr_info['default'].'" id="aesop-generator-attr-' . $attr_name . '" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" />';
763
+						$return .= '<input type="color" name="'.$attr_name.'" value="'.$attr_info['default'].'" id="aesop-generator-attr-'.$attr_name.'" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" />';
764 764
 
765
-					} elseif ( 'text_area' == $attr_info['type'] ) {
765
+					} elseif ('text_area' == $attr_info['type']) {
766 766
 
767
-						$return .= '<textarea name="' . $attr_name . '" id="aesop-generator-attr-' . $attr_name . '" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" placeholder="'.$attr_info['default'].'" /></textarea>'.$prefix.'';
767
+						$return .= '<textarea name="'.$attr_name.'" id="aesop-generator-attr-'.$attr_name.'" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" placeholder="'.$attr_info['default'].'" /></textarea>'.$prefix.'';
768 768
 
769 769
 					} else {
770
-						$return .= '<input type="' . $attr_field_type . '" name="' . $attr_name . '" value="'.$attr_info['default'].'" id="aesop-generator-attr-' . $attr_name . '" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" />'.$prefix.'';
770
+						$return .= '<input type="'.$attr_field_type.'" name="'.$attr_name.'" value="'.$attr_info['default'].'" id="aesop-generator-attr-'.$attr_name.'" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" />'.$prefix.'';
771 771
 					}
772 772
 				}
773 773
 				$return .= '</p>';
@@ -778,9 +778,9 @@  discard block
 block discarded – undo
778 778
 		///////////////////////////
779 779
 		// START GALLERY AND MAP FRONT END STUFFS
780 780
 		///////////////////////////
781
-		if ( isset( $shortcode['front'] ) && true == $shortcode['front'] ) {
781
+		if (isset($shortcode['front']) && true == $shortcode['front']) {
782 782
 
783
-			if ( 'gallery' == $shortcode['front_type'] ) {
783
+			if ('gallery' == $shortcode['front_type']) {
784 784
 
785 785
 				$return .= lasso_gallery_editor_module();
786 786
 
@@ -791,13 +791,13 @@  discard block
 block discarded – undo
791 791
 		///////////////////////////
792 792
 
793 793
 		// Single shortcode (not closed)
794
-		if ( 'single' == $shortcode['type'] ) {
794
+		if ('single' == $shortcode['type']) {
795 795
 
796 796
 			$return .= '<input type="hidden" name="lasso-generator-content" id="lasso-generator-content" value="false" />';
797 797
 
798 798
 		} else {
799 799
 
800
-			$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>';
800
+			$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>';
801 801
 		}
802 802
 
803 803
 		$return .= '<p class="lasso-buttoninsert-wrap"><a href="#" class="lasso-generator-cancel" id="lasso--sidebar__close">Cancel
@@ -834,14 +834,14 @@  discard block
 block discarded – undo
834 834
 				<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
835 835
 				<div id="lasso--hide" style="display:none;" class="lasso--post-form">
836 836
 					<i class="lasso-icon lasso-icon-move"></i>
837
-					<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>
837
+					<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>
838 838
 					<div class="lasso--slider_wrap">
839 839
 						<div id="lasso--slider"></div>
840 840
 					</div>
841 841
 					<ul id="lasso--revision-list"></ul>
842 842
 					<div class="lasso--btn-group lasso--btn-group-small">
843
-						<a href="#" class="lasso--btn-secondary" id="lasso--close-modal"><?php _e( 'Cancel', 'lasso' );?></a>
844
-						<a href="#" class="lasso--btn-primary" id="lasso--select-revision"><?php _e( 'Select', 'lasso' );?></a>
843
+						<a href="#" class="lasso--btn-secondary" id="lasso--close-modal"><?php _e('Cancel', 'lasso'); ?></a>
844
+						<a href="#" class="lasso--btn-primary" id="lasso--select-revision"><?php _e('Select', 'lasso'); ?></a>
845 845
 					</div>
846 846
 				</div>
847 847
 
Please login to merge, or discard this patch.
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -188,8 +188,11 @@  discard block
 block discarded – undo
188 188
 						<?php if ( class_exists ('Aesop_Events') ) { ?>
189 189
 						     <li data-type="events" title="<?php esc_attr_e( 'Event', 'lasso' );?>"  class="lasso-toolbar--component__event"></li>
190 190
 						<?php }?>
191
-					<?php else: ?>
192
-						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );?>" class="image lasso-toolbar--component__image"></li>
191
+					<?php else {
192
+	: ?>
193
+						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );
194
+}
195
+?>" class="image lasso-toolbar--component__image"></li>
193 196
 						<li data-type="wpquote" title="<?php esc_attr_e( 'WordPress Quote', 'lasso' );?>" class="quote lasso-toolbar--component__quote"></li>
194 197
 						<!--li data-type="wpvideo" title="<?php esc_attr_e( 'WordPress Video', 'lasso' );?>" class="video lasso-toolbar--component__video"></li-->
195 198
 					<?php endif; ?>
@@ -712,8 +715,9 @@  discard block
 block discarded – undo
712 715
 
713 716
 	$blob = array();
714 717
 
715
-	if ( empty( $codes ) )
716
-		return;
718
+	if ( empty( $codes ) ) {
719
+			return;
720
+	}
717 721
 
718 722
 	foreach ( $codes as $slug => $shortcode ) {
719 723
 		$return = '';
Please login to merge, or discard this patch.