Completed
Push — master ( 920e5e...c084e4 )
by
unknown
02:54
created
public/includes/editor-modules.php 1 patch
Spacing   +190 added lines, -190 removed lines patch added patch discarded remove patch
@@ -12,32 +12,32 @@  discard block
 block discarded – undo
12 12
  *
13 13
  * @since 1.0
14 14
  */
15
-add_action( 'wp_footer', 'lasso_editor_controls' );
15
+add_action('wp_footer', 'lasso_editor_controls');
16 16
 function lasso_editor_controls() {
17 17
 
18 18
 	global $post;
19 19
 
20
-	if ( lasso_user_can('edit_posts') ) {
20
+	if (lasso_user_can('edit_posts')) {
21 21
 
22
-		$status = get_post_status( get_the_ID() );
22
+		$status = get_post_status(get_the_ID());
23 23
 
24 24
 		// let users add custom css classes
25
-		$custom_classes = apply_filters( 'lasso_control_classes', '' );
25
+		$custom_classes = apply_filters('lasso_control_classes', '');
26 26
 
27 27
 		$post_access_class   = '';
28
-		$post_new_disabled   = lasso_editor_get_option( 'post_adding_disabled', 'lasso_editor' );
29
-		$post_settings_disabled = lasso_editor_get_option( 'post_settings_disabled', 'lasso_editor' );
30
-		$shortcodify_disabled = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
28
+		$post_new_disabled   = lasso_editor_get_option('post_adding_disabled', 'lasso_editor');
29
+		$post_settings_disabled = lasso_editor_get_option('post_settings_disabled', 'lasso_editor');
30
+		$shortcodify_disabled = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor');
31 31
 
32 32
 
33 33
 		// CSS class if adding new post objects is disabled
34
-		if ( 'on' == $post_new_disabled ) { $post_access_class = 'lasso--post-new-disabled'; }
34
+		if ('on' == $post_new_disabled) { $post_access_class = 'lasso--post-new-disabled'; }
35 35
 
36 36
 		// CSS class if adjust settings is disabled
37
-		if ( 'on' == $post_settings_disabled ) { $post_access_class = 'lasso--post-settings-disabled'; }
37
+		if ('on' == $post_settings_disabled) { $post_access_class = 'lasso--post-settings-disabled'; }
38 38
 
39 39
 		// CSS class if adding new post objects AND settings are disabled
40
-		if ( 'on' == $post_new_disabled && 'on' == $post_settings_disabled ) { $post_access_class = 'lasso--post-all-disabled'; }
40
+		if ('on' == $post_new_disabled && 'on' == $post_settings_disabled) { $post_access_class = 'lasso--post-all-disabled'; }
41 41
 
42 42
 		// CSS class if shortcodify or (Aesop Shortcode Conversion) is disabled
43 43
 		$sc_saving_class = 'on' == $shortcodify_disabled ? 'shortcodify-disabled' : 'shortcodify-enabled';
@@ -45,44 +45,44 @@  discard block
 block discarded – undo
45 45
 		// user is capable
46 46
 		$is_capable = is_singular() && lasso_user_can('edit_post');
47 47
 
48
-		?><div id="lasso--controls" class="lasso-post-status--<?php echo sanitize_html_class( $status );?> <?php echo sanitize_html_class( $custom_classes );?>" data-post-id="<?php echo get_the_ID();?>" >
48
+		?><div id="lasso--controls" class="lasso-post-status--<?php echo sanitize_html_class($status); ?> <?php echo sanitize_html_class($custom_classes); ?>" data-post-id="<?php echo get_the_ID(); ?>" >
49 49
 
50
-			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class;?> ">
50
+			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class; ?> ">
51 51
 
52
-				<?php do_action( 'lasso_editor_controls_before' );
52
+				<?php do_action('lasso_editor_controls_before');
53 53
 
54
-				if ( $is_capable ) { ?>
54
+				if ($is_capable) { ?>
55 55
 
56
-					<li id="lasso--edit" title="<?php esc_attr_e( 'Edit Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
56
+					<li id="lasso--edit" title="<?php esc_attr_e('Edit Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
57 57
 
58
-					<?php if ( 'off' == $post_settings_disabled || empty( $post_settings_disabled ) ) { ?>
59
-						<li id="lasso--post-settings" title="<?php esc_attr_e( 'Post Settings', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
58
+					<?php if ('off' == $post_settings_disabled || empty($post_settings_disabled)) { ?>
59
+						<li id="lasso--post-settings" title="<?php esc_attr_e('Post Settings', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
60 60
 					<?php }
61 61
 
62 62
 				} ?>
63 63
 
64
-				<li id="lasso--post-all" title="<?php esc_attr_e( 'All Posts', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
64
+				<li id="lasso--post-all" title="<?php esc_attr_e('All Posts', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
65 65
 
66
-				<?php if ( $is_capable && wp_revisions_enabled( $post ) ) { ?>
67
-					<li id="lasso--post-revisions" title="<?php esc_attr_e( 'Revisions', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
66
+				<?php if ($is_capable && wp_revisions_enabled($post)) { ?>
67
+					<li id="lasso--post-revisions" title="<?php esc_attr_e('Revisions', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
68 68
 				<?php } ?>
69 69
 
70
-				<?php if ( ( 'off' == $post_new_disabled || empty( $post_new_disabled ) && lasso_user_can('publish_posts') ) ) { ?>
71
-					<li id="lasso--post-new" title="<?php esc_attr_e( 'Add Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
70
+				<?php if (('off' == $post_new_disabled || empty($post_new_disabled) && lasso_user_can('publish_posts'))) { ?>
71
+					<li id="lasso--post-new" title="<?php esc_attr_e('Add Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
72 72
 				<?php } ?>
73 73
 
74
-				<?php do_action( 'lasso_editor_controls_after' );?>
74
+				<?php do_action('lasso_editor_controls_after'); ?>
75 75
 
76 76
 			</ul>
77 77
 
78
-			<?php if ( is_singular() ) { ?>
78
+			<?php if (is_singular()) { ?>
79 79
 
80 80
 				<div class="lasso--controls__right">
81 81
 
82
-					<a href="#" title="<?php esc_attr_e( 'Save Post', 'lasso' );?>" id="lasso--save" class="lasso-save-post lasso--button <?php echo $sc_saving_class;?>"></a>
82
+					<a href="#" title="<?php esc_attr_e('Save Post', 'lasso'); ?>" id="lasso--save" class="lasso-save-post lasso--button <?php echo $sc_saving_class; ?>"></a>
83 83
 
84
-					<?php if ( 'draft' == $status && ( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') )  ) { ?>
85
-						<a href="#" title="<?php esc_attr_e( 'Publish Post', 'lasso' );?>" id="lasso--publish" class="lasso-publish-post lasso--button <?php echo $sc_saving_class;?>"></a>
84
+					<?php if ('draft' == $status && (lasso_user_can('publish_posts') || lasso_user_can('publish_pages'))) { ?>
85
+						<a href="#" title="<?php esc_attr_e('Publish Post', 'lasso'); ?>" id="lasso--publish" class="lasso-publish-post lasso--button <?php echo $sc_saving_class; ?>"></a>
86 86
 					<?php } ?>
87 87
 
88 88
 				</div>
@@ -105,13 +105,13 @@  discard block
 block discarded – undo
105 105
 
106 106
 	ob_start();
107 107
 
108
-	if ( !lasso_user_can() )
108
+	if (!lasso_user_can())
109 109
 		return;
110 110
 
111 111
 	// let users add custom css classes
112
-	$custom_classes = apply_filters( 'lasso_sidebar_classes', '' );
112
+	$custom_classes = apply_filters('lasso_sidebar_classes', '');
113 113
 	?>
114
-	<div id="lasso--sidebar" class="<?php echo sanitize_html_class( $custom_classes );?>" >
114
+	<div id="lasso--sidebar" class="<?php echo sanitize_html_class($custom_classes); ?>" >
115 115
 		<div class="lasso--sidebar__inner">
116 116
 			<div id="lasso--component__settings"></div>
117 117
 		</div>
@@ -129,80 +129,80 @@  discard block
 block discarded – undo
129 129
 
130 130
 	ob_start();
131 131
 
132
-	if ( !lasso_user_can() )
132
+	if (!lasso_user_can())
133 133
 		return;
134 134
 
135 135
 	// check for lasso story engine and add a class doniting this
136
-	$ase_status = class_exists( 'Aesop_Core' ) || defined( 'LASSO_CUSTOM' ) ? 'ase-active' : 'ase-not-active';
136
+	$ase_status = class_exists('Aesop_Core') || defined('LASSO_CUSTOM') ? 'ase-active' : 'ase-not-active';
137 137
 
138 138
 	// let users add custom css classes
139
-	$custom_classes = apply_filters( 'lasso_toolbar_classes', '' );
139
+	$custom_classes = apply_filters('lasso_toolbar_classes', '');
140 140
 
141 141
 	// are toolbar headings enabled
142
-	$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
142
+	$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
143 143
 
144
-	$toolbar_class  = $toolbar_headings ? 'toolbar-extended' : false;
144
+	$toolbar_class = $toolbar_headings ? 'toolbar-extended' : false;
145 145
 
146 146
 	?>
147
-	<div class="lasso--toolbar_wrap lasso-editor-controls--wrap <?php echo $toolbar_class.' '.$ase_status.' '.sanitize_html_class( $custom_classes );?>">
147
+	<div class="lasso--toolbar_wrap lasso-editor-controls--wrap <?php echo $toolbar_class.' '.$ase_status.' '.sanitize_html_class($custom_classes); ?>">
148 148
 		<ul class="lasso--toolbar__inner lasso-editor-controls">
149
-			<?php do_action( 'lasso_toolbar_components_before' );?>
150
-		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e( 'Bold', 'lasso' );?>"></li>
151
-		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e( 'Underline', 'lasso' );?>"></li>
152
-		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e( 'Italicize', 'lasso' );?>"></li>
153
-		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e( 'Strikethrough', 'lasso' );?>"></li>
154
-		    <?php if ( $toolbar_headings ): ?>
155
-		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>"></li>
156
-		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>"></li>
149
+			<?php do_action('lasso_toolbar_components_before'); ?>
150
+		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e('Bold', 'lasso'); ?>"></li>
151
+		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e('Underline', 'lasso'); ?>"></li>
152
+		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e('Italicize', 'lasso'); ?>"></li>
153
+		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e('Strikethrough', 'lasso'); ?>"></li>
154
+		    <?php if ($toolbar_headings): ?>
155
+		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>"></li>
156
+		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>"></li>
157 157
 			<?php endif; ?>
158
-			<li id="lasso-toolbar--color" style="color:red;" title="<?php esc_attr_e( 'Color', 'lasso' );?>">C</li>
159
-		    <li id="lasso-toolbar--link" title="<?php esc_attr_e( 'Anchor Link', 'lasso' );?>">
158
+			<li id="lasso-toolbar--color" style="color:red;" title="<?php esc_attr_e('Color', 'lasso'); ?>">C</li>
159
+		    <li id="lasso-toolbar--link" title="<?php esc_attr_e('Anchor Link', 'lasso'); ?>">
160 160
 		    	<div id="lasso-toolbar--link__wrap">
161
-		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'http://url.com', 'lasso' );?>"></div>
162
-		    		<a href="#" title="<?php esc_attr_e( 'Create Link', 'lasso' );?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
161
+		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e('http://url.com', 'lasso'); ?>"></div>
162
+		    		<a href="#" title="<?php esc_attr_e('Create Link', 'lasso'); ?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
163 163
 					<input type="checkbox" />
164 164
                     <label>Styled Check Box</label>
165 165
 		    	</div>
166 166
 		    </li>
167
-		    <?php do_action( 'lasso_toolbar_components_after' );?>
168
-		    <li id="lasso-toolbar--html" title="<?php esc_attr_e( 'Insert HTML', 'lasso' );?>">
167
+		    <?php do_action('lasso_toolbar_components_after'); ?>
168
+		    <li id="lasso-toolbar--html" title="<?php esc_attr_e('Insert HTML', 'lasso'); ?>">
169 169
 		    	<div id="lasso-toolbar--html__wrap">
170
-		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?>"></div>
170
+		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?>"></div>
171 171
 		    		<div id="lasso-toolbar--html__footer">
172 172
 		    			<ul class="lasso-toolbar--html-snips">
173
-		    				<?php if ( !$toolbar_headings ): ?>
174
-		    				<li id="lasso-html--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>">
175
-		    				<li id="lasso-html--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>">
173
+		    				<?php if (!$toolbar_headings): ?>
174
+		    				<li id="lasso-html--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>">
175
+		    				<li id="lasso-html--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>">
176 176
 		    				<?php endif; ?>
177
-		    				<li id="lasso-html--ul" title="<?php esc_attr_e( 'Unordered List', 'lasso' );?>">
178
-		    				<li id="lasso-html--ol" title="<?php esc_attr_e( 'Ordered List', 'lasso' );?>">
177
+		    				<li id="lasso-html--ul" title="<?php esc_attr_e('Unordered List', 'lasso'); ?>">
178
+		    				<li id="lasso-html--ol" title="<?php esc_attr_e('Ordered List', 'lasso'); ?>">
179 179
 		    			</ul>
180
-		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e( 'Cancel', 'lasso' );?></a>
181
-		    			<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>
180
+		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e('Cancel', 'lasso'); ?></a>
181
+		    			<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>
182 182
 		    		</div>
183 183
 		    	</div>
184 184
 		    </li>
185
-		    <li id="lasso-toolbar--components" title="<?php esc_attr_e( 'Insert Component', 'lasso' );?>">
185
+		    <li id="lasso-toolbar--components" title="<?php esc_attr_e('Insert Component', 'lasso'); ?>">
186 186
 			    <ul id="lasso-toolbar--components__list">
187
-			    	<?php if ( 'ase-active' == $ase_status ): ?>
188
-						<li data-type="image" title="<?php esc_attr_e( 'Image', 'lasso' );?>" class="lasso-toolbar--component__image"></li>
189
-						<li data-type="character" title="<?php esc_attr_e( 'Character', 'lasso' );?>" class="lasso-toolbar--component__character"></li>
190
-						<li data-type="quote" title="<?php esc_attr_e( 'Quote', 'lasso' );?>"  class="lasso-toolbar--component__quote"></li>
191
-						<li data-type="content" title="<?php esc_attr_e( 'Content', 'lasso' );?>"  class="lasso-toolbar--component__content"></li>
192
-						<li data-type="chapter" title="<?php esc_attr_e( 'Chapter', 'lasso' );?>"  class="lasso-toolbar--component__chapter"></li>
193
-						<li data-type="parallax" title="<?php esc_attr_e( 'Parallax', 'lasso' );?>"  class="lasso-toolbar--component__parallax"></li>
194
-						<li data-type="audio" title="<?php esc_attr_e( 'Audio', 'lasso' );?>"  class="lasso-toolbar--component__audio"></li>
195
-						<li data-type="video" title="<?php esc_attr_e( 'Video', 'lasso' );?>"  class="lasso-toolbar--component__video"></li>
196
-						<li data-type="map" title="<?php esc_attr_e( 'Map', 'lasso' );?>"  class="lasso-toolbar--component__map"></li>
197
-						<li data-type="timeline_stop" title="<?php esc_attr_e( 'Timeline', 'lasso' );?>"  class="lasso-toolbar--component__timeline"></li>
198
-						<li data-type="document" title="<?php esc_attr_e( 'Document', 'lasso' );?>"  class="lasso-toolbar--component__document"></li>
199
-						<li data-type="collection" title="<?php esc_attr_e( 'Collection', 'lasso' );?>"  class="lasso-toolbar--component__collection"></li>
200
-						<li data-type="gallery" title="<?php esc_attr_e( 'Gallery', 'lasso' );?>"  class="lasso-toolbar--component__gallery"></li>
187
+			    	<?php if ('ase-active' == $ase_status): ?>
188
+						<li data-type="image" title="<?php esc_attr_e('Image', 'lasso'); ?>" class="lasso-toolbar--component__image"></li>
189
+						<li data-type="character" title="<?php esc_attr_e('Character', 'lasso'); ?>" class="lasso-toolbar--component__character"></li>
190
+						<li data-type="quote" title="<?php esc_attr_e('Quote', 'lasso'); ?>"  class="lasso-toolbar--component__quote"></li>
191
+						<li data-type="content" title="<?php esc_attr_e('Content', 'lasso'); ?>"  class="lasso-toolbar--component__content"></li>
192
+						<li data-type="chapter" title="<?php esc_attr_e('Chapter', 'lasso'); ?>"  class="lasso-toolbar--component__chapter"></li>
193
+						<li data-type="parallax" title="<?php esc_attr_e('Parallax', 'lasso'); ?>"  class="lasso-toolbar--component__parallax"></li>
194
+						<li data-type="audio" title="<?php esc_attr_e('Audio', 'lasso'); ?>"  class="lasso-toolbar--component__audio"></li>
195
+						<li data-type="video" title="<?php esc_attr_e('Video', 'lasso'); ?>"  class="lasso-toolbar--component__video"></li>
196
+						<li data-type="map" title="<?php esc_attr_e('Map', 'lasso'); ?>"  class="lasso-toolbar--component__map"></li>
197
+						<li data-type="timeline_stop" title="<?php esc_attr_e('Timeline', 'lasso'); ?>"  class="lasso-toolbar--component__timeline"></li>
198
+						<li data-type="document" title="<?php esc_attr_e('Document', 'lasso'); ?>"  class="lasso-toolbar--component__document"></li>
199
+						<li data-type="collection" title="<?php esc_attr_e('Collection', 'lasso'); ?>"  class="lasso-toolbar--component__collection"></li>
200
+						<li data-type="gallery" title="<?php esc_attr_e('Gallery', 'lasso'); ?>"  class="lasso-toolbar--component__gallery"></li>
201 201
 					<?php else: ?>
202
-						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );?>" class="image lasso-toolbar--component__image"></li>
203
-						<li data-type="wpquote" title="<?php esc_attr_e( 'WordPress Quote', 'lasso' );?>" class="quote lasso-toolbar--component__quote"></li>
202
+						<li data-type="wpimg" title="<?php esc_attr_e('WordPress Image', 'lasso'); ?>" class="image lasso-toolbar--component__image"></li>
203
+						<li data-type="wpquote" title="<?php esc_attr_e('WordPress Quote', 'lasso'); ?>" class="quote lasso-toolbar--component__quote"></li>
204 204
 					<?php endif; ?>
205
-					<?php do_action( 'lasso_toolbar_components' );?>
205
+					<?php do_action('lasso_toolbar_components'); ?>
206 206
 			    </ul>
207 207
 			</li>
208 208
 		</ul>
@@ -218,22 +218,22 @@  discard block
 block discarded – undo
218 218
  */
219 219
 function lasso_editor_settings_toolbar() {
220 220
 
221
-	$delete_nonce = wp_create_nonce( 'lasso-delete-nonce' );
221
+	$delete_nonce = wp_create_nonce('lasso-delete-nonce');
222 222
 
223 223
 	ob_start();
224 224
 
225
-	if ( !lasso_user_can() )
225
+	if (!lasso_user_can())
226 226
 		return;
227 227
 
228 228
 	// let users add custom css classes
229
-	$custom_classes = apply_filters( 'lasso_component_classes', '' );
229
+	$custom_classes = apply_filters('lasso_component_classes', '');
230 230
 
231 231
 	?>
232
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
233
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
234
-		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
235
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
236
-		<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>
232
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
233
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
234
+		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
235
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
236
+		<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>
237 237
 	</ul>
238 238
 
239 239
 	<?php return ob_get_clean();
@@ -249,17 +249,17 @@  discard block
 block discarded – undo
249 249
 
250 250
 	ob_start();
251 251
 
252
-	if ( !lasso_user_can() )
252
+	if (!lasso_user_can())
253 253
 		return;
254 254
 
255 255
 	// has post thumbnail
256
-	$has_thumbnail = has_post_thumbnail( get_the_ID() ) ? 'class="lasso--featImg--has-thumb"' : false;
256
+	$has_thumbnail = has_post_thumbnail(get_the_ID()) ? 'class="lasso--featImg--has-thumb"' : false;
257 257
 
258 258
 	?>
259
-	<ul id="lasso--featImgControls" <?php echo $has_thumbnail;?>>
260
-		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e( 'Replace Image', 'lasso' );?>" href="#"><i class="lasso-icon-image"></i></a></li>
261
-		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e( 'Delete Image', 'lasso' );?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
262
-		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e( 'save', 'lasso' );?></a></li>
259
+	<ul id="lasso--featImgControls" <?php echo $has_thumbnail; ?>>
260
+		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e('Replace Image', 'lasso'); ?>" href="#"><i class="lasso-icon-image"></i></a></li>
261
+		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e('Delete Image', 'lasso'); ?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
262
+		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e('save', 'lasso'); ?></a></li>
263 263
 	</ul>
264 264
 
265 265
 	<?php return ob_get_clean();
@@ -278,55 +278,55 @@  discard block
 block discarded – undo
278 278
 
279 279
 	ob_start();
280 280
 
281
-	if ( !lasso_user_can() )
281
+	if (!lasso_user_can())
282 282
 		return;
283 283
 
284 284
 	global $post;
285 285
 
286 286
 	$postid = get_the_ID();
287 287
 
288
-	$status = get_post_status( $postid );
289
-	$nonce = wp_create_nonce( 'lasso-update-post-settings' );
288
+	$status = get_post_status($postid);
289
+	$nonce = wp_create_nonce('lasso-update-post-settings');
290 290
 
291 291
 	// let users add custom css classes
292
-	$custom_classes = apply_filters( 'lasso_modal_settings_classes', '' );
292
+	$custom_classes = apply_filters('lasso_modal_settings_classes', '');
293 293
 
294 294
 	// objects categories
295
-	$categories 		= lasso_get_post_objects( $postid, 'category' );
296
-	$tags 				= lasso_get_post_objects( $postid, 'tag' );
295
+	$categories = lasso_get_post_objects($postid, 'category');
296
+	$tags = lasso_get_post_objects($postid, 'tag');
297 297
 
298 298
 	// modal tabs
299
-	$tabs  				= lasso_modal_addons('tab');
300
-	$content 			= lasso_modal_addons('content');
299
+	$tabs = lasso_modal_addons('tab');
300
+	$content = lasso_modal_addons('content');
301 301
 
302 302
 	// are we singular
303
-	$is_singular 		= is_singular();
303
+	$is_singular = is_singular();
304 304
 	$is_singular_class 	= $is_singular ? 'lasso--postsettings__2col' : 'lasso--postsettings__1col';
305 305
 	$has_thumb_class    = has_post_thumbnail() ? 'has-thumbnail' : 'no-thumbnail';
306 306
 	$theme_supports     = current_theme_supports('post-thumbnails');
307
-	$default_image 		= LASSO_URL.'/admin/assets/img/empty-img.png';
307
+	$default_image = LASSO_URL.'/admin/assets/img/empty-img.png';
308 308
 
309 309
 ?>
310
-	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>">
310
+	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>">
311 311
 		<div class="lasso--modal__inner">
312 312
 
313
-			<?php if( $tabs ) { echo $tabs; } ?>
313
+			<?php if ($tabs) { echo $tabs; } ?>
314 314
 
315 315
 			<div class="lasso--modal__content modal__content--core visible" data-addon-content="core">
316
-				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class;?>" >
316
+				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class; ?>" >
317 317
 
318
-					<?php if ( $is_singular && $theme_supports ) : ?>
318
+					<?php if ($is_singular && $theme_supports) : ?>
319 319
 					<div class="lasso--postsettings__left">
320
-						<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>
321
-						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url( $default_image );?>">
320
+						<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>
321
+						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url($default_image); ?>">
322 322
 
323 323
 							<div id="lasso--post-thumb__controls" class="lasso--post-thumb__controls">
324
-								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image','lasso');?>" class="dashicons dashicons-edit"></i>
325
-								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image','lasso');?>" class="dashicons dashicons-no-alt"></i>
324
+								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image', 'lasso'); ?>" class="dashicons dashicons-edit"></i>
325
+								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image', 'lasso'); ?>" class="dashicons dashicons-no-alt"></i>
326 326
 								<i id="lasso--save-status" class="lasso-icon lasso-icon-spinner6 not-visible"></i>
327 327
 							</div>
328 328
 
329
-							<?php echo has_post_thumbnail() ? get_the_post_thumbnail( $post->ID, 'medium' ) : '<img src="'.$default_image.'">'; ?>
329
+							<?php echo has_post_thumbnail() ? get_the_post_thumbnail($post->ID, 'medium') : '<img src="'.$default_image.'">'; ?>
330 330
 
331 331
 						</div>
332 332
 						<div id="lasso--featImgSave"><a href="#" class="not-visible">Save</a></div>
@@ -336,12 +336,12 @@  discard block
 block discarded – undo
336 336
 
337 337
 					<div class="lasso--postsettings__right">
338 338
 
339
-						<?php if( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') ): ?>
339
+						<?php if (lasso_user_can('publish_posts') || lasso_user_can('publish_pages')): ?>
340 340
 						<div class="lasso--postsettings__option story-status-option">
341
-							<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>
342
-							<ul class="story-status story-status-<?php echo sanitize_html_class( $status );?>">
343
-								<li id="lasso--status-draft"><?php _e( 'Draft', 'lasso' );?></li>
344
-								<li id="lasso--status-publish"><?php _e( 'Publish', 'lasso' );?></li>
341
+							<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>
342
+							<ul class="story-status story-status-<?php echo sanitize_html_class($status); ?>">
343
+								<li id="lasso--status-draft"><?php _e('Draft', 'lasso'); ?></li>
344
+								<li id="lasso--status-publish"><?php _e('Publish', 'lasso'); ?></li>
345 345
 							</ul>
346 346
 							<div class="lasso--slider_wrap">
347 347
 								<div id="lasso--slider"></div>
@@ -349,10 +349,10 @@  discard block
 block discarded – undo
349 349
 						</div>
350 350
 						<?php endif; ?>
351 351
 
352
-						<?php if ( 'publish' == $status ): ?>
352
+						<?php if ('publish' == $status): ?>
353 353
 						<div class="lasso--postsettings__option story-slug-option">
354
-							<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>
355
-							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset( $post ) ? esc_attr( $post->post_name ) : false;?>">
354
+							<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>
355
+							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset($post) ? esc_attr($post->post_name) : false; ?>">
356 356
 						</div>
357 357
 						<?php endif; ?>
358 358
 
@@ -361,34 +361,34 @@  discard block
 block discarded – undo
361 361
 					<div class="lasso--postsettings__middle">
362 362
 
363 363
 						<div class="lasso--postsettings__option story-categories-option">
364
-							<label><?php _e( 'Categories', 'lasso' );?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e( 'Type a category name and press enter.', 'lasso' );?>"><i class="lasso-icon-help"></i></span></label>
365
-							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories;?>">
364
+							<label><?php _e('Categories', 'lasso'); ?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e('Type a category name and press enter.', 'lasso'); ?>"><i class="lasso-icon-help"></i></span></label>
365
+							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories; ?>">
366 366
 						</div>
367 367
 
368 368
 						<div class="lasso--postsettings__option story-tags-option">
369
-							<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>
370
-							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags;?>">
369
+							<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>
370
+							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags; ?>">
371 371
 						</div>
372 372
 
373 373
 					</div>
374 374
 
375
-					<?php do_action( 'lasso_modal_post_form' ); // action ?>
375
+					<?php do_action('lasso_modal_post_form'); // action ?>
376 376
 
377 377
 					<div class="lasso--postsettings__footer" style="display:none;">
378
-						<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
378
+						<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
379 379
 						<input type="hidden" name="status" value="">
380 380
 						<input type="hidden" name="categories" value="">
381
-						<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
381
+						<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
382 382
 						<input type="hidden" name="action" value="process_update-object_post">
383
-						<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
384
-						<?php do_action( 'lasso_modal_post_form_footer' ); // action ?>
385
-						<input type="submit" value="<?php esc_attr_e( 'Save', 'lasso' );?>">
383
+						<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
384
+						<?php do_action('lasso_modal_post_form_footer'); // action ?>
385
+						<input type="submit" value="<?php esc_attr_e('Save', 'lasso'); ?>">
386 386
 					</div>
387 387
 
388 388
 				</form>
389 389
 			</div>
390 390
 
391
-			<?php if( $tabs ) { echo $content; } ?>
391
+			<?php if ($tabs) { echo $content; } ?>
392 392
 
393 393
 		</div>
394 394
 
@@ -409,41 +409,41 @@  discard block
 block discarded – undo
409 409
 
410 410
 	ob_start();
411 411
 
412
-	if ( !lasso_user_can('edit_posts') )
412
+	if (!lasso_user_can('edit_posts'))
413 413
 		return;
414 414
 
415
-	$status = get_post_status( get_the_ID() );
415
+	$status = get_post_status(get_the_ID());
416 416
 
417
-	$nonce = wp_create_nonce( 'lasso-editor-new-post' );
417
+	$nonce = wp_create_nonce('lasso-editor-new-post');
418 418
 
419 419
 	// let users add custom css classes
420
-	$custom_classes = apply_filters( 'lasso_modal_post_classes', '' );
420
+	$custom_classes = apply_filters('lasso_modal_post_classes', '');
421 421
 
422 422
 	// return the post type
423
-	$type = get_post_type( get_the_ID() );
423
+	$type = get_post_type(get_the_ID());
424 424
 
425 425
 	?>
426
-	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>">
426
+	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>">
427 427
 		<div class="lasso--modal__inner">
428 428
 
429 429
 			<form id="lasso--postnew__form" enctype="multipart/form-data" class="lasso--post-form">
430 430
 
431 431
 				<div class="lasso--postsettings__option story-slug-option lasso--last-option">
432
-					<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>
433
-					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e( 'Grump Wizards Make Toxic Brew', 'lasso' );?>">
432
+					<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>
433
+					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e('Grump Wizards Make Toxic Brew', 'lasso'); ?>">
434 434
 						<div class="lasso--select-wrap">
435 435
 						<select id="lasso--select-type" name="story_type">
436 436
 
437 437
 							<?php
438 438
 								$types = lasso_post_types();
439 439
 
440
-								if ( !empty( $types ) ) {
440
+								if (!empty($types)) {
441 441
 
442
-									foreach( $types as $type ) {
442
+									foreach ($types as $type) {
443 443
 
444
-										$type = preg_replace( '/s\b/','', $type );
444
+										$type = preg_replace('/s\b/', '', $type);
445 445
 
446
-										printf( '<option value="%s">%s</option>', lcfirst( esc_attr( $type ) ) , ucfirst( esc_attr( $type ) ) );
446
+										printf('<option value="%s">%s</option>', lcfirst(esc_attr($type)), ucfirst(esc_attr($type)));
447 447
 									}
448 448
 
449 449
 								}
@@ -454,11 +454,11 @@  discard block
 block discarded – undo
454 454
 				</div>
455 455
 
456 456
 				<div class="lasso--postsettings__footer" style="display:none;">
457
-					<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
457
+					<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
458 458
 					<input type="hidden" name="action" value="process_new-object_post">
459 459
 					<input type="hidden" name="object" value="post">
460
-					<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
461
-					<input type="submit" value="<?php esc_attr_e( 'Create', 'lasso' );?>">
460
+					<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
461
+					<input type="submit" value="<?php esc_attr_e('Create', 'lasso'); ?>">
462 462
 				</div>
463 463
 
464 464
 			</form>
@@ -482,18 +482,18 @@  discard block
 block discarded – undo
482 482
 	ob_start();
483 483
 
484 484
 	// post status
485
-	$status = get_post_status( get_the_ID() );
485
+	$status = get_post_status(get_the_ID());
486 486
 
487 487
 	// let users add custom css classes
488
-	$custom_classes = apply_filters( 'lasso_modal_all_post_classes', '' );
488
+	$custom_classes = apply_filters('lasso_modal_all_post_classes', '');
489 489
 
490 490
 	?>
491
-	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>">
491
+	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>">
492 492
 		<div class="lasso--modal__inner">
493 493
 
494 494
 			<div class="lasso--post-filtering not-visible">
495 495
 				<div class="lasso--search__results">
496
-					<span id="lasso--results-found"></span><?php _e('results found','lasso');?>
496
+					<span id="lasso--results-found"></span><?php _e('results found', 'lasso'); ?>
497 497
 				</div>
498 498
 				<div class="lasso--search">
499 499
 					<i id="lasso--search__toggle" class="dashicons dashicons-search"></i>
@@ -506,16 +506,16 @@  discard block
 block discarded – undo
506 506
 
507 507
 				$post_types = lasso_post_types_names();
508 508
 
509
-				if ( ! empty( $post_types ) ) {
509
+				if (!empty($post_types)) {
510 510
 					$first = 'active';
511
-					foreach( $post_types as $name => $label ) {
512
-						printf( '<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr( $first), esc_attr( $name ), esc_attr( $label ) );
511
+					foreach ($post_types as $name => $label) {
512
+						printf('<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr($first), esc_attr($name), esc_attr($label));
513 513
 						$first = '';
514 514
 					}
515 515
 
516 516
 				}
517 517
 
518
-				do_action('lasso_modal_post_objects');?>
518
+				do_action('lasso_modal_post_objects'); ?>
519 519
 
520 520
 			</ul>
521 521
 			<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
@@ -533,18 +533,18 @@  discard block
 block discarded – undo
533 533
 
534 534
 	ob_start();
535 535
 
536
-	if ( !lasso_user_can() )
536
+	if (!lasso_user_can())
537 537
 		return;
538 538
 
539 539
 	// let users add custom css classes
540
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
540
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
541 541
 
542 542
 	?>
543
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
544
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
545
-		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
546
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
547
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
543
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
544
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
545
+		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
546
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
547
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
548 548
 	</ul>
549 549
 
550 550
 	<?php return ob_get_clean();
@@ -557,16 +557,16 @@  discard block
 block discarded – undo
557 557
  */
558 558
 function lasso_map_form_footer() {
559 559
 
560
-	$nonce = wp_create_nonce( 'lasso-process-map' );
560
+	$nonce = wp_create_nonce('lasso-process-map');
561 561
 
562 562
 	ob_start();
563 563
 
564 564
 	?>
565 565
 	<div class="lasso--map-form__footer">
566
-		<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
567
-		<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
566
+		<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
567
+		<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
568 568
 		<input type="hidden" name="action" value="process_map_save">
569
-		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e( 'Save Locations', 'lasso' );?>">
569
+		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e('Save Locations', 'lasso'); ?>">
570 570
 	</div>
571 571
 
572 572
 	<?php return ob_get_clean();
@@ -584,7 +584,7 @@  discard block
 block discarded – undo
584 584
 
585 585
 	?>
586 586
 	<div id="lasso--pagerefresh" class="visible">
587
-		<?php _e( 'Save this post and refesh the page to see these changes.', 'lasso' );?>
587
+		<?php _e('Save this post and refesh the page to see these changes.', 'lasso'); ?>
588 588
 	</div>
589 589
 
590 590
 	<?php return ob_get_clean();
@@ -598,43 +598,43 @@  discard block
 block discarded – undo
598 598
  */
599 599
 function lasso_editor_options_blob() {
600 600
 
601
-	$codes   = function_exists( 'aesop_shortcodes' ) ? aesop_shortcodes() : apply_filters( 'lasso_custom_options', '' );
602
-	$galleries  = function_exists( 'lasso_editor_galleries_exist' ) && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
601
+	$codes = function_exists('aesop_shortcodes') ? aesop_shortcodes() : apply_filters('lasso_custom_options', '');
602
+	$galleries = function_exists('lasso_editor_galleries_exist') && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
603 603
 
604
-	$nonce = wp_create_nonce( 'lasso_gallery' );
604
+	$nonce = wp_create_nonce('lasso_gallery');
605 605
 
606 606
 	$blob = array();
607 607
 
608
-	if ( empty( $codes ) )
608
+	if (empty($codes))
609 609
 		return;
610 610
 
611
-	foreach ( $codes as $slug => $shortcode ) {
611
+	foreach ($codes as $slug => $shortcode) {
612 612
 		$return = '';
613 613
 		// Shortcode has atts
614 614
 
615
-		if ( count( $shortcode['atts'] ) && $shortcode['atts'] ) {
615
+		if (count($shortcode['atts']) && $shortcode['atts']) {
616 616
 
617
-			foreach ( $shortcode['atts'] as $attr_name => $attr_info ) {
617
+			foreach ($shortcode['atts'] as $attr_name => $attr_info) {
618 618
 
619 619
 
620
-				$prefix = isset( $attr_info['prefix'] ) ? sprintf( '<span class="lasso-option-prefix">%s</span>', $attr_info['prefix'] ) : null;
620
+				$prefix = isset($attr_info['prefix']) ? sprintf('<span class="lasso-option-prefix">%s</span>', $attr_info['prefix']) : null;
621 621
 
622 622
 				$return .= '<form id="lasso--component-settings-form" class="'.$galleries.'" method="post">';
623 623
 				$return .= '<p data-option="'.$attr_name.'" class="lasso-option lasso-'.$slug.'-'.$attr_name.'">';
624
-				$return .= '<label for="lasso-generator-attr-' . $attr_name . '">' . $attr_info['desc'] . '</label>';
624
+				$return .= '<label for="lasso-generator-attr-'.$attr_name.'">'.$attr_info['desc'].'</label>';
625 625
 				$return .= '<small class="lasso-option-desc">'.$attr_info['tip'].'</small>';
626 626
 				// Select
627 627
 
628
-				if ( isset( $attr_info['values'] ) ) {
628
+				if (isset($attr_info['values'])) {
629 629
 
630
-					$return .= '<select name="' . $attr_name . '" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr">';
630
+					$return .= '<select name="'.$attr_name.'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr">';
631 631
 
632
-					$i=0;
632
+					$i = 0;
633 633
 
634
-					foreach ( $attr_info['values'] as $attr_value ) {
634
+					foreach ($attr_info['values'] as $attr_value) {
635 635
 						$attr_value_selected = $attr_info['default'] == $attr_value ? ' selected="selected"' : '';
636 636
 
637
-						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" ' . $attr_value_selected . '>'.$attr_info['values'][$i]['name'].'</option>';
637
+						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" '.$attr_value_selected.'>'.$attr_info['values'][$i]['name'].'</option>';
638 638
 
639 639
 						$i++;
640 640
 					}
@@ -643,24 +643,24 @@  discard block
 block discarded – undo
643 643
 
644 644
 				} else {
645 645
 
646
-					$attr_field_type = isset( $attr_info['type'] ) ? $attr_info['type'] : 'text';
646
+					$attr_field_type = isset($attr_info['type']) ? $attr_info['type'] : 'text';
647 647
 
648 648
 					// image upload
649
-					if ( 'media_upload' == $attr_info['type'] ) {
649
+					if ('media_upload' == $attr_info['type']) {
650 650
 
651
-						$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.'" />';
651
+						$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.'" />';
652 652
 						$return .= '<a href="#" id="lasso-upload-img" class="lasso-option-button" /></a>';
653 653
 
654
-					} elseif ( 'color' == $attr_info['type'] ) {
654
+					} elseif ('color' == $attr_info['type']) {
655 655
 
656
-						$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.'" />';
656
+						$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.'" />';
657 657
 
658
-					} elseif ( 'text_area' == $attr_info['type'] ) {
658
+					} elseif ('text_area' == $attr_info['type']) {
659 659
 
660
-						$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.'';
660
+						$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.'';
661 661
 
662 662
 					} else {
663
-						$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.'';
663
+						$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.'';
664 664
 					}
665 665
 				}
666 666
 				$return .= '</p>';
@@ -671,9 +671,9 @@  discard block
 block discarded – undo
671 671
 		///////////////////////////
672 672
 		// START GALLERY AND MAP FRONT END STUFFS
673 673
 		///////////////////////////
674
-		if ( isset( $shortcode['front'] ) && true == $shortcode['front'] ) {
674
+		if (isset($shortcode['front']) && true == $shortcode['front']) {
675 675
 
676
-			if ( 'gallery' == $shortcode['front_type'] ) {
676
+			if ('gallery' == $shortcode['front_type']) {
677 677
 
678 678
 				$return .= lasso_gallery_editor_module();
679 679
 
@@ -684,13 +684,13 @@  discard block
 block discarded – undo
684 684
 		///////////////////////////
685 685
 
686 686
 		// Single shortcode (not closed)
687
-		if ( 'single' == $shortcode['type'] ) {
687
+		if ('single' == $shortcode['type']) {
688 688
 
689 689
 			$return .= '<input type="hidden" name="lasso-generator-content" id="lasso-generator-content" value="false" />';
690 690
 
691 691
 		} else {
692 692
 
693
-			$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>';
693
+			$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>';
694 694
 		}
695 695
 
696 696
 		$return .= '<p class="lasso-buttoninsert-wrap"><a href="#" class="lasso-generator-cancel" id="lasso--sidebar__close">Cancel
@@ -723,7 +723,7 @@  discard block
 block discarded – undo
723 723
 				<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
724 724
 				<div id="lasso--hide" style="display:none;" class="lasso--post-form">
725 725
 					<i class="lasso-icon lasso-icon-move"></i>
726
-					<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>
726
+					<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>
727 727
 					<div class="lasso--slider_wrap">
728 728
 						<div id="lasso--slider"></div>
729 729
 					</div>
Please login to merge, or discard this patch.
public/includes/helpers.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 		'public' => true,
246 246
 	), 'objects' );
247 247
 	$post_types = array_combine( array_keys( $post_types ), wp_list_pluck( $post_types, 'label' ) );
248
-    unset( $post_types[ 'attachment' ] );
248
+	unset( $post_types[ 'attachment' ] );
249 249
 
250 250
 	/**
251 251
 	 * Set which post types are allowed
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
 		'public' => true,
270 270
 	), 'names' );
271 271
 	//$post_types = array_combine( array_keys( $post_types ), wp_list_pluck( $post_types, 'label' ) );
272
-    unset( $post_types[ 'attachment' ] );
272
+	unset( $post_types[ 'attachment' ] );
273 273
 
274 274
 	/**
275 275
 	 * Set which post types are allowed
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
  */
372 372
 if ( !function_exists( 'lasso_user_can' ) ):
373 373
 	function lasso_user_can( $action = '', $postid = 0 ) {
374
-        $result = false;
374
+		$result = false;
375 375
 		if ( empty( $action ) )
376 376
 			$action = 'edit_posts';
377 377
 
Please login to merge, or discard this patch.
Spacing   +72 added lines, -72 removed lines patch added patch discarded remove patch
@@ -12,21 +12,21 @@  discard block
 block discarded – undo
12 12
  * @return the option value
13 13
  * @since 1.0
14 14
  */
15
-function lasso_editor_get_option( $option, $section, $default = '' ) {
15
+function lasso_editor_get_option($option, $section, $default = '') {
16 16
 
17
-	if ( empty( $option ) )
17
+	if (empty($option))
18 18
 		return;
19 19
 
20
-	if ( function_exists( 'is_multisite' ) && is_multisite() ) {
20
+	if (function_exists('is_multisite') && is_multisite()) {
21 21
 
22
-		$options = get_site_option( $section );
22
+		$options = get_site_option($section);
23 23
 
24 24
 	} else {
25 25
 
26
-		$options = get_option( $section );
26
+		$options = get_option($section);
27 27
 	}
28 28
 
29
-	if ( isset( $options[$option] ) ) {
29
+	if (isset($options[$option])) {
30 30
 		return $options[$option];
31 31
 	}
32 32
 
@@ -40,9 +40,9 @@  discard block
 block discarded – undo
40 40
  */
41 41
 function lasso_editor_galleries_exist() {
42 42
 
43
-	$q = new wp_query( array( 'post_type' => 'ai_galleries', 'post_status' => 'publish' ) );
43
+	$q = new wp_query(array('post_type' => 'ai_galleries', 'post_status' => 'publish'));
44 44
 
45
-	if ( $q->have_posts() )
45
+	if ($q->have_posts())
46 46
 		return true;
47 47
 	else
48 48
 		return false;
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
 function lasso_get_supported_theme_class() {
58 58
 
59 59
 	$name  	= wp_get_theme()->get('Name');
60
-	$slug  	= lasso_clean_string( $name );
60
+	$slug  	= lasso_clean_string($name);
61 61
 
62
-	switch ( $slug ) {
62
+	switch ($slug) {
63 63
 		case 'aesop-story-theme': // aesop
64 64
 			$out = '.aesop-entry-content';
65 65
 			break;
@@ -108,16 +108,16 @@  discard block
 block discarded – undo
108 108
 
109 109
 	}
110 110
 
111
-	return apply_filters('lasso_content_class', !empty( $out ) ? $out : false);
111
+	return apply_filters('lasso_content_class', !empty($out) ? $out : false);
112 112
 	//return !empty( $out ) ? $out : false;
113 113
 }
114 114
 
115 115
 function lasso_get_supported_theme_title_class() {
116 116
 
117 117
 	$name  	= wp_get_theme()->get('Name');
118
-	$slug  	= lasso_clean_string( $name );
118
+	$slug  	= lasso_clean_string($name);
119 119
 
120
-	switch ( $slug ) {
120
+	switch ($slug) {
121 121
 
122 122
 		case 'aesop-story-theme': // aesop
123 123
 			$out = '.aesop-entry-title';
@@ -148,16 +148,16 @@  discard block
 block discarded – undo
148 148
 			break;
149 149
 	}
150 150
 
151
-	return apply_filters('lasso_title_class', !empty( $out ) ? $out : false);
151
+	return apply_filters('lasso_title_class', !empty($out) ? $out : false);
152 152
 }
153 153
 
154 154
 //since 0.9.9.6
155 155
 function lasso_get_supported_theme_featured_image_class() {
156 156
 
157 157
 	$name  	= wp_get_theme()->get('Name');
158
-	$slug  	= lasso_clean_string( $name );
158
+	$slug  	= lasso_clean_string($name);
159 159
 
160
-	return apply_filters('lasso_featured_image_class', !empty( $out ) ? $out : false);
160
+	return apply_filters('lasso_featured_image_class', !empty($out) ? $out : false);
161 161
 }
162 162
 
163 163
 
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 *	@since 0.8.7
169 169
 *	@return string of comma separated classes
170 170
 */
171
-function lasso_supported_no_save(){
171
+function lasso_supported_no_save() {
172 172
 
173 173
 	return apply_filters('lasso_dont_save', '.lasso--ignore, .sharedaddy, .us_wrapper, .twitter-tweet, .meta, .edit-link');
174 174
 }
@@ -182,8 +182,8 @@  discard block
 block discarded – undo
182 182
  *
183 183
  * @return array|mixed|object|string|void
184 184
  */
185
-function lasso_sanitize_data( $data ) {
186
-	return \lasso\sanatize::do_sanitize( $data );
185
+function lasso_sanitize_data($data) {
186
+	return \lasso\sanatize::do_sanitize($data);
187 187
 
188 188
 }
189 189
 
@@ -193,18 +193,18 @@  discard block
 block discarded – undo
193 193
  *	@since 0.9.3
194 194
  *	@return string of comma delimited category slugs
195 195
 */
196
-function lasso_get_post_objects( $postid = '', $taxonomy = 'category') {
196
+function lasso_get_post_objects($postid = '', $taxonomy = 'category') {
197 197
 
198
-	if ( empty( $postid ) )
198
+	if (empty($postid))
199 199
 		$postid = get_the_ID();
200 200
 
201
-	$objects = 'category' == $taxonomy ? get_the_category( $postid ) : get_the_tags( $postid );
201
+	$objects = 'category' == $taxonomy ? get_the_category($postid) : get_the_tags($postid);
202 202
 
203
-	if ( empty( $objects) )
203
+	if (empty($objects))
204 204
 		return;
205 205
 
206 206
 	$out = '';
207
-	foreach( $objects as $object ) {
207
+	foreach ($objects as $object) {
208 208
 		$out .= $object->slug.', ';
209 209
 	}
210 210
 
@@ -218,15 +218,15 @@  discard block
 block discarded – undo
218 218
  *	@since 0.9.3
219 219
  *	@return array all categoiries
220 220
 */
221
-function lasso_get_objects( $taxonomy = 'category' ) {
221
+function lasso_get_objects($taxonomy = 'category') {
222 222
 
223 223
 	$objects = 'category' == $taxonomy ? get_categories(array('hide_empty' => 0)) : get_tags(array('hide_empty' => 0));
224 224
 
225
-	if ( empty( $objects) )
225
+	if (empty($objects))
226 226
 		return;
227 227
 
228 228
 	$out = array();
229
-	foreach( $objects as $object ) {
229
+	foreach ($objects as $object) {
230 230
 		$out[] = $object->slug;
231 231
 	}
232 232
 
@@ -241,11 +241,11 @@  discard block
 block discarded – undo
241 241
  * @since 0.9.4
242 242
  */
243 243
 function lasso_post_types_names() {
244
-	$post_types = get_post_types( array(
244
+	$post_types = get_post_types(array(
245 245
 		'public' => true,
246
-	), 'objects' );
247
-	$post_types = array_combine( array_keys( $post_types ), wp_list_pluck( $post_types, 'label' ) );
248
-    unset( $post_types[ 'attachment' ] );
246
+	), 'objects');
247
+	$post_types = array_combine(array_keys($post_types), wp_list_pluck($post_types, 'label'));
248
+    unset($post_types['attachment']);
249 249
 
250 250
 	/**
251 251
 	 * Set which post types are allowed
@@ -254,10 +254,10 @@  discard block
 block discarded – undo
254 254
 	 *
255 255
 	 * @param array $allowed_post_types Array of names (not labels) of allowed post types. Must be registered.
256 256
 	 */
257
-	$allowed_post_types = apply_filters( 'lasso_allowed_post_types', array( 'post', 'page') );
258
-	foreach( $post_types as $name => $label ) {
259
-		if ( ! in_array( $name, $allowed_post_types ) ) {
260
-			unset( $post_types[ $name ] );
257
+	$allowed_post_types = apply_filters('lasso_allowed_post_types', array('post', 'page'));
258
+	foreach ($post_types as $name => $label) {
259
+		if (!in_array($name, $allowed_post_types)) {
260
+			unset($post_types[$name]);
261 261
 		}
262 262
 	}
263 263
 	return $post_types;
@@ -265,11 +265,11 @@  discard block
 block discarded – undo
265 265
 
266 266
 
267 267
 function lasso_post_types() {
268
-	$post_types = get_post_types( array(
268
+	$post_types = get_post_types(array(
269 269
 		'public' => true,
270
-	), 'names' );
270
+	), 'names');
271 271
 	//$post_types = array_combine( array_keys( $post_types ), wp_list_pluck( $post_types, 'label' ) );
272
-    unset( $post_types[ 'attachment' ] );
272
+    unset($post_types['attachment']);
273 273
 
274 274
 	/**
275 275
 	 * Set which post types are allowed
@@ -278,10 +278,10 @@  discard block
 block discarded – undo
278 278
 	 *
279 279
 	 * @param array $allowed_post_types Array of names (not labels) of allowed post types. Must be registered.
280 280
 	 */
281
-	$allowed_post_types = apply_filters( 'lasso_allowed_post_types', array( 'post', 'page') );
282
-	foreach( $post_types as $name => $label ) {
283
-		if ( ! in_array( $name, $allowed_post_types ) ) {
284
-			unset( $post_types[ $name ] );
281
+	$allowed_post_types = apply_filters('lasso_allowed_post_types', array('post', 'page'));
282
+	foreach ($post_types as $name => $label) {
283
+		if (!in_array($name, $allowed_post_types)) {
284
+			unset($post_types[$name]);
285 285
 		}
286 286
 	}
287 287
 	return $post_types;
@@ -300,22 +300,22 @@  discard block
 block discarded – undo
300 300
 *	@uses lasso_modal_addons()
301 301
 *	@since 0.9.4
302 302
 */
303
-function lasso_modal_addons_content( $tab = '', $type ){
303
+function lasso_modal_addons_content($tab = '', $type) {
304 304
 
305
-	$name = lasso_clean_string( $tab['name'] );
305
+	$name = lasso_clean_string($tab['name']);
306 306
 
307
-	if ( 'tab' == $type ) {
307
+	if ('tab' == $type) {
308 308
 
309
-		$out = sprintf( '<li data-addon-name="%s">%s</li>', $name, $tab['name'] );
309
+		$out = sprintf('<li data-addon-name="%s">%s</li>', $name, $tab['name']);
310 310
 
311
-	} else if ( 'content' == $type ){
311
+	} else if ('content' == $type) {
312 312
 
313
-		$content = isset( $tab['content'] ) && is_callable( $tab['content'] ) ? call_user_func( $tab['content'] ) : false;
314
-		$options = isset( $tab['options'] ) && is_callable( $tab['options'] ) ? call_user_func( $tab['options'] ) : false;
313
+		$content = isset($tab['content']) && is_callable($tab['content']) ? call_user_func($tab['content']) : false;
314
+		$options = isset($tab['options']) && is_callable($tab['options']) ? call_user_func($tab['options']) : false;
315 315
 
316
-		$out = sprintf( '<div class="lasso--modal__content not-visible" data-addon-content="%s">
316
+		$out = sprintf('<div class="lasso--modal__content not-visible" data-addon-content="%s">
317 317
 			%s%s
318
-			</div>', $name, $content, lasso_option_form( $name, $options ) );
318
+			</div>', $name, $content, lasso_option_form($name, $options));
319 319
 
320 320
 	}
321 321
 
@@ -330,12 +330,12 @@  discard block
 block discarded – undo
330 330
 *
331 331
 * @return void|string
332 332
 */
333
-function lasso_clean_string( $string = '' ) {
333
+function lasso_clean_string($string = '') {
334 334
 
335
-	if ( empty( $string ) )
335
+	if (empty($string))
336 336
 		return;
337 337
 
338
-	return sanitize_text_field( strtolower( preg_replace('/[\s_]/', '-', $string ) ) );
338
+	return sanitize_text_field(strtolower(preg_replace('/[\s_]/', '-', $string)));
339 339
 }
340 340
 
341 341
 /**
@@ -348,13 +348,13 @@  discard block
 block discarded – undo
348 348
  *
349 349
  * @return void|string
350 350
  */
351
-function lasso_unclean_string( $string = '' ) {
351
+function lasso_unclean_string($string = '') {
352 352
 
353
-	if ( empty( $string ) ) {
353
+	if (empty($string)) {
354 354
 		return;
355 355
 	}
356 356
 
357
-	return sanitize_text_field( strtolower( str_replace( '-', '_', $string ) ) );
357
+	return sanitize_text_field(strtolower(str_replace('-', '_', $string)));
358 358
 }
359 359
 
360 360
 
@@ -369,22 +369,22 @@  discard block
 block discarded – undo
369 369
  * @param unknown $postid int the id of the post object to check against
370 370
  * @since 0.9.9.7 added filter 'lasso_user_can_filter'
371 371
  */
372
-if ( !function_exists( 'lasso_user_can' ) ):
373
-	function lasso_user_can( $action = '', $postid = 0 ) {
372
+if (!function_exists('lasso_user_can')):
373
+	function lasso_user_can($action = '', $postid = 0) {
374 374
         $result = false;
375
-		if ( empty( $action ) )
375
+		if (empty($action))
376 376
 			$action = 'edit_posts';
377 377
 
378
-		if ( empty( $postid ) )
378
+		if (empty($postid))
379 379
 			$postid = get_the_ID();
380 380
 
381
-		if ( is_user_logged_in() && current_user_can( $action, $postid ) ) {
382
-			$result =  true;
381
+		if (is_user_logged_in() && current_user_can($action, $postid)) {
382
+			$result = true;
383 383
 		} else {
384 384
 			$result = false;
385 385
 		}
386 386
 		
387
-		return apply_filters( 'lasso_user_can_filter', $result,  $action, $postid);
387
+		return apply_filters('lasso_user_can_filter', $result, $action, $postid);
388 388
 	}
389 389
 endif;
390 390
 
@@ -393,25 +393,25 @@  discard block
 block discarded – undo
393 393
 *
394 394
 *	@since 0.9.5
395 395
 */
396
-if ( !function_exists('lasso_editor_empty_results') ):
396
+if (!function_exists('lasso_editor_empty_results')):
397 397
 
398
-	function lasso_editor_empty_results( $type = 'posts' ){
398
+	function lasso_editor_empty_results($type = 'posts') {
399 399
 
400
-		if ( 'posts' == $type ) {
400
+		if ('posts' == $type) {
401 401
 
402
-			$string = apply_filters('lasso_empty_state_message', __('No posts to show', 'lasso') );
402
+			$string = apply_filters('lasso_empty_state_message', __('No posts to show', 'lasso'));
403 403
 			$icon = 'lasso-icon-file-text2';
404 404
 			$button = false;
405 405
 
406
-		} elseif ( 'revision' == $type ) {
406
+		} elseif ('revision' == $type) {
407 407
 
408
-			$string = apply_filters('lasso_empty_state_message', __('No revisions found', 'lasso') );
408
+			$string = apply_filters('lasso_empty_state_message', __('No revisions found', 'lasso'));
409 409
 			$icon = 'lasso-icon-history';
410
-			$button = sprintf('<a href="#" class="lasso--btn-secondary" id="lasso--close-modal">%s</a>', __('Close','lasso') );
410
+			$button = sprintf('<a href="#" class="lasso--btn-secondary" id="lasso--close-modal">%s</a>', __('Close', 'lasso'));
411 411
 
412 412
 		}
413 413
 
414
-		return sprintf('<div id="lasso--empty-state" class="lasso--empty-state"><i class="lasso--empty-state-icon lasso-icon %s"></i><p>%s</p>%s</div>', $icon, $string, $button );
414
+		return sprintf('<div id="lasso--empty-state" class="lasso--empty-state"><i class="lasso--empty-state-icon lasso-icon %s"></i><p>%s</p>%s</div>', $icon, $string, $button);
415 415
 	}
416 416
 
417 417
 endif;
Please login to merge, or discard this patch.
lasso.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -18,27 +18,27 @@
 block discarded – undo
18 18
  */
19 19
 
20 20
 // If this file is called directly, abort.
21
-if ( ! defined( 'WPINC' ) ) {
21
+if (!defined('WPINC')) {
22 22
 	die;
23 23
 }
24 24
 
25 25
 // Set some constants
26
-define( 'LASSO_VERSION', '0.9.9.7' );
27
-define( 'LASSO_DIR', plugin_dir_path( __FILE__ ) );
28
-define( 'LASSO_URL', plugins_url( '', __FILE__ ) );
29
-define( 'LASSO_FILE', __FILE__ );
26
+define('LASSO_VERSION', '0.9.9.7');
27
+define('LASSO_DIR', plugin_dir_path(__FILE__));
28
+define('LASSO_URL', plugins_url('', __FILE__));
29
+define('LASSO_FILE', __FILE__);
30 30
 
31 31
 /**
32 32
  * Load plugin if PHP version is 5.4 or later.
33 33
  */
34
-if ( version_compare( PHP_VERSION, '5.4.0', '>=' ) ) {
34
+if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
35 35
 
36
-	include_once( LASSO_DIR . '/bootstrap.php' );
36
+	include_once(LASSO_DIR.'/bootstrap.php');
37 37
 
38 38
 } else {
39 39
 
40 40
 	add_action('admin_head', 'lasso_fail_notice');
41
-	function lasso_fail_notice(){
41
+	function lasso_fail_notice() {
42 42
 
43 43
 		printf('<div class="error"><p>Lasso requires PHP 5.4 or higher.</p></div>');
44 44
 
Please login to merge, or discard this patch.