Completed
Push — master ( e528e5...1c19be )
by
unknown
01:47
created
admin/includes/menus/settings.php 2 patches
Spacing   +92 added lines, -92 removed lines patch added patch discarded remove patch
@@ -9,9 +9,9 @@  discard block
 block discarded – undo
9 9
 
10 10
 	function __construct() {
11 11
 
12
-		add_action( 'admin_menu',     array( $this, 'menu' ) );
13
-		add_action( 'network_admin_menu',   array( $this, 'menu' ) );
14
-		add_action( 'wp_ajax_lasso-editor-settings', array( $this, 'process_settings' ) );
12
+		add_action('admin_menu', array($this, 'menu'));
13
+		add_action('network_admin_menu', array($this, 'menu'));
14
+		add_action('wp_ajax_lasso-editor-settings', array($this, 'process_settings'));
15 15
 
16 16
 	}
17 17
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	function menu() {
24 24
 
25 25
 		// CHANGED Removed condition.
26
-		add_submenu_page( 'lasso-editor', __( 'Settings', 'lasso' ), __( 'Settings', 'lasso' ), 'manage_options', 'lasso-editor-settings', array( $this, 'settings' ) );
26
+		add_submenu_page('lasso-editor', __('Settings', 'lasso'), __('Settings', 'lasso'), 'manage_options', 'lasso-editor-settings', array($this, 'settings'));
27 27
 
28 28
 	}
29 29
 
@@ -45,26 +45,26 @@  discard block
 block discarded – undo
45 45
 	function process_settings() {
46 46
 
47 47
 		// bail out if current user isn't and administrator and they are not logged in
48
-		if ( !current_user_can( 'manage_options' ) || !is_user_logged_in() )
48
+		if (!current_user_can('manage_options') || !is_user_logged_in())
49 49
 			return;
50 50
 
51
-		if ( isset( $_POST['action'] ) && 'lasso-editor-settings' == $_POST['action'] && check_admin_referer( 'nonce', 'lasso_editor_settings' ) ) {
51
+		if (isset($_POST['action']) && 'lasso-editor-settings' == $_POST['action'] && check_admin_referer('nonce', 'lasso_editor_settings')) {
52 52
 
53
-			$options = isset( $_POST['lasso_editor'] ) ? $_POST['lasso_editor'] : false;
53
+			$options = isset($_POST['lasso_editor']) ? $_POST['lasso_editor'] : false;
54 54
 			
55 55
 			$arr = $options['allowed_post_types'];
56
-			$options = array_map( 'sanitize_text_field', $options );
57
-			$options['allowed_post_types'] = array_keys( $arr);
56
+			$options = array_map('sanitize_text_field', $options);
57
+			$options['allowed_post_types'] = array_keys($arr);
58 58
 
59 59
 			
60 60
 
61
-			if ( function_exists( 'is_multisite' ) && is_multisite() ) {
61
+			if (function_exists('is_multisite') && is_multisite()) {
62 62
 
63
-				update_site_option( 'lasso_editor', $options );
63
+				update_site_option('lasso_editor', $options);
64 64
 
65 65
 			} else {
66 66
 
67
-				update_option( 'lasso_editor', $options );
67
+				update_option('lasso_editor', $options);
68 68
 			}
69 69
 
70 70
 			wp_send_json_success();
@@ -86,60 +86,60 @@  discard block
 block discarded – undo
86 86
 	 */
87 87
 	function lasso_editor_settings_form() {
88 88
 
89
-		if ( !is_user_logged_in() )
89
+		if (!is_user_logged_in())
90 90
 			return;
91 91
 
92
-		$article_object   = lasso_editor_get_option( 'article_class', 'lasso_editor' );
93
-		$featImgClass    = lasso_editor_get_option( 'featimg_class', 'lasso_editor' );
94
-		$titleClass    = lasso_editor_get_option( 'title_class', 'lasso_editor' );
92
+		$article_object = lasso_editor_get_option('article_class', 'lasso_editor');
93
+		$featImgClass = lasso_editor_get_option('featimg_class', 'lasso_editor');
94
+		$titleClass = lasso_editor_get_option('title_class', 'lasso_editor');
95 95
 
96
-		$post_new_disabled   = lasso_editor_get_option( 'post_adding_disabled', 'lasso_editor' );
97
-		$save_to_post_disabled  = lasso_editor_get_option( 'post_save_disabled', 'lasso_editor' );
98
-		$post_settings_disabled = lasso_editor_get_option( 'post_settings_disabled', 'lasso_editor' );
99
-		$shortcodify_disabled  = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
100
-		$enable_autosave  = lasso_editor_get_option( 'enable_autosave', 'lasso_editor' );
96
+		$post_new_disabled = lasso_editor_get_option('post_adding_disabled', 'lasso_editor');
97
+		$save_to_post_disabled  = lasso_editor_get_option('post_save_disabled', 'lasso_editor');
98
+		$post_settings_disabled = lasso_editor_get_option('post_settings_disabled', 'lasso_editor');
99
+		$shortcodify_disabled  = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor');
100
+		$enable_autosave = lasso_editor_get_option('enable_autosave', 'lasso_editor');
101 101
 
102
-		$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
103
-		$toolbar_headings_h4      = lasso_editor_get_option( 'toolbar_headings_h4', 'lasso_editor' );
104
-		$toolbar_show_color      = lasso_editor_get_option( 'toolbar_show_color', 'lasso_editor' );
105
-		$toolbar_show_alignment  = lasso_editor_get_option( 'toolbar_show_alignment', 'lasso_editor' );
102
+		$toolbar_headings      = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
103
+		$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
104
+		$toolbar_show_color      = lasso_editor_get_option('toolbar_show_color', 'lasso_editor');
105
+		$toolbar_show_alignment  = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor');
106 106
 		
107
-		$objectsNoSave  	= lasso_editor_get_option('dont_save', 'lasso_editor');
108
-		$objectsNonEditable  	= lasso_editor_get_option('non_editable', 'lasso_editor');
107
+		$objectsNoSave = lasso_editor_get_option('dont_save', 'lasso_editor');
108
+		$objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor');
109 109
 		$disable_tour = lasso_editor_get_option('disable_tour', 'lasso_editor');
110 110
 		$show_ignored_items = lasso_editor_get_option('show_ignored_items', 'lasso_editor');
111 111
 		$save_using_rest_disabled = lasso_editor_get_option('save_using_rest_disabled', 'lasso_editor');
112 112
 		
113
-		$default_post_types = apply_filters( 'lasso_allowed_post_types', array( 'post', 'page'));
114
-		$allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor',  $default_post_types);
113
+		$default_post_types = apply_filters('lasso_allowed_post_types', array('post', 'page'));
114
+		$allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', $default_post_types);
115 115
 
116 116
 ?>
117 117
 		<div class="wrap">
118 118
 
119
-	    	<h2><?php _e( 'Editus Settings', 'lasso' );?></h2>
119
+	    	<h2><?php _e('Editus Settings', 'lasso'); ?></h2>
120 120
 
121 121
 			<form id="lasso-editor-settings-form" class="lasso--form-settings" method="post" enctype="multipart/form-data">
122 122
 
123
-				<?php do_action('lasso_settings_before');?>
123
+				<?php do_action('lasso_settings_before'); ?>
124 124
 				
125 125
 				
126 126
 				
127 127
 				<div class="lasso-editor-settings--option-wrap">
128 128
 					<div class="lasso-editor-settings--option-inner">
129
-						<label><?php _e( 'Enable for:', 'lasso' );?></label>
130
-						<span class="lasso--setting-description"><?php _e( 'Enable Editus for the following post types.', 'lasso' );?></span>
129
+						<label><?php _e('Enable for:', 'lasso'); ?></label>
130
+						<span class="lasso--setting-description"><?php _e('Enable Editus for the following post types.', 'lasso'); ?></span>
131 131
 						<?php
132 132
 						$args = array(
133 133
 							'public'   => true
134 134
 						);
135 135
 						 
136
-						$allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
137
-						$post_types = get_post_types( $args, 'objects' );
136
+						$allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
137
+						$post_types = get_post_types($args, 'objects');
138 138
 						 
139
-						foreach ( $post_types  as $post_type ) {
139
+						foreach ($post_types  as $post_type) {
140 140
 						   if ($post_type->name == 'attachment') continue;
141
-						   $checked ="";
142
-						   if (  in_array( $post_type->name, $allowed_post_types )  ) {
141
+						   $checked = "";
142
+						   if (in_array($post_type->name, $allowed_post_types)) {
143 143
 								$checked = 'checked="checked"';
144 144
 						   }
145 145
 						   echo '<label><input type="checkbox" '.$checked.' name="lasso_editor[allowed_post_types]['.$post_type->name.']" id="lasso_editor[allowed_post_types]['.$post_type->name.']" >'.$post_type->name.'</label>';
@@ -151,76 +151,76 @@  discard block
 block discarded – undo
151 151
 
152 152
 				<div class="lasso-editor-settings--option-wrap">
153 153
 					<div class="lasso-editor-settings--option-inner">
154
-						<label><?php _e( 'Article Class', 'lasso' );?></label>
155
-						<span class="lasso--setting-description"><?php _e( 'Provide the CSS class (including the preceding dot) of container that holds the post. This should be the first parent container class that holds the_content.', 'lasso' );?></span>
156
-						<input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr( $article_object );?>" placeholder=".entry-content">
154
+						<label><?php _e('Article Class', 'lasso'); ?></label>
155
+						<span class="lasso--setting-description"><?php _e('Provide the CSS class (including the preceding dot) of container that holds the post. This should be the first parent container class that holds the_content.', 'lasso'); ?></span>
156
+						<input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr($article_object); ?>" placeholder=".entry-content">
157 157
 					</div>
158 158
 				</div>
159 159
 
160 160
 				<div class="lasso-editor-settings--option-wrap">
161 161
 					<div class="lasso-editor-settings--option-inner">
162
-						<label><?php _e( 'Featured Image Class', 'lasso' );?></label>
163
-						<span class="lasso--setting-description"><?php _e( 'Provide the CSS class that uses a featured image as a background image. This currently only supports themes that have the featured image set as background image.', 'lasso' );?></span>
164
-						<input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr( $featImgClass );?>" placeholder=".entry-content">
162
+						<label><?php _e('Featured Image Class', 'lasso'); ?></label>
163
+						<span class="lasso--setting-description"><?php _e('Provide the CSS class that uses a featured image as a background image. This currently only supports themes that have the featured image set as background image.', 'lasso'); ?></span>
164
+						<input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr($featImgClass); ?>" placeholder=".entry-content">
165 165
 					</div>
166 166
 				</div>
167 167
 
168 168
 				<div class="lasso-editor-settings--option-wrap">
169 169
 					<div class="lasso-editor-settings--option-inner">
170
-						<label><?php _e( 'Article Title Class', 'lasso' );?></label>
171
-						<span class="lasso--setting-description"><?php _e( 'Provide the CSS class for the post title. This will enable you to update the title of the post by clicking and typing.', 'lasso' );?></span>
172
-						<input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr( $titleClass );?>" placeholder=".entry-content">
170
+						<label><?php _e('Article Title Class', 'lasso'); ?></label>
171
+						<span class="lasso--setting-description"><?php _e('Provide the CSS class for the post title. This will enable you to update the title of the post by clicking and typing.', 'lasso'); ?></span>
172
+						<input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr($titleClass); ?>" placeholder=".entry-content">
173 173
 					</div>
174 174
 				</div>
175 175
 
176 176
 				<!-- Advanced -->
177 177
 				<div class="lasso-editor-settings--option-wrap">
178 178
 					<div class="lasso-editor-settings--option-inner">
179
-						<label><?php _e( 'Ignored Items to Save', 'lasso' );?></label>
180
-						<span class="lasso--setting-description"><?php _e( 'If your post container holds additional markup, list the css class names (comma separated, including the dot) of those items. When you enter the editor, Editus will remove (NOT delete) these items so that it does not save them as HTML.', 'lasso' );?></span>
181
-						<textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNoSave );?></textarea>
179
+						<label><?php _e('Ignored Items to Save', 'lasso'); ?></label>
180
+						<span class="lasso--setting-description"><?php _e('If your post container holds additional markup, list the css class names (comma separated, including the dot) of those items. When you enter the editor, Editus will remove (NOT delete) these items so that it does not save them as HTML.', 'lasso'); ?></span>
181
+						<textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNoSave); ?></textarea>
182 182
 					</div>
183 183
 				</div>
184 184
 				
185 185
 				<div class="lasso-editor-settings--option-wrap">
186 186
 					<div class="lasso-editor-settings--option-inner">
187
-						<label><?php _e( 'Read Only Items', 'lasso' );?></label>
188
-						<span class="lasso--setting-description"><?php _e( 'If your post has items that should not be editable, list the css class names (comma separated, including the dot) of those items.', 'lasso' );?></span>
189
-						<textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNonEditable );?></textarea>
187
+						<label><?php _e('Read Only Items', 'lasso'); ?></label>
188
+						<span class="lasso--setting-description"><?php _e('If your post has items that should not be editable, list the css class names (comma separated, including the dot) of those items.', 'lasso'); ?></span>
189
+						<textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNonEditable); ?></textarea>
190 190
 					</div>
191 191
 				</div>
192 192
 				
193 193
 				<div class="lasso-editor-settings--option-wrap">
194 194
 					<div class="lasso-editor-settings--option-inner">
195
-						<input type="checkbox" class="checkbox" name="lasso_editor[show_ignored_items]" id="lasso_editor[show_ignored_items]" <?php echo checked( $show_ignored_items, 'on' );?> >
196
-						<label for="lasso_editor[show_ignored_items]"> <?php _e( 'Show Ignored Items', 'lasso' );?></label>
197
-						<span class="lasso--setting-description"><?php _e( 'By default the ignored items are hidden. Check this to show ignored items while keeping them uneditable.', 'lasso' );?></span>
195
+						<input type="checkbox" class="checkbox" name="lasso_editor[show_ignored_items]" id="lasso_editor[show_ignored_items]" <?php echo checked($show_ignored_items, 'on'); ?> >
196
+						<label for="lasso_editor[show_ignored_items]"> <?php _e('Show Ignored Items', 'lasso'); ?></label>
197
+						<span class="lasso--setting-description"><?php _e('By default the ignored items are hidden. Check this to show ignored items while keeping them uneditable.', 'lasso'); ?></span>
198 198
 					</div>
199 199
 				</div>
200 200
 
201 201
 				<div class="lasso-editor-settings--option-wrap">
202 202
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
203
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked( $toolbar_headings, 'on' );?> >
204
-						<label for="lasso_editor[toolbar_headings]"><?php _e( 'Enable H2 and H3 Buttons', 'lasso' );?></label>
205
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set H2 and H3 settings.', 'lasso' );?></span>
203
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked($toolbar_headings, 'on'); ?> >
204
+						<label for="lasso_editor[toolbar_headings]"><?php _e('Enable H2 and H3 Buttons', 'lasso'); ?></label>
205
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set H2 and H3 settings.', 'lasso'); ?></span>
206 206
 
207 207
 					</div>
208 208
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
209
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings_h4]" id="lasso_editor[toolbar_headings_h4]" <?php echo checked( $toolbar_headings_h4, 'on' );?> >
210
-						<label for="lasso_editor[toolbar_headings_h4]"><?php _e( 'Enable H4/H5/H6 Buttons', 'lasso' );?></label>
211
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set H4/H5/H6 settings.', 'lasso' );?></span>
209
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings_h4]" id="lasso_editor[toolbar_headings_h4]" <?php echo checked($toolbar_headings_h4, 'on'); ?> >
210
+						<label for="lasso_editor[toolbar_headings_h4]"><?php _e('Enable H4/H5/H6 Buttons', 'lasso'); ?></label>
211
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set H4/H5/H6 settings.', 'lasso'); ?></span>
212 212
 
213 213
 					</div>
214 214
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
215
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked( $toolbar_show_color, 'on' );?> >
216
-						<label for="lasso_editor[toolbar_show_color]"><?php _e( 'Enable Text Color Buttons', 'lasso' );?></label>
217
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set text colors.', 'lasso' );?></span>
215
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked($toolbar_show_color, 'on'); ?> >
216
+						<label for="lasso_editor[toolbar_show_color]"><?php _e('Enable Text Color Buttons', 'lasso'); ?></label>
217
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set text colors.', 'lasso'); ?></span>
218 218
 
219 219
 					</div>
220 220
 					<div class="lasso-editor-settings--option-inner">
221
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked( $toolbar_show_alignment, 'on' );?> >
222
-						<label for="lasso_editor[toolbar_show_alignment]"><?php _e( 'Enable Text Align Buttons', 'lasso' );?></label>
223
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set text alignment.', 'lasso' );?></span>
221
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked($toolbar_show_alignment, 'on'); ?> >
222
+						<label for="lasso_editor[toolbar_show_alignment]"><?php _e('Enable Text Align Buttons', 'lasso'); ?></label>
223
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set text alignment.', 'lasso'); ?></span>
224 224
 
225 225
 					</div>
226 226
 				</div>
@@ -235,70 +235,70 @@  discard block
 block discarded – undo
235 235
 
236 236
 				<div class="lasso-editor-settings--option-wrap">
237 237
 					<div class="lasso-editor-settings--option-inner">
238
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked( $post_settings_disabled, 'on' );?> >
239
-						<label for="lasso_editor[post_settings_disabled]"> <?php _e( 'Disable Post Settings', 'lasso' );?></label>
240
-						<span class="lasso--setting-description"><?php _e( 'Check this to disable users from being able to edit post settings from the front-end.', 'lasso' );?></span>
238
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked($post_settings_disabled, 'on'); ?> >
239
+						<label for="lasso_editor[post_settings_disabled]"> <?php _e('Disable Post Settings', 'lasso'); ?></label>
240
+						<span class="lasso--setting-description"><?php _e('Check this to disable users from being able to edit post settings from the front-end.', 'lasso'); ?></span>
241 241
 					</div>
242 242
 				</div>
243 243
 
244 244
 				<div class="lasso-editor-settings--option-wrap">
245 245
 					<div class="lasso-editor-settings--option-inner">
246
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked( $post_new_disabled, 'on' );?> >
247
-						<label for="lasso_editor[post_adding_disabled]"><?php _e( 'Disable Post Adding', 'lasso' );?></label>
248
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable users from being able to add new posts from the front-end.', 'lasso' );?></span>
246
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked($post_new_disabled, 'on'); ?> >
247
+						<label for="lasso_editor[post_adding_disabled]"><?php _e('Disable Post Adding', 'lasso'); ?></label>
248
+						<span class="lasso--setting-description"><?php _e('Check this box to disable users from being able to add new posts from the front-end.', 'lasso'); ?></span>
249 249
 					</div>
250 250
 				</div>
251 251
 
252 252
 				<div class="lasso-editor-settings--option-wrap">
253 253
 					<div class="lasso-editor-settings--option-inner">
254
-						<input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked( $shortcodify_disabled, 'on' );?> >
255
-						<label for="lasso_editor[shortcodify_disabled]"><?php _e( 'Disable Aesop Component Conversion', 'lasso' );?></label>
256
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso' );?></span>
254
+						<input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked($shortcodify_disabled, 'on'); ?> >
255
+						<label for="lasso_editor[shortcodify_disabled]"><?php _e('Disable Aesop Component Conversion', 'lasso'); ?></label>
256
+						<span class="lasso--setting-description"><?php _e('Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso'); ?></span>
257 257
 					</div>
258 258
 				</div>
259 259
 				
260 260
 				<div class="lasso-editor-settings--option-wrap">
261 261
 					<div class="lasso-editor-settings--option-inner">
262
-						<input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked( $enable_autosave, 'on' );?> >
263
-						<label for="lasso_editor[enable_autosave]"><?php _e( 'Enable Auto Save', 'lasso' );?></label>
264
-						<span class="lasso--setting-description"><?php _e( 'Check this box to enable auto save.', 'lasso' );?></span>
262
+						<input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked($enable_autosave, 'on'); ?> >
263
+						<label for="lasso_editor[enable_autosave]"><?php _e('Enable Auto Save', 'lasso'); ?></label>
264
+						<span class="lasso--setting-description"><?php _e('Check this box to enable auto save.', 'lasso'); ?></span>
265 265
 					</div>
266 266
 				</div>
267 267
 				
268 268
 				<div class="lasso-editor-settings--option-wrap">
269 269
 					<div class="lasso-editor-settings--option-inner">
270
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_save_disabled]" id="lasso_editor[post_save_disabled]" <?php echo checked( $save_to_post_disabled, 'on' );?> >
271
-						<label for="lasso_editor[post_save_disabled]"><?php _e( 'Disable Post Saving', 'lasso' );?></label>
272
-						<span class="lasso--setting-description"><?php _e( 'By default the editor will update the database with the post or page it is being used on. Check this box to disable this. If you check this box, it is assumed that you will be using the provided filters to save your own content.', 'lasso' );?></span>
270
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_save_disabled]" id="lasso_editor[post_save_disabled]" <?php echo checked($save_to_post_disabled, 'on'); ?> >
271
+						<label for="lasso_editor[post_save_disabled]"><?php _e('Disable Post Saving', 'lasso'); ?></label>
272
+						<span class="lasso--setting-description"><?php _e('By default the editor will update the database with the post or page it is being used on. Check this box to disable this. If you check this box, it is assumed that you will be using the provided filters to save your own content.', 'lasso'); ?></span>
273 273
 
274 274
 					</div>
275 275
 				</div>
276 276
 				
277 277
 				<div class="lasso-editor-settings--option-wrap">
278 278
 					<div class="lasso-editor-settings--option-inner">
279
-						<input type="checkbox" class="checkbox" name="lasso_editor[save_using_rest_disabled]" id="lasso_editor[save_using_rest_disabled]" <?php echo checked( $save_using_rest_disabled, 'on' );?> >
280
-						<label for="lasso_editor[save_using_rest_disabled]"><?php _e( "Don't Use REST API to Save", 'lasso' );?></label>
281
-						<span class="lasso--setting-description"><?php _e( 'By default the editor will use REST API to save posts. Check this box to use custom AJAX calls instead.', 'lasso' );?></span>
279
+						<input type="checkbox" class="checkbox" name="lasso_editor[save_using_rest_disabled]" id="lasso_editor[save_using_rest_disabled]" <?php echo checked($save_using_rest_disabled, 'on'); ?> >
280
+						<label for="lasso_editor[save_using_rest_disabled]"><?php _e("Don't Use REST API to Save", 'lasso'); ?></label>
281
+						<span class="lasso--setting-description"><?php _e('By default the editor will use REST API to save posts. Check this box to use custom AJAX calls instead.', 'lasso'); ?></span>
282 282
 
283 283
 					</div>
284 284
 				</div>
285 285
 				
286 286
 				<div class="lasso-editor-settings--option-wrap last">
287 287
 					<div class="lasso-editor-settings--option-inner">
288
-						<input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked( $disable_tour, 'on' );?> >
289
-						<label for="lasso_editor[disable_tour]"> <?php _e( 'Do Not Show Tour Dialog', 'lasso' );?></label>
290
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable the tour dialog box for all users.', 'lasso' );?></span>
288
+						<input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked($disable_tour, 'on'); ?> >
289
+						<label for="lasso_editor[disable_tour]"> <?php _e('Do Not Show Tour Dialog', 'lasso'); ?></label>
290
+						<span class="lasso--setting-description"><?php _e('Check this box to disable the tour dialog box for all users.', 'lasso'); ?></span>
291 291
 					</div>
292 292
 				</div>
293 293
 
294 294
 
295 295
 				<div class="lasso-editor-settings--submit">
296 296
 				    <input type="hidden" name="action" value="lasso-editor-settings" />
297
-				    <input type="submit" class="button-primary" value="<?php esc_attr_e( 'Save Settings', 'lasso' );?>" />
298
-					<?php wp_nonce_field( 'nonce', 'lasso_editor_settings' ); ?>
297
+				    <input type="submit" class="button-primary" value="<?php esc_attr_e('Save Settings', 'lasso'); ?>" />
298
+					<?php wp_nonce_field('nonce', 'lasso_editor_settings'); ?>
299 299
 				</div>
300 300
 				
301
-				<?php do_action('lasso_settings_after');?>
301
+				<?php do_action('lasso_settings_after'); ?>
302 302
 			</form>
303 303
 
304 304
 		</div><?php
Please login to merge, or discard this patch.
Braces   +9 added lines, -5 removed lines patch added patch discarded remove patch
@@ -45,8 +45,9 @@  discard block
 block discarded – undo
45 45
 	function process_settings() {
46 46
 
47 47
 		// bail out if current user isn't and administrator and they are not logged in
48
-		if ( !current_user_can( 'manage_options' ) || !is_user_logged_in() )
49
-			return;
48
+		if ( !current_user_can( 'manage_options' ) || !is_user_logged_in() ) {
49
+					return;
50
+		}
50 51
 
51 52
 		if ( isset( $_POST['action'] ) && 'lasso-editor-settings' == $_POST['action'] && check_admin_referer( 'nonce', 'lasso_editor_settings' ) ) {
52 53
 
@@ -86,8 +87,9 @@  discard block
 block discarded – undo
86 87
 	 */
87 88
 	function lasso_editor_settings_form() {
88 89
 
89
-		if ( !is_user_logged_in() )
90
-			return;
90
+		if ( !is_user_logged_in() ) {
91
+					return;
92
+		}
91 93
 
92 94
 		$article_object   = lasso_editor_get_option( 'article_class', 'lasso_editor' );
93 95
 		$featImgClass    = lasso_editor_get_option( 'featimg_class', 'lasso_editor' );
@@ -137,7 +139,9 @@  discard block
 block discarded – undo
137 139
 						$post_types = get_post_types( $args, 'objects' );
138 140
 						 
139 141
 						foreach ( $post_types  as $post_type ) {
140
-						   if ($post_type->name == 'attachment') continue;
142
+						   if ($post_type->name == 'attachment') {
143
+						   	continue;
144
+						   }
141 145
 						   $checked ="";
142 146
 						   if (  in_array( $post_type->name, $allowed_post_types )  ) {
143 147
 								$checked = 'checked="checked"';
Please login to merge, or discard this patch.
lasso.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -18,27 +18,27 @@  discard block
 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.15.1' );
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.15.1');
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
 
@@ -48,18 +48,18 @@  discard block
 block discarded – undo
48 48
 function lasso_show_in_rest() {
49 49
 	global $wp_post_types;
50 50
 	
51
-	$allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor', array( ) );
52
-	$allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
51
+	$allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', array( ));
52
+	$allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
53 53
 	
54
-	foreach( $allowed_post_types as $key ) {
54
+	foreach ($allowed_post_types as $key) {
55 55
 	    
56 56
 		// If the post type doesn't exist, skip it
57
-		if( !$wp_post_types[$key] )
57
+		if (!$wp_post_types[$key])
58 58
 			continue;
59 59
 	    	
60 60
     	$wp_post_types[$key]->show_in_rest = true;
61 61
     }
62 62
 }
63 63
 
64
- add_action( 'init', 'lasso_show_in_rest' );
64
+ add_action('init', 'lasso_show_in_rest');
65 65
 
Please login to merge, or discard this patch.
public/includes/editor-modules.php 2 patches
Spacing   +226 added lines, -226 removed lines patch added patch discarded remove patch
@@ -12,32 +12,32 @@  discard block
 block discarded – undo
12 12
  *
13 13
  * @since 1.0
14 14
  */
15
-add_action( 'wp_footer', 'lasso_editor_controls' );
15
+add_action('wp_footer', 'lasso_editor_controls');
16 16
 function lasso_editor_controls() {
17 17
 
18 18
 	global $post;
19 19
 
20
-	if ( lasso_user_can('edit_posts') ) {
20
+	if (lasso_user_can('edit_posts')) {
21 21
 
22
-		$status = get_post_status( get_the_ID() );
22
+		$status = get_post_status(get_the_ID());
23 23
 
24 24
 		// let users add custom css classes
25
-		$custom_classes = apply_filters( 'lasso_control_classes', '' );
25
+		$custom_classes = apply_filters('lasso_control_classes', '');
26 26
 
27 27
 		$post_access_class   = '';
28
-		$post_new_disabled   = lasso_editor_get_option( 'post_adding_disabled', 'lasso_editor' );
29
-		$post_settings_disabled = lasso_editor_get_option( 'post_settings_disabled', 'lasso_editor' );
30
-		$shortcodify_disabled = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
28
+		$post_new_disabled   = lasso_editor_get_option('post_adding_disabled', 'lasso_editor');
29
+		$post_settings_disabled = lasso_editor_get_option('post_settings_disabled', 'lasso_editor');
30
+		$shortcodify_disabled = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor');
31 31
 
32 32
 
33 33
 		// CSS class if adding new post objects is disabled
34
-		if ( 'on' == $post_new_disabled ) { $post_access_class = 'lasso--post-new-disabled'; }
34
+		if ('on' == $post_new_disabled) { $post_access_class = 'lasso--post-new-disabled'; }
35 35
 
36 36
 		// CSS class if adjust settings is disabled
37
-		if ( 'on' == $post_settings_disabled ) { $post_access_class = 'lasso--post-settings-disabled'; }
37
+		if ('on' == $post_settings_disabled) { $post_access_class = 'lasso--post-settings-disabled'; }
38 38
 
39 39
 		// CSS class if adding new post objects AND settings are disabled
40
-		if ( 'on' == $post_new_disabled && 'on' == $post_settings_disabled ) { $post_access_class = 'lasso--post-all-disabled'; }
40
+		if ('on' == $post_new_disabled && 'on' == $post_settings_disabled) { $post_access_class = 'lasso--post-all-disabled'; }
41 41
 
42 42
 		// CSS class if shortcodify or (Aesop Shortcode Conversion) is disabled
43 43
 		$sc_saving_class = 'on' == $shortcodify_disabled ? 'shortcodify-disabled' : 'shortcodify-enabled';
@@ -49,44 +49,44 @@  discard block
 block discarded – undo
49 49
 		$mobile_style = $is_mobile ? 'style="bottom:0px;"' : null;
50 50
 		
51 51
 
52
-		?><div id="lasso--controls" class="lasso-post-status--<?php echo sanitize_html_class( $status );?> <?php echo sanitize_html_class( $custom_classes );?>" data-post-id="<?php echo get_the_ID();?>" >
52
+		?><div id="lasso--controls" class="lasso-post-status--<?php echo sanitize_html_class($status); ?> <?php echo sanitize_html_class($custom_classes); ?>" data-post-id="<?php echo get_the_ID(); ?>" >
53 53
 
54
-			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class;?> "  <?php echo $mobile_style ?> >
54
+			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class; ?> "  <?php echo $mobile_style ?> >
55 55
 
56
-				<?php do_action( 'lasso_editor_controls_before' );
56
+				<?php do_action('lasso_editor_controls_before');
57 57
 
58
-				if ( $is_capable ) { ?>
58
+				if ($is_capable) { ?>
59 59
 
60
-					<li id="lasso--edit" title="<?php esc_attr_e( 'Edit Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
60
+					<li id="lasso--edit" title="<?php esc_attr_e('Edit Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
61 61
 
62
-					<?php if ( 'off' == $post_settings_disabled || empty( $post_settings_disabled ) ) { ?>
63
-						<li id="lasso--post-settings" title="<?php esc_attr_e( 'Post Settings', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
62
+					<?php if ('off' == $post_settings_disabled || empty($post_settings_disabled)) { ?>
63
+						<li id="lasso--post-settings" title="<?php esc_attr_e('Post Settings', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
64 64
 					<?php }
65 65
 
66 66
 				} ?>
67 67
 
68
-				<li id="lasso--post-all" title="<?php esc_attr_e( 'All Posts', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
68
+				<li id="lasso--post-all" title="<?php esc_attr_e('All Posts', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
69 69
 
70
-				<?php if ( $is_capable && wp_revisions_enabled( $post ) ) { ?>
71
-					<li id="lasso--post-revisions" title="<?php esc_attr_e( 'Revisions', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
70
+				<?php if ($is_capable && wp_revisions_enabled($post)) { ?>
71
+					<li id="lasso--post-revisions" title="<?php esc_attr_e('Revisions', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
72 72
 				<?php } ?>
73 73
 
74
-				<?php if ( ( 'off' == $post_new_disabled || empty( $post_new_disabled ) && lasso_user_can('publish_posts') ) ) { ?>
75
-					<li id="lasso--post-new" title="<?php esc_attr_e( 'Add Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
74
+				<?php if (('off' == $post_new_disabled || empty($post_new_disabled) && lasso_user_can('publish_posts'))) { ?>
75
+					<li id="lasso--post-new" title="<?php esc_attr_e('Add Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
76 76
 				<?php } ?>
77 77
 
78
-				<?php do_action( 'lasso_editor_controls_after' );?>
78
+				<?php do_action('lasso_editor_controls_after'); ?>
79 79
 
80 80
 			</ul>
81 81
 
82
-			<?php if ( is_singular() && !$is_mobile ) { ?>
82
+			<?php if (is_singular() && !$is_mobile) { ?>
83 83
 
84
-				<div class="lasso--controls__right" data-posttype="<?php echo get_post_type( get_the_ID() );?>" data-status="<?php echo $status;?>">
84
+				<div class="lasso--controls__right" data-posttype="<?php echo get_post_type(get_the_ID()); ?>" data-status="<?php echo $status; ?>">
85 85
 
86
-					<a href="#" title="<?php esc_attr_e( 'Save Post', 'lasso' );?>" id="lasso--save" class="lasso-save-post lasso--button <?php echo $sc_saving_class;?>"></a>
86
+					<a href="#" title="<?php esc_attr_e('Save Post', 'lasso'); ?>" id="lasso--save" class="lasso-save-post lasso--button <?php echo $sc_saving_class; ?>"></a>
87 87
 
88
-					<?php if ( 'draft' == $status && ( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') )  ) { ?>
89
-						<a href="#" title="<?php esc_attr_e( 'Publish Post', 'lasso' );?>" id="lasso--publish" class="lasso-publish-post lasso--button <?php echo $sc_saving_class;?>"></a>
88
+					<?php if ('draft' == $status && (lasso_user_can('publish_posts') || lasso_user_can('publish_pages'))) { ?>
89
+						<a href="#" title="<?php esc_attr_e('Publish Post', 'lasso'); ?>" id="lasso--publish" class="lasso-publish-post lasso--button <?php echo $sc_saving_class; ?>"></a>
90 90
 					<?php } ?>
91 91
 
92 92
 				</div>
@@ -109,13 +109,13 @@  discard block
 block discarded – undo
109 109
 
110 110
 	ob_start();
111 111
 
112
-	if ( !lasso_user_can() )
112
+	if (!lasso_user_can())
113 113
 		return;
114 114
 
115 115
 	// let users add custom css classes
116
-	$custom_classes = apply_filters( 'lasso_sidebar_classes', '' );
116
+	$custom_classes = apply_filters('lasso_sidebar_classes', '');
117 117
 	?>
118
-	<div id="lasso--sidebar" class="<?php echo sanitize_html_class( $custom_classes );?>" >
118
+	<div id="lasso--sidebar" class="<?php echo sanitize_html_class($custom_classes); ?>" >
119 119
 		<div class="lasso--sidebar__inner">
120 120
 			<div id="lasso--component__settings"></div>
121 121
 		</div>
@@ -133,26 +133,26 @@  discard block
 block discarded – undo
133 133
 
134 134
 	ob_start();
135 135
 
136
-	if ( !lasso_user_can() )
136
+	if (!lasso_user_can())
137 137
 		return;
138 138
 	
139 139
 	$is_mobile = wp_is_mobile();
140 140
 
141 141
 	// check for lasso story engine and add a class doniting this
142
-	$ase_status = class_exists( 'Aesop_Core' ) || defined( 'LASSO_CUSTOM' ) ? 'ase-active' : 'ase-not-active';
142
+	$ase_status = class_exists('Aesop_Core') || defined('LASSO_CUSTOM') ? 'ase-active' : 'ase-not-active';
143 143
 
144 144
 	// let users add custom css classes
145
-	$custom_classes = apply_filters( 'lasso_toolbar_classes', '' );
145
+	$custom_classes = apply_filters('lasso_toolbar_classes', '');
146 146
 
147 147
 	// are toolbar headings enabled
148
-	$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
149
-	$toolbar_headings_h4      = lasso_editor_get_option( 'toolbar_headings_h4', 'lasso_editor' );
148
+	$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
149
+	$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
150 150
 
151
-	$toolbar_class  = $toolbar_headings ? 'toolbar-extended' : false;
151
+	$toolbar_class = $toolbar_headings ? 'toolbar-extended' : false;
152 152
 	
153 153
 	// mobile styles
154 154
     $mobile_class = $is_mobile ? 'lasso-mobile' : false;
155
-	$mobile_style =$is_mobile ? 'style="bottom:0px;"' : null;
155
+	$mobile_style = $is_mobile ? 'style="bottom:0px;"' : null;
156 156
 	
157 157
 	//show color
158 158
 	$show_color = lasso_editor_get_option('toolbar_show_color', 'lasso_editor');
@@ -160,99 +160,99 @@  discard block
 block discarded – undo
160 160
 	//show alignment
161 161
 	$show_align = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor');
162 162
 	
163
-	$status = get_post_status( get_the_ID() );
163
+	$status = get_post_status(get_the_ID());
164 164
 
165 165
 
166 166
 	?>
167
-	<div class="lasso--toolbar_wrap lasso-editor-controls--wrap <?php echo $toolbar_class.' '.$mobile_class.' '.$ase_status.' '.sanitize_html_class( $custom_classes );?>" <?php echo $mobile_style ?>>
168
-		<ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"';}?>>
169
-			<?php do_action( 'lasso_toolbar_components_before' );?>
170
-		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e( 'Bold', 'lasso' );?>"></li>
171
-		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e( 'Underline', 'lasso' );?>"></li>
172
-		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e( 'Italicize', 'lasso' );?>"></li>
173
-		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e( 'Strikethrough', 'lasso' );?>"></li>
174
-		    <?php if ( $toolbar_headings ): ?>
175
-		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>"></li>
176
-		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>"></li>
167
+	<div class="lasso--toolbar_wrap lasso-editor-controls--wrap <?php echo $toolbar_class.' '.$mobile_class.' '.$ase_status.' '.sanitize_html_class($custom_classes); ?>" <?php echo $mobile_style ?>>
168
+		<ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"'; }?>>
169
+			<?php do_action('lasso_toolbar_components_before'); ?>
170
+		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e('Bold', 'lasso'); ?>"></li>
171
+		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e('Underline', 'lasso'); ?>"></li>
172
+		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e('Italicize', 'lasso'); ?>"></li>
173
+		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e('Strikethrough', 'lasso'); ?>"></li>
174
+		    <?php if ($toolbar_headings): ?>
175
+		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>"></li>
176
+		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>"></li>
177 177
 			<?php endif; ?>
178
-			<?php if ( $toolbar_headings_h4 ): ?>
179
-		    <li id="lasso-toolbar--h4" title="<?php esc_attr_e( 'H4 Heading', 'lasso' );?>"></li>
180
-		    <li id="lasso-toolbar--h5" title="<?php esc_attr_e( 'H5 Heading', 'lasso' );?>"></li>
181
-			<li id="lasso-toolbar--h6" title="<?php esc_attr_e( 'H6 Heading', 'lasso' );?>"></li>
178
+			<?php if ($toolbar_headings_h4): ?>
179
+		    <li id="lasso-toolbar--h4" title="<?php esc_attr_e('H4 Heading', 'lasso'); ?>"></li>
180
+		    <li id="lasso-toolbar--h5" title="<?php esc_attr_e('H5 Heading', 'lasso'); ?>"></li>
181
+			<li id="lasso-toolbar--h6" title="<?php esc_attr_e('H6 Heading', 'lasso'); ?>"></li>
182 182
 			<?php endif; ?>
183 183
 			
184
-			<?php if ( $show_color ): ?>
185
-		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e( 'Set Text Color', 'lasso' );?>"></li>
186
-		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e( 'Choose Color', 'lasso' );?>"></li>
184
+			<?php if ($show_color): ?>
185
+		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e('Set Text Color', 'lasso'); ?>"></li>
186
+		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e('Choose Color', 'lasso'); ?>"></li>
187 187
 			<?php endif; ?>
188 188
 					
189
-		    <li id="lasso-toolbar--components" title="<?php esc_attr_e( 'Insert Component', 'lasso' );?>">
189
+		    <li id="lasso-toolbar--components" title="<?php esc_attr_e('Insert Component', 'lasso'); ?>">
190 190
 			    <ul id="lasso-toolbar--components__list" style="display:none;">
191
-			    	<?php if ( 'ase-active' == $ase_status ): ?>
192
-						<li data-type="image" title="<?php esc_attr_e( 'Image', 'lasso' );?>" class="lasso-toolbar--component__image"></li>
193
-						<li data-type="character" title="<?php esc_attr_e( 'Character', 'lasso' );?>" class="lasso-toolbar--component__character"></li>
194
-						<li data-type="quote" title="<?php esc_attr_e( 'Quote', 'lasso' );?>"  class="lasso-toolbar--component__quote"></li>
195
-						<li data-type="content" title="<?php esc_attr_e( 'Content', 'lasso' );?>"  class="lasso-toolbar--component__content"></li>
196
-						<li data-type="chapter" title="<?php esc_attr_e( 'Chapter', 'lasso' );?>"  class="lasso-toolbar--component__chapter"></li>
197
-						<li data-type="parallax" title="<?php esc_attr_e( 'Parallax', 'lasso' );?>"  class="lasso-toolbar--component__parallax"></li>
198
-						<li data-type="audio" title="<?php esc_attr_e( 'Audio', 'lasso' );?>"  class="lasso-toolbar--component__audio"></li>
199
-						<li data-type="video" title="<?php esc_attr_e( 'Video', 'lasso' );?>"  class="lasso-toolbar--component__video"></li>
200
-						<li data-type="map" title="<?php esc_attr_e( 'Map', 'lasso' );?>"  class="lasso-toolbar--component__map"></li>
201
-						<li data-type="timeline_stop" title="<?php esc_attr_e( 'Timeline', 'lasso' );?>"  class="lasso-toolbar--component__timeline"></li>
202
-						<li data-type="document" title="<?php esc_attr_e( 'Document', 'lasso' );?>"  class="lasso-toolbar--component__document"></li>
203
-						<li data-type="collection" title="<?php esc_attr_e( 'Collection', 'lasso' );?>"  class="lasso-toolbar--component__collection"></li>
204
-						<li data-type="gallery" title="<?php esc_attr_e( 'Gallery', 'lasso' );?>"  class="lasso-toolbar--component__gallery"></li>
205
-						<?php if ( class_exists ('Aesop_GalleryPop') ) { ?>
206
-						     <li data-type="gallery" title="<?php esc_attr_e( 'Gallery Pop', 'lasso' );?>"  class="lasso-toolbar--component__gallerypop"></li>
191
+			    	<?php if ('ase-active' == $ase_status): ?>
192
+						<li data-type="image" title="<?php esc_attr_e('Image', 'lasso'); ?>" class="lasso-toolbar--component__image"></li>
193
+						<li data-type="character" title="<?php esc_attr_e('Character', 'lasso'); ?>" class="lasso-toolbar--component__character"></li>
194
+						<li data-type="quote" title="<?php esc_attr_e('Quote', 'lasso'); ?>"  class="lasso-toolbar--component__quote"></li>
195
+						<li data-type="content" title="<?php esc_attr_e('Content', 'lasso'); ?>"  class="lasso-toolbar--component__content"></li>
196
+						<li data-type="chapter" title="<?php esc_attr_e('Chapter', 'lasso'); ?>"  class="lasso-toolbar--component__chapter"></li>
197
+						<li data-type="parallax" title="<?php esc_attr_e('Parallax', 'lasso'); ?>"  class="lasso-toolbar--component__parallax"></li>
198
+						<li data-type="audio" title="<?php esc_attr_e('Audio', 'lasso'); ?>"  class="lasso-toolbar--component__audio"></li>
199
+						<li data-type="video" title="<?php esc_attr_e('Video', 'lasso'); ?>"  class="lasso-toolbar--component__video"></li>
200
+						<li data-type="map" title="<?php esc_attr_e('Map', 'lasso'); ?>"  class="lasso-toolbar--component__map"></li>
201
+						<li data-type="timeline_stop" title="<?php esc_attr_e('Timeline', 'lasso'); ?>"  class="lasso-toolbar--component__timeline"></li>
202
+						<li data-type="document" title="<?php esc_attr_e('Document', 'lasso'); ?>"  class="lasso-toolbar--component__document"></li>
203
+						<li data-type="collection" title="<?php esc_attr_e('Collection', 'lasso'); ?>"  class="lasso-toolbar--component__collection"></li>
204
+						<li data-type="gallery" title="<?php esc_attr_e('Gallery', 'lasso'); ?>"  class="lasso-toolbar--component__gallery"></li>
205
+						<?php if (class_exists('Aesop_GalleryPop')) { ?>
206
+						     <li data-type="gallery" title="<?php esc_attr_e('Gallery Pop', 'lasso'); ?>"  class="lasso-toolbar--component__gallerypop"></li>
207 207
 						<?php }?>
208 208
 					<?php else: ?>
209
-						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );?>" class="image lasso-toolbar--component__image"></li>
210
-						<li data-type="wpquote" title="<?php esc_attr_e( 'WordPress Quote', 'lasso' );?>" class="quote lasso-toolbar--component__quote"></li>
211
-						<!--li data-type="wpvideo" title="<?php esc_attr_e( 'WordPress Video', 'lasso' );?>" class="video lasso-toolbar--component__video"></li-->
209
+						<li data-type="wpimg" title="<?php esc_attr_e('WordPress Image', 'lasso'); ?>" class="image lasso-toolbar--component__image"></li>
210
+						<li data-type="wpquote" title="<?php esc_attr_e('WordPress Quote', 'lasso'); ?>" class="quote lasso-toolbar--component__quote"></li>
211
+						<!--li data-type="wpvideo" title="<?php esc_attr_e('WordPress Video', 'lasso'); ?>" class="video lasso-toolbar--component__video"></li-->
212 212
 					<?php endif; ?>
213
-					<?php do_action( 'lasso_toolbar_components' );?>
213
+					<?php do_action('lasso_toolbar_components'); ?>
214 214
 			    </ul>
215 215
 			</li>
216
-			<li id="lasso-toolbar--link" title="<?php esc_attr_e( 'Anchor Link', 'lasso' );?>">
216
+			<li id="lasso-toolbar--link" title="<?php esc_attr_e('Anchor Link', 'lasso'); ?>">
217 217
 		    	<div id="lasso-toolbar--link__wrap" <?php echo $mobile_style ?> >
218
-		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'http://url.com', 'lasso' );?>"></div>
219
-		    		<a href="#" title="<?php esc_attr_e( 'Create Link', 'lasso' );?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
218
+		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e('http://url.com', 'lasso'); ?>"></div>
219
+		    		<a href="#" title="<?php esc_attr_e('Create Link', 'lasso'); ?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
220 220
 					<input class="styled-checkbox" type="checkbox" id="aesop-toolbar--link_newtab" checked/>
221 221
                     <label for="aesop-toolbar--link_newtab">Open in Another Tab</label>
222 222
 		    	</div>
223 223
 		    </li>
224
-		    <?php do_action( 'lasso_toolbar_components_after' );?>
225
-		    <li id="lasso-toolbar--html" title="<?php esc_attr_e( 'Insert HTML', 'lasso' );?>">
224
+		    <?php do_action('lasso_toolbar_components_after'); ?>
225
+		    <li id="lasso-toolbar--html" title="<?php esc_attr_e('Insert HTML', 'lasso'); ?>">
226 226
 		    	<div id="lasso-toolbar--html__wrap" <?php echo $mobile_style ?>>
227
-		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?>"></div>
227
+		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?>"></div>
228 228
 		    		<div id="lasso-toolbar--html__footer">
229 229
 		    			<ul class="lasso-toolbar--html-snips">
230
-		    				<?php if ( !$toolbar_headings ): ?>
231
-		    				<li id="lasso-html--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>">
232
-		    				<li id="lasso-html--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>">
230
+		    				<?php if (!$toolbar_headings): ?>
231
+		    				<li id="lasso-html--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>">
232
+		    				<li id="lasso-html--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>">
233 233
 		    				<?php endif; ?>
234
-		    				<li id="lasso-html--ul" title="<?php esc_attr_e( 'Unordered List', 'lasso' );?>">
235
-		    				<li id="lasso-html--ol" title="<?php esc_attr_e( 'Ordered List', 'lasso' );?>">
234
+		    				<li id="lasso-html--ul" title="<?php esc_attr_e('Unordered List', 'lasso'); ?>">
235
+		    				<li id="lasso-html--ol" title="<?php esc_attr_e('Ordered List', 'lasso'); ?>">
236 236
 		    			</ul>
237
-		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e( 'Cancel', 'lasso' );?></a>
238
-		    			<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>
237
+		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e('Cancel', 'lasso'); ?></a>
238
+		    			<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>
239 239
 		    		</div>
240 240
 		    	</div>
241 241
 		    </li>
242
-			<?php if ( $show_align ): ?>
243
-		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e( 'Text Left Align', 'lasso' );?>"></li>
244
-		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e( 'Text Center Align', 'lasso' );?>"></li>
245
-			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e( 'Text Right Align', 'lasso' );?>"></li>
242
+			<?php if ($show_align): ?>
243
+		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e('Text Left Align', 'lasso'); ?>"></li>
244
+		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e('Text Center Align', 'lasso'); ?>"></li>
245
+			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e('Text Right Align', 'lasso'); ?>"></li>
246 246
 			<?php endif; ?>
247 247
 		</ul>
248
-		<?php if ( is_singular() && $is_mobile ) { ?>
248
+		<?php if (is_singular() && $is_mobile) { ?>
249 249
 
250
-				<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;">
250
+				<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;">
251 251
 
252
-					<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>
252
+					<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>
253 253
 
254
-					<?php if ( 'draft' == $status && ( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') )  ) { ?>
255
-						<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>
254
+					<?php if ('draft' == $status && (lasso_user_can('publish_posts') || lasso_user_can('publish_pages'))) { ?>
255
+						<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>
256 256
 					<?php } ?>
257 257
 
258 258
 				</div>
@@ -270,22 +270,22 @@  discard block
 block discarded – undo
270 270
  */
271 271
 function lasso_editor_settings_toolbar() {
272 272
 
273
-	$delete_nonce = wp_create_nonce( 'lasso-delete-nonce' );
273
+	$delete_nonce = wp_create_nonce('lasso-delete-nonce');
274 274
 
275 275
 	ob_start();
276 276
 
277
-	if ( !lasso_user_can() )
277
+	if (!lasso_user_can())
278 278
 		return;
279 279
 
280 280
 	// let users add custom css classes
281
-	$custom_classes = apply_filters( 'lasso_component_classes', '' );
281
+	$custom_classes = apply_filters('lasso_component_classes', '');
282 282
 
283 283
 	?>
284
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
285
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
286
-		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
287
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
288
-		<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>
284
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
285
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
286
+		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
287
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
288
+		<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>
289 289
 	</ul>
290 290
 
291 291
 	<?php return ob_get_clean();
@@ -301,17 +301,17 @@  discard block
 block discarded – undo
301 301
 
302 302
 	ob_start();
303 303
 
304
-	if ( !lasso_user_can() )
304
+	if (!lasso_user_can())
305 305
 		return;
306 306
 
307 307
 	// has post thumbnail
308
-	$has_thumbnail = has_post_thumbnail( get_the_ID() ) ? 'class="lasso--featImg--has-thumb"' : false;
308
+	$has_thumbnail = has_post_thumbnail(get_the_ID()) ? 'class="lasso--featImg--has-thumb"' : false;
309 309
 
310 310
 	?>
311
-	<ul id="lasso--featImgControls" <?php echo $has_thumbnail;?>>
312
-		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e( 'Replace Image', 'lasso' );?>" href="#"><i class="lasso-icon-image"></i></a></li>
313
-		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e( 'Delete Image', 'lasso' );?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
314
-		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e( 'save', 'lasso' );?></a></li>
311
+	<ul id="lasso--featImgControls" <?php echo $has_thumbnail; ?>>
312
+		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e('Replace Image', 'lasso'); ?>" href="#"><i class="lasso-icon-image"></i></a></li>
313
+		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e('Delete Image', 'lasso'); ?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
314
+		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e('save', 'lasso'); ?></a></li>
315 315
 	</ul>
316 316
 
317 317
 	<?php return ob_get_clean();
@@ -330,55 +330,55 @@  discard block
 block discarded – undo
330 330
 
331 331
 	ob_start();
332 332
 
333
-	if ( !lasso_user_can() )
333
+	if (!lasso_user_can())
334 334
 		return;
335 335
 
336 336
 	global $post;
337 337
 
338 338
 	$postid = get_the_ID();
339 339
 
340
-	$status = get_post_status( $postid );
341
-	$nonce = wp_create_nonce( 'lasso-update-post-settings' );
340
+	$status = get_post_status($postid);
341
+	$nonce = wp_create_nonce('lasso-update-post-settings');
342 342
 
343 343
 	// let users add custom css classes
344
-	$custom_classes = apply_filters( 'lasso_modal_settings_classes', '' );
344
+	$custom_classes = apply_filters('lasso_modal_settings_classes', '');
345 345
 
346 346
 	// objects categories
347
-	$categories 		= lasso_get_post_objects( $postid, 'category' );
348
-	$tags 				= lasso_get_post_objects( $postid, 'tag' );
347
+	$categories = lasso_get_post_objects($postid, 'category');
348
+	$tags = lasso_get_post_objects($postid, 'tag');
349 349
 
350 350
 	// modal tabs
351
-	$tabs  				= lasso_modal_addons('tab');
352
-	$content 			= lasso_modal_addons('content');
351
+	$tabs = lasso_modal_addons('tab');
352
+	$content = lasso_modal_addons('content');
353 353
 
354 354
 	// are we singular
355
-	$is_singular 		= is_singular();
355
+	$is_singular = is_singular();
356 356
 	$is_singular_class 	= $is_singular ? 'lasso--postsettings__2col' : 'lasso--postsettings__1col';
357 357
 	$has_thumb_class    = has_post_thumbnail() ? 'has-thumbnail' : 'no-thumbnail';
358 358
 	$theme_supports     = current_theme_supports('post-thumbnails');
359
-	$default_image 		= LASSO_URL.'/admin/assets/img/empty-img.png';
359
+	$default_image = LASSO_URL.'/admin/assets/img/empty-img.png';
360 360
 
361 361
 ?>
362
-	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>">
362
+	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>">
363 363
 		<div class="lasso--modal__inner">
364 364
 
365
-			<?php if( $tabs ) { echo $tabs; } ?>
365
+			<?php if ($tabs) { echo $tabs; } ?>
366 366
 
367 367
 			<div class="lasso--modal__content modal__content--core visible" data-addon-content="core">
368
-				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class;?>" >
368
+				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class; ?>" >
369 369
 
370
-					<?php if ( $is_singular && $theme_supports ) : ?>
370
+					<?php if ($is_singular && $theme_supports) : ?>
371 371
 					<div class="lasso--postsettings__left">
372
-						<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>
373
-						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url( $default_image );?>">
372
+						<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>
373
+						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url($default_image); ?>">
374 374
 
375 375
 							<div id="lasso--post-thumb__controls" class="lasso--post-thumb__controls">
376
-								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image','lasso');?>" class="dashicons dashicons-edit"></i>
377
-								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image','lasso');?>" class="dashicons dashicons-no-alt"></i>
376
+								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image', 'lasso'); ?>" class="dashicons dashicons-edit"></i>
377
+								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image', 'lasso'); ?>" class="dashicons dashicons-no-alt"></i>
378 378
 								<i id="lasso--save-status" class="lasso-icon lasso-icon-spinner6 not-visible"></i>
379 379
 							</div>
380 380
 
381
-							<?php echo has_post_thumbnail() ? get_the_post_thumbnail( $post->ID, 'medium' ) : '<img src="'.$default_image.'">'; ?>
381
+							<?php echo has_post_thumbnail() ? get_the_post_thumbnail($post->ID, 'medium') : '<img src="'.$default_image.'">'; ?>
382 382
 
383 383
 						</div>
384 384
 						<div id="lasso--featImgSave"><a href="#" class="not-visible">Save</a></div>
@@ -388,12 +388,12 @@  discard block
 block discarded – undo
388 388
 
389 389
 					<div class="lasso--postsettings__right">
390 390
 
391
-						<?php if( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') ): ?>
391
+						<?php if (lasso_user_can('publish_posts') || lasso_user_can('publish_pages')): ?>
392 392
 						<div class="lasso--postsettings__option story-status-option">
393
-							<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>
394
-							<ul class="story-status story-status-<?php echo sanitize_html_class( $status );?>">
395
-								<li id="lasso--status-draft"><?php _e( 'Draft', 'lasso' );?></li>
396
-								<li id="lasso--status-publish"><?php _e( 'Publish', 'lasso' );?></li>
393
+							<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>
394
+							<ul class="story-status story-status-<?php echo sanitize_html_class($status); ?>">
395
+								<li id="lasso--status-draft"><?php _e('Draft', 'lasso'); ?></li>
396
+								<li id="lasso--status-publish"><?php _e('Publish', 'lasso'); ?></li>
397 397
 							</ul>
398 398
 							<div class="lasso--slider_wrap">
399 399
 								<div id="lasso--slider"></div>
@@ -401,10 +401,10 @@  discard block
 block discarded – undo
401 401
 						</div>
402 402
 						<?php endif; ?>
403 403
 
404
-						<?php if ( 'publish' == $status ): ?>
404
+						<?php if ('publish' == $status): ?>
405 405
 						<div class="lasso--postsettings__option story-slug-option">
406
-							<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>
407
-							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset( $post ) ? esc_attr( $post->post_name ) : false;?>">
406
+							<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>
407
+							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset($post) ? esc_attr($post->post_name) : false; ?>">
408 408
 						</div>
409 409
 						<?php endif; ?>
410 410
 
@@ -413,24 +413,24 @@  discard block
 block discarded – undo
413 413
 					<div class="lasso--postsettings__middle">
414 414
 
415 415
 						<div class="lasso--postsettings__option story-categories-option">
416
-							<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>
417
-							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories;?>">
416
+							<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>
417
+							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories; ?>">
418 418
 						</div>
419 419
 
420 420
 						<div class="lasso--postsettings__option story-tags-option">
421
-							<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>
422
-							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags;?>">
421
+							<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>
422
+							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags; ?>">
423 423
 						</div>
424 424
 
425 425
 					</div>
426 426
 					<div style="max-height:300px;overflow-y: scroll;">
427 427
                     <?php
428
-							$allcats = explode(",",lasso_get_objects('category'));
429
-							$currcats = explode(",",$categories);
430
-							foreach ( $allcats  as $category ) {
428
+							$allcats = explode(",", lasso_get_objects('category'));
429
+							$currcats = explode(",", $categories);
430
+							foreach ($allcats  as $category) {
431 431
 								if (empty($category)) continue;
432
-							   $checked ="";
433
-							   if (  in_array( $category, $currcats ) ) {
432
+							   $checked = "";
433
+							   if (in_array($category, $currcats)) {
434 434
 									$checked = 'checked="checked"';
435 435
 									
436 436
 							   }
@@ -439,23 +439,23 @@  discard block
 block discarded – undo
439 439
 					?>
440 440
 					</div>
441 441
 
442
-					<?php do_action( 'lasso_modal_post_form' ); // action ?>
442
+					<?php do_action('lasso_modal_post_form'); // action ?>
443 443
 
444 444
 					<div class="lasso--postsettings__footer" >
445
-						<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
445
+						<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
446 446
 						<input type="hidden" name="status" value="">
447 447
 						<input type="hidden" name="categories" value="">
448
-						<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
448
+						<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
449 449
 						<input type="hidden" name="action" value="process_update-object_post">
450
-						<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
451
-						<?php do_action( 'lasso_modal_post_form_footer' ); // action ?>
452
-						<input type="submit" value="<?php esc_attr_e( 'Save', 'lasso' );?>">
450
+						<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
451
+						<?php do_action('lasso_modal_post_form_footer'); // action ?>
452
+						<input type="submit" value="<?php esc_attr_e('Save', 'lasso'); ?>">
453 453
 					</div>
454 454
 
455 455
 				</form>
456 456
 			</div>
457 457
 
458
-			<?php if( $tabs ) { echo $content; } ?>
458
+			<?php if ($tabs) { echo $content; } ?>
459 459
 
460 460
 		</div>
461 461
 
@@ -476,44 +476,44 @@  discard block
 block discarded – undo
476 476
 
477 477
 	ob_start();
478 478
 
479
-	if ( !lasso_user_can('edit_posts') )
479
+	if (!lasso_user_can('edit_posts'))
480 480
 		return;
481 481
 
482
-	$status = get_post_status( get_the_ID() );
482
+	$status = get_post_status(get_the_ID());
483 483
 
484
-	$nonce = wp_create_nonce( 'lasso-editor-new-post' );
484
+	$nonce = wp_create_nonce('lasso-editor-new-post');
485 485
 
486 486
 	// let users add custom css classes
487
-	$custom_classes = apply_filters( 'lasso_modal_post_classes', '' );
487
+	$custom_classes = apply_filters('lasso_modal_post_classes', '');
488 488
 
489 489
 	// return the post type
490
-	$type = get_post_type( get_the_ID() );
490
+	$type = get_post_type(get_the_ID());
491 491
 
492 492
 	if (wp_is_mobile()) {
493 493
 		$mobile_style = 'style="top:140px !important;"';
494 494
 	}
495 495
 	?>
496
-	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" <?php echo $mobile_style;?>">
496
+	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" <?php echo $mobile_style; ?>">
497 497
 		<div class="lasso--modal__inner">
498 498
 
499 499
 			<form id="lasso--postnew__form" enctype="multipart/form-data" class="lasso--post-form">
500 500
 
501 501
 				<div class="lasso--postsettings__option story-slug-option lasso--last-option">
502
-					<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>
503
-					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e( 'Grump Wizards Make Toxic Brew', 'lasso' );?>">
502
+					<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>
503
+					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e('Grump Wizards Make Toxic Brew', 'lasso'); ?>">
504 504
 						<div class="lasso--select-wrap" style="width:90px">
505 505
 						<select id="lasso--select-type" name="story_type">
506 506
 
507 507
 							<?php
508 508
 								$types = lasso_post_types();
509 509
 
510
-								if ( !empty( $types ) ) {
510
+								if (!empty($types)) {
511 511
 
512
-									foreach( $types as $type ) {
512
+									foreach ($types as $type) {
513 513
 
514
-										$type = preg_replace( '/s\b/','', $type );
514
+										$type = preg_replace('/s\b/', '', $type);
515 515
 
516
-										printf( '<option value="%s">%s</option>', lcfirst( esc_attr( $type ) ) , ucfirst( esc_attr( $type ) ) );
516
+										printf('<option value="%s">%s</option>', lcfirst(esc_attr($type)), ucfirst(esc_attr($type)));
517 517
 									}
518 518
 
519 519
 								}
@@ -523,12 +523,12 @@  discard block
 block discarded – undo
523 523
 					</div>
524 524
 				</div>
525 525
 
526
-				<div class="lasso--postsettings__footer" style="<?php if (!wp_is_mobile()) {echo 'display:none;';} ?>">
527
-					<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
526
+				<div class="lasso--postsettings__footer" style="<?php if (!wp_is_mobile()) {echo 'display:none;'; } ?>">
527
+					<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
528 528
 					<input type="hidden" name="action" value="process_new-object_post">
529 529
 					<input type="hidden" name="object" value="post">
530
-					<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
531
-					<input type="submit" value="<?php esc_attr_e( 'Create', 'lasso' );?>">
530
+					<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
531
+					<input type="submit" value="<?php esc_attr_e('Create', 'lasso'); ?>">
532 532
 				</div>
533 533
 
534 534
 			</form>
@@ -556,18 +556,18 @@  discard block
 block discarded – undo
556 556
 	ob_start();
557 557
 
558 558
 	// post status
559
-	$status = get_post_status( get_the_ID() );
559
+	$status = get_post_status(get_the_ID());
560 560
 
561 561
 	// let users add custom css classes
562
-	$custom_classes = apply_filters( 'lasso_modal_all_post_classes', '' );
562
+	$custom_classes = apply_filters('lasso_modal_all_post_classes', '');
563 563
 
564 564
 	?>
565
-	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" style="max-height:100%">
565
+	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" style="max-height:100%">
566 566
 		<div class="lasso--modal__inner">
567 567
 
568 568
 			<div class="lasso--post-filtering not-visible">
569 569
 				<div class="lasso--search__results">
570
-					<span id="lasso--results-found"></span><?php _e('results found','lasso');?>
570
+					<span id="lasso--results-found"></span><?php _e('results found', 'lasso'); ?>
571 571
 				</div>
572 572
 				<div class="lasso--search">
573 573
 					<i id="lasso--search__toggle" class="dashicons dashicons-search"></i>
@@ -581,16 +581,16 @@  discard block
 block discarded – undo
581 581
 				$post_types = lasso_post_types_names();
582 582
 				$rest_bases = lasso_post_types_rest_base();
583 583
 
584
-				if ( ! empty( $post_types ) ) {
584
+				if (!empty($post_types)) {
585 585
 					$first = 'active';
586
-					foreach( $post_types as $name => $label ) {
587
-						printf( '<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr( $first), esc_attr( $rest_bases[$name] ), esc_attr( $label ) );
586
+					foreach ($post_types as $name => $label) {
587
+						printf('<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr($first), esc_attr($rest_bases[$name]), esc_attr($label));
588 588
 						$first = '';
589 589
 					}
590 590
 
591 591
 				}
592 592
 
593
-				do_action('lasso_modal_post_objects');?>
593
+				do_action('lasso_modal_post_objects'); ?>
594 594
 
595 595
 			</ul>
596 596
 			<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
@@ -608,18 +608,18 @@  discard block
 block discarded – undo
608 608
 
609 609
 	ob_start();
610 610
 
611
-	if ( !lasso_user_can() )
611
+	if (!lasso_user_can())
612 612
 		return;
613 613
 
614 614
 	// let users add custom css classes
615
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
615
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
616 616
 
617 617
 	?>
618
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
619
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
620
-		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
621
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
622
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
618
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
619
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
620
+		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
621
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
622
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
623 623
 	</ul>
624 624
 
625 625
 	<?php return ob_get_clean();
@@ -629,18 +629,18 @@  discard block
 block discarded – undo
629 629
 
630 630
 	ob_start();
631 631
 
632
-	if ( !lasso_user_can() )
632
+	if (!lasso_user_can())
633 633
 		return;
634 634
 
635 635
 	// let users add custom css classes
636
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
636
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
637 637
 
638 638
 	?>
639
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
640
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
641
-		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
642
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
643
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
639
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
640
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
641
+		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
642
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
643
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
644 644
 	</ul>
645 645
 
646 646
 	<?php return ob_get_clean();
@@ -653,16 +653,16 @@  discard block
 block discarded – undo
653 653
  */
654 654
 function lasso_map_form_footer() {
655 655
 
656
-	$nonce = wp_create_nonce( 'lasso-process-map' );
656
+	$nonce = wp_create_nonce('lasso-process-map');
657 657
 
658 658
 	ob_start();
659 659
 
660 660
 	?>
661 661
 	<div class="lasso--map-form__footer">
662
-		<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
663
-		<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
662
+		<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
663
+		<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
664 664
 		<input type="hidden" name="action" value="process_map_save">
665
-		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e( 'Save Locations', 'lasso' );?>">
665
+		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e('Save Locations', 'lasso'); ?>">
666 666
 	</div>
667 667
 
668 668
 	<?php return ob_get_clean();
@@ -680,7 +680,7 @@  discard block
 block discarded – undo
680 680
 
681 681
 	?>
682 682
 	<div id="lasso--pagerefresh" class="visible">
683
-		<?php _e( 'Save this post and refesh the page to see these changes.', 'lasso' );?>
683
+		<?php _e('Save this post and refesh the page to see these changes.', 'lasso'); ?>
684 684
 	</div>
685 685
 
686 686
 	<?php return ob_get_clean();
@@ -694,43 +694,43 @@  discard block
 block discarded – undo
694 694
  */
695 695
 function lasso_editor_options_blob() {
696 696
 
697
-	$codes   = function_exists( 'aesop_shortcodes' ) ? aesop_shortcodes() : apply_filters( 'lasso_custom_options', '' );
698
-	$galleries  = function_exists( 'lasso_editor_galleries_exist' ) && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
697
+	$codes = function_exists('aesop_shortcodes') ? aesop_shortcodes() : apply_filters('lasso_custom_options', '');
698
+	$galleries = function_exists('lasso_editor_galleries_exist') && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
699 699
 
700
-	$nonce = wp_create_nonce( 'lasso_gallery' );
700
+	$nonce = wp_create_nonce('lasso_gallery');
701 701
 
702 702
 	$blob = array();
703 703
 
704
-	if ( empty( $codes ) )
704
+	if (empty($codes))
705 705
 		return;
706 706
 
707
-	foreach ( $codes as $slug => $shortcode ) {
707
+	foreach ($codes as $slug => $shortcode) {
708 708
 		$return = '';
709 709
 		// Shortcode has atts
710 710
 
711
-		if ( count( $shortcode['atts'] ) && $shortcode['atts'] ) {
711
+		if (count($shortcode['atts']) && $shortcode['atts']) {
712 712
 
713
-			foreach ( $shortcode['atts'] as $attr_name => $attr_info ) {
713
+			foreach ($shortcode['atts'] as $attr_name => $attr_info) {
714 714
 
715 715
 
716
-				$prefix = isset( $attr_info['prefix'] ) ? sprintf( '<span class="lasso-option-prefix">%s</span>', $attr_info['prefix'] ) : null;
716
+				$prefix = isset($attr_info['prefix']) ? sprintf('<span class="lasso-option-prefix">%s</span>', $attr_info['prefix']) : null;
717 717
 
718 718
 				$return .= '<form id="lasso--component-settings-form" class="'.$galleries.'" method="post">';
719 719
 				$return .= '<p data-option="'.$attr_name.'" class="lasso-option lasso-'.$slug.'-'.$attr_name.'">';
720
-				$return .= '<label for="lasso-generator-attr-' . $attr_name . '">' . $attr_info['desc'] . '</label>';
720
+				$return .= '<label for="lasso-generator-attr-'.$attr_name.'">'.$attr_info['desc'].'</label>';
721 721
 				$return .= '<small class="lasso-option-desc">'.$attr_info['tip'].'</small>';
722 722
 				// Select
723 723
 
724
-				if ( isset( $attr_info['values'] ) ) {
724
+				if (isset($attr_info['values'])) {
725 725
 
726
-					$return .= '<select name="' . $attr_name . '" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr">';
726
+					$return .= '<select name="'.$attr_name.'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr">';
727 727
 
728
-					$i=0;
728
+					$i = 0;
729 729
 
730
-					foreach ( $attr_info['values'] as $attr_value ) {
730
+					foreach ($attr_info['values'] as $attr_value) {
731 731
 						$attr_value_selected = $attr_info['default'] == $attr_value ? ' selected="selected"' : '';
732 732
 
733
-						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" ' . $attr_value_selected . '>'.$attr_info['values'][$i]['name'].'</option>';
733
+						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" '.$attr_value_selected.'>'.$attr_info['values'][$i]['name'].'</option>';
734 734
 
735 735
 						$i++;
736 736
 					}
@@ -739,24 +739,24 @@  discard block
 block discarded – undo
739 739
 
740 740
 				} else {
741 741
 
742
-					$attr_field_type = isset( $attr_info['type'] ) ? $attr_info['type'] : 'text';
742
+					$attr_field_type = isset($attr_info['type']) ? $attr_info['type'] : 'text';
743 743
 
744 744
 					// image upload
745
-					if ( 'media_upload' == $attr_info['type'] ) {
745
+					if ('media_upload' == $attr_info['type']) {
746 746
 
747
-						$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.'" />';
747
+						$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.'" />';
748 748
 						$return .= '<a href="#" id="lasso-upload-img" class="lasso-option-button" /></a>';
749 749
 
750
-					} elseif ( 'color' == $attr_info['type'] ) {
750
+					} elseif ('color' == $attr_info['type']) {
751 751
 
752
-						$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.'" />';
752
+						$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.'" />';
753 753
 
754
-					} elseif ( 'text_area' == $attr_info['type'] ) {
754
+					} elseif ('text_area' == $attr_info['type']) {
755 755
 
756
-						$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.'';
756
+						$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.'';
757 757
 
758 758
 					} else {
759
-						$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.'';
759
+						$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.'';
760 760
 					}
761 761
 				}
762 762
 				$return .= '</p>';
@@ -767,9 +767,9 @@  discard block
 block discarded – undo
767 767
 		///////////////////////////
768 768
 		// START GALLERY AND MAP FRONT END STUFFS
769 769
 		///////////////////////////
770
-		if ( isset( $shortcode['front'] ) && true == $shortcode['front'] ) {
770
+		if (isset($shortcode['front']) && true == $shortcode['front']) {
771 771
 
772
-			if ( 'gallery' == $shortcode['front_type'] ) {
772
+			if ('gallery' == $shortcode['front_type']) {
773 773
 
774 774
 				$return .= lasso_gallery_editor_module();
775 775
 
@@ -780,13 +780,13 @@  discard block
 block discarded – undo
780 780
 		///////////////////////////
781 781
 
782 782
 		// Single shortcode (not closed)
783
-		if ( 'single' == $shortcode['type'] ) {
783
+		if ('single' == $shortcode['type']) {
784 784
 
785 785
 			$return .= '<input type="hidden" name="lasso-generator-content" id="lasso-generator-content" value="false" />';
786 786
 
787 787
 		} else {
788 788
 
789
-			$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>';
789
+			$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>';
790 790
 		}
791 791
 
792 792
 		$return .= '<p class="lasso-buttoninsert-wrap"><a href="#" class="lasso-generator-cancel" id="lasso--sidebar__close">Cancel
@@ -819,7 +819,7 @@  discard block
 block discarded – undo
819 819
 				<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
820 820
 				<div id="lasso--hide" style="display:none;" class="lasso--post-form">
821 821
 					<i class="lasso-icon lasso-icon-move"></i>
822
-					<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>
822
+					<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>
823 823
 					<div class="lasso--slider_wrap">
824 824
 						<div id="lasso--slider"></div>
825 825
 					</div>
Please login to merge, or discard this patch.
Braces   +35 added lines, -21 removed lines patch added patch discarded remove patch
@@ -109,8 +109,9 @@  discard block
 block discarded – undo
109 109
 
110 110
 	ob_start();
111 111
 
112
-	if ( !lasso_user_can() )
113
-		return;
112
+	if ( !lasso_user_can() ) {
113
+			return;
114
+	}
114 115
 
115 116
 	// let users add custom css classes
116 117
 	$custom_classes = apply_filters( 'lasso_sidebar_classes', '' );
@@ -133,8 +134,9 @@  discard block
 block discarded – undo
133 134
 
134 135
 	ob_start();
135 136
 
136
-	if ( !lasso_user_can() )
137
-		return;
137
+	if ( !lasso_user_can() ) {
138
+			return;
139
+	}
138 140
 	
139 141
 	$is_mobile = wp_is_mobile();
140 142
 
@@ -205,8 +207,11 @@  discard block
 block discarded – undo
205 207
 						<?php if ( class_exists ('Aesop_GalleryPop') ) { ?>
206 208
 						     <li data-type="gallery" title="<?php esc_attr_e( 'Gallery Pop', 'lasso' );?>"  class="lasso-toolbar--component__gallerypop"></li>
207 209
 						<?php }?>
208
-					<?php else: ?>
209
-						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );?>" class="image lasso-toolbar--component__image"></li>
210
+					<?php else {
211
+	: ?>
212
+						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );
213
+}
214
+?>" class="image lasso-toolbar--component__image"></li>
210 215
 						<li data-type="wpquote" title="<?php esc_attr_e( 'WordPress Quote', 'lasso' );?>" class="quote lasso-toolbar--component__quote"></li>
211 216
 						<!--li data-type="wpvideo" title="<?php esc_attr_e( 'WordPress Video', 'lasso' );?>" class="video lasso-toolbar--component__video"></li-->
212 217
 					<?php endif; ?>
@@ -274,8 +279,9 @@  discard block
 block discarded – undo
274 279
 
275 280
 	ob_start();
276 281
 
277
-	if ( !lasso_user_can() )
278
-		return;
282
+	if ( !lasso_user_can() ) {
283
+			return;
284
+	}
279 285
 
280 286
 	// let users add custom css classes
281 287
 	$custom_classes = apply_filters( 'lasso_component_classes', '' );
@@ -301,8 +307,9 @@  discard block
 block discarded – undo
301 307
 
302 308
 	ob_start();
303 309
 
304
-	if ( !lasso_user_can() )
305
-		return;
310
+	if ( !lasso_user_can() ) {
311
+			return;
312
+	}
306 313
 
307 314
 	// has post thumbnail
308 315
 	$has_thumbnail = has_post_thumbnail( get_the_ID() ) ? 'class="lasso--featImg--has-thumb"' : false;
@@ -330,8 +337,9 @@  discard block
 block discarded – undo
330 337
 
331 338
 	ob_start();
332 339
 
333
-	if ( !lasso_user_can() )
334
-		return;
340
+	if ( !lasso_user_can() ) {
341
+			return;
342
+	}
335 343
 
336 344
 	global $post;
337 345
 
@@ -428,7 +436,9 @@  discard block
 block discarded – undo
428 436
 							$allcats = explode(",",lasso_get_objects('category'));
429 437
 							$currcats = explode(",",$categories);
430 438
 							foreach ( $allcats  as $category ) {
431
-								if (empty($category)) continue;
439
+								if (empty($category)) {
440
+									continue;
441
+								}
432 442
 							   $checked ="";
433 443
 							   if (  in_array( $category, $currcats ) ) {
434 444
 									$checked = 'checked="checked"';
@@ -476,8 +486,9 @@  discard block
 block discarded – undo
476 486
 
477 487
 	ob_start();
478 488
 
479
-	if ( !lasso_user_can('edit_posts') )
480
-		return;
489
+	if ( !lasso_user_can('edit_posts') ) {
490
+			return;
491
+	}
481 492
 
482 493
 	$status = get_post_status( get_the_ID() );
483 494
 
@@ -608,8 +619,9 @@  discard block
 block discarded – undo
608 619
 
609 620
 	ob_start();
610 621
 
611
-	if ( !lasso_user_can() )
612
-		return;
622
+	if ( !lasso_user_can() ) {
623
+			return;
624
+	}
613 625
 
614 626
 	// let users add custom css classes
615 627
 	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
@@ -629,8 +641,9 @@  discard block
 block discarded – undo
629 641
 
630 642
 	ob_start();
631 643
 
632
-	if ( !lasso_user_can() )
633
-		return;
644
+	if ( !lasso_user_can() ) {
645
+			return;
646
+	}
634 647
 
635 648
 	// let users add custom css classes
636 649
 	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
@@ -701,8 +714,9 @@  discard block
 block discarded – undo
701 714
 
702 715
 	$blob = array();
703 716
 
704
-	if ( empty( $codes ) )
705
-		return;
717
+	if ( empty( $codes ) ) {
718
+			return;
719
+	}
706 720
 
707 721
 	foreach ( $codes as $slug => $shortcode ) {
708 722
 		$return = '';
Please login to merge, or discard this patch.