Completed
Push — master ( 5052d3...d97084 )
by
unknown
02:19
created
public/includes/editor-modules.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 	$toolbar_class  = $toolbar_headings ? 'toolbar-extended' : false;
151 151
 	
152 152
 	// mobile styles
153
-    $mobile_class = $is_mobile ? 'lasso-mobile' : false;
153
+	$mobile_class = $is_mobile ? 'lasso-mobile' : false;
154 154
 	$mobile_style =$is_mobile ? 'style="bottom:0px;"' : null;
155 155
 	
156 156
 	//show color
@@ -529,8 +529,8 @@  discard block
 block discarded – undo
529 529
 	global $post;
530 530
 	
531 531
 	global $wp_post_types;
532
-    $labels = &$wp_post_types['post']->labels;
533
-    $labels->name = 'Articles';
532
+	$labels = &$wp_post_types['post']->labels;
533
+	$labels->name = 'Articles';
534 534
 
535 535
 	ob_start();
536 536
 
Please login to merge, or discard this patch.
Spacing   +216 added lines, -216 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,25 +133,25 @@  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' );
148
+	$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
149 149
 
150
-	$toolbar_class  = $toolbar_headings ? 'toolbar-extended' : false;
150
+	$toolbar_class = $toolbar_headings ? 'toolbar-extended' : false;
151 151
 	
152 152
 	// mobile styles
153 153
     $mobile_class = $is_mobile ? 'lasso-mobile' : false;
154
-	$mobile_style =$is_mobile ? 'style="bottom:0px;"' : null;
154
+	$mobile_style = $is_mobile ? 'style="bottom:0px;"' : null;
155 155
 	
156 156
 	//show color
157 157
 	$show_color = lasso_editor_get_option('toolbar_show_color', 'lasso_editor');
@@ -159,94 +159,94 @@  discard block
 block discarded – undo
159 159
 	//show alignment
160 160
 	$show_align = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor');
161 161
 	
162
-	$status = get_post_status( get_the_ID() );
162
+	$status = get_post_status(get_the_ID());
163 163
 
164 164
 
165 165
 	?>
166
-	<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 ?>>
167
-		<ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"';}?>>
168
-			<?php do_action( 'lasso_toolbar_components_before' );?>
169
-		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e( 'Bold', 'lasso' );?>"></li>
170
-		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e( 'Underline', 'lasso' );?>"></li>
171
-		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e( 'Italicize', 'lasso' );?>"></li>
172
-		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e( 'Strikethrough', 'lasso' );?>"></li>
173
-		    <?php if ( $toolbar_headings ): ?>
174
-		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>"></li>
175
-		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>"></li>
166
+	<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 ?>>
167
+		<ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"'; }?>>
168
+			<?php do_action('lasso_toolbar_components_before'); ?>
169
+		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e('Bold', 'lasso'); ?>"></li>
170
+		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e('Underline', 'lasso'); ?>"></li>
171
+		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e('Italicize', 'lasso'); ?>"></li>
172
+		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e('Strikethrough', 'lasso'); ?>"></li>
173
+		    <?php if ($toolbar_headings): ?>
174
+		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>"></li>
175
+		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>"></li>
176 176
 			<?php endif; ?>
177 177
 			
178
-			<?php if ( $show_color ): ?>
179
-		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e( 'Set Text Color', 'lasso' );?>"></li>
180
-		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e( 'Choose Color', 'lasso' );?>"></li>
178
+			<?php if ($show_color): ?>
179
+		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e('Set Text Color', 'lasso'); ?>"></li>
180
+		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e('Choose Color', 'lasso'); ?>"></li>
181 181
 			<?php endif; ?>
182 182
 					
183
-		    <li id="lasso-toolbar--components" title="<?php esc_attr_e( 'Insert Component', 'lasso' );?>">
183
+		    <li id="lasso-toolbar--components" title="<?php esc_attr_e('Insert Component', 'lasso'); ?>">
184 184
 			    <ul id="lasso-toolbar--components__list" style="display:none;">
185
-			    	<?php if ( 'ase-active' == $ase_status ): ?>
186
-						<li data-type="image" title="<?php esc_attr_e( 'Image', 'lasso' );?>" class="lasso-toolbar--component__image"></li>
187
-						<li data-type="character" title="<?php esc_attr_e( 'Character', 'lasso' );?>" class="lasso-toolbar--component__character"></li>
188
-						<li data-type="quote" title="<?php esc_attr_e( 'Quote', 'lasso' );?>"  class="lasso-toolbar--component__quote"></li>
189
-						<li data-type="content" title="<?php esc_attr_e( 'Content', 'lasso' );?>"  class="lasso-toolbar--component__content"></li>
190
-						<li data-type="chapter" title="<?php esc_attr_e( 'Chapter', 'lasso' );?>"  class="lasso-toolbar--component__chapter"></li>
191
-						<li data-type="parallax" title="<?php esc_attr_e( 'Parallax', 'lasso' );?>"  class="lasso-toolbar--component__parallax"></li>
192
-						<li data-type="audio" title="<?php esc_attr_e( 'Audio', 'lasso' );?>"  class="lasso-toolbar--component__audio"></li>
193
-						<li data-type="video" title="<?php esc_attr_e( 'Video', 'lasso' );?>"  class="lasso-toolbar--component__video"></li>
194
-						<li data-type="map" title="<?php esc_attr_e( 'Map', 'lasso' );?>"  class="lasso-toolbar--component__map"></li>
195
-						<li data-type="timeline_stop" title="<?php esc_attr_e( 'Timeline', 'lasso' );?>"  class="lasso-toolbar--component__timeline"></li>
196
-						<li data-type="document" title="<?php esc_attr_e( 'Document', 'lasso' );?>"  class="lasso-toolbar--component__document"></li>
197
-						<li data-type="collection" title="<?php esc_attr_e( 'Collection', 'lasso' );?>"  class="lasso-toolbar--component__collection"></li>
198
-						<li data-type="gallery" title="<?php esc_attr_e( 'Gallery', 'lasso' );?>"  class="lasso-toolbar--component__gallery"></li>
199
-						<?php if ( class_exists ('Aesop_GalleryPop') ) { ?>
200
-						     <li data-type="gallery" title="<?php esc_attr_e( 'Gallery Pop', 'lasso' );?>"  class="lasso-toolbar--component__gallerypop"></li>
185
+			    	<?php if ('ase-active' == $ase_status): ?>
186
+						<li data-type="image" title="<?php esc_attr_e('Image', 'lasso'); ?>" class="lasso-toolbar--component__image"></li>
187
+						<li data-type="character" title="<?php esc_attr_e('Character', 'lasso'); ?>" class="lasso-toolbar--component__character"></li>
188
+						<li data-type="quote" title="<?php esc_attr_e('Quote', 'lasso'); ?>"  class="lasso-toolbar--component__quote"></li>
189
+						<li data-type="content" title="<?php esc_attr_e('Content', 'lasso'); ?>"  class="lasso-toolbar--component__content"></li>
190
+						<li data-type="chapter" title="<?php esc_attr_e('Chapter', 'lasso'); ?>"  class="lasso-toolbar--component__chapter"></li>
191
+						<li data-type="parallax" title="<?php esc_attr_e('Parallax', 'lasso'); ?>"  class="lasso-toolbar--component__parallax"></li>
192
+						<li data-type="audio" title="<?php esc_attr_e('Audio', 'lasso'); ?>"  class="lasso-toolbar--component__audio"></li>
193
+						<li data-type="video" title="<?php esc_attr_e('Video', 'lasso'); ?>"  class="lasso-toolbar--component__video"></li>
194
+						<li data-type="map" title="<?php esc_attr_e('Map', 'lasso'); ?>"  class="lasso-toolbar--component__map"></li>
195
+						<li data-type="timeline_stop" title="<?php esc_attr_e('Timeline', 'lasso'); ?>"  class="lasso-toolbar--component__timeline"></li>
196
+						<li data-type="document" title="<?php esc_attr_e('Document', 'lasso'); ?>"  class="lasso-toolbar--component__document"></li>
197
+						<li data-type="collection" title="<?php esc_attr_e('Collection', 'lasso'); ?>"  class="lasso-toolbar--component__collection"></li>
198
+						<li data-type="gallery" title="<?php esc_attr_e('Gallery', 'lasso'); ?>"  class="lasso-toolbar--component__gallery"></li>
199
+						<?php if (class_exists('Aesop_GalleryPop')) { ?>
200
+						     <li data-type="gallery" title="<?php esc_attr_e('Gallery Pop', 'lasso'); ?>"  class="lasso-toolbar--component__gallerypop"></li>
201 201
 						<?php }?>
202 202
 					<?php else: ?>
203
-						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );?>" class="image lasso-toolbar--component__image"></li>
204
-						<li data-type="wpquote" title="<?php esc_attr_e( 'WordPress Quote', 'lasso' );?>" class="quote lasso-toolbar--component__quote"></li>
205
-						<!--li data-type="wpvideo" title="<?php esc_attr_e( 'WordPress Video', 'lasso' );?>" class="video lasso-toolbar--component__video"></li-->
203
+						<li data-type="wpimg" title="<?php esc_attr_e('WordPress Image', 'lasso'); ?>" class="image lasso-toolbar--component__image"></li>
204
+						<li data-type="wpquote" title="<?php esc_attr_e('WordPress Quote', 'lasso'); ?>" class="quote lasso-toolbar--component__quote"></li>
205
+						<!--li data-type="wpvideo" title="<?php esc_attr_e('WordPress Video', 'lasso'); ?>" class="video lasso-toolbar--component__video"></li-->
206 206
 					<?php endif; ?>
207
-					<?php do_action( 'lasso_toolbar_components' );?>
207
+					<?php do_action('lasso_toolbar_components'); ?>
208 208
 			    </ul>
209 209
 			</li>
210
-			<li id="lasso-toolbar--link" title="<?php esc_attr_e( 'Anchor Link', 'lasso' );?>">
210
+			<li id="lasso-toolbar--link" title="<?php esc_attr_e('Anchor Link', 'lasso'); ?>">
211 211
 		    	<div id="lasso-toolbar--link__wrap" <?php echo $mobile_style ?> >
212
-		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'http://url.com', 'lasso' );?>"></div>
213
-		    		<a href="#" title="<?php esc_attr_e( 'Create Link', 'lasso' );?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
212
+		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e('http://url.com', 'lasso'); ?>"></div>
213
+		    		<a href="#" title="<?php esc_attr_e('Create Link', 'lasso'); ?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
214 214
 					<input class="styled-checkbox" type="checkbox" id="aesop-toolbar--link_newtab" checked/>
215 215
                     <label for="aesop-toolbar--link_newtab">Open in Another Tab</label>
216 216
 		    	</div>
217 217
 		    </li>
218
-		    <?php do_action( 'lasso_toolbar_components_after' );?>
219
-		    <li id="lasso-toolbar--html" title="<?php esc_attr_e( 'Insert HTML', 'lasso' );?>">
218
+		    <?php do_action('lasso_toolbar_components_after'); ?>
219
+		    <li id="lasso-toolbar--html" title="<?php esc_attr_e('Insert HTML', 'lasso'); ?>">
220 220
 		    	<div id="lasso-toolbar--html__wrap" <?php echo $mobile_style ?>>
221
-		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?>"></div>
221
+		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?>"></div>
222 222
 		    		<div id="lasso-toolbar--html__footer">
223 223
 		    			<ul class="lasso-toolbar--html-snips">
224
-		    				<?php if ( !$toolbar_headings ): ?>
225
-		    				<li id="lasso-html--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>">
226
-		    				<li id="lasso-html--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>">
224
+		    				<?php if (!$toolbar_headings): ?>
225
+		    				<li id="lasso-html--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>">
226
+		    				<li id="lasso-html--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>">
227 227
 		    				<?php endif; ?>
228
-		    				<li id="lasso-html--ul" title="<?php esc_attr_e( 'Unordered List', 'lasso' );?>">
229
-		    				<li id="lasso-html--ol" title="<?php esc_attr_e( 'Ordered List', 'lasso' );?>">
228
+		    				<li id="lasso-html--ul" title="<?php esc_attr_e('Unordered List', 'lasso'); ?>">
229
+		    				<li id="lasso-html--ol" title="<?php esc_attr_e('Ordered List', 'lasso'); ?>">
230 230
 		    			</ul>
231
-		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e( 'Cancel', 'lasso' );?></a>
232
-		    			<a href="#" title="<?php esc_attr_e( 'Insert HTML', 'lasso' );?>" class="lasso-toolbar--html__control" id="lasso-toolbar--html__insert" ><?php _e( 'Insert', 'lasso' );?></a>
231
+		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e('Cancel', 'lasso'); ?></a>
232
+		    			<a href="#" title="<?php esc_attr_e('Insert HTML', 'lasso'); ?>" class="lasso-toolbar--html__control" id="lasso-toolbar--html__insert" ><?php _e('Insert', 'lasso'); ?></a>
233 233
 		    		</div>
234 234
 		    	</div>
235 235
 		    </li>
236
-			<?php if ( $show_align ): ?>
237
-		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e( 'Text Left Align', 'lasso' );?>"></li>
238
-		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e( 'Text Center Align', 'lasso' );?>"></li>
239
-			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e( 'Text Right Align', 'lasso' );?>"></li>
236
+			<?php if ($show_align): ?>
237
+		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e('Text Left Align', 'lasso'); ?>"></li>
238
+		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e('Text Center Align', 'lasso'); ?>"></li>
239
+			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e('Text Right Align', 'lasso'); ?>"></li>
240 240
 			<?php endif; ?>
241 241
 		</ul>
242
-		<?php if ( is_singular() && $is_mobile ) { ?>
242
+		<?php if (is_singular() && $is_mobile) { ?>
243 243
 
244
-				<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;">
244
+				<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;">
245 245
 
246
-					<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>
246
+					<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>
247 247
 
248
-					<?php if ( 'draft' == $status && ( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') )  ) { ?>
249
-						<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>
248
+					<?php if ('draft' == $status && (lasso_user_can('publish_posts') || lasso_user_can('publish_pages'))) { ?>
249
+						<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>
250 250
 					<?php } ?>
251 251
 
252 252
 				</div>
@@ -264,22 +264,22 @@  discard block
 block discarded – undo
264 264
  */
265 265
 function lasso_editor_settings_toolbar() {
266 266
 
267
-	$delete_nonce = wp_create_nonce( 'lasso-delete-nonce' );
267
+	$delete_nonce = wp_create_nonce('lasso-delete-nonce');
268 268
 
269 269
 	ob_start();
270 270
 
271
-	if ( !lasso_user_can() )
271
+	if (!lasso_user_can())
272 272
 		return;
273 273
 
274 274
 	// let users add custom css classes
275
-	$custom_classes = apply_filters( 'lasso_component_classes', '' );
275
+	$custom_classes = apply_filters('lasso_component_classes', '');
276 276
 
277 277
 	?>
278
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
279
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
280
-		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
281
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
282
-		<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>
278
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
279
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
280
+		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
281
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
282
+		<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>
283 283
 	</ul>
284 284
 
285 285
 	<?php return ob_get_clean();
@@ -295,17 +295,17 @@  discard block
 block discarded – undo
295 295
 
296 296
 	ob_start();
297 297
 
298
-	if ( !lasso_user_can() )
298
+	if (!lasso_user_can())
299 299
 		return;
300 300
 
301 301
 	// has post thumbnail
302
-	$has_thumbnail = has_post_thumbnail( get_the_ID() ) ? 'class="lasso--featImg--has-thumb"' : false;
302
+	$has_thumbnail = has_post_thumbnail(get_the_ID()) ? 'class="lasso--featImg--has-thumb"' : false;
303 303
 
304 304
 	?>
305
-	<ul id="lasso--featImgControls" <?php echo $has_thumbnail;?>>
306
-		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e( 'Replace Image', 'lasso' );?>" href="#"><i class="lasso-icon-image"></i></a></li>
307
-		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e( 'Delete Image', 'lasso' );?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
308
-		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e( 'save', 'lasso' );?></a></li>
305
+	<ul id="lasso--featImgControls" <?php echo $has_thumbnail; ?>>
306
+		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e('Replace Image', 'lasso'); ?>" href="#"><i class="lasso-icon-image"></i></a></li>
307
+		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e('Delete Image', 'lasso'); ?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
308
+		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e('save', 'lasso'); ?></a></li>
309 309
 	</ul>
310 310
 
311 311
 	<?php return ob_get_clean();
@@ -324,55 +324,55 @@  discard block
 block discarded – undo
324 324
 
325 325
 	ob_start();
326 326
 
327
-	if ( !lasso_user_can() )
327
+	if (!lasso_user_can())
328 328
 		return;
329 329
 
330 330
 	global $post;
331 331
 
332 332
 	$postid = get_the_ID();
333 333
 
334
-	$status = get_post_status( $postid );
335
-	$nonce = wp_create_nonce( 'lasso-update-post-settings' );
334
+	$status = get_post_status($postid);
335
+	$nonce = wp_create_nonce('lasso-update-post-settings');
336 336
 
337 337
 	// let users add custom css classes
338
-	$custom_classes = apply_filters( 'lasso_modal_settings_classes', '' );
338
+	$custom_classes = apply_filters('lasso_modal_settings_classes', '');
339 339
 
340 340
 	// objects categories
341
-	$categories 		= lasso_get_post_objects( $postid, 'category' );
342
-	$tags 				= lasso_get_post_objects( $postid, 'tag' );
341
+	$categories = lasso_get_post_objects($postid, 'category');
342
+	$tags = lasso_get_post_objects($postid, 'tag');
343 343
 
344 344
 	// modal tabs
345
-	$tabs  				= lasso_modal_addons('tab');
346
-	$content 			= lasso_modal_addons('content');
345
+	$tabs = lasso_modal_addons('tab');
346
+	$content = lasso_modal_addons('content');
347 347
 
348 348
 	// are we singular
349
-	$is_singular 		= is_singular();
349
+	$is_singular = is_singular();
350 350
 	$is_singular_class 	= $is_singular ? 'lasso--postsettings__2col' : 'lasso--postsettings__1col';
351 351
 	$has_thumb_class    = has_post_thumbnail() ? 'has-thumbnail' : 'no-thumbnail';
352 352
 	$theme_supports     = current_theme_supports('post-thumbnails');
353
-	$default_image 		= LASSO_URL.'/admin/assets/img/empty-img.png';
353
+	$default_image = LASSO_URL.'/admin/assets/img/empty-img.png';
354 354
 
355 355
 ?>
356
-	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>">
356
+	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>">
357 357
 		<div class="lasso--modal__inner">
358 358
 
359
-			<?php if( $tabs ) { echo $tabs; } ?>
359
+			<?php if ($tabs) { echo $tabs; } ?>
360 360
 
361 361
 			<div class="lasso--modal__content modal__content--core visible" data-addon-content="core">
362
-				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class;?>" >
362
+				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class; ?>" >
363 363
 
364
-					<?php if ( $is_singular && $theme_supports ) : ?>
364
+					<?php if ($is_singular && $theme_supports) : ?>
365 365
 					<div class="lasso--postsettings__left">
366
-						<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>
367
-						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url( $default_image );?>">
366
+						<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>
367
+						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url($default_image); ?>">
368 368
 
369 369
 							<div id="lasso--post-thumb__controls" class="lasso--post-thumb__controls">
370
-								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image','lasso');?>" class="dashicons dashicons-edit"></i>
371
-								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image','lasso');?>" class="dashicons dashicons-no-alt"></i>
370
+								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image', 'lasso'); ?>" class="dashicons dashicons-edit"></i>
371
+								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image', 'lasso'); ?>" class="dashicons dashicons-no-alt"></i>
372 372
 								<i id="lasso--save-status" class="lasso-icon lasso-icon-spinner6 not-visible"></i>
373 373
 							</div>
374 374
 
375
-							<?php echo has_post_thumbnail() ? get_the_post_thumbnail( $post->ID, 'medium' ) : '<img src="'.$default_image.'">'; ?>
375
+							<?php echo has_post_thumbnail() ? get_the_post_thumbnail($post->ID, 'medium') : '<img src="'.$default_image.'">'; ?>
376 376
 
377 377
 						</div>
378 378
 						<div id="lasso--featImgSave"><a href="#" class="not-visible">Save</a></div>
@@ -382,12 +382,12 @@  discard block
 block discarded – undo
382 382
 
383 383
 					<div class="lasso--postsettings__right">
384 384
 
385
-						<?php if( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') ): ?>
385
+						<?php if (lasso_user_can('publish_posts') || lasso_user_can('publish_pages')): ?>
386 386
 						<div class="lasso--postsettings__option story-status-option">
387
-							<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>
388
-							<ul class="story-status story-status-<?php echo sanitize_html_class( $status );?>">
389
-								<li id="lasso--status-draft"><?php _e( 'Draft', 'lasso' );?></li>
390
-								<li id="lasso--status-publish"><?php _e( 'Publish', 'lasso' );?></li>
387
+							<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>
388
+							<ul class="story-status story-status-<?php echo sanitize_html_class($status); ?>">
389
+								<li id="lasso--status-draft"><?php _e('Draft', 'lasso'); ?></li>
390
+								<li id="lasso--status-publish"><?php _e('Publish', 'lasso'); ?></li>
391 391
 							</ul>
392 392
 							<div class="lasso--slider_wrap">
393 393
 								<div id="lasso--slider"></div>
@@ -395,10 +395,10 @@  discard block
 block discarded – undo
395 395
 						</div>
396 396
 						<?php endif; ?>
397 397
 
398
-						<?php if ( 'publish' == $status ): ?>
398
+						<?php if ('publish' == $status): ?>
399 399
 						<div class="lasso--postsettings__option story-slug-option">
400
-							<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>
401
-							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset( $post ) ? esc_attr( $post->post_name ) : false;?>">
400
+							<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>
401
+							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset($post) ? esc_attr($post->post_name) : false; ?>">
402 402
 						</div>
403 403
 						<?php endif; ?>
404 404
 
@@ -407,34 +407,34 @@  discard block
 block discarded – undo
407 407
 					<div class="lasso--postsettings__middle">
408 408
 
409 409
 						<div class="lasso--postsettings__option story-categories-option">
410
-							<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>
411
-							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories;?>">
410
+							<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>
411
+							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories; ?>">
412 412
 						</div>
413 413
 
414 414
 						<div class="lasso--postsettings__option story-tags-option">
415
-							<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>
416
-							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags;?>">
415
+							<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>
416
+							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags; ?>">
417 417
 						</div>
418 418
 
419 419
 					</div>
420 420
 
421
-					<?php do_action( 'lasso_modal_post_form' ); // action ?>
421
+					<?php do_action('lasso_modal_post_form'); // action ?>
422 422
 
423 423
 					<div class="lasso--postsettings__footer" style="display:none;">
424
-						<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
424
+						<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
425 425
 						<input type="hidden" name="status" value="">
426 426
 						<input type="hidden" name="categories" value="">
427
-						<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
427
+						<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
428 428
 						<input type="hidden" name="action" value="process_update-object_post">
429
-						<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
430
-						<?php do_action( 'lasso_modal_post_form_footer' ); // action ?>
431
-						<input type="submit" value="<?php esc_attr_e( 'Save', 'lasso' );?>">
429
+						<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
430
+						<?php do_action('lasso_modal_post_form_footer'); // action ?>
431
+						<input type="submit" value="<?php esc_attr_e('Save', 'lasso'); ?>">
432 432
 					</div>
433 433
 
434 434
 				</form>
435 435
 			</div>
436 436
 
437
-			<?php if( $tabs ) { echo $content; } ?>
437
+			<?php if ($tabs) { echo $content; } ?>
438 438
 
439 439
 		</div>
440 440
 
@@ -455,44 +455,44 @@  discard block
 block discarded – undo
455 455
 
456 456
 	ob_start();
457 457
 
458
-	if ( !lasso_user_can('edit_posts') )
458
+	if (!lasso_user_can('edit_posts'))
459 459
 		return;
460 460
 
461
-	$status = get_post_status( get_the_ID() );
461
+	$status = get_post_status(get_the_ID());
462 462
 
463
-	$nonce = wp_create_nonce( 'lasso-editor-new-post' );
463
+	$nonce = wp_create_nonce('lasso-editor-new-post');
464 464
 
465 465
 	// let users add custom css classes
466
-	$custom_classes = apply_filters( 'lasso_modal_post_classes', '' );
466
+	$custom_classes = apply_filters('lasso_modal_post_classes', '');
467 467
 
468 468
 	// return the post type
469
-	$type = get_post_type( get_the_ID() );
469
+	$type = get_post_type(get_the_ID());
470 470
 
471 471
 	if (wp_is_mobile()) {
472 472
 		$mobile_style = 'style="top:140px !important;"';
473 473
 	}
474 474
 	?>
475
-	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" <?php echo $mobile_style;?>">
475
+	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" <?php echo $mobile_style; ?>">
476 476
 		<div class="lasso--modal__inner">
477 477
 
478 478
 			<form id="lasso--postnew__form" enctype="multipart/form-data" class="lasso--post-form">
479 479
 
480 480
 				<div class="lasso--postsettings__option story-slug-option lasso--last-option">
481
-					<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>
482
-					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e( 'Grump Wizards Make Toxic Brew', 'lasso' );?>">
481
+					<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>
482
+					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e('Grump Wizards Make Toxic Brew', 'lasso'); ?>">
483 483
 						<div class="lasso--select-wrap" style="width:90px">
484 484
 						<select id="lasso--select-type" name="story_type">
485 485
 
486 486
 							<?php
487 487
 								$types = lasso_post_types();
488 488
 
489
-								if ( !empty( $types ) ) {
489
+								if (!empty($types)) {
490 490
 
491
-									foreach( $types as $type ) {
491
+									foreach ($types as $type) {
492 492
 
493
-										$type = preg_replace( '/s\b/','', $type );
493
+										$type = preg_replace('/s\b/', '', $type);
494 494
 
495
-										printf( '<option value="%s">%s</option>', lcfirst( esc_attr( $type ) ) , ucfirst( esc_attr( $type ) ) );
495
+										printf('<option value="%s">%s</option>', lcfirst(esc_attr($type)), ucfirst(esc_attr($type)));
496 496
 									}
497 497
 
498 498
 								}
@@ -502,12 +502,12 @@  discard block
 block discarded – undo
502 502
 					</div>
503 503
 				</div>
504 504
 
505
-				<div class="lasso--postsettings__footer" style="<?php if (!wp_is_mobile()) {echo 'display:none;';} ?>">
506
-					<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
505
+				<div class="lasso--postsettings__footer" style="<?php if (!wp_is_mobile()) {echo 'display:none;'; } ?>">
506
+					<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
507 507
 					<input type="hidden" name="action" value="process_new-object_post">
508 508
 					<input type="hidden" name="object" value="post">
509
-					<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
510
-					<input type="submit" value="<?php esc_attr_e( 'Create', 'lasso' );?>">
509
+					<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
510
+					<input type="submit" value="<?php esc_attr_e('Create', 'lasso'); ?>">
511 511
 				</div>
512 512
 
513 513
 			</form>
@@ -535,18 +535,18 @@  discard block
 block discarded – undo
535 535
 	ob_start();
536 536
 
537 537
 	// post status
538
-	$status = get_post_status( get_the_ID() );
538
+	$status = get_post_status(get_the_ID());
539 539
 
540 540
 	// let users add custom css classes
541
-	$custom_classes = apply_filters( 'lasso_modal_all_post_classes', '' );
541
+	$custom_classes = apply_filters('lasso_modal_all_post_classes', '');
542 542
 
543 543
 	?>
544
-	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" style="max-height:100%">
544
+	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" style="max-height:100%">
545 545
 		<div class="lasso--modal__inner">
546 546
 
547 547
 			<div class="lasso--post-filtering not-visible">
548 548
 				<div class="lasso--search__results">
549
-					<span id="lasso--results-found"></span><?php _e('results found','lasso');?>
549
+					<span id="lasso--results-found"></span><?php _e('results found', 'lasso'); ?>
550 550
 				</div>
551 551
 				<div class="lasso--search">
552 552
 					<i id="lasso--search__toggle" class="dashicons dashicons-search"></i>
@@ -559,18 +559,18 @@  discard block
 block discarded – undo
559 559
 
560 560
 				$post_types = lasso_post_types_names();
561 561
 
562
-				if ( ! empty( $post_types ) ) {
562
+				if (!empty($post_types)) {
563 563
 					$first = 'active';
564
-					foreach( $post_types as $name => $label ) {
564
+					foreach ($post_types as $name => $label) {
565 565
 						//printf( '<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr( $first), esc_attr( $name ), esc_attr( $label ) );
566 566
 						//print_r($post_types);
567
-						printf( '<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr( $first), esc_attr( $name ), esc_attr( $label ) );
567
+						printf('<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr($first), esc_attr($name), esc_attr($label));
568 568
 						$first = '';
569 569
 					}
570 570
 
571 571
 				}
572 572
 
573
-				do_action('lasso_modal_post_objects');?>
573
+				do_action('lasso_modal_post_objects'); ?>
574 574
 
575 575
 			</ul>
576 576
 			<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
@@ -588,18 +588,18 @@  discard block
 block discarded – undo
588 588
 
589 589
 	ob_start();
590 590
 
591
-	if ( !lasso_user_can() )
591
+	if (!lasso_user_can())
592 592
 		return;
593 593
 
594 594
 	// let users add custom css classes
595
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
595
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
596 596
 
597 597
 	?>
598
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
599
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
600
-		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
601
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
602
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
598
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
599
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
600
+		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
601
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
602
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
603 603
 	</ul>
604 604
 
605 605
 	<?php return ob_get_clean();
@@ -609,18 +609,18 @@  discard block
 block discarded – undo
609 609
 
610 610
 	ob_start();
611 611
 
612
-	if ( !lasso_user_can() )
612
+	if (!lasso_user_can())
613 613
 		return;
614 614
 
615 615
 	// let users add custom css classes
616
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
616
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
617 617
 
618 618
 	?>
619
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
620
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
621
-		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
622
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
623
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
619
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
620
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
621
+		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
622
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
623
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
624 624
 	</ul>
625 625
 
626 626
 	<?php return ob_get_clean();
@@ -633,16 +633,16 @@  discard block
 block discarded – undo
633 633
  */
634 634
 function lasso_map_form_footer() {
635 635
 
636
-	$nonce = wp_create_nonce( 'lasso-process-map' );
636
+	$nonce = wp_create_nonce('lasso-process-map');
637 637
 
638 638
 	ob_start();
639 639
 
640 640
 	?>
641 641
 	<div class="lasso--map-form__footer">
642
-		<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
643
-		<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
642
+		<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
643
+		<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
644 644
 		<input type="hidden" name="action" value="process_map_save">
645
-		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e( 'Save Locations', 'lasso' );?>">
645
+		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e('Save Locations', 'lasso'); ?>">
646 646
 	</div>
647 647
 
648 648
 	<?php return ob_get_clean();
@@ -660,7 +660,7 @@  discard block
 block discarded – undo
660 660
 
661 661
 	?>
662 662
 	<div id="lasso--pagerefresh" class="visible">
663
-		<?php _e( 'Save this post and refesh the page to see these changes.', 'lasso' );?>
663
+		<?php _e('Save this post and refesh the page to see these changes.', 'lasso'); ?>
664 664
 	</div>
665 665
 
666 666
 	<?php return ob_get_clean();
@@ -674,43 +674,43 @@  discard block
 block discarded – undo
674 674
  */
675 675
 function lasso_editor_options_blob() {
676 676
 
677
-	$codes   = function_exists( 'aesop_shortcodes' ) ? aesop_shortcodes() : apply_filters( 'lasso_custom_options', '' );
678
-	$galleries  = function_exists( 'lasso_editor_galleries_exist' ) && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
677
+	$codes = function_exists('aesop_shortcodes') ? aesop_shortcodes() : apply_filters('lasso_custom_options', '');
678
+	$galleries = function_exists('lasso_editor_galleries_exist') && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
679 679
 
680
-	$nonce = wp_create_nonce( 'lasso_gallery' );
680
+	$nonce = wp_create_nonce('lasso_gallery');
681 681
 
682 682
 	$blob = array();
683 683
 
684
-	if ( empty( $codes ) )
684
+	if (empty($codes))
685 685
 		return;
686 686
 
687
-	foreach ( $codes as $slug => $shortcode ) {
687
+	foreach ($codes as $slug => $shortcode) {
688 688
 		$return = '';
689 689
 		// Shortcode has atts
690 690
 
691
-		if ( count( $shortcode['atts'] ) && $shortcode['atts'] ) {
691
+		if (count($shortcode['atts']) && $shortcode['atts']) {
692 692
 
693
-			foreach ( $shortcode['atts'] as $attr_name => $attr_info ) {
693
+			foreach ($shortcode['atts'] as $attr_name => $attr_info) {
694 694
 
695 695
 
696
-				$prefix = isset( $attr_info['prefix'] ) ? sprintf( '<span class="lasso-option-prefix">%s</span>', $attr_info['prefix'] ) : null;
696
+				$prefix = isset($attr_info['prefix']) ? sprintf('<span class="lasso-option-prefix">%s</span>', $attr_info['prefix']) : null;
697 697
 
698 698
 				$return .= '<form id="lasso--component-settings-form" class="'.$galleries.'" method="post">';
699 699
 				$return .= '<p data-option="'.$attr_name.'" class="lasso-option lasso-'.$slug.'-'.$attr_name.'">';
700
-				$return .= '<label for="lasso-generator-attr-' . $attr_name . '">' . $attr_info['desc'] . '</label>';
700
+				$return .= '<label for="lasso-generator-attr-'.$attr_name.'">'.$attr_info['desc'].'</label>';
701 701
 				$return .= '<small class="lasso-option-desc">'.$attr_info['tip'].'</small>';
702 702
 				// Select
703 703
 
704
-				if ( isset( $attr_info['values'] ) ) {
704
+				if (isset($attr_info['values'])) {
705 705
 
706
-					$return .= '<select name="' . $attr_name . '" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr">';
706
+					$return .= '<select name="'.$attr_name.'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr">';
707 707
 
708
-					$i=0;
708
+					$i = 0;
709 709
 
710
-					foreach ( $attr_info['values'] as $attr_value ) {
710
+					foreach ($attr_info['values'] as $attr_value) {
711 711
 						$attr_value_selected = $attr_info['default'] == $attr_value ? ' selected="selected"' : '';
712 712
 
713
-						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" ' . $attr_value_selected . '>'.$attr_info['values'][$i]['name'].'</option>';
713
+						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" '.$attr_value_selected.'>'.$attr_info['values'][$i]['name'].'</option>';
714 714
 
715 715
 						$i++;
716 716
 					}
@@ -719,24 +719,24 @@  discard block
 block discarded – undo
719 719
 
720 720
 				} else {
721 721
 
722
-					$attr_field_type = isset( $attr_info['type'] ) ? $attr_info['type'] : 'text';
722
+					$attr_field_type = isset($attr_info['type']) ? $attr_info['type'] : 'text';
723 723
 
724 724
 					// image upload
725
-					if ( 'media_upload' == $attr_info['type'] ) {
725
+					if ('media_upload' == $attr_info['type']) {
726 726
 
727
-						$return .= '<input type="' . $attr_field_type . '" name="' . $attr_name . '" value="'.$attr_info['default'].'" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />';
727
+						$return .= '<input type="'.$attr_field_type.'" name="'.$attr_name.'" value="'.$attr_info['default'].'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />';
728 728
 						$return .= '<a href="#" id="lasso-upload-img" class="lasso-option-button" /></a>';
729 729
 
730
-					} elseif ( 'color' == $attr_info['type'] ) {
730
+					} elseif ('color' == $attr_info['type']) {
731 731
 
732
-						$return .= '<input type="color" name="' . $attr_name . '" value="'.$attr_info['default'].'" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />';
732
+						$return .= '<input type="color" name="'.$attr_name.'" value="'.$attr_info['default'].'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />';
733 733
 
734
-					} elseif ( 'text_area' == $attr_info['type'] ) {
734
+					} elseif ('text_area' == $attr_info['type']) {
735 735
 
736
-						$return .= '<textarea name="' . $attr_name . '" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" placeholder="'.$attr_info['default'].'" /></textarea>'.$prefix.'';
736
+						$return .= '<textarea name="'.$attr_name.'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" placeholder="'.$attr_info['default'].'" /></textarea>'.$prefix.'';
737 737
 
738 738
 					} else {
739
-						$return .= '<input type="' . $attr_field_type . '" name="' . $attr_name . '" value="'.$attr_info['default'].'" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />'.$prefix.'';
739
+						$return .= '<input type="'.$attr_field_type.'" name="'.$attr_name.'" value="'.$attr_info['default'].'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />'.$prefix.'';
740 740
 					}
741 741
 				}
742 742
 				$return .= '</p>';
@@ -747,9 +747,9 @@  discard block
 block discarded – undo
747 747
 		///////////////////////////
748 748
 		// START GALLERY AND MAP FRONT END STUFFS
749 749
 		///////////////////////////
750
-		if ( isset( $shortcode['front'] ) && true == $shortcode['front'] ) {
750
+		if (isset($shortcode['front']) && true == $shortcode['front']) {
751 751
 
752
-			if ( 'gallery' == $shortcode['front_type'] ) {
752
+			if ('gallery' == $shortcode['front_type']) {
753 753
 
754 754
 				$return .= lasso_gallery_editor_module();
755 755
 
@@ -760,13 +760,13 @@  discard block
 block discarded – undo
760 760
 		///////////////////////////
761 761
 
762 762
 		// Single shortcode (not closed)
763
-		if ( 'single' == $shortcode['type'] ) {
763
+		if ('single' == $shortcode['type']) {
764 764
 
765 765
 			$return .= '<input type="hidden" name="lasso-generator-content" id="lasso-generator-content" value="false" />';
766 766
 
767 767
 		} else {
768 768
 
769
-			$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>';
769
+			$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>';
770 770
 		}
771 771
 
772 772
 		$return .= '<p class="lasso-buttoninsert-wrap"><a href="#" class="lasso-generator-cancel" id="lasso--sidebar__close">Cancel
@@ -799,7 +799,7 @@  discard block
 block discarded – undo
799 799
 				<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
800 800
 				<div id="lasso--hide" style="display:none;" class="lasso--post-form">
801 801
 					<i class="lasso-icon lasso-icon-move"></i>
802
-					<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>
802
+					<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>
803 803
 					<div class="lasso--slider_wrap">
804 804
 						<div id="lasso--slider"></div>
805 805
 					</div>
Please login to merge, or discard this patch.
public/includes/lasso.php 2 patches
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -255,14 +255,14 @@  discard block
 block discarded – undo
255 255
 		$out = load_textdomain( $domain, trailingslashit( LASSO_DIR ). 'languages/' . $domain . '-' . $locale . '.mo' );
256 256
 	}
257 257
 	
258
-    // new ajax function to lock post for editing
258
+	// new ajax function to lock post for editing
259 259
 	public function editus_lock_post()
260 260
 	{
261 261
 		$post_id= $_POST["postid"];
262 262
 		$locked = wp_check_post_lock($post_id);
263 263
 		
264 264
 		if (!$locked) {
265
-		    wp_set_post_lock($post_id);
265
+			wp_set_post_lock($post_id);
266 266
 			echo "true";
267 267
 		} else {
268 268
 			$user_info = get_userdata($locked);
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
 		 );
282 282
 		foreach ($_POST as $key => $value) {
283 283
 			if ($key !="code" && $key !="action") {
284
-			    //$shortcode = $shortcode.$key.'="'.$value.'" ';
284
+				//$shortcode = $shortcode.$key.'="'.$value.'" ';
285 285
 				$atts[$key] = $value;
286 286
 			}
287 287
 		}
@@ -291,42 +291,42 @@  discard block
 block discarded – undo
291 291
 		}*/
292 292
 		
293 293
 		if ($code == "aesop_image") {
294
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php');
295
-		    echo aesop_image_shortcode($atts);
294
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php');
295
+			echo aesop_image_shortcode($atts);
296 296
 		}
297 297
 		if ($code == "aesop_quote") {
298
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php');
299
-		    echo aesop_quote_shortcode($atts);
298
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php');
299
+			echo aesop_quote_shortcode($atts);
300 300
 		}
301 301
 		
302 302
 		if ($code == "aesop_parallax") {
303
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php');
304
-		    echo aesop_parallax_shortcode($atts);
303
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php');
304
+			echo aesop_parallax_shortcode($atts);
305 305
 		}
306 306
 		
307 307
 		if ($code == "aesop_character") {
308
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php');
309
-		    echo aesop_character_shortcode($atts);
308
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php');
309
+			echo aesop_character_shortcode($atts);
310 310
 		}
311 311
 		
312 312
 		if ($code == "aesop_collection") {
313
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php');
314
-		    echo aesop_collection_shortcode($atts);
313
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php');
314
+			echo aesop_collection_shortcode($atts);
315 315
 		}
316 316
 		
317 317
 		if ($code == "aesop_chapter") {
318
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php');
319
-		    echo aesop_chapter_shortcode($atts);
318
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php');
319
+			echo aesop_chapter_shortcode($atts);
320 320
 		}
321 321
 		
322 322
 		if ($code == "aesop_content") {
323
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php');
324
-		    echo aesop_content_shortcode($atts, $atts['content_data']);
323
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php');
324
+			echo aesop_content_shortcode($atts, $atts['content_data']);
325 325
 		}
326 326
 		
327 327
 		if ($code == "aesop_gallery") {
328
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
329
-		    echo do_shortcode( '[aesop_gallery id="'.$atts["id"].'"]');
328
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
329
+			echo do_shortcode( '[aesop_gallery id="'.$atts["id"].'"]');
330 330
 		}
331 331
 		
332 332
 		exit; 
Please login to merge, or discard this patch.
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -52,13 +52,13 @@  discard block
 block discarded – undo
52 52
 		require_once LASSO_DIR.'/public/includes/wrap-shortcodes.php';
53 53
 
54 54
 		// Activate plugin when new blog is added
55
-		add_action( 'wpmu_new_blog', array( $this, 'activate_new_site' ) );
55
+		add_action('wpmu_new_blog', array($this, 'activate_new_site'));
56 56
 
57 57
 		// Load plugin text domain
58
-		add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
58
+		add_action('init', array($this, 'load_plugin_textdomain'));
59 59
 		
60
-		add_action( 'wp_ajax_get_aesop_component',     array( $this, 'get_aesop_component' ) );
61
-		add_action( 'wp_ajax_editus_lock_post',     array( $this, 'editus_lock_post' ) );
60
+		add_action('wp_ajax_get_aesop_component', array($this, 'get_aesop_component'));
61
+		add_action('wp_ajax_editus_lock_post', array($this, 'editus_lock_post'));
62 62
 
63 63
 		//enqueue assets
64 64
 		new assets();
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	public static function get_instance() {
87 87
 
88 88
 		// If the single instance hasn't been set, set it now.
89
-		if ( null == self::$instance ) {
89
+		if (null == self::$instance) {
90 90
 			self::$instance = new self;
91 91
 		}
92 92
 
@@ -103,18 +103,18 @@  discard block
 block discarded – undo
103 103
 	 *                                       WPMU is disabled or plugin is
104 104
 	 *                                       activated on an individual blog.
105 105
 	 */
106
-	public static function activate( $network_wide ) {
106
+	public static function activate($network_wide) {
107 107
 
108
-		if ( function_exists( 'is_multisite' ) && is_multisite() ) {
108
+		if (function_exists('is_multisite') && is_multisite()) {
109 109
 
110
-			if ( $network_wide  ) {
110
+			if ($network_wide) {
111 111
 
112 112
 				// Get all blog ids
113 113
 				$blog_ids = self::get_blog_ids();
114 114
 
115
-				foreach ( $blog_ids as $blog_id ) {
115
+				foreach ($blog_ids as $blog_id) {
116 116
 
117
-					switch_to_blog( $blog_id );
117
+					switch_to_blog($blog_id);
118 118
 					self::single_activate();
119 119
 				}
120 120
 
@@ -140,18 +140,18 @@  discard block
 block discarded – undo
140 140
 	 *                                       WPMU is disabled or plugin is
141 141
 	 *                                       deactivated on an individual blog.
142 142
 	 */
143
-	public static function deactivate( $network_wide ) {
143
+	public static function deactivate($network_wide) {
144 144
 
145
-		if ( function_exists( 'is_multisite' ) && is_multisite() ) {
145
+		if (function_exists('is_multisite') && is_multisite()) {
146 146
 
147
-			if ( $network_wide ) {
147
+			if ($network_wide) {
148 148
 
149 149
 				// Get all blog ids
150 150
 				$blog_ids = self::get_blog_ids();
151 151
 
152
-				foreach ( $blog_ids as $blog_id ) {
152
+				foreach ($blog_ids as $blog_id) {
153 153
 
154
-					switch_to_blog( $blog_id );
154
+					switch_to_blog($blog_id);
155 155
 					self::single_deactivate();
156 156
 
157 157
 				}
@@ -175,13 +175,13 @@  discard block
 block discarded – undo
175 175
 	 *
176 176
 	 * @param int     $blog_id ID of the new blog.
177 177
 	 */
178
-	public function activate_new_site( $blog_id ) {
178
+	public function activate_new_site($blog_id) {
179 179
 
180
-		if ( 1 !== did_action( 'wpmu_new_blog' ) ) {
180
+		if (1 !== did_action('wpmu_new_blog')) {
181 181
 			return;
182 182
 		}
183 183
 
184
-		switch_to_blog( $blog_id );
184
+		switch_to_blog($blog_id);
185 185
 		self::single_activate();
186 186
 		restore_current_blog();
187 187
 
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 			WHERE archived = '0' AND spam = '0'
207 207
 			AND deleted = '0'";
208 208
 
209
-		return $wpdb->get_col( $sql );
209
+		return $wpdb->get_col($sql);
210 210
 
211 211
 	}
212 212
 
@@ -217,18 +217,18 @@  discard block
 block discarded – undo
217 217
 	 */
218 218
 	private static function single_activate() {
219 219
 
220
-		$curr_version = get_option( 'lasso_version' );
220
+		$curr_version = get_option('lasso_version');
221 221
 
222 222
 		// update upgraded from
223
-		if ( $curr_version ) {
224
-			update_option( 'lasso_updated_from', $curr_version );
223
+		if ($curr_version) {
224
+			update_option('lasso_updated_from', $curr_version);
225 225
 		}
226 226
 
227 227
 		// update lasso version option
228
-		update_option( 'lasso_version', LASSO_VERSION );
228
+		update_option('lasso_version', LASSO_VERSION);
229 229
 
230 230
 		// set transietn for activation welcome
231
-		set_transient( '_lasso_welcome_redirect', true, 30 );
231
+		set_transient('_lasso_welcome_redirect', true, 30);
232 232
 
233 233
 
234 234
 	}
@@ -250,15 +250,15 @@  discard block
 block discarded – undo
250 250
 	public function load_plugin_textdomain() {
251 251
 
252 252
 		$domain = $this->plugin_slug;
253
-		$locale = apply_filters( 'plugin_locale', get_locale(), $domain );
253
+		$locale = apply_filters('plugin_locale', get_locale(), $domain);
254 254
 
255
-		$out = load_textdomain( $domain, trailingslashit( LASSO_DIR ). 'languages/' . $domain . '-' . $locale . '.mo' );
255
+		$out = load_textdomain($domain, trailingslashit(LASSO_DIR).'languages/'.$domain.'-'.$locale.'.mo');
256 256
 	}
257 257
 	
258 258
     // new ajax function to lock post for editing
259 259
 	public function editus_lock_post()
260 260
 	{
261
-		$post_id= $_POST["postid"];
261
+		$post_id = $_POST["postid"];
262 262
 		$locked = wp_check_post_lock($post_id);
263 263
 		
264 264
 		if (!$locked) {
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 			echo "true";
267 267
 		} else {
268 268
 			$user_info = get_userdata($locked);
269
-			echo "Post opened by ".$user_info->first_name .  " " . $user_info->last_name;
269
+			echo "Post opened by ".$user_info->first_name." ".$user_info->last_name;
270 270
 		}
271 271
 		exit;
272 272
 	}
@@ -276,11 +276,11 @@  discard block
 block discarded – undo
276 276
 	{
277 277
 		
278 278
 		
279
-		$code= $_POST["code"];
279
+		$code = $_POST["code"];
280 280
 		$atts = array(
281 281
 		 );
282 282
 		foreach ($_POST as $key => $value) {
283
-			if ($key !="code" && $key !="action") {
283
+			if ($key != "code" && $key != "action") {
284 284
 			    //$shortcode = $shortcode.$key.'="'.$value.'" ';
285 285
 				$atts[$key] = $value;
286 286
 			}
@@ -291,42 +291,42 @@  discard block
 block discarded – undo
291 291
 		}*/
292 292
 		
293 293
 		if ($code == "aesop_image") {
294
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php');
294
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php');
295 295
 		    echo aesop_image_shortcode($atts);
296 296
 		}
297 297
 		if ($code == "aesop_quote") {
298
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php');
298
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php');
299 299
 		    echo aesop_quote_shortcode($atts);
300 300
 		}
301 301
 		
302 302
 		if ($code == "aesop_parallax") {
303
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php');
303
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php');
304 304
 		    echo aesop_parallax_shortcode($atts);
305 305
 		}
306 306
 		
307 307
 		if ($code == "aesop_character") {
308
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php');
308
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php');
309 309
 		    echo aesop_character_shortcode($atts);
310 310
 		}
311 311
 		
312 312
 		if ($code == "aesop_collection") {
313
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php');
313
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php');
314 314
 		    echo aesop_collection_shortcode($atts);
315 315
 		}
316 316
 		
317 317
 		if ($code == "aesop_chapter") {
318
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php');
318
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php');
319 319
 		    echo aesop_chapter_shortcode($atts);
320 320
 		}
321 321
 		
322 322
 		if ($code == "aesop_content") {
323
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php');
323
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php');
324 324
 		    echo aesop_content_shortcode($atts, $atts['content_data']);
325 325
 		}
326 326
 		
327 327
 		if ($code == "aesop_gallery") {
328
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
329
-		    echo do_shortcode( '[aesop_gallery id="'.$atts["id"].'"]');
328
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
329
+		    echo do_shortcode('[aesop_gallery id="'.$atts["id"].'"]');
330 330
 		}
331 331
 		
332 332
 		exit; 
Please login to merge, or discard this patch.