Completed
Push — master ( 45be7a...c97e2a )
by
unknown
01:52
created
public/includes/editor-modules.php 1 patch
Spacing   +235 added lines, -235 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';
@@ -49,44 +49,44 @@  discard block
 block discarded – undo
49 49
 		$mobile_style = $is_mobile ? 'style="bottom:0px;"' : null;
50 50
 		
51 51
 
52
-		?><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
+		?><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(); ?>" >
53 53
 
54
-			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class;?> "  <?php echo $mobile_style ?> >
54
+			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class; ?> "  <?php echo $mobile_style ?> >
55 55
 
56
-				<?php do_action( 'lasso_editor_controls_before' );
56
+				<?php do_action('lasso_editor_controls_before');
57 57
 
58
-				if ( $is_capable ) { ?>
58
+				if ($is_capable) { ?>
59 59
 
60
-					<li id="lasso--edit" title="<?php esc_attr_e( 'Edit Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
60
+					<li id="lasso--edit" title="<?php esc_attr_e('Edit Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
61 61
 
62
-					<?php if ( 'off' == $post_settings_disabled || empty( $post_settings_disabled ) ) { ?>
63
-						<li id="lasso--post-settings" title="<?php esc_attr_e( 'Post Settings', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
62
+					<?php if ('off' == $post_settings_disabled || empty($post_settings_disabled)) { ?>
63
+						<li id="lasso--post-settings" title="<?php esc_attr_e('Post Settings', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
64 64
 					<?php }
65 65
 
66 66
 				} ?>
67 67
 
68
-				<li id="lasso--post-all" title="<?php esc_attr_e( 'All Posts', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
68
+				<li id="lasso--post-all" title="<?php esc_attr_e('All Posts', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
69 69
 
70
-				<?php if ( $is_capable && wp_revisions_enabled( $post ) ) { ?>
71
-					<li id="lasso--post-revisions" title="<?php esc_attr_e( 'Revisions', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
70
+				<?php if ($is_capable && wp_revisions_enabled($post)) { ?>
71
+					<li id="lasso--post-revisions" title="<?php esc_attr_e('Revisions', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
72 72
 				<?php } ?>
73 73
 
74
-				<?php if ( ( 'off' == $post_new_disabled || empty( $post_new_disabled ) && lasso_user_can('publish_posts') ) ) { ?>
75
-					<li id="lasso--post-new" title="<?php esc_attr_e( 'Add Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
74
+				<?php if (('off' == $post_new_disabled || empty($post_new_disabled) && lasso_user_can('publish_posts'))) { ?>
75
+					<li id="lasso--post-new" title="<?php esc_attr_e('Add Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
76 76
 				<?php } ?>
77 77
 
78
-				<?php do_action( 'lasso_editor_controls_after' );?>
78
+				<?php do_action('lasso_editor_controls_after'); ?>
79 79
 
80 80
 			</ul>
81 81
 
82
-			<?php if ( is_singular() && !$is_mobile ) { ?>
82
+			<?php if (is_singular() && !$is_mobile) { ?>
83 83
 
84
-				<div class="lasso--controls__right" data-posttype="<?php echo get_post_type( get_the_ID() );?>" data-status="<?php echo $status;?>">
84
+				<div class="lasso--controls__right" data-posttype="<?php echo get_post_type(get_the_ID()); ?>" data-status="<?php echo $status; ?>">
85 85
 
86
-					<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
+					<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>
87 87
 
88
-					<?php if ( 'draft' == $status && ( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') )  ) { ?>
89
-						<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
+					<?php if ('draft' == $status && (lasso_user_can('publish_posts') || lasso_user_can('publish_pages'))) { ?>
89
+						<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>
90 90
 					<?php } ?>
91 91
 
92 92
 				</div>
@@ -109,13 +109,13 @@  discard block
 block discarded – undo
109 109
 
110 110
 	ob_start();
111 111
 
112
-	if ( !lasso_user_can() )
112
+	if (!lasso_user_can())
113 113
 		return;
114 114
 
115 115
 	// let users add custom css classes
116
-	$custom_classes = apply_filters( 'lasso_sidebar_classes', '' );
116
+	$custom_classes = apply_filters('lasso_sidebar_classes', '');
117 117
 	?>
118
-	<div id="lasso--sidebar" class="<?php echo sanitize_html_class( $custom_classes );?>" >
118
+	<div id="lasso--sidebar" class="<?php echo sanitize_html_class($custom_classes); ?>" >
119 119
 		<div class="lasso--sidebar__inner">
120 120
 			<div id="lasso--component__settings"></div>
121 121
 		</div>
@@ -133,26 +133,26 @@  discard block
 block discarded – undo
133 133
 
134 134
 	ob_start();
135 135
 
136
-	if ( !lasso_user_can() )
136
+	if (!lasso_user_can())
137 137
 		return;
138 138
 	
139 139
 	$is_mobile = wp_is_mobile();
140 140
 
141 141
 	// check for lasso story engine and add a class doniting this
142
-	$ase_status = class_exists( 'Aesop_Core' ) || defined( 'LASSO_CUSTOM' ) ? 'ase-active' : 'ase-not-active';
142
+	$ase_status = class_exists('Aesop_Core') || defined('LASSO_CUSTOM') ? 'ase-active' : 'ase-not-active';
143 143
 
144 144
 	// let users add custom css classes
145
-	$custom_classes = apply_filters( 'lasso_toolbar_classes', '' );
145
+	$custom_classes = apply_filters('lasso_toolbar_classes', '');
146 146
 
147 147
 	// are toolbar headings enabled
148
-	$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
149
-	$toolbar_headings_h4      = lasso_editor_get_option( 'toolbar_headings_h4', 'lasso_editor' );
148
+	$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
149
+	$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
150 150
 
151
-	$toolbar_class  = $toolbar_headings ? 'toolbar-extended' : false;
151
+	$toolbar_class = $toolbar_headings ? 'toolbar-extended' : false;
152 152
 	
153 153
 	// mobile styles
154 154
     $mobile_class = $is_mobile ? 'lasso-mobile' : false;
155
-	$mobile_style =$is_mobile ? 'style="bottom:0px;"' : null;
155
+	$mobile_style = $is_mobile ? 'style="bottom:0px;"' : null;
156 156
 	
157 157
 	//show color
158 158
 	$show_color = lasso_editor_get_option('toolbar_show_color', 'lasso_editor');
@@ -160,109 +160,109 @@  discard block
 block discarded – undo
160 160
 	//show alignment
161 161
 	$show_align = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor');
162 162
 	
163
-	$status = get_post_status( get_the_ID() );
163
+	$status = get_post_status(get_the_ID());
164 164
 
165 165
 
166 166
 	?>
167
-	<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 ?>>
168
-		<ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"';}?>>
169
-			<?php do_action( 'lasso_toolbar_components_before' );?>
170
-		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e( 'Bold', 'lasso' );?>"></li>
171
-		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e( 'Underline', 'lasso' );?>"></li>
172
-		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e( 'Italicize', 'lasso' );?>"></li>
173
-		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e( 'Strikethrough', 'lasso' );?>"></li>
174
-			<li id="lasso-toolbar--components" title="<?php esc_attr_e( 'Insert Component', 'lasso' );?>" style="color:#ffffa0;">
167
+	<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 ?>>
168
+		<ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"'; }?>>
169
+			<?php do_action('lasso_toolbar_components_before'); ?>
170
+		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e('Bold', 'lasso'); ?>"></li>
171
+		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e('Underline', 'lasso'); ?>"></li>
172
+		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e('Italicize', 'lasso'); ?>"></li>
173
+		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e('Strikethrough', 'lasso'); ?>"></li>
174
+			<li id="lasso-toolbar--components" title="<?php esc_attr_e('Insert Component', 'lasso'); ?>" style="color:#ffffa0;">
175 175
 			    <ul id="lasso-toolbar--components__list" style="display:none;color:white;">
176
-			    	<?php if ( 'ase-active' == $ase_status ): ?>
177
-						<li data-type="image" title="<?php esc_attr_e( 'Image', 'lasso' );?>" class="lasso-toolbar--component__image"></li>
178
-						<li data-type="character" title="<?php esc_attr_e( 'Character', 'lasso' );?>" class="lasso-toolbar--component__character"></li>
179
-						<li data-type="quote" title="<?php esc_attr_e( 'Quote', 'lasso' );?>"  class="lasso-toolbar--component__quote"></li>
180
-						<li data-type="content" title="<?php esc_attr_e( 'Content', 'lasso' );?>"  class="lasso-toolbar--component__content"></li>
181
-						<li data-type="chapter" title="<?php esc_attr_e( 'Chapter', 'lasso' );?>"  class="lasso-toolbar--component__chapter"></li>
182
-						<li data-type="parallax" title="<?php esc_attr_e( 'Parallax', 'lasso' );?>"  class="lasso-toolbar--component__parallax"></li>
183
-						<li data-type="audio" title="<?php esc_attr_e( 'Audio', 'lasso' );?>"  class="lasso-toolbar--component__audio"></li>
184
-						<li data-type="video" title="<?php esc_attr_e( 'Video', 'lasso' );?>"  class="lasso-toolbar--component__video"></li>
185
-						<li data-type="map" title="<?php esc_attr_e( 'Map', 'lasso' );?>"  class="lasso-toolbar--component__map"></li>
186
-						<li data-type="timeline_stop" title="<?php esc_attr_e( 'Timeline', 'lasso' );?>"  class="lasso-toolbar--component__timeline"></li>
187
-						<li data-type="document" title="<?php esc_attr_e( 'Document', 'lasso' );?>"  class="lasso-toolbar--component__document"></li>
188
-						<li data-type="collection" title="<?php esc_attr_e( 'Collection', 'lasso' );?>"  class="lasso-toolbar--component__collection"></li>
189
-						<li data-type="gallery" title="<?php esc_attr_e( 'Gallery', 'lasso' );?>"  class="lasso-toolbar--component__gallery"></li>
190
-						<?php if ( class_exists ('Aesop_GalleryPop') ) { ?>
191
-						     <li data-type="gallery" title="<?php esc_attr_e( 'Gallery Pop', 'lasso' );?>"  class="lasso-toolbar--component__gallerypop"></li>
176
+			    	<?php if ('ase-active' == $ase_status): ?>
177
+						<li data-type="image" title="<?php esc_attr_e('Image', 'lasso'); ?>" class="lasso-toolbar--component__image"></li>
178
+						<li data-type="character" title="<?php esc_attr_e('Character', 'lasso'); ?>" class="lasso-toolbar--component__character"></li>
179
+						<li data-type="quote" title="<?php esc_attr_e('Quote', 'lasso'); ?>"  class="lasso-toolbar--component__quote"></li>
180
+						<li data-type="content" title="<?php esc_attr_e('Content', 'lasso'); ?>"  class="lasso-toolbar--component__content"></li>
181
+						<li data-type="chapter" title="<?php esc_attr_e('Chapter', 'lasso'); ?>"  class="lasso-toolbar--component__chapter"></li>
182
+						<li data-type="parallax" title="<?php esc_attr_e('Parallax', 'lasso'); ?>"  class="lasso-toolbar--component__parallax"></li>
183
+						<li data-type="audio" title="<?php esc_attr_e('Audio', 'lasso'); ?>"  class="lasso-toolbar--component__audio"></li>
184
+						<li data-type="video" title="<?php esc_attr_e('Video', 'lasso'); ?>"  class="lasso-toolbar--component__video"></li>
185
+						<li data-type="map" title="<?php esc_attr_e('Map', 'lasso'); ?>"  class="lasso-toolbar--component__map"></li>
186
+						<li data-type="timeline_stop" title="<?php esc_attr_e('Timeline', 'lasso'); ?>"  class="lasso-toolbar--component__timeline"></li>
187
+						<li data-type="document" title="<?php esc_attr_e('Document', 'lasso'); ?>"  class="lasso-toolbar--component__document"></li>
188
+						<li data-type="collection" title="<?php esc_attr_e('Collection', 'lasso'); ?>"  class="lasso-toolbar--component__collection"></li>
189
+						<li data-type="gallery" title="<?php esc_attr_e('Gallery', 'lasso'); ?>"  class="lasso-toolbar--component__gallery"></li>
190
+						<?php if (class_exists('Aesop_GalleryPop')) { ?>
191
+						     <li data-type="gallery" title="<?php esc_attr_e('Gallery Pop', 'lasso'); ?>"  class="lasso-toolbar--component__gallerypop"></li>
192 192
 						<?php }?>
193
-						<?php if ( class_exists ('Aesop_Events') ) { ?>
194
-						     <li data-type="events" title="<?php esc_attr_e( 'Event', 'lasso' );?>"  class="lasso-toolbar--component__event"></li>
193
+						<?php if (class_exists('Aesop_Events')) { ?>
194
+						     <li data-type="events" title="<?php esc_attr_e('Event', 'lasso'); ?>"  class="lasso-toolbar--component__event"></li>
195 195
 						<?php }?>
196 196
 					<?php else: ?>
197
-						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );?>" class="image lasso-toolbar--component__image"></li>
198
-						<li data-type="wpquote" title="<?php esc_attr_e( 'WordPress Quote', 'lasso' );?>" class="quote lasso-toolbar--component__quote"></li>
199
-						<!--li data-type="wpvideo" title="<?php esc_attr_e( 'WordPress Video', 'lasso' );?>" class="video lasso-toolbar--component__video"></li-->
197
+						<li data-type="wpimg" title="<?php esc_attr_e('WordPress Image', 'lasso'); ?>" class="image lasso-toolbar--component__image"></li>
198
+						<li data-type="wpquote" title="<?php esc_attr_e('WordPress Quote', 'lasso'); ?>" class="quote lasso-toolbar--component__quote"></li>
199
+						<!--li data-type="wpvideo" title="<?php esc_attr_e('WordPress Video', 'lasso'); ?>" class="video lasso-toolbar--component__video"></li-->
200 200
 					<?php endif; ?>
201
-					<?php do_action( 'lasso_toolbar_components' );?>
201
+					<?php do_action('lasso_toolbar_components'); ?>
202 202
 			    </ul>
203 203
 			</li>
204
-		    <?php if ( $toolbar_headings ): ?>
205
-		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>"></li>
206
-		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>"></li>
204
+		    <?php if ($toolbar_headings): ?>
205
+		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>"></li>
206
+		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>"></li>
207 207
 			<?php endif; ?>
208
-			<?php if ( $toolbar_headings_h4 ): ?>
209
-		    <li id="lasso-toolbar--h4" title="<?php esc_attr_e( 'H4 Heading', 'lasso' );?>"></li>
210
-		    <li id="lasso-toolbar--h5" title="<?php esc_attr_e( 'H5 Heading', 'lasso' );?>"></li>
211
-			<li id="lasso-toolbar--h6" title="<?php esc_attr_e( 'H6 Heading', 'lasso' );?>"></li>
208
+			<?php if ($toolbar_headings_h4): ?>
209
+		    <li id="lasso-toolbar--h4" title="<?php esc_attr_e('H4 Heading', 'lasso'); ?>"></li>
210
+		    <li id="lasso-toolbar--h5" title="<?php esc_attr_e('H5 Heading', 'lasso'); ?>"></li>
211
+			<li id="lasso-toolbar--h6" title="<?php esc_attr_e('H6 Heading', 'lasso'); ?>"></li>
212 212
 			<?php endif; ?>
213 213
 			
214
-			<?php if ( $show_color ): ?>
215
-		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e( 'Set Color for Selected Text', 'lasso' );?>"></li>
216
-		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e( 'Choose Color', 'lasso' );?>"></li>
214
+			<?php if ($show_color): ?>
215
+		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e('Set Color for Selected Text', 'lasso'); ?>"></li>
216
+		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e('Choose Color', 'lasso'); ?>"></li>
217 217
 			<?php endif; ?>
218 218
 					
219 219
 		    
220
-			<li id="lasso-toolbar--link" title="<?php esc_attr_e( 'Anchor Link', 'lasso' );?>">
220
+			<li id="lasso-toolbar--link" title="<?php esc_attr_e('Anchor Link', 'lasso'); ?>">
221 221
 		    	<div id="lasso-toolbar--link__wrap" <?php echo $mobile_style ?> >
222
-		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'http://url.com', 'lasso' );?>"></div>
223
-		    		<a href="#" title="<?php esc_attr_e( 'Create Link', 'lasso' );?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
222
+		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e('http://url.com', 'lasso'); ?>"></div>
223
+		    		<a href="#" title="<?php esc_attr_e('Create Link', 'lasso'); ?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
224 224
 					<input class="styled-checkbox" type="checkbox" id="aesop-toolbar--link_newtab" checked/>
225
-                    <label for="aesop-toolbar--link_newtab"><?php esc_attr_e( 'Open in a New Tab', 'lasso' );?></label>
225
+                    <label for="aesop-toolbar--link_newtab"><?php esc_attr_e('Open in a New Tab', 'lasso'); ?></label>
226 226
 		    	</div>
227 227
 		    </li>
228
-		    <?php do_action( 'lasso_toolbar_components_after' );?>
229
-		    <li id="lasso-toolbar--html" title="<?php esc_attr_e( 'Insert HTML or Code', 'lasso' );?>">
228
+		    <?php do_action('lasso_toolbar_components_after'); ?>
229
+		    <li id="lasso-toolbar--html" title="<?php esc_attr_e('Insert HTML or Code', 'lasso'); ?>">
230 230
 		    	<div id="lasso-toolbar--html__wrap" <?php echo $mobile_style ?>>
231
-		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?>"></div>
231
+		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?>"></div>
232 232
 		    		<div id="lasso-toolbar--html__footer">
233 233
 					<div id="lasso-toolbar--html__footer_desc" >
234
-					<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?><br>
235
-					<?php esc_attr_e( 'You can also use Shortcodes', 'lasso' );?><br>
236
-					<?php esc_attr_e( 'You can also enter a URL to embed, such as Youtube, Vimeo and Twitter URLs.', 'lasso' );?>
234
+					<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?><br>
235
+					<?php esc_attr_e('You can also use Shortcodes', 'lasso'); ?><br>
236
+					<?php esc_attr_e('You can also enter a URL to embed, such as Youtube, Vimeo and Twitter URLs.', 'lasso'); ?>
237 237
 					</div>
238 238
 		    			<ul class="lasso-toolbar--html-snips">
239 239
 						
240
-		    				<?php if ( !$toolbar_headings ): ?>
241
-		    				<li id="lasso-html--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>">
242
-		    				<li id="lasso-html--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>">
240
+		    				<?php if (!$toolbar_headings): ?>
241
+		    				<li id="lasso-html--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>">
242
+		    				<li id="lasso-html--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>">
243 243
 		    				<?php endif; ?>
244
-		    				<li id="lasso-html--ul" title="<?php esc_attr_e( 'Unordered List', 'lasso' );?>">
245
-		    				<li id="lasso-html--ol" title="<?php esc_attr_e( 'Ordered List', 'lasso' );?>">
244
+		    				<li id="lasso-html--ul" title="<?php esc_attr_e('Unordered List', 'lasso'); ?>">
245
+		    				<li id="lasso-html--ol" title="<?php esc_attr_e('Ordered List', 'lasso'); ?>">
246 246
 		    			</ul>
247
-		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e( 'Cancel', 'lasso' );?></a>
248
-		    			<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>
247
+		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e('Cancel', 'lasso'); ?></a>
248
+		    			<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>
249 249
 		    		</div>
250 250
 		    	</div>
251 251
 		    </li>
252
-			<?php if ( $show_align ): ?>
253
-		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e( 'Text Left Align', 'lasso' );?>"></li>
254
-		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e( 'Text Center Align', 'lasso' );?>"></li>
255
-			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e( 'Text Right Align', 'lasso' );?>"></li>
252
+			<?php if ($show_align): ?>
253
+		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e('Text Left Align', 'lasso'); ?>"></li>
254
+		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e('Text Center Align', 'lasso'); ?>"></li>
255
+			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e('Text Right Align', 'lasso'); ?>"></li>
256 256
 			<?php endif; ?>
257 257
 		</ul>
258
-		<?php if ( is_singular() && $is_mobile ) { ?>
258
+		<?php if (is_singular() && $is_mobile) { ?>
259 259
 
260
-				<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;">
260
+				<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;">
261 261
 
262
-					<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>
262
+					<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>
263 263
 
264
-					<?php if ( 'draft' == $status && ( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') )  ) { ?>
265
-						<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>
264
+					<?php if ('draft' == $status && (lasso_user_can('publish_posts') || lasso_user_can('publish_pages'))) { ?>
265
+						<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>
266 266
 					<?php } ?>
267 267
 
268 268
 				</div>
@@ -280,22 +280,22 @@  discard block
 block discarded – undo
280 280
  */
281 281
 function lasso_editor_settings_toolbar() {
282 282
 
283
-	$delete_nonce = wp_create_nonce( 'lasso-delete-nonce' );
283
+	$delete_nonce = wp_create_nonce('lasso-delete-nonce');
284 284
 
285 285
 	ob_start();
286 286
 
287
-	if ( !lasso_user_can() )
287
+	if (!lasso_user_can())
288 288
 		return;
289 289
 
290 290
 	// let users add custom css classes
291
-	$custom_classes = apply_filters( 'lasso_component_classes', '' );
291
+	$custom_classes = apply_filters('lasso_component_classes', '');
292 292
 
293 293
 	?>
294
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
295
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
296
-		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
297
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
298
-		<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>
294
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
295
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
296
+		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
297
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
298
+		<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>
299 299
 	</ul>
300 300
 
301 301
 	<?php return ob_get_clean();
@@ -311,17 +311,17 @@  discard block
 block discarded – undo
311 311
 
312 312
 	ob_start();
313 313
 
314
-	if ( !lasso_user_can() )
314
+	if (!lasso_user_can())
315 315
 		return;
316 316
 
317 317
 	// has post thumbnail
318
-	$has_thumbnail = has_post_thumbnail( get_the_ID() ) ? 'class="lasso--featImg--has-thumb"' : false;
318
+	$has_thumbnail = has_post_thumbnail(get_the_ID()) ? 'class="lasso--featImg--has-thumb"' : false;
319 319
 
320 320
 	?>
321
-	<ul id="lasso--featImgControls" <?php echo $has_thumbnail;?>>
322
-		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e( 'Replace Image', 'lasso' );?>" href="#"><i class="lasso-icon-image"></i></a></li>
323
-		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e( 'Delete Image', 'lasso' );?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
324
-		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e( 'save', 'lasso' );?></a></li>
321
+	<ul id="lasso--featImgControls" <?php echo $has_thumbnail; ?>>
322
+		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e('Replace Image', 'lasso'); ?>" href="#"><i class="lasso-icon-image"></i></a></li>
323
+		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e('Delete Image', 'lasso'); ?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
324
+		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e('save', 'lasso'); ?></a></li>
325 325
 	</ul>
326 326
 
327 327
 	<?php return ob_get_clean();
@@ -340,58 +340,58 @@  discard block
 block discarded – undo
340 340
 
341 341
 	ob_start();
342 342
 
343
-	if ( !lasso_user_can() )
343
+	if (!lasso_user_can())
344 344
 		return;
345 345
 
346 346
 	global $post;
347 347
 
348 348
 	$postid = get_the_ID();
349 349
 
350
-	$status = get_post_status( $postid );
351
-	$nonce = wp_create_nonce( 'lasso-update-post-settings' );
350
+	$status = get_post_status($postid);
351
+	$nonce = wp_create_nonce('lasso-update-post-settings');
352 352
 
353 353
 	// let users add custom css classes
354
-	$custom_classes = apply_filters( 'lasso_modal_settings_classes', '' );
354
+	$custom_classes = apply_filters('lasso_modal_settings_classes', '');
355 355
 
356 356
 	// objects categories
357
-	$categories 		= lasso_get_post_objects( $postid, 'category' );
358
-	$tags 				= lasso_get_post_objects( $postid, 'tag' );
357
+	$categories = lasso_get_post_objects($postid, 'category');
358
+	$tags = lasso_get_post_objects($postid, 'tag');
359 359
 
360 360
 	// modal tabs
361
-	$tabs  				= lasso_modal_addons('tab');
362
-	$content 			= lasso_modal_addons('content');
361
+	$tabs = lasso_modal_addons('tab');
362
+	$content = lasso_modal_addons('content');
363 363
 	
364 364
 	//editor options
365 365
 	$allow_change_date = lasso_editor_get_option('allow_change_date', 'lasso_editor');
366 366
 
367 367
 	// are we singular
368
-	$is_singular 		= is_singular();
368
+	$is_singular = is_singular();
369 369
 	$is_singular_class 	= $is_singular ? 'lasso--postsettings__2col' : 'lasso--postsettings__1col';
370 370
 	$has_thumb_class    = has_post_thumbnail() ? 'has-thumbnail' : 'no-thumbnail';
371 371
 	$theme_supports     = current_theme_supports('post-thumbnails');
372
-	$default_image 		= LASSO_URL.'/admin/assets/img/empty-img.png';
372
+	$default_image = LASSO_URL.'/admin/assets/img/empty-img.png';
373 373
 
374 374
 ?>
375
-	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>">
375
+	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>">
376 376
 		<div class="lasso--modal__inner">
377 377
 
378
-			<?php if( $tabs ) { echo $tabs; } ?>
378
+			<?php if ($tabs) { echo $tabs; } ?>
379 379
 
380 380
 			<div class="lasso--modal__content modal__content--core visible" data-addon-content="core">
381
-				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class;?>" >
381
+				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class; ?>" >
382 382
 
383
-					<?php if ( $is_singular && $theme_supports ) : ?>
383
+					<?php if ($is_singular && $theme_supports) : ?>
384 384
 					<div class="lasso--postsettings__left">
385
-						<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>
386
-						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url( $default_image );?>">
385
+						<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>
386
+						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url($default_image); ?>">
387 387
 
388 388
 							<div id="lasso--post-thumb__controls" class="lasso--post-thumb__controls">
389
-								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image','lasso');?>" class="dashicons dashicons-edit"></i>
390
-								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image','lasso');?>" class="dashicons dashicons-no-alt"></i>
389
+								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image', 'lasso'); ?>" class="dashicons dashicons-edit"></i>
390
+								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image', 'lasso'); ?>" class="dashicons dashicons-no-alt"></i>
391 391
 								<i id="lasso--save-status" class="lasso-icon lasso-icon-spinner6 not-visible"></i>
392 392
 							</div>
393 393
 
394
-							<?php echo has_post_thumbnail() ? get_the_post_thumbnail( $post->ID, 'medium' ) : '<img src="'.$default_image.'">'; ?>
394
+							<?php echo has_post_thumbnail() ? get_the_post_thumbnail($post->ID, 'medium') : '<img src="'.$default_image.'">'; ?>
395 395
 
396 396
 						</div>
397 397
 						<div id="lasso--featImgSave"><a href="#" class="not-visible">Save</a></div>
@@ -401,12 +401,12 @@  discard block
 block discarded – undo
401 401
 
402 402
 					<div class="lasso--postsettings__right">
403 403
 
404
-						<?php if( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') ): ?>
404
+						<?php if (lasso_user_can('publish_posts') || lasso_user_can('publish_pages')): ?>
405 405
 						<div class="lasso--postsettings__option story-status-option">
406
-							<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>
407
-							<ul class="story-status story-status-<?php echo sanitize_html_class( $status );?>">
408
-								<li id="lasso--status-draft"><?php _e( 'Draft', 'lasso' );?></li>
409
-								<li id="lasso--status-publish"><?php _e( 'Publish', 'lasso' );?></li>
406
+							<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>
407
+							<ul class="story-status story-status-<?php echo sanitize_html_class($status); ?>">
408
+								<li id="lasso--status-draft"><?php _e('Draft', 'lasso'); ?></li>
409
+								<li id="lasso--status-publish"><?php _e('Publish', 'lasso'); ?></li>
410 410
 							</ul>
411 411
 							<div class="lasso--slider_wrap">
412 412
 								<div id="lasso--slider"></div>
@@ -414,10 +414,10 @@  discard block
 block discarded – undo
414 414
 						</div>
415 415
 						<?php endif; ?>
416 416
 
417
-						<?php if ( 'publish' == $status ): ?>
417
+						<?php if ('publish' == $status): ?>
418 418
 						<div class="lasso--postsettings__option story-slug-option">
419
-							<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>
420
-							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset( $post ) ? esc_attr( $post->post_name ) : false;?>">
419
+							<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>
420
+							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset($post) ? esc_attr($post->post_name) : false; ?>">
421 421
 						</div>
422 422
 						<?php endif; ?>
423 423
 
@@ -426,20 +426,20 @@  discard block
 block discarded – undo
426 426
 					<div class="lasso--postsettings__middle">
427 427
 
428 428
 						<div class="lasso--postsettings__option story-categories-option">
429
-							<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>
430
-							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories;?>">
429
+							<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>
430
+							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories; ?>">
431 431
 						</div>
432 432
 
433 433
 						<div class="lasso--postsettings__option story-tags-option">
434
-							<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>
435
-							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags;?>">
434
+							<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>
435
+							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags; ?>">
436 436
 						</div>
437 437
 						<?php 
438 438
 						if ($allow_change_date) { 
439
-						    $dateformat = get_option( 'date_format' ); 
439
+						    $dateformat = get_option('date_format'); 
440 440
 						?>
441
-						    <label><?php _e( 'Post Date', 'lasso' ); ?></label>
442
-							<input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid);?>"/>
441
+						    <label><?php _e('Post Date', 'lasso'); ?></label>
442
+							<input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid); ?>"/>
443 443
 						<?php
444 444
 						}?>
445 445
 
@@ -461,23 +461,23 @@  discard block
 block discarded – undo
461 461
 					?>
462 462
 					<!--/div-->
463 463
 
464
-					<?php do_action( 'lasso_modal_post_form' ); // action ?>
464
+					<?php do_action('lasso_modal_post_form'); // action ?>
465 465
 
466 466
 					<div class="lasso--postsettings__footer" >
467
-						<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
467
+						<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
468 468
 						<input type="hidden" name="status" value="">
469 469
 						<input type="hidden" name="categories" value="">
470
-						<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
470
+						<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
471 471
 						<input type="hidden" name="action" value="process_update-object_post">
472
-						<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
473
-						<?php do_action( 'lasso_modal_post_form_footer' ); // action ?>
474
-						<input type="submit" value="<?php esc_attr_e( 'Save', 'lasso' );?>">
472
+						<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
473
+						<?php do_action('lasso_modal_post_form_footer'); // action ?>
474
+						<input type="submit" value="<?php esc_attr_e('Save', 'lasso'); ?>">
475 475
 					</div>
476 476
 
477 477
 				</form>
478 478
 			</div>
479 479
 
480
-			<?php if( $tabs ) { echo $content; } ?>
480
+			<?php if ($tabs) { echo $content; } ?>
481 481
 
482 482
 		</div>
483 483
 
@@ -498,41 +498,41 @@  discard block
 block discarded – undo
498 498
 
499 499
 	ob_start();
500 500
 
501
-	if ( !lasso_user_can('edit_posts') )
501
+	if (!lasso_user_can('edit_posts'))
502 502
 		return;
503 503
 
504
-	$status = get_post_status( get_the_ID() );
504
+	$status = get_post_status(get_the_ID());
505 505
 
506
-	$nonce = wp_create_nonce( 'lasso-editor-new-post' );
506
+	$nonce = wp_create_nonce('lasso-editor-new-post');
507 507
 
508 508
 	// let users add custom css classes
509
-	$custom_classes = apply_filters( 'lasso_modal_post_classes', '' );
509
+	$custom_classes = apply_filters('lasso_modal_post_classes', '');
510 510
 
511 511
 	// return the post type
512
-	$type = get_post_type( get_the_ID() );
512
+	$type = get_post_type(get_the_ID());
513 513
 
514 514
 	$mobile_style = "";
515 515
 	if (wp_is_mobile()) {
516 516
 		$mobile_style = 'style="top:140px !important;"';
517 517
 	}
518 518
 	?>
519
-	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" <?php echo $mobile_style;?>">
519
+	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" <?php echo $mobile_style; ?>">
520 520
 		<div class="lasso--modal__inner lasso--hasnewform">
521 521
 
522 522
 			<form id="lasso--postnew__form" enctype="multipart/form-data" class="lasso--post-form">
523 523
 
524 524
 				<div class="lasso--postsettings__option story-slug-option lasso--last-option">
525
-					<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>
526
-					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e( 'Grump Wizards Make Toxic Brew', 'lasso' );?>">
525
+					<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>
526
+					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e('Grump Wizards Make Toxic Brew', 'lasso'); ?>">
527 527
 						<div class="lasso--select-wrap" style="width:90px">
528 528
 						<select id="lasso--select-type" name="story_type">
529 529
 
530 530
 							<?php
531 531
 								$types = lasso_post_types();
532
-								if ( !empty( $types ) ) {
533
-									foreach( $types as $type ) {					
534
-										$type = preg_replace( '/s\b/','', $type );
535
-										printf( '<option value="%s">%s</option>', lcfirst( esc_attr( $type ) ) , ucfirst( esc_attr( $type ) ) );
532
+								if (!empty($types)) {
533
+									foreach ($types as $type) {					
534
+										$type = preg_replace('/s\b/', '', $type);
535
+										printf('<option value="%s">%s</option>', lcfirst(esc_attr($type)), ucfirst(esc_attr($type)));
536 536
 									}
537 537
 
538 538
 								}
@@ -542,19 +542,19 @@  discard block
 block discarded – undo
542 542
 					</div>
543 543
 				</div>
544 544
 
545
-				<div class="lasso--postsettings__footer" style="<?php if (!wp_is_mobile()) {echo 'display:none;';} ?>">
546
-					<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
545
+				<div class="lasso--postsettings__footer" style="<?php if (!wp_is_mobile()) {echo 'display:none;'; } ?>">
546
+					<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
547 547
 					<input type="hidden" name="action" value="process_new-object_post">
548 548
 					<?php
549
-						if ( !empty( $types ) ) {
549
+						if (!empty($types)) {
550 550
 							// get the first element
551 551
 						    $type = reset($types);							
552
-							$type = preg_replace( '/s\b/','', $type );
553
-							printf( '<input type="hidden" name="object" value="%s">', lcfirst( esc_attr( $type ) ) );		
552
+							$type = preg_replace('/s\b/', '', $type);
553
+							printf('<input type="hidden" name="object" value="%s">', lcfirst(esc_attr($type)));		
554 554
 						}
555 555
 					?>
556
-					<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
557
-					<input type="submit" value="<?php esc_attr_e( 'Create', 'lasso' );?>">
556
+					<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
557
+					<input type="submit" value="<?php esc_attr_e('Create', 'lasso'); ?>">
558 558
 				</div>
559 559
 
560 560
 			</form>
@@ -582,18 +582,18 @@  discard block
 block discarded – undo
582 582
 	ob_start();
583 583
 
584 584
 	// post status
585
-	$status = get_post_status( get_the_ID() );
585
+	$status = get_post_status(get_the_ID());
586 586
 
587 587
 	// let users add custom css classes
588
-	$custom_classes = apply_filters( 'lasso_modal_all_post_classes', '' );
588
+	$custom_classes = apply_filters('lasso_modal_all_post_classes', '');
589 589
 
590 590
 	?>
591
-	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" style="max-height:100%">
591
+	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" style="max-height:100%">
592 592
 		<div class="lasso--modal__inner">
593 593
 
594 594
 			<div class="lasso--post-filtering not-visible">
595 595
 				<div class="lasso--search__results">
596
-					<span id="lasso--results-found"></span><?php _e('results found','lasso');?>
596
+					<span id="lasso--results-found"></span><?php _e('results found', 'lasso'); ?>
597 597
 				</div>
598 598
 				<div class="lasso--search">
599 599
 					<i id="lasso--search__toggle" class="dashicons dashicons-search"></i>
@@ -607,18 +607,18 @@  discard block
 block discarded – undo
607 607
 				$post_types = lasso_post_types_names();
608 608
 				$rest_bases = lasso_post_types_rest_base();
609 609
 
610
-				if ( ! empty( $post_types ) ) {
610
+				if (!empty($post_types)) {
611 611
 					$first = 'active';
612
-					foreach( $post_types as $name => $label ) {
612
+					foreach ($post_types as $name => $label) {
613 613
 						if (array_key_exists($name, $rest_bases)) {
614
-							printf( '<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr( $first), esc_attr( $rest_bases[$name] ), esc_attr( $label ) );
614
+							printf('<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr($first), esc_attr($rest_bases[$name]), esc_attr($label));
615 615
 						}
616 616
 						$first = '';
617 617
 					}
618 618
 
619 619
 				}
620 620
 
621
-				do_action('lasso_modal_post_objects');?>
621
+				do_action('lasso_modal_post_objects'); ?>
622 622
 
623 623
 			</ul>
624 624
 			<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
@@ -636,18 +636,18 @@  discard block
 block discarded – undo
636 636
 
637 637
 	ob_start();
638 638
 
639
-	if ( !lasso_user_can() )
639
+	if (!lasso_user_can())
640 640
 		return;
641 641
 
642 642
 	// let users add custom css classes
643
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
643
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
644 644
 
645 645
 	?>
646
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
647
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
648
-		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
649
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
650
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
646
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
647
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
648
+		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
649
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
650
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
651 651
 	</ul>
652 652
 
653 653
 	<?php return ob_get_clean();
@@ -657,18 +657,18 @@  discard block
 block discarded – undo
657 657
 
658 658
 	ob_start();
659 659
 
660
-	if ( !lasso_user_can() )
660
+	if (!lasso_user_can())
661 661
 		return;
662 662
 
663 663
 	// let users add custom css classes
664
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
664
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
665 665
 
666 666
 	?>
667
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
668
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
669
-		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
670
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
671
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
667
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
668
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
669
+		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
670
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
671
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
672 672
 	</ul>
673 673
 
674 674
 	<?php return ob_get_clean();
@@ -681,16 +681,16 @@  discard block
 block discarded – undo
681 681
  */
682 682
 function lasso_map_form_footer() {
683 683
 
684
-	$nonce = wp_create_nonce( 'lasso-process-map' );
684
+	$nonce = wp_create_nonce('lasso-process-map');
685 685
 
686 686
 	ob_start();
687 687
 
688 688
 	?>
689 689
 	<div class="lasso--map-form__footer">
690
-		<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
691
-		<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
690
+		<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
691
+		<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
692 692
 		<input type="hidden" name="action" value="process_map_save">
693
-		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e( 'Save Locations', 'lasso' );?>">
693
+		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e('Save Locations', 'lasso'); ?>">
694 694
 	</div>
695 695
 
696 696
 	<?php return ob_get_clean();
@@ -708,7 +708,7 @@  discard block
 block discarded – undo
708 708
 
709 709
 	?>
710 710
 	<div id="lasso--pagerefresh" class="visible">
711
-		<?php _e( 'Save this post and refesh the page to see these changes.', 'lasso' );?>
711
+		<?php _e('Save this post and refesh the page to see these changes.', 'lasso'); ?>
712 712
 	</div>
713 713
 
714 714
 	<?php return ob_get_clean();
@@ -722,43 +722,43 @@  discard block
 block discarded – undo
722 722
  */
723 723
 function lasso_editor_options_blob() {
724 724
 
725
-	$codes   = function_exists( 'aesop_shortcodes' ) ? aesop_shortcodes() : apply_filters( 'lasso_custom_options', '' );
726
-	$galleries  = function_exists( 'lasso_editor_galleries_exist' ) && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
725
+	$codes = function_exists('aesop_shortcodes') ? aesop_shortcodes() : apply_filters('lasso_custom_options', '');
726
+	$galleries = function_exists('lasso_editor_galleries_exist') && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
727 727
 
728
-	$nonce = wp_create_nonce( 'lasso_gallery' );
728
+	$nonce = wp_create_nonce('lasso_gallery');
729 729
 
730 730
 	$blob = array();
731 731
 
732
-	if ( empty( $codes ) )
732
+	if (empty($codes))
733 733
 		return;
734 734
 
735
-	foreach ( $codes as $slug => $shortcode ) {
735
+	foreach ($codes as $slug => $shortcode) {
736 736
 		$return = '';
737 737
 		// Shortcode has atts
738 738
 
739
-		if ( count( $shortcode['atts'] ) && $shortcode['atts'] ) {
739
+		if (count($shortcode['atts']) && $shortcode['atts']) {
740 740
 
741
-			foreach ( $shortcode['atts'] as $attr_name => $attr_info ) {
741
+			foreach ($shortcode['atts'] as $attr_name => $attr_info) {
742 742
 
743 743
 
744
-				$prefix = isset( $attr_info['prefix'] ) ? sprintf( '<span class="lasso-option-prefix">%s</span>', $attr_info['prefix'] ) : null;
744
+				$prefix = isset($attr_info['prefix']) ? sprintf('<span class="lasso-option-prefix">%s</span>', $attr_info['prefix']) : null;
745 745
 
746 746
 				$return .= '<form id="lasso--component-settings-form" class="'.$galleries.'" method="post">';
747 747
 				$return .= '<p data-option="'.$attr_name.'" class="lasso-option aesop-'.$slug.'-'.$attr_name.'">';
748
-				$return .= '<label for="aesop-generator-attr-' . $attr_name . '">' . $attr_info['desc'] . '</label>';
748
+				$return .= '<label for="aesop-generator-attr-'.$attr_name.'">'.$attr_info['desc'].'</label>';
749 749
 				$return .= '<small class="lasso-option-desc">'.$attr_info['tip'].'</small>';
750 750
 				// Select
751 751
 
752
-				if ( isset( $attr_info['values'] ) ) {
752
+				if (isset($attr_info['values'])) {
753 753
 
754
-					$return .= '<select name="' . $attr_name . '" id="aesop-generator-attr-' . $attr_name . '" class="lasso-generator-attr">';
754
+					$return .= '<select name="'.$attr_name.'" id="aesop-generator-attr-'.$attr_name.'" class="lasso-generator-attr">';
755 755
 
756
-					$i=0;
756
+					$i = 0;
757 757
 
758
-					foreach ( $attr_info['values'] as $attr_value ) {
758
+					foreach ($attr_info['values'] as $attr_value) {
759 759
 						$attr_value_selected = $attr_info['default'] == $attr_value ? ' selected="selected"' : '';
760 760
 
761
-						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" ' . $attr_value_selected . '>'.$attr_info['values'][$i]['name'].'</option>';
761
+						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" '.$attr_value_selected.'>'.$attr_info['values'][$i]['name'].'</option>';
762 762
 
763 763
 						$i++;
764 764
 					}
@@ -767,24 +767,24 @@  discard block
 block discarded – undo
767 767
 
768 768
 				} else {
769 769
 
770
-					$attr_field_type = isset( $attr_info['type'] ) ? $attr_info['type'] : 'text';
770
+					$attr_field_type = isset($attr_info['type']) ? $attr_info['type'] : 'text';
771 771
 
772 772
 					// image upload
773
-					if ( 'media_upload' == $attr_info['type'] ) {
773
+					if ('media_upload' == $attr_info['type']) {
774 774
 
775
-						$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.'" />';
775
+						$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.'" />';
776 776
 						$return .= '<a href="#" id="lasso-upload-img" class="lasso-option-button" /></a>';
777 777
 
778
-					} elseif ( 'color' == $attr_info['type'] ) {
778
+					} elseif ('color' == $attr_info['type']) {
779 779
 
780
-						$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.'" />';
780
+						$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.'" />';
781 781
 
782
-					} elseif ( 'text_area' == $attr_info['type'] ) {
782
+					} elseif ('text_area' == $attr_info['type']) {
783 783
 
784
-						$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.'';
784
+						$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.'';
785 785
 
786 786
 					} else {
787
-						$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.'';
787
+						$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.'';
788 788
 					}
789 789
 				}
790 790
 				$return .= '</p>';
@@ -795,9 +795,9 @@  discard block
 block discarded – undo
795 795
 		///////////////////////////
796 796
 		// START GALLERY AND MAP FRONT END STUFFS
797 797
 		///////////////////////////
798
-		if ( isset( $shortcode['front'] ) && true == $shortcode['front'] ) {
798
+		if (isset($shortcode['front']) && true == $shortcode['front']) {
799 799
 
800
-			if ( 'gallery' == $shortcode['front_type'] ) {
800
+			if ('gallery' == $shortcode['front_type']) {
801 801
 
802 802
 				$return .= lasso_gallery_editor_module();
803 803
 
@@ -808,13 +808,13 @@  discard block
 block discarded – undo
808 808
 		///////////////////////////
809 809
 
810 810
 		// Single shortcode (not closed)
811
-		if ( 'single' == $shortcode['type'] ) {
811
+		if ('single' == $shortcode['type']) {
812 812
 
813 813
 			$return .= '<input type="hidden" name="lasso-generator-content" id="lasso-generator-content" value="false" />';
814 814
 
815 815
 		} else {
816 816
 
817
-			$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>';
817
+			$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>';
818 818
 		}
819 819
 
820 820
 		$return .= '<p class="lasso-buttoninsert-wrap"><a href="#" class="lasso-generator-cancel" id="lasso--sidebar__close">Cancel
@@ -851,14 +851,14 @@  discard block
 block discarded – undo
851 851
 				<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
852 852
 				<div id="lasso--hide" style="display:none;" class="lasso--post-form">
853 853
 					<i class="lasso-icon lasso-icon-move"></i>
854
-					<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>
854
+					<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>
855 855
 					<div class="lasso--slider_wrap">
856 856
 						<div id="lasso--slider"></div>
857 857
 					</div>
858 858
 					<ul id="lasso--revision-list"></ul>
859 859
 					<div class="lasso--btn-group lasso--btn-group-small">
860
-						<a href="#" class="lasso--btn-secondary" id="lasso--close-modal"><?php _e( 'Cancel', 'lasso' );?></a>
861
-						<a href="#" class="lasso--btn-primary" id="lasso--select-revision"><?php _e( 'Select', 'lasso' );?></a>
860
+						<a href="#" class="lasso--btn-secondary" id="lasso--close-modal"><?php _e('Cancel', 'lasso'); ?></a>
861
+						<a href="#" class="lasso--btn-primary" id="lasso--select-revision"><?php _e('Select', 'lasso'); ?></a>
862 862
 					</div>
863 863
 				</div>
864 864
 
Please login to merge, or discard this patch.
public/includes/assets.php 1 patch
Spacing   +85 added lines, -85 removed lines patch added patch discarded remove patch
@@ -10,21 +10,21 @@  discard block
 block discarded – undo
10 10
 
11 11
 class assets {
12 12
 
13
-	public function __construct(){
13
+	public function __construct() {
14 14
 
15
-		add_action('wp_enqueue_scripts', array($this,'scripts'));
15
+		add_action('wp_enqueue_scripts', array($this, 'scripts'));
16 16
 	}
17 17
 
18
-	public function scripts(){
18
+	public function scripts() {
19 19
 
20 20
 	
21
-		if ( lasso_user_can('edit_posts')) {
21
+		if (lasso_user_can('edit_posts')) {
22 22
 
23 23
 			wp_enqueue_style('lasso-style', LASSO_URL.'/public/assets/css/lasso.css', LASSO_VERSION, true);
24 24
 
25 25
             //don't load autocomplete if it's a stockholm theme
26
-			$themename  	= wp_get_theme()->get('Name');
27
-			if ($themename !='Stockholm' ) {
26
+			$themename = wp_get_theme()->get('Name');
27
+			if ($themename != 'Stockholm') {
28 28
 				wp_enqueue_script('jquery-ui-autocomplete');
29 29
 			}
30 30
 			wp_enqueue_script('jquery-ui-draggable');
@@ -37,27 +37,27 @@  discard block
 block discarded – undo
37 37
 			// url for json api
38 38
 			$home_url = function_exists('json_get_url_prefix') ? json_get_url_prefix() : false;
39 39
 
40
-			$article_object 	= lasso_editor_get_option('article_class','lasso_editor');
40
+			$article_object 	= lasso_editor_get_option('article_class', 'lasso_editor');
41 41
 
42
-			$article_object 	= empty( $article_object ) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object;
42
+			$article_object 	= empty($article_object) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object;
43 43
 
44
-			$featImgClass 		= lasso_editor_get_option('featimg_class','lasso_editor');
45
-			if (empty( $featImgClass )) {
44
+			$featImgClass = lasso_editor_get_option('featimg_class', 'lasso_editor');
45
+			if (empty($featImgClass)) {
46 46
 				$featImgClass = lasso_get_supported_theme_featured_image_class();
47 47
 			}
48
-			$titleClass 		= lasso_editor_get_option('title_class','lasso_editor');
49
-			if (empty( $titleClass )) {
48
+			$titleClass = lasso_editor_get_option('title_class', 'lasso_editor');
49
+			if (empty($titleClass)) {
50 50
 				$titleClass = lasso_get_supported_theme_title_class();
51 51
 			}
52
-			$toolbar_headings  	= lasso_editor_get_option('toolbar_headings', 'lasso_editor');
53
-			$toolbar_headings_h4  	= lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
52
+			$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
53
+			$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
54 54
 			$objectsNoSave  	= lasso_editor_get_option('dont_save', 'lasso_editor');
55
-			$objectsNonEditable  	= lasso_editor_get_option('non_editable', 'lasso_editor');
55
+			$objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor');
56 56
 			$disableRESTSave = lasso_editor_get_option('save_using_rest_disabled', 'lasso_editor');
57
-			$save_to_post_disabled  = lasso_editor_get_option( 'post_save_disabled', 'lasso_editor' );
57
+			$save_to_post_disabled = lasso_editor_get_option('post_save_disabled', 'lasso_editor');
58 58
 			
59
-			$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor','b');
60
-			$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor','i');
59
+			$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor', 'b');
60
+			$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor', 'i');
61 61
 
62 62
 			
63 63
 			//text alignement
@@ -71,8 +71,8 @@  discard block
 block discarded – undo
71 71
 			
72 72
 			if ($show_color) {
73 73
 				//color picker
74
-				wp_enqueue_style( 'wp-color-picker' );
75
-				wp_enqueue_script( 'iris', admin_url( 'js/iris.min.js' ), array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), false, 1 );
74
+				wp_enqueue_style('wp-color-picker');
75
+				wp_enqueue_script('iris', admin_url('js/iris.min.js'), array('jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch'), false, 1);
76 76
 			}
77 77
 			
78 78
 			// click to insert components, not drag and drop
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 			
82 82
 			// custom fields
83 83
 			
84
-			$custom_fields = apply_filters( 'editus_custom_fields', null ); //array('testFieldName' => '#field1');
84
+			$custom_fields = apply_filters('editus_custom_fields', null); //array('testFieldName' => '#field1');
85 85
 
86 86
 
87 87
 
@@ -92,50 +92,50 @@  discard block
 block discarded – undo
92 92
             $delta = time() - $post_date;
93 93
 
94 94
 			$strings = array(
95
-				'save' 				=> __('Save','lasso'),
96
-				'cancel' 			=> __('Cancel','lasso'),
97
-				'exiteditor' 		=> __('Exit Editor','lasso'),
98
-				'saving' 			=> __('Saving...','lasso'),
99
-				'saved'				=> __('Saved!','lasso'),
100
-				'adding' 			=> __('Adding...','lasso'),
101
-				'added'				=> __('Added!','lasso'),
102
-				'loading' 			=> __('Loading...','lasso'),
103
-				'loadMore'			=> __('Load More','lasso'),
104
-				'close'			=> __('Close','lasso'),
105
-				'noPostsFound'		=> __('No more posts found','lasso'),
106
-				'fetchFail'	    	=> __('Fetching failed.','lasso'),
107
-				'galleryCreated' 	=> __('Gallery Created!','lasso'),
108
-				'galleryUpdated' 	=> __('Gallery Updated!','lasso'),
109
-				'justWrite'			=> __('Just write...','lasso'),
110
-				'chooseImage'		=> __('Choose an image','lasso'),
111
-				'updateImage'		=> __('Update Image','lasso'),
112
-				'insertImage'		=> __('Insert Image','lasso'),
113
-				'selectImage'		=> __('Select Image','lasso'),
114
-				'removeFeatImg'     => __('Remove featured image?','lasso'),
115
-				'updateSelectedImg' => __('Update Selected Image','lasso'),
116
-				'chooseImages'		=> __('Choose images','lasso'),
117
-				'editImage'			=> __('Edit Image','lasso'),
118
-				'addImages'			=> __('Add Images','lasso'),
119
-				'addNewGallery'		=> __('Add New Gallery','lasso'),
120
-				'selectGallery'		=> __('Select Lasso Gallery Image','lasso'),
121
-				'useSelectedImages' => __('Use Selected Images','lasso'),
122
-				'publishPost'		=> __('Publish Post?','lasso'),
123
-				'publishYes'		=> __('Yes, publish it!','lasso'),
124
-				'deletePost'		=> __('Trash Post?','lasso'),
125
-				'deleteYes'			=> __('Yes, trash it!','lasso'),
126
-				'warning'			=> __('Oh snap!','laso'),
127
-				'cancelText'		=> __('O.K. got it!','lasso'),
128
-				'missingClass'		=> __('It looks like we are either missing the Article CSS class, or it is configured incorrectly. Editus will not function correctly without this CSS class.','lasso'),
95
+				'save' 				=> __('Save', 'lasso'),
96
+				'cancel' 			=> __('Cancel', 'lasso'),
97
+				'exiteditor' 		=> __('Exit Editor', 'lasso'),
98
+				'saving' 			=> __('Saving...', 'lasso'),
99
+				'saved'				=> __('Saved!', 'lasso'),
100
+				'adding' 			=> __('Adding...', 'lasso'),
101
+				'added'				=> __('Added!', 'lasso'),
102
+				'loading' 			=> __('Loading...', 'lasso'),
103
+				'loadMore'			=> __('Load More', 'lasso'),
104
+				'close'			=> __('Close', 'lasso'),
105
+				'noPostsFound'		=> __('No more posts found', 'lasso'),
106
+				'fetchFail'	    	=> __('Fetching failed.', 'lasso'),
107
+				'galleryCreated' 	=> __('Gallery Created!', 'lasso'),
108
+				'galleryUpdated' 	=> __('Gallery Updated!', 'lasso'),
109
+				'justWrite'			=> __('Just write...', 'lasso'),
110
+				'chooseImage'		=> __('Choose an image', 'lasso'),
111
+				'updateImage'		=> __('Update Image', 'lasso'),
112
+				'insertImage'		=> __('Insert Image', 'lasso'),
113
+				'selectImage'		=> __('Select Image', 'lasso'),
114
+				'removeFeatImg'     => __('Remove featured image?', 'lasso'),
115
+				'updateSelectedImg' => __('Update Selected Image', 'lasso'),
116
+				'chooseImages'		=> __('Choose images', 'lasso'),
117
+				'editImage'			=> __('Edit Image', 'lasso'),
118
+				'addImages'			=> __('Add Images', 'lasso'),
119
+				'addNewGallery'		=> __('Add New Gallery', 'lasso'),
120
+				'selectGallery'		=> __('Select Lasso Gallery Image', 'lasso'),
121
+				'useSelectedImages' => __('Use Selected Images', 'lasso'),
122
+				'publishPost'		=> __('Publish Post?', 'lasso'),
123
+				'publishYes'		=> __('Yes, publish it!', 'lasso'),
124
+				'deletePost'		=> __('Trash Post?', 'lasso'),
125
+				'deleteYes'			=> __('Yes, trash it!', 'lasso'),
126
+				'warning'			=> __('Oh snap!', 'laso'),
127
+				'cancelText'		=> __('O.K. got it!', 'lasso'),
128
+				'missingClass'		=> __('It looks like we are either missing the Article CSS class, or it is configured incorrectly. Editus will not function correctly without this CSS class.', 'lasso'),
129 129
 				'missingConfirm'	=> __('Update Settings', 'lasso'),
130
-				'helperText'		=> __('one more letter','lasso'),
130
+				'helperText'		=> __('one more letter', 'lasso'),
131 131
 				'editingBackup'  	=> __('You are currently editing a backup copy of this post.'),
132 132
 			);
133 133
 
134
-			$api_url = trailingslashit( home_url() ) . 'lasso-internal-api';
134
+			$api_url = trailingslashit(home_url()).'lasso-internal-api';
135 135
 
136 136
 			$gallery_class = new gallery();
137 137
 			$gallery_nonce_action = $gallery_class->nonce_action;
138
-			$gallery_nonce = wp_create_nonce( $gallery_nonce_action );
138
+			$gallery_nonce = wp_create_nonce($gallery_nonce_action);
139 139
 			
140 140
 			
141 141
             if ($allow_change_date) {
@@ -150,13 +150,13 @@  discard block
 block discarded – undo
150 150
 			  
151 151
 			if (function_exists('rest_url')) {
152 152
 				//$rest_root = esc_url_raw( rest_url());
153
-				$rest_nonce = wp_create_nonce( 'wp_rest' );
154
-				$settings = array( 'root' => $rest_root, 'nonce' => $rest_nonce );
155
-				wp_enqueue_script( 'wp-api', '', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
156
-				wp_localize_script( 'wp-api', 'wpApiSettings', $settings );
157
-				wp_localize_script( 'wp-api', 'WP_API_Settings', $settings );
153
+				$rest_nonce = wp_create_nonce('wp_rest');
154
+				$settings = array('root' => $rest_root, 'nonce' => $rest_nonce);
155
+				wp_enqueue_script('wp-api', '', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true);
156
+				wp_localize_script('wp-api', 'wpApiSettings', $settings);
157
+				wp_localize_script('wp-api', 'WP_API_Settings', $settings);
158 158
 				
159
-				if ( class_exists( 'WP_REST_Controller' )) {
159
+				if (class_exists('WP_REST_Controller')) {
160 160
 					// we are using REST API V2
161 161
 					$using_restapiv2 = true;
162 162
 				}
@@ -164,8 +164,8 @@  discard block
 block discarded – undo
164 164
 
165 165
 			// localized objects
166 166
 			$objects = array(
167
-				'ajaxurl' 			=> esc_url( $api_url ),
168
-				'ajaxurl2' 			=> esc_url( admin_url( 'admin-ajax.php' )),
167
+				'ajaxurl' 			=> esc_url($api_url),
168
+				'ajaxurl2' 			=> esc_url(admin_url('admin-ajax.php')),
169 169
 				'rest_root'         => $rest_root,
170 170
 				'rest_nonce'        => $rest_nonce,
171 171
 				'editor' 			=> 'lasso--content', // ID of editable content (without #) DONT CHANGE
@@ -173,13 +173,13 @@  discard block
 block discarded – undo
173 173
 				'featImgClass'		=> $featImgClass,
174 174
 				'titleClass'		=> $titleClass,
175 175
 				'strings'			=> $strings,
176
-				'settingsLink'		=> function_exists('is_multisite') && is_multisite() ? network_admin_url( 'settings.php?page=lasso-editor' ) : admin_url( 'admin.php?page=lasso-editor-settings' ),
177
-				'post_status'		=> get_post_status( $postid ),
176
+				'settingsLink'		=> function_exists('is_multisite') && is_multisite() ? network_admin_url('settings.php?page=lasso-editor') : admin_url('admin.php?page=lasso-editor-settings'),
177
+				'post_status'		=> get_post_status($postid),
178 178
 				'postid'			=> $postid,
179 179
 				'permalink'			=> $permalink,
180 180
 				'edit_others_pages'	=> current_user_can('edit_others_pages') ? true : false,
181 181
 				'edit_others_posts'	=> current_user_can('edit_others_posts') ? true : false,
182
-				'userCanEdit'		=> current_user_can('edit_post', $postid ),
182
+				'userCanEdit'		=> current_user_can('edit_post', $postid),
183 183
 				'can_publish_posts'	=> current_user_can('publish_posts'),
184 184
 				'can_publish_pages'	=> current_user_can('publish_pages'),
185 185
 				'author'			=> is_user_logged_in() ? get_current_user_ID() : false,
@@ -214,26 +214,26 @@  discard block
 block discarded – undo
214 214
 				'postTags'    		=> lasso_get_objects('tag'),
215 215
 				'noResultsDiv'		=> lasso_editor_empty_results(),
216 216
 				'noRevisionsDiv'	=> lasso_editor_empty_results('revision'),
217
-				'mapTileProvider'   => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider( $postid ) : false,
218
-				'mapLocations'		=> get_post_meta( $postid, 'ase_map_component_locations' ),
219
-				'mapStart'			=> get_post_meta( $postid, 'ase_map_component_start_point', true ),
220
-				'mapZoom'			=> get_post_meta( $postid, 'ase_map_component_zoom', true ),
217
+				'mapTileProvider'   => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider($postid) : false,
218
+				'mapLocations'		=> get_post_meta($postid, 'ase_map_component_locations'),
219
+				'mapStart'			=> get_post_meta($postid, 'ase_map_component_start_point', true),
220
+				'mapZoom'			=> get_post_meta($postid, 'ase_map_component_zoom', true),
221 221
 				'revisionModal' 	=> lasso_editor_revision_modal(),
222 222
 				'isMobile'          => wp_is_mobile(),
223
-				'enableAutoSave'    => lasso_editor_get_option( 'enable_autosave', 'lasso_editor' ),
223
+				'enableAutoSave'    => lasso_editor_get_option('enable_autosave', 'lasso_editor'),
224 224
 				'showColor'         => $show_color,
225 225
 				'showAlignment'     => $show_align,
226 226
 				'showIgnoredItems'  => lasso_editor_get_option('show_ignored_items', 'lasso_editor'),
227 227
 				'restapi2'          => $using_restapiv2,
228 228
 				'saveusingrest'     => $using_restapiv2 && !$disableRESTSave,
229
-				'newObjectContent'  => apply_filters( 'lasso_new_object_content', __( 'Once upon a time...','lasso') ),
229
+				'newObjectContent'  => apply_filters('lasso_new_object_content', __('Once upon a time...', 'lasso')),
230 230
 				'disableSavePost'   => $save_to_post_disabled,
231 231
 				'boldTag'           => $bold_tag,
232 232
 				'iTag'           	=> $i_tag,
233 233
 				'customFields'      => $custom_fields,
234
-				'clickToInsert'     => ($insert_comp_ui !='drag'),
235
-				'buttonOnEmptyP'     => ($insert_comp_ui =='mediumcom'),      // auto show a button to insert components on an empty paragraph           
236
-				'skipToEdit'        =>( $delta < 10 ) // if it's a new post, skip to edit mode
234
+				'clickToInsert'     => ($insert_comp_ui != 'drag'),
235
+				'buttonOnEmptyP'     => ($insert_comp_ui == 'mediumcom'), // auto show a button to insert components on an empty paragraph           
236
+				'skipToEdit'        =>($delta < 10) // if it's a new post, skip to edit mode
237 237
 			);
238 238
 
239 239
 
@@ -242,9 +242,9 @@  discard block
 block discarded – undo
242 242
 			
243 243
 			if (!$using_restapiv2) {
244 244
                // enqueue REST API V1
245
-			   wp_enqueue_script( 'wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
246
-			   $settings = array( 'root' => home_url( $home_url ), 'nonce' => wp_create_nonce( 'wp_json' ) );
247
-			   wp_localize_script( 'wp-api-js', 'WP_API_Settings', $settings );
245
+			   wp_enqueue_script('wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true);
246
+			   $settings = array('root' => home_url($home_url), 'nonce' => wp_create_nonce('wp_json'));
247
+			   wp_localize_script('wp-api-js', 'WP_API_Settings', $settings);
248 248
 			}
249 249
 			
250 250
 			if ($allow_change_date) {
@@ -253,13 +253,13 @@  discard block
 block discarded – undo
253 253
 				wp_enqueue_style('jquery-ui');
254 254
 			}
255 255
 
256
-			$postfix = ( defined( 'SCRIPT_DEBUG' ) && true === SCRIPT_DEBUG ) ? '' : '.min';
256
+			$postfix = (defined('SCRIPT_DEBUG') && true === SCRIPT_DEBUG) ? '' : '.min';
257 257
 			if ($show_color) {
258
-				wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api','iris'), LASSO_VERSION, true);
258
+				wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api', 'iris'), LASSO_VERSION, true);
259 259
 			} else {
260
-			    wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
260
+			    wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
261 261
 			}
262
-			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects ) );
262
+			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects));
263 263
 
264 264
 
265 265
 		}
Please login to merge, or discard this patch.