Completed
Push — master ( e37cc4...f545a8 )
by
unknown
01:48
created
admin/includes/menus/settings.php 2 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -79,6 +79,10 @@
 block discarded – undo
79 79
 
80 80
 	}
81 81
 	
82
+	/**
83
+	 * @param string $id
84
+	 * @param string $defvalue
85
+	 */
82 86
 	function create_section_for_color_picker($id, $title, $defvalue) { 
83 87
 		$color_value = lasso_editor_get_option( $id, 'lasso_editor',$defvalue );
84 88
 	 
Please login to merge, or discard this patch.
Spacing   +128 added lines, -128 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();
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	}
81 81
 	
82 82
 	function create_section_for_color_picker($id, $title, $defvalue) { 
83
-		$color_value = lasso_editor_get_option( $id, 'lasso_editor',$defvalue );
83
+		$color_value = lasso_editor_get_option($id, 'lasso_editor', $defvalue);
84 84
 	 
85 85
 		echo '<div lass="lasso-editor-settings--option-inner">'."\n";
86 86
 		echo '<label>'.$title.'</label>';
@@ -95,37 +95,37 @@  discard block
 block discarded – undo
95 95
 	 */
96 96
 	function lasso_editor_settings_form() {
97 97
 
98
-		if ( !is_user_logged_in() )
98
+		if (!is_user_logged_in())
99 99
 			return;
100 100
 
101
-		$article_object   = lasso_editor_get_option( 'article_class', 'lasso_editor' );
102
-		$featImgClass    = lasso_editor_get_option( 'featimg_class', 'lasso_editor' );
103
-		$titleClass    = lasso_editor_get_option( 'title_class', 'lasso_editor' );
104
-
105
-		$post_new_disabled   = lasso_editor_get_option( 'post_adding_disabled', 'lasso_editor' );
106
-		$save_to_post_disabled  = lasso_editor_get_option( 'post_save_disabled', 'lasso_editor' );
107
-		$post_settings_disabled = lasso_editor_get_option( 'post_settings_disabled', 'lasso_editor' );
108
-		$allow_change_date = lasso_editor_get_option( 'allow_change_date', 'lasso_editor' );
109
-		$allow_new_category = lasso_editor_get_option( 'allow_new_category', 'lasso_editor' );
110
-		$shortcodify_disabled  = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
111
-		$enable_autosave  = lasso_editor_get_option( 'enable_autosave', 'lasso_editor' );
112
-
113
-		$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
114
-		$toolbar_headings_h4      = lasso_editor_get_option( 'toolbar_headings_h4', 'lasso_editor' );
115
-		$toolbar_show_color      = lasso_editor_get_option( 'toolbar_show_color', 'lasso_editor' );
116
-		$toolbar_show_alignment  = lasso_editor_get_option( 'toolbar_show_alignment', 'lasso_editor' );
101
+		$article_object = lasso_editor_get_option('article_class', 'lasso_editor');
102
+		$featImgClass = lasso_editor_get_option('featimg_class', 'lasso_editor');
103
+		$titleClass = lasso_editor_get_option('title_class', 'lasso_editor');
104
+
105
+		$post_new_disabled = lasso_editor_get_option('post_adding_disabled', 'lasso_editor');
106
+		$save_to_post_disabled  = lasso_editor_get_option('post_save_disabled', 'lasso_editor');
107
+		$post_settings_disabled = lasso_editor_get_option('post_settings_disabled', 'lasso_editor');
108
+		$allow_change_date = lasso_editor_get_option('allow_change_date', 'lasso_editor');
109
+		$allow_new_category = lasso_editor_get_option('allow_new_category', 'lasso_editor');
110
+		$shortcodify_disabled  = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor');
111
+		$enable_autosave = lasso_editor_get_option('enable_autosave', 'lasso_editor');
112
+
113
+		$toolbar_headings      = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
114
+		$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
115
+		$toolbar_show_color      = lasso_editor_get_option('toolbar_show_color', 'lasso_editor');
116
+		$toolbar_show_alignment  = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor');
117 117
 		
118
-		$objectsNoSave  	= lasso_editor_get_option('dont_save', 'lasso_editor');
119
-		$objectsNonEditable  	= lasso_editor_get_option('non_editable', 'lasso_editor');
118
+		$objectsNoSave = lasso_editor_get_option('dont_save', 'lasso_editor');
119
+		$objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor');
120 120
 		$disable_tour = lasso_editor_get_option('disable_tour', 'lasso_editor');
121 121
 		$show_ignored_items = lasso_editor_get_option('show_ignored_items', 'lasso_editor');
122 122
 		$save_using_rest_disabled = lasso_editor_get_option('save_using_rest_disabled', 'lasso_editor');
123 123
 		
124
-		$default_post_types = apply_filters( 'lasso_allowed_post_types', array( 'post', 'page'));
125
-		$allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor',  $default_post_types);
124
+		$default_post_types = apply_filters('lasso_allowed_post_types', array('post', 'page'));
125
+		$allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', $default_post_types);
126 126
 		
127
-		$bold_tag = lasso_editor_get_option( 'bold_tag', 'lasso_editor',  "b");
128
-		$i_tag = lasso_editor_get_option( 'i_tag', 'lasso_editor',  "i");
127
+		$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor', "b");
128
+		$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor', "i");
129 129
 		
130 130
 		$insert_comp_ui = lasso_editor_get_option('insert_comp_ui', 'lasso_editor');
131 131
 		if (!$insert_comp_ui) {
@@ -135,31 +135,31 @@  discard block
 block discarded – undo
135 135
 ?>
136 136
 		<div class="wrap">
137 137
 
138
-	    	<h2><?php _e( 'Editus Settings', 'lasso' );?></h2>
138
+	    	<h2><?php _e('Editus Settings', 'lasso'); ?></h2>
139 139
 
140 140
 			<form id="lasso-editor-settings-form" class="lasso--form-settings" method="post" enctype="multipart/form-data">
141 141
 
142
-				<?php do_action('lasso_settings_before');?>
142
+				<?php do_action('lasso_settings_before'); ?>
143 143
 				
144 144
 				
145 145
 				
146
-				<h3><?php _e( 'Enable for:', 'lasso' );?></h3>
146
+				<h3><?php _e('Enable for:', 'lasso'); ?></h3>
147 147
 				<div class="lasso-editor-settings--option-wrap">
148 148
 					<div class="lasso-editor-settings--option-inner">
149 149
 						
150
-						<span class="lasso--setting-description"><?php _e( 'Enable Editus for the following post types.', 'lasso' );?></span>
150
+						<span class="lasso--setting-description"><?php _e('Enable Editus for the following post types.', 'lasso'); ?></span>
151 151
 						<?php
152 152
 						$args = array(
153 153
 							'public'   => true
154 154
 						);
155 155
 						 
156
-						$allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
157
-						$post_types = get_post_types( $args, 'objects' );
156
+						$allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
157
+						$post_types = get_post_types($args, 'objects');
158 158
 						 
159
-						foreach ( $post_types  as $post_type ) {
159
+						foreach ($post_types  as $post_type) {
160 160
 						   if ($post_type->name == 'attachment') continue;
161
-						   $checked ="";
162
-						   if (  in_array( $post_type->name, $allowed_post_types )  ) {
161
+						   $checked = "";
162
+						   if (in_array($post_type->name, $allowed_post_types)) {
163 163
 								$checked = 'checked="checked"';
164 164
 						   }
165 165
 						   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>';
@@ -169,90 +169,90 @@  discard block
 block discarded – undo
169 169
 				</div>
170 170
 				
171 171
 
172
-				<h3><?php _e( 'Internal Settings', 'lasso' );?></h3>
172
+				<h3><?php _e('Internal Settings', 'lasso'); ?></h3>
173 173
 				<div class="lasso-editor-settings--option-wrap">
174 174
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
175
-						<label><?php _e( 'Article Class', 'lasso' );?></label>
176
-						<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>
177
-						<input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr( $article_object );?>" placeholder=".entry-content">
175
+						<label><?php _e('Article Class', 'lasso'); ?></label>
176
+						<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>
177
+						<input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr($article_object); ?>" placeholder=".entry-content">
178 178
 					</div>
179 179
 				
180 180
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
181
-						<label><?php _e( 'Featured Image Class', 'lasso' );?></label>
182
-						<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>
183
-						<input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr( $featImgClass );?>" placeholder=".entry-content">
181
+						<label><?php _e('Featured Image Class', 'lasso'); ?></label>
182
+						<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>
183
+						<input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr($featImgClass); ?>" placeholder=".entry-content">
184 184
 					</div>
185 185
 				
186 186
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
187
-						<label><?php _e( 'Article Title Class', 'lasso' );?></label>
188
-						<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>
189
-						<input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr( $titleClass );?>" placeholder=".entry-content">
187
+						<label><?php _e('Article Title Class', 'lasso'); ?></label>
188
+						<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>
189
+						<input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr($titleClass); ?>" placeholder=".entry-content">
190 190
 					</div>
191 191
 				
192 192
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
193
-						<label><?php _e( 'Ignored Items to Save', 'lasso' );?></label>
194
-						<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>
195
-						<textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNoSave );?></textarea>
193
+						<label><?php _e('Ignored Items to Save', 'lasso'); ?></label>
194
+						<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>
195
+						<textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNoSave); ?></textarea>
196 196
 					</div>
197 197
 				
198 198
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
199
-						<label><?php _e( 'Read Only Items', 'lasso' );?></label>
200
-						<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>
201
-						<textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNonEditable );?></textarea>
199
+						<label><?php _e('Read Only Items', 'lasso'); ?></label>
200
+						<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>
201
+						<textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNonEditable); ?></textarea>
202 202
 					</div>
203 203
 				
204 204
 					<div class="lasso-editor-settings--option-inner" >
205
-						<input type="checkbox" class="checkbox" name="lasso_editor[show_ignored_items]" id="lasso_editor[show_ignored_items]" <?php echo checked( $show_ignored_items, 'on' );?> >
206
-						<label for="lasso_editor[show_ignored_items]"> <?php _e( 'Show Ignored Items', 'lasso' );?></label>
207
-						<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>
205
+						<input type="checkbox" class="checkbox" name="lasso_editor[show_ignored_items]" id="lasso_editor[show_ignored_items]" <?php echo checked($show_ignored_items, 'on'); ?> >
206
+						<label for="lasso_editor[show_ignored_items]"> <?php _e('Show Ignored Items', 'lasso'); ?></label>
207
+						<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>
208 208
 					</div>
209 209
 				</div>
210 210
 
211
-				<h3><?php _e( 'Editor UI', 'lasso' );?></h3>
211
+				<h3><?php _e('Editor UI', 'lasso'); ?></h3>
212 212
 				<div class="lasso-editor-settings--option-wrap">
213 213
 					<?php
214
-					self::create_section_for_color_picker('button-color1', _e( 'Editor Bar Color Top', 'lasso' ), '#0000ff');
215
-					self::create_section_for_color_picker('button-color2', _e( 'Editor Bar Color Bottom', 'lasso' ), '#000030');
216
-					self::create_section_for_color_picker('dialog-color', _e( 'Dialog Color', 'lasso' ), '#000055');
217
-					self::create_section_for_color_picker('text-color', _e( 'Icon/Text Color', 'lasso' ), '#ffffff');
214
+					self::create_section_for_color_picker('button-color1', _e('Editor Bar Color Top', 'lasso'), '#0000ff');
215
+					self::create_section_for_color_picker('button-color2', _e('Editor Bar Color Bottom', 'lasso'), '#000030');
216
+					self::create_section_for_color_picker('dialog-color', _e('Dialog Color', 'lasso'), '#000055');
217
+					self::create_section_for_color_picker('text-color', _e('Icon/Text Color', 'lasso'), '#ffffff');
218 218
 					?>
219
-					<button type="button" id="lasso-editor-settings--default-colors" ><?php _e( 'Default Colors', 'lasso' );?></button>
219
+					<button type="button" id="lasso-editor-settings--default-colors" ><?php _e('Default Colors', 'lasso'); ?></button>
220 220
 				    <div style="height:50px;"></div>
221 221
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
222
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked( $toolbar_headings, 'on' );?> >
223
-						<label for="lasso_editor[toolbar_headings]"><?php _e( 'Enable H2 and H3 Buttons', 'lasso' );?></label>
224
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set H2 and H3 settings.', 'lasso' );?></span>
222
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked($toolbar_headings, 'on'); ?> >
223
+						<label for="lasso_editor[toolbar_headings]"><?php _e('Enable H2 and H3 Buttons', 'lasso'); ?></label>
224
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set H2 and H3 settings.', 'lasso'); ?></span>
225 225
 
226 226
 					</div>
227 227
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
228
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings_h4]" id="lasso_editor[toolbar_headings_h4]" <?php echo checked( $toolbar_headings_h4, 'on' );?> >
229
-						<label for="lasso_editor[toolbar_headings_h4]"><?php _e( 'Enable H4/H5/H6 Buttons', 'lasso' );?></label>
230
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set H4/H5/H6 settings.', 'lasso' );?></span>
228
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings_h4]" id="lasso_editor[toolbar_headings_h4]" <?php echo checked($toolbar_headings_h4, 'on'); ?> >
229
+						<label for="lasso_editor[toolbar_headings_h4]"><?php _e('Enable H4/H5/H6 Buttons', 'lasso'); ?></label>
230
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set H4/H5/H6 settings.', 'lasso'); ?></span>
231 231
 
232 232
 					</div>
233 233
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
234
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked( $toolbar_show_color, 'on' );?> >
235
-						<label for="lasso_editor[toolbar_show_color]"><?php _e( 'Enable Text Color Buttons', 'lasso' );?></label>
236
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set text colors.', 'lasso' );?></span>
234
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked($toolbar_show_color, 'on'); ?> >
235
+						<label for="lasso_editor[toolbar_show_color]"><?php _e('Enable Text Color Buttons', 'lasso'); ?></label>
236
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set text colors.', 'lasso'); ?></span>
237 237
 
238 238
 					</div>
239 239
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
240
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked( $toolbar_show_alignment, 'on' );?> >
241
-						<label for="lasso_editor[toolbar_show_alignment]"><?php _e( 'Enable Text Align Buttons', 'lasso' );?></label>
242
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set text alignment.', 'lasso' );?></span>
240
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked($toolbar_show_alignment, 'on'); ?> >
241
+						<label for="lasso_editor[toolbar_show_alignment]"><?php _e('Enable Text Align Buttons', 'lasso'); ?></label>
242
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set text alignment.', 'lasso'); ?></span>
243 243
 
244 244
 					</div>
245 245
 					<div class="lasso-editor-settings--option-inner">
246
-					    <label for="lasso_editor[insert_comp_ui]"> <?php _e( 'Insert Component UI', 'lasso' );?></label>
247
-						<span class="lasso--setting-description"><?php _e( 'UI mechanism to insert components', 'lasso' );?></span>
246
+					    <label for="lasso_editor[insert_comp_ui]"> <?php _e('Insert Component UI', 'lasso'); ?></label>
247
+						<span class="lasso--setting-description"><?php _e('UI mechanism to insert components', 'lasso'); ?></span>
248 248
 						<div class="lasso-editor-settings--option-inner" style="border:none;">
249
-					       <input type="radio" name="lasso_editor[insert_comp_ui]" value='drag' <?php echo checked( $insert_comp_ui, 'drag' );?>> <?php _e( 'Drag and Drop', 'lasso' );?>
249
+					       <input type="radio" name="lasso_editor[insert_comp_ui]" value='drag' <?php echo checked($insert_comp_ui, 'drag'); ?>> <?php _e('Drag and Drop', 'lasso'); ?>
250 250
 						</div>
251 251
 						<div class="lasso-editor-settings--option-inner" style="border:none;">
252
-						<input type="radio" name="lasso_editor[insert_comp_ui]" value="click" <?php echo checked( $insert_comp_ui, 'click' );?>> <?php _e( 'Click', 'lasso' );?>
252
+						<input type="radio" name="lasso_editor[insert_comp_ui]" value="click" <?php echo checked($insert_comp_ui, 'click'); ?>> <?php _e('Click', 'lasso'); ?>
253 253
 						</div>
254 254
 						<div class="lasso-editor-settings--option-inner" style="border:none;">
255
-						<input type="radio" name="lasso_editor[insert_comp_ui]" value="mediumcom" <?php echo checked( $insert_comp_ui, 'mediumcom' );?>> <?php _e( 'Auto Button on Empty Paragraph. medium.com-like UI.', 'lasso' );?>
255
+						<input type="radio" name="lasso_editor[insert_comp_ui]" value="mediumcom" <?php echo checked($insert_comp_ui, 'mediumcom'); ?>> <?php _e('Auto Button on Empty Paragraph. medium.com-like UI.', 'lasso'); ?>
256 256
 						</div>
257 257
 					</div>
258 258
 				</div>
@@ -261,82 +261,82 @@  discard block
 block discarded – undo
261 261
 				
262 262
 				
263 263
 
264
-				<h3><?php _e( 'Post Settings UI', 'lasso' );?></h3>
264
+				<h3><?php _e('Post Settings UI', 'lasso'); ?></h3>
265 265
 				<div class="lasso-editor-settings--option-wrap"  >
266 266
 					<div class="lasso-editor-settings--option-inner" style="border:none">
267
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked( $post_settings_disabled, 'on' );?> >
268
-						<label for="lasso_editor[post_settings_disabled]"> <?php _e( 'Disable Post Settings', 'lasso' );?></label>
269
-						<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>
267
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked($post_settings_disabled, 'on'); ?> >
268
+						<label for="lasso_editor[post_settings_disabled]"> <?php _e('Disable Post Settings', 'lasso'); ?></label>
269
+						<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>
270 270
 					</div>
271 271
 					
272 272
 					<div class="lasso-editor-settings--option-inner" style="border:none">
273
-						<input type="checkbox" class="checkbox" name="lasso_editor[allow_change_date]" id="lasso_editor[allow_change_date]" <?php echo checked( $allow_change_date, 'on' );?> >
274
-						<label for="lasso_editor[allow_change_date]"> <?php _e( 'Allow Changing Post Date', 'lasso' );?></label>
275
-						<span class="lasso--setting-description"><?php _e( 'Add the date selector to change the post\'s date to the Post Setting dialog', 'lasso' );?></span>
273
+						<input type="checkbox" class="checkbox" name="lasso_editor[allow_change_date]" id="lasso_editor[allow_change_date]" <?php echo checked($allow_change_date, 'on'); ?> >
274
+						<label for="lasso_editor[allow_change_date]"> <?php _e('Allow Changing Post Date', 'lasso'); ?></label>
275
+						<span class="lasso--setting-description"><?php _e('Add the date selector to change the post\'s date to the Post Setting dialog', 'lasso'); ?></span>
276 276
 					</div>
277 277
 					
278 278
 					<div class="lasso-editor-settings--option-inner" style="border:none">
279
-						<input type="checkbox" class="checkbox" name="lasso_editor[allow_new_category]" id="lasso_editor[allow_new_category]" <?php echo checked( $allow_new_category, 'on' );?> >
280
-						<label for="lasso_editor[allow_new_category]"> <?php _e( 'Allow Adding New Category', 'lasso' );?></label>
281
-						<span class="lasso--setting-description"><?php _e( 'Add the user to create new, previously non-existing categories for posts.', 'lasso' );?></span>
279
+						<input type="checkbox" class="checkbox" name="lasso_editor[allow_new_category]" id="lasso_editor[allow_new_category]" <?php echo checked($allow_new_category, 'on'); ?> >
280
+						<label for="lasso_editor[allow_new_category]"> <?php _e('Allow Adding New Category', 'lasso'); ?></label>
281
+						<span class="lasso--setting-description"><?php _e('Add the user to create new, previously non-existing categories for posts.', 'lasso'); ?></span>
282 282
 					</div>
283 283
 				
284 284
 					<div class="lasso-editor-settings--option-inner" >
285
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked( $post_new_disabled, 'on' );?> >
286
-						<label for="lasso_editor[post_adding_disabled]"><?php _e( 'Disable Post Adding', 'lasso' );?></label>
287
-						<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>
285
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked($post_new_disabled, 'on'); ?> >
286
+						<label for="lasso_editor[post_adding_disabled]"><?php _e('Disable Post Adding', 'lasso'); ?></label>
287
+						<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>
288 288
 					</div>
289 289
 					
290 290
 
291 291
 				</div>
292 292
 				
293
-				<h3><?php _e( 'Misc', 'lasso' );?></h3>
293
+				<h3><?php _e('Misc', 'lasso'); ?></h3>
294 294
 				<div class="lasso-editor-settings--option-wrap">
295 295
 					<div class="lasso-editor-settings--option-inner" style="border:none">
296
-						<input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked( $disable_tour, 'on' );?> >
297
-						<label for="lasso_editor[disable_tour]"> <?php _e( 'Do Not Show Tour Dialog', 'lasso' );?></label>
298
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable the tour dialog box for all users.', 'lasso' );?></span>
296
+						<input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked($disable_tour, 'on'); ?> >
297
+						<label for="lasso_editor[disable_tour]"> <?php _e('Do Not Show Tour Dialog', 'lasso'); ?></label>
298
+						<span class="lasso--setting-description"><?php _e('Check this box to disable the tour dialog box for all users.', 'lasso'); ?></span>
299 299
 					</div>
300 300
 
301 301
 					<div class="lasso-editor-settings--option-inner" style="border:none">
302
-					    <label for="lasso_editor[bold_tag]"> <?php _e( '"Bold" Tag', 'lasso' );?></label>
303
-						<span class="lasso--setting-description"><?php _e( 'Choose the HTML tag used for the "Bold" style.', 'lasso' );?></span>
304
-					    <input type="radio" name="lasso_editor[bold_tag]" value='b' <?php echo checked( $bold_tag, 'b' );?>> b
305
-						<input type="radio" name="lasso_editor[bold_tag]" value="strong" <?php echo checked( $bold_tag, 'strong' );?>> strong
302
+					    <label for="lasso_editor[bold_tag]"> <?php _e('"Bold" Tag', 'lasso'); ?></label>
303
+						<span class="lasso--setting-description"><?php _e('Choose the HTML tag used for the "Bold" style.', 'lasso'); ?></span>
304
+					    <input type="radio" name="lasso_editor[bold_tag]" value='b' <?php echo checked($bold_tag, 'b'); ?>> b
305
+						<input type="radio" name="lasso_editor[bold_tag]" value="strong" <?php echo checked($bold_tag, 'strong'); ?>> strong
306 306
 					</div>
307 307
 					<div class="lasso-editor-settings--option-inner" >
308
-					    <label for="lasso_editor[i_tag]"> <?php _e( '"Italic" Tag', 'lasso' );?></label>
309
-						<span class="lasso--setting-description"><?php _e( 'Choose the HTML tag used for the "Italic" style.', 'lasso' );?></span>
310
-					    <input type="radio" name="lasso_editor[i_tag]" value='i' <?php echo checked( $i_tag, 'i' );?>> i
311
-						<input type="radio" name="lasso_editor[i_tag]" value="em" <?php echo checked( $i_tag, 'em' );?>> em
308
+					    <label for="lasso_editor[i_tag]"> <?php _e('"Italic" Tag', 'lasso'); ?></label>
309
+						<span class="lasso--setting-description"><?php _e('Choose the HTML tag used for the "Italic" style.', 'lasso'); ?></span>
310
+					    <input type="radio" name="lasso_editor[i_tag]" value='i' <?php echo checked($i_tag, 'i'); ?>> i
311
+						<input type="radio" name="lasso_editor[i_tag]" value="em" <?php echo checked($i_tag, 'em'); ?>> em
312 312
 					</div>
313 313
 				</div>
314 314
 
315
-				<h3><?php _e( 'Advanced', 'lasso' );?></h3>
315
+				<h3><?php _e('Advanced', 'lasso'); ?></h3>
316 316
 				<div class="lasso-editor-settings--option-wrap ">
317 317
 					<div class="lasso-editor-settings--option-inner" style="border:none">
318
-						<input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked( $shortcodify_disabled, 'on' );?> >
319
-						<label for="lasso_editor[shortcodify_disabled]"><?php _e( 'Disable Aesop Component Conversion', 'lasso' );?></label>
320
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso' );?></span>
318
+						<input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked($shortcodify_disabled, 'on'); ?> >
319
+						<label for="lasso_editor[shortcodify_disabled]"><?php _e('Disable Aesop Component Conversion', 'lasso'); ?></label>
320
+						<span class="lasso--setting-description"><?php _e('Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso'); ?></span>
321 321
 					</div>
322 322
 				
323 323
 					<div class="lasso-editor-settings--option-inner" style="border:none">
324
-						<input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked( $enable_autosave, 'on' );?> >
325
-						<label for="lasso_editor[enable_autosave]"><?php _e( 'Enable Auto Save', 'lasso' );?></label>
326
-						<span class="lasso--setting-description"><?php _e( 'Check this box to enable auto save.', 'lasso' );?></span>
324
+						<input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked($enable_autosave, 'on'); ?> >
325
+						<label for="lasso_editor[enable_autosave]"><?php _e('Enable Auto Save', 'lasso'); ?></label>
326
+						<span class="lasso--setting-description"><?php _e('Check this box to enable auto save.', 'lasso'); ?></span>
327 327
 					</div>
328 328
 				
329 329
 					<div class="lasso-editor-settings--option-inner" style="border:none">
330
-						<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' );?> >
331
-						<label for="lasso_editor[post_save_disabled]"><?php _e( 'Disable Post Saving', 'lasso' );?></label>
332
-						<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>
330
+						<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'); ?> >
331
+						<label for="lasso_editor[post_save_disabled]"><?php _e('Disable Post Saving', 'lasso'); ?></label>
332
+						<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>
333 333
 
334 334
 					</div>
335 335
 				
336 336
 					<div class="lasso-editor-settings--option-inner">
337
-						<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' );?> >
338
-						<label for="lasso_editor[save_using_rest_disabled]"><?php _e( "Don't Use REST API to Save", 'lasso' );?></label>
339
-						<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>
337
+						<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'); ?> >
338
+						<label for="lasso_editor[save_using_rest_disabled]"><?php _e("Don't Use REST API to Save", 'lasso'); ?></label>
339
+						<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>
340 340
 
341 341
 					</div>
342 342
 				</div>
@@ -346,11 +346,11 @@  discard block
 block discarded – undo
346 346
 
347 347
 				<div class="lasso-editor-settings--submit">
348 348
 				    <input type="hidden" name="action" value="lasso-editor-settings" />
349
-				    <input type="submit" class="button-primary" value="<?php esc_attr_e( 'Save Settings', 'lasso' );?>" />
350
-					<?php wp_nonce_field( 'nonce', 'lasso_editor_settings' ); ?>
349
+				    <input type="submit" class="button-primary" value="<?php esc_attr_e('Save Settings', 'lasso'); ?>" />
350
+					<?php wp_nonce_field('nonce', 'lasso_editor_settings'); ?>
351 351
 				</div>
352 352
 				
353
-				<?php do_action('lasso_settings_after');?>
353
+				<?php do_action('lasso_settings_after'); ?>
354 354
 			</form>
355 355
 
356 356
 		</div><?php
Please login to merge, or discard this patch.
lasso.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -61,6 +61,9 @@
 block discarded – undo
61 61
 }
62 62
 
63 63
 
64
+/**
65
+ * @param string $section
66
+ */
64 67
 function lasso_editor_get_option( $option, $section, $default = '' ) {
65 68
 
66 69
 	if ( empty( $option ) )
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 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', '1.0.0' );
27
-define( 'LASSO_DIR', plugin_dir_path( __FILE__ ) );
28
-define( 'LASSO_URL', plugins_url( '', __FILE__ ) );
29
-define( 'LASSO_FILE', __FILE__ );
26
+define('LASSO_VERSION', '1.0.0');
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
 
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
 }
47 47
 
48 48
 add_filter('register_post_type_args', 'lasso_show_in_rest', 10, 2);
49
-function lasso_show_in_rest($args, $post_type){
49
+function lasso_show_in_rest($args, $post_type) {
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 );
53
-	if (in_array( $post_type,$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
+	if (in_array($post_type, $allowed_post_types)) {
54 54
 		$args['show_in_rest'] = true;
55 55
 		if ($post_type != 'post' && $post_type != 'page') {
56 56
 			$args['rest_base'] = $post_type;
@@ -61,21 +61,21 @@  discard block
 block discarded – undo
61 61
 }
62 62
 
63 63
 
64
-function lasso_editor_get_option( $option, $section, $default = '' ) {
64
+function lasso_editor_get_option($option, $section, $default = '') {
65 65
 
66
-	if ( empty( $option ) )
66
+	if (empty($option))
67 67
 		return;
68 68
 
69
-	if ( function_exists( 'is_multisite' ) && is_multisite() ) {
69
+	if (function_exists('is_multisite') && is_multisite()) {
70 70
 
71
-		$options = get_site_option( $section );
71
+		$options = get_site_option($section);
72 72
 
73 73
 	} else {
74 74
 
75
-		$options = get_option( $section );
75
+		$options = get_option($section);
76 76
 	}
77 77
 
78
-	if ( isset( $options[$option] ) ) {
78
+	if (isset($options[$option])) {
79 79
 		return $options[$option];
80 80
 	}
81 81
 
Please login to merge, or discard this patch.
public/includes/assets.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 		if ( lasso_user_can('edit_posts')) {
22 22
 			
23 23
 			/**    Returns the time offset from UTC
24
-			*/
24
+			 */
25 25
 			function get_UTC_offset() {
26 26
 				$origin_dtz = new \DateTimeZone(get_option('timezone_string'));				
27 27
 				$origin_dt = new \DateTime("now", $origin_dtz);
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
 			wp_enqueue_style('lasso-style', LASSO_URL.'/public/assets/css/lasso.css', LASSO_VERSION, true);
33 33
 
34
-            //don't load autocomplete if it's a stockholm theme
34
+			//don't load autocomplete if it's a stockholm theme
35 35
 			$themename  	= wp_get_theme()->get('Name');
36 36
 			if ($themename !='Stockholm' ) {
37 37
 				wp_enqueue_script('jquery-ui-autocomplete');
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 			$tz_offset = get_UTC_offset();
100 100
 			$post_date = get_the_time('U', $postid);
101 101
 			$time = (time()+$tz_offset);
102
-            $delta = $time - $post_date;
102
+			$delta = $time - $post_date;
103 103
 
104 104
 			$strings = array(
105 105
 				'save' 				=> __('Save','lasso'),
@@ -151,11 +151,11 @@  discard block
 block discarded – undo
151 151
 			$gallery_nonce = wp_create_nonce( $gallery_nonce_action );
152 152
 			
153 153
 			
154
-            if ($allow_change_date) {
155
-			    $permalink = get_site_url().'/?p='.$postid;
156
-            } else {
157
-                $permalink = get_permalink($postid);
158
-            }
154
+			if ($allow_change_date) {
155
+				$permalink = get_site_url().'/?p='.$postid;
156
+			} else {
157
+				$permalink = get_permalink($postid);
158
+			}
159 159
 			
160 160
 			// rest api
161 161
 			$rest_nonce = '';
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 				'customFields'      => $custom_fields,
248 248
 				'clickToInsert'     => ($insert_comp_ui =='click'),
249 249
 				'buttonOnEmptyP'     => ($insert_comp_ui =='mediumcom'),      // auto show a button to insert components on an empty paragraph      
250
-                'rtl'               => is_rtl(),				
250
+				'rtl'               => is_rtl(),				
251 251
 				'skipToEdit'        =>( $delta < 10 && $delta >=0 ), // if it's a new post, skip to edit mode
252 252
 			);
253 253
 
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 			
257 257
 			
258 258
 			if (!$using_restapiv2) {
259
-               // enqueue REST API V1
259
+			   // enqueue REST API V1
260 260
 			   wp_enqueue_script( 'wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
261 261
 			   $settings = array( 'root' => home_url( $home_url ), 'nonce' => wp_create_nonce( 'wp_json' ) );
262 262
 			   wp_localize_script( 'wp-api-js', 'WP_API_Settings', $settings );
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 			if ($show_color) {
273 273
 				wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api','iris'), LASSO_VERSION, true);
274 274
 			} else {
275
-			    wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
275
+				wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
276 276
 			}
277 277
 			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects ) );
278 278
 
Please login to merge, or discard this patch.
Spacing   +87 added lines, -87 removed lines patch added patch discarded remove patch
@@ -10,15 +10,15 @@  discard block
 block discarded – undo
10 10
 
11 11
 class assets {
12 12
 
13
-	public function __construct(){
13
+	public function __construct() {
14 14
 
15
-		add_action('wp_enqueue_scripts', array($this,'scripts'));
15
+		add_action('wp_enqueue_scripts', array($this, 'scripts'));
16 16
 	}
17 17
 
18
-	public function scripts(){
18
+	public function scripts() {
19 19
 
20 20
 	
21
-		if ( lasso_user_can('edit_posts')) {
21
+		if (lasso_user_can('edit_posts')) {
22 22
 			
23 23
 			/**    Returns the time offset from UTC
24 24
 			*/
@@ -32,8 +32,8 @@  discard block
 block discarded – undo
32 32
 			wp_enqueue_style('lasso-style', LASSO_URL.'/public/assets/css/lasso.css', LASSO_VERSION, true);
33 33
 
34 34
             //don't load autocomplete if it's a stockholm theme
35
-			$themename  	= wp_get_theme()->get('Name');
36
-			if ($themename !='Stockholm' ) {
35
+			$themename = wp_get_theme()->get('Name');
36
+			if ($themename != 'Stockholm') {
37 37
 				wp_enqueue_script('jquery-ui-autocomplete');
38 38
 			}
39 39
 			wp_enqueue_script('jquery-ui-draggable');
@@ -46,27 +46,27 @@  discard block
 block discarded – undo
46 46
 			// url for json api
47 47
 			$home_url = function_exists('json_get_url_prefix') ? json_get_url_prefix() : false;
48 48
 
49
-			$article_object 	= lasso_editor_get_option('article_class','lasso_editor');
49
+			$article_object 	= lasso_editor_get_option('article_class', 'lasso_editor');
50 50
 
51
-			$article_object 	= empty( $article_object ) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object;
51
+			$article_object 	= empty($article_object) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object;
52 52
 
53
-			$featImgClass 		= lasso_editor_get_option('featimg_class','lasso_editor');
54
-			if (empty( $featImgClass )) {
53
+			$featImgClass = lasso_editor_get_option('featimg_class', 'lasso_editor');
54
+			if (empty($featImgClass)) {
55 55
 				$featImgClass = lasso_get_supported_theme_featured_image_class();
56 56
 			}
57
-			$titleClass 		= lasso_editor_get_option('title_class','lasso_editor');
58
-			if (empty( $titleClass )) {
57
+			$titleClass = lasso_editor_get_option('title_class', 'lasso_editor');
58
+			if (empty($titleClass)) {
59 59
 				$titleClass = lasso_get_supported_theme_title_class();
60 60
 			}
61
-			$toolbar_headings  	= lasso_editor_get_option('toolbar_headings', 'lasso_editor');
62
-			$toolbar_headings_h4  	= lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
61
+			$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
62
+			$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
63 63
 			$objectsNoSave  	= lasso_editor_get_option('dont_save', 'lasso_editor');
64
-			$objectsNonEditable  	= lasso_editor_get_option('non_editable', 'lasso_editor');
64
+			$objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor');
65 65
 			$disableRESTSave = lasso_editor_get_option('save_using_rest_disabled', 'lasso_editor');
66
-			$save_to_post_disabled  = lasso_editor_get_option( 'post_save_disabled', 'lasso_editor' );
66
+			$save_to_post_disabled = lasso_editor_get_option('post_save_disabled', 'lasso_editor');
67 67
 			
68
-			$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor','b');
69
-			$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor','i');
68
+			$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor', 'b');
69
+			$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor', 'i');
70 70
 
71 71
 			
72 72
 			//text alignement
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
 			
81 81
 			if ($show_color) {
82 82
 				//color picker
83
-				wp_enqueue_style( 'wp-color-picker' );
84
-				wp_enqueue_script( 'iris', admin_url( 'js/iris.min.js' ), array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), false, 1 );
83
+				wp_enqueue_style('wp-color-picker');
84
+				wp_enqueue_script('iris', admin_url('js/iris.min.js'), array('jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch'), false, 1);
85 85
 			}
86 86
 			
87 87
 			// click to insert components, not drag and drop
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 			
91 91
 			// custom fields
92 92
 			
93
-			$custom_fields = apply_filters( 'editus_custom_fields', null ); //array('testFieldName' => '#field1');
93
+			$custom_fields = apply_filters('editus_custom_fields', null); //array('testFieldName' => '#field1');
94 94
 
95 95
 
96 96
 
@@ -98,57 +98,57 @@  discard block
 block discarded – undo
98 98
 			$postid 			= get_the_ID();
99 99
 			$tz_offset = get_UTC_offset();
100 100
 			$post_date = get_the_time('U', $postid);
101
-			$time = (time()+$tz_offset);
101
+			$time = (time() + $tz_offset);
102 102
             $delta = $time - $post_date;
103 103
 
104 104
 			$strings = array(
105
-				'save' 				=> __('Save','lasso'),
106
-				'selectText'	  	=> __('Please Select Text First.','lasso'),
107
-				'cancel' 			=> __('Cancel','lasso'),
108
-				'exiteditor' 		=> __('Exit Editor','lasso'),
109
-				'saving' 			=> __('Saving...','lasso'),
110
-				'saved'				=> __('Saved!','lasso'),
111
-				'adding' 			=> __('Adding...','lasso'),
112
-				'added'				=> __('Added!','lasso'),
113
-				'loading' 			=> __('Loading...','lasso'),
114
-				'loadMore'			=> __('Load More','lasso'),
115
-				'close'			=> __('Close','lasso'),
116
-				'noPostsFound'		=> __('No more posts found','lasso'),
117
-				'fetchFail'	    	=> __('Fetching failed.','lasso'),
118
-				'galleryCreated' 	=> __('Gallery Created!','lasso'),
119
-				'galleryUpdated' 	=> __('Gallery Updated!','lasso'),
120
-				'justWrite'			=> __('Just write...','lasso'),
121
-				'chooseImage'		=> __('Choose an image','lasso'),
122
-				'updateImage'		=> __('Update Image','lasso'),
123
-				'insertImage'		=> __('Insert Image','lasso'),
124
-				'selectImage'		=> __('Select Image','lasso'),
125
-				'removeFeatImg'     => __('Remove featured image?','lasso'),
126
-				'updateSelectedImg' => __('Update Selected Image','lasso'),
127
-				'chooseImages'		=> __('Choose images','lasso'),
128
-				'editImage'			=> __('Edit Image','lasso'),
129
-				'addImages'			=> __('Add Images','lasso'),
130
-				'addNewGallery'		=> __('Add New Gallery','lasso'),
131
-				'selectGallery'		=> __('Select Lasso Gallery Image','lasso'),
132
-				'useSelectedImages' => __('Use Selected Images','lasso'),
133
-				'publishPost'		=> __('Publish Post?','lasso'),
134
-				'publishYes'		=> __('Yes, publish it!','lasso'),
135
-				'deletePost'		=> __('Trash Post?','lasso'),
136
-				'deleteYes'			=> __('Yes, trash it!','lasso'),
137
-				'warning'			=> __('Oh snap!','laso'),
138
-				'cancelText'		=> __('O.K. got it!','lasso'),
139
-				'missingClass'		=> __('It looks like we are either missing the Article CSS class, or it is configured incorrectly. Editus will not function correctly without this CSS class.','lasso'),
105
+				'save' 				=> __('Save', 'lasso'),
106
+				'selectText'	  	=> __('Please Select Text First.', 'lasso'),
107
+				'cancel' 			=> __('Cancel', 'lasso'),
108
+				'exiteditor' 		=> __('Exit Editor', 'lasso'),
109
+				'saving' 			=> __('Saving...', 'lasso'),
110
+				'saved'				=> __('Saved!', 'lasso'),
111
+				'adding' 			=> __('Adding...', 'lasso'),
112
+				'added'				=> __('Added!', 'lasso'),
113
+				'loading' 			=> __('Loading...', 'lasso'),
114
+				'loadMore'			=> __('Load More', 'lasso'),
115
+				'close'			=> __('Close', 'lasso'),
116
+				'noPostsFound'		=> __('No more posts found', 'lasso'),
117
+				'fetchFail'	    	=> __('Fetching failed.', 'lasso'),
118
+				'galleryCreated' 	=> __('Gallery Created!', 'lasso'),
119
+				'galleryUpdated' 	=> __('Gallery Updated!', 'lasso'),
120
+				'justWrite'			=> __('Just write...', 'lasso'),
121
+				'chooseImage'		=> __('Choose an image', 'lasso'),
122
+				'updateImage'		=> __('Update Image', 'lasso'),
123
+				'insertImage'		=> __('Insert Image', 'lasso'),
124
+				'selectImage'		=> __('Select Image', 'lasso'),
125
+				'removeFeatImg'     => __('Remove featured image?', 'lasso'),
126
+				'updateSelectedImg' => __('Update Selected Image', 'lasso'),
127
+				'chooseImages'		=> __('Choose images', 'lasso'),
128
+				'editImage'			=> __('Edit Image', 'lasso'),
129
+				'addImages'			=> __('Add Images', 'lasso'),
130
+				'addNewGallery'		=> __('Add New Gallery', 'lasso'),
131
+				'selectGallery'		=> __('Select Lasso Gallery Image', 'lasso'),
132
+				'useSelectedImages' => __('Use Selected Images', 'lasso'),
133
+				'publishPost'		=> __('Publish Post?', 'lasso'),
134
+				'publishYes'		=> __('Yes, publish it!', 'lasso'),
135
+				'deletePost'		=> __('Trash Post?', 'lasso'),
136
+				'deleteYes'			=> __('Yes, trash it!', 'lasso'),
137
+				'warning'			=> __('Oh snap!', 'laso'),
138
+				'cancelText'		=> __('O.K. got it!', 'lasso'),
139
+				'missingClass'		=> __('It looks like we are either missing the Article CSS class, or it is configured incorrectly. Editus will not function correctly without this CSS class.', 'lasso'),
140 140
 				'missingConfirm'	=> __('Update Settings', 'lasso'),
141
-				'helperText'		=> __('one more letter','lasso'),
141
+				'helperText'		=> __('one more letter', 'lasso'),
142 142
 				'editingBackup'  	=> __('You are currently editing a backup copy of this post.'),
143 143
 				
144 144
 				
145 145
 			);
146 146
 
147
-			$api_url = trailingslashit( home_url() ) . 'lasso-internal-api';
147
+			$api_url = trailingslashit(home_url()).'lasso-internal-api';
148 148
 
149 149
 			$gallery_class = new gallery();
150 150
 			$gallery_nonce_action = $gallery_class->nonce_action;
151
-			$gallery_nonce = wp_create_nonce( $gallery_nonce_action );
151
+			$gallery_nonce = wp_create_nonce($gallery_nonce_action);
152 152
 			
153 153
 			
154 154
             if ($allow_change_date) {
@@ -163,13 +163,13 @@  discard block
 block discarded – undo
163 163
 			  
164 164
 			if (function_exists('rest_url')) {
165 165
 				//$rest_root = esc_url_raw( rest_url());
166
-				$rest_nonce = wp_create_nonce( 'wp_rest' );
167
-				$settings = array( 'root' => $rest_root, 'nonce' => $rest_nonce );
168
-				wp_enqueue_script( 'wp-api', '', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
169
-				wp_localize_script( 'wp-api', 'wpApiSettings', $settings );
170
-				wp_localize_script( 'wp-api', 'WP_API_Settings', $settings );
166
+				$rest_nonce = wp_create_nonce('wp_rest');
167
+				$settings = array('root' => $rest_root, 'nonce' => $rest_nonce);
168
+				wp_enqueue_script('wp-api', '', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true);
169
+				wp_localize_script('wp-api', 'wpApiSettings', $settings);
170
+				wp_localize_script('wp-api', 'WP_API_Settings', $settings);
171 171
 				
172
-				if ( class_exists( 'WP_REST_Controller' )) {
172
+				if (class_exists('WP_REST_Controller')) {
173 173
 					// we are using REST API V2
174 174
 					$using_restapiv2 = true;
175 175
 				}
@@ -177,8 +177,8 @@  discard block
 block discarded – undo
177 177
 
178 178
 			// localized objects
179 179
 			$objects = array(
180
-				'ajaxurl' 			=> esc_url( $api_url ),
181
-				'ajaxurl2' 			=> esc_url( admin_url( 'admin-ajax.php' )),
180
+				'ajaxurl' 			=> esc_url($api_url),
181
+				'ajaxurl2' 			=> esc_url(admin_url('admin-ajax.php')),
182 182
 				'rest_root'         => $rest_root,
183 183
 				'rest_nonce'        => $rest_nonce,
184 184
 				'editor' 			=> 'lasso--content', // ID of editable content (without #) DONT CHANGE
@@ -186,13 +186,13 @@  discard block
 block discarded – undo
186 186
 				'featImgClass'		=> $featImgClass,
187 187
 				'titleClass'		=> $titleClass,
188 188
 				'strings'			=> $strings,
189
-				'settingsLink'		=> function_exists('is_multisite') && is_multisite() ? network_admin_url( 'settings.php?page=lasso-editor' ) : admin_url( 'admin.php?page=lasso-editor-settings' ),
190
-				'post_status'		=> get_post_status( $postid ),
189
+				'settingsLink'		=> function_exists('is_multisite') && is_multisite() ? network_admin_url('settings.php?page=lasso-editor') : admin_url('admin.php?page=lasso-editor-settings'),
190
+				'post_status'		=> get_post_status($postid),
191 191
 				'postid'			=> $postid,
192 192
 				'permalink'			=> $permalink,
193 193
 				'edit_others_pages'	=> current_user_can('edit_others_pages') ? true : false,
194 194
 				'edit_others_posts'	=> current_user_can('edit_others_posts') ? true : false,
195
-				'userCanEdit'		=> current_user_can('edit_post', $postid ),
195
+				'userCanEdit'		=> current_user_can('edit_post', $postid),
196 196
 				'can_publish'		=> is_page() ? current_user_can('publish_pages') : current_user_can('publish_posts'),
197 197
 				//'can_publish_posts'	=> current_user_can('publish_posts'),
198 198
 				//'can_publish_pages'	=> current_user_can('publish_pages'),
@@ -228,27 +228,27 @@  discard block
 block discarded – undo
228 228
 				'postTags'    		=> lasso_get_objects('tag'),
229 229
 				'noResultsDiv'		=> lasso_editor_empty_results(),
230 230
 				'noRevisionsDiv'	=> lasso_editor_empty_results('revision'),
231
-				'mapTileProvider'   => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider( $postid ) : false,
232
-				'mapLocations'		=> get_post_meta( $postid, 'ase_map_component_locations' ),
233
-				'mapStart'			=> get_post_meta( $postid, 'ase_map_component_start_point', true ),
234
-				'mapZoom'			=> get_post_meta( $postid, 'ase_map_component_zoom', true ),
231
+				'mapTileProvider'   => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider($postid) : false,
232
+				'mapLocations'		=> get_post_meta($postid, 'ase_map_component_locations'),
233
+				'mapStart'			=> get_post_meta($postid, 'ase_map_component_start_point', true),
234
+				'mapZoom'			=> get_post_meta($postid, 'ase_map_component_zoom', true),
235 235
 				'revisionModal' 	=> lasso_editor_revision_modal(),
236 236
 				'isMobile'          => wp_is_mobile(),
237
-				'enableAutoSave'    => lasso_editor_get_option( 'enable_autosave', 'lasso_editor' ),
237
+				'enableAutoSave'    => lasso_editor_get_option('enable_autosave', 'lasso_editor'),
238 238
 				'showColor'         => $show_color,
239 239
 				'showAlignment'     => $show_align,
240 240
 				'showIgnoredItems'  => lasso_editor_get_option('show_ignored_items', 'lasso_editor'),
241 241
 				'restapi2'          => $using_restapiv2,
242 242
 				'saveusingrest'     => $using_restapiv2 && !$disableRESTSave,
243
-				'newObjectContent'  => '<p>'.apply_filters( 'lasso_new_object_content', __( 'Once upon a time...','lasso') ).'</p>',
243
+				'newObjectContent'  => '<p>'.apply_filters('lasso_new_object_content', __('Once upon a time...', 'lasso')).'</p>',
244 244
 				'disableSavePost'   => $save_to_post_disabled,
245 245
 				'boldTag'           => $bold_tag,
246 246
 				'iTag'           	=> $i_tag,
247 247
 				'customFields'      => $custom_fields,
248
-				'clickToInsert'     => ($insert_comp_ui =='click'),
249
-				'buttonOnEmptyP'     => ($insert_comp_ui =='mediumcom'),      // auto show a button to insert components on an empty paragraph      
248
+				'clickToInsert'     => ($insert_comp_ui == 'click'),
249
+				'buttonOnEmptyP'     => ($insert_comp_ui == 'mediumcom'), // auto show a button to insert components on an empty paragraph      
250 250
                 'rtl'               => is_rtl(),				
251
-				'skipToEdit'        =>( $delta < 10 && $delta >=0 ), // if it's a new post, skip to edit mode
251
+				'skipToEdit'        =>($delta < 10 && $delta >= 0), // if it's a new post, skip to edit mode
252 252
 			);
253 253
 
254 254
 
@@ -257,9 +257,9 @@  discard block
 block discarded – undo
257 257
 			
258 258
 			if (!$using_restapiv2) {
259 259
                // enqueue REST API V1
260
-			   wp_enqueue_script( 'wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
261
-			   $settings = array( 'root' => home_url( $home_url ), 'nonce' => wp_create_nonce( 'wp_json' ) );
262
-			   wp_localize_script( 'wp-api-js', 'WP_API_Settings', $settings );
260
+			   wp_enqueue_script('wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true);
261
+			   $settings = array('root' => home_url($home_url), 'nonce' => wp_create_nonce('wp_json'));
262
+			   wp_localize_script('wp-api-js', 'WP_API_Settings', $settings);
263 263
 			}
264 264
 			
265 265
 			if ($allow_change_date) {
@@ -268,13 +268,13 @@  discard block
 block discarded – undo
268 268
 				wp_enqueue_style('jquery-ui');
269 269
 			}
270 270
 
271
-			$postfix = ( defined( 'SCRIPT_DEBUG' ) && true === SCRIPT_DEBUG ) ? '' : '.min';
271
+			$postfix = (defined('SCRIPT_DEBUG') && true === SCRIPT_DEBUG) ? '' : '.min';
272 272
 			if ($show_color) {
273
-				wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api','iris'), LASSO_VERSION, true);
273
+				wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api', 'iris'), LASSO_VERSION, true);
274 274
 			} else {
275
-			    wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
275
+			    wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
276 276
 			}
277
-			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects ) );
277
+			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects));
278 278
 
279 279
 
280 280
 		}
Please login to merge, or discard this patch.
public/includes/editor-modules.php 3 patches
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 	$toolbar_class  = $toolbar_headings ? 'toolbar-extended' : false;
205 205
 	
206 206
 	// mobile styles
207
-    $mobile_class = $is_mobile ? 'lasso-mobile' : false;
207
+	$mobile_class = $is_mobile ? 'lasso-mobile' : false;
208 208
 	$mobile_style =$is_mobile ? 'style="bottom:0px;"' : null;
209 209
 	
210 210
 	//show color
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
 						</div>
485 485
 						<?php 
486 486
 						if ($allow_change_date) { 
487
-						    $dateformat = get_option( 'date_format' ); 
487
+							$dateformat = get_option( 'date_format' ); 
488 488
 						?>
489 489
 						    <label><?php _e( 'Post Date', 'lasso' ); ?></label>
490 490
 							<input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid);?>"/>
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
597 597
 					<?php
598 598
 						if ( !empty( $types ) ) {
599 599
 							// get the first element
600
-						    $type = key($types);						
600
+							$type = key($types);						
601 601
 							$type = preg_replace( '/s\b/','', $type );
602 602
 							printf( '<input type="hidden" name="object" value="%s">', lcfirst( esc_attr( $type ) ) );		
603 603
 						}
@@ -625,8 +625,8 @@  discard block
 block discarded – undo
625 625
 	global $post;
626 626
 	
627 627
 	global $wp_post_types;
628
-    $labels = &$wp_post_types['post']->labels;
629
-    $labels->name = 'Articles';
628
+	$labels = &$wp_post_types['post']->labels;
629
+	$labels->name = 'Articles';
630 630
 
631 631
 	ob_start();
632 632
 
@@ -869,9 +869,9 @@  discard block
 block discarded – undo
869 869
 		$return .= '</form>';
870 870
 
871 871
 		// extra JS codes
872
-        if (isset($shortcode['codes'])) {
873
-		    $return .= $shortcode['codes'];
874
-        }
872
+		if (isset($shortcode['codes'])) {
873
+			$return .= $shortcode['codes'];
874
+		}
875 875
 		$blob[$slug] = $return;
876 876
 	}
877 877
 
@@ -920,23 +920,23 @@  discard block
 block discarded – undo
920 920
  * @return string
921 921
  */
922 922
 function lasso_editor_adjustBrightness($hex, $steps) { 
923
-    $steps = max(-255, min(255, $steps));
923
+	$steps = max(-255, min(255, $steps));
924 924
 
925
-    // Normalize into a six character long hex string
926
-    $hex = str_replace('#', '', $hex);
927
-    if (strlen($hex) == 3) {
928
-        $hex = str_repeat(substr($hex,0,1), 2).str_repeat(substr($hex,1,1), 2).str_repeat(substr($hex,2,1), 2);
929
-    }
925
+	// Normalize into a six character long hex string
926
+	$hex = str_replace('#', '', $hex);
927
+	if (strlen($hex) == 3) {
928
+		$hex = str_repeat(substr($hex,0,1), 2).str_repeat(substr($hex,1,1), 2).str_repeat(substr($hex,2,1), 2);
929
+	}
930 930
 
931
-    // Split into three parts: R, G and B
932
-    $color_parts = str_split($hex, 2);
933
-    $return = '#';
931
+	// Split into three parts: R, G and B
932
+	$color_parts = str_split($hex, 2);
933
+	$return = '#';
934 934
 
935
-    foreach ($color_parts as $color) {
936
-        $color   = hexdec($color); // Convert to decimal
937
-        $color   = max(0,min(255,$color + $steps)); // Adjust color
938
-        $return .= str_pad(dechex($color), 2, '0', STR_PAD_LEFT); // Make two char hex code
939
-    }
935
+	foreach ($color_parts as $color) {
936
+		$color   = hexdec($color); // Convert to decimal
937
+		$color   = max(0,min(255,$color + $steps)); // Adjust color
938
+		$return .= str_pad(dechex($color), 2, '0', STR_PAD_LEFT); // Make two char hex code
939
+	}
940 940
 
941
-    return $return;
941
+	return $return;
942 942
 }
Please login to merge, or discard this patch.
Spacing   +245 added lines, -245 removed lines patch added patch discarded remove patch
@@ -11,38 +11,38 @@  discard block
 block discarded – undo
11 11
  *
12 12
  * @since 1.0
13 13
  */
14
-add_action( 'wp_footer', 'lasso_editor_controls' );
14
+add_action('wp_footer', 'lasso_editor_controls');
15 15
 function lasso_editor_controls() {
16 16
 
17 17
 	global $post;
18 18
 
19
-	if ( lasso_user_can('edit_posts') ) {
19
+	if (lasso_user_can('edit_posts')) {
20 20
 
21
-		$status = get_post_status( get_the_ID() );
22
-		$button_color1 = lasso_editor_get_option('button-color1', 'lasso_editor','#0000ff');
23
-		$button_color2 = lasso_editor_get_option('button-color2', 'lasso_editor','#0000');
24
-		$dialog_color = lasso_editor_get_option('dialog-color', 'lasso_editor','#000055');
25
-		$text_color = lasso_editor_get_option('text-color', 'lasso_editor','#ffffff');
21
+		$status = get_post_status(get_the_ID());
22
+		$button_color1 = lasso_editor_get_option('button-color1', 'lasso_editor', '#0000ff');
23
+		$button_color2 = lasso_editor_get_option('button-color2', 'lasso_editor', '#0000');
24
+		$dialog_color = lasso_editor_get_option('dialog-color', 'lasso_editor', '#000055');
25
+		$text_color = lasso_editor_get_option('text-color', 'lasso_editor', '#ffffff');
26 26
 		$hover_color1 = lasso_editor_adjustBrightness($button_color1, 50);
27 27
 		$hover_color2 = lasso_editor_adjustBrightness($button_color2, 50);
28 28
 
29 29
 		// let users add custom css classes
30
-		$custom_classes = apply_filters( 'lasso_control_classes', '' );
30
+		$custom_classes = apply_filters('lasso_control_classes', '');
31 31
 
32 32
 		$post_access_class   = '';
33
-		$post_new_disabled   = lasso_editor_get_option( 'post_adding_disabled', 'lasso_editor' );
34
-		$post_settings_disabled = lasso_editor_get_option( 'post_settings_disabled', 'lasso_editor' );
35
-		$shortcodify_disabled = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
33
+		$post_new_disabled   = lasso_editor_get_option('post_adding_disabled', 'lasso_editor');
34
+		$post_settings_disabled = lasso_editor_get_option('post_settings_disabled', 'lasso_editor');
35
+		$shortcodify_disabled = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor');
36 36
 
37 37
 
38 38
 		// CSS class if adding new post objects is disabled
39
-		if ( 'on' == $post_new_disabled ) { $post_access_class = 'lasso--post-new-disabled'; }
39
+		if ('on' == $post_new_disabled) { $post_access_class = 'lasso--post-new-disabled'; }
40 40
 
41 41
 		// CSS class if adjust settings is disabled
42
-		if ( 'on' == $post_settings_disabled ) { $post_access_class = 'lasso--post-settings-disabled'; }
42
+		if ('on' == $post_settings_disabled) { $post_access_class = 'lasso--post-settings-disabled'; }
43 43
 
44 44
 		// CSS class if adding new post objects AND settings are disabled
45
-		if ( 'on' == $post_new_disabled && 'on' == $post_settings_disabled ) { $post_access_class = 'lasso--post-all-disabled'; }
45
+		if ('on' == $post_new_disabled && 'on' == $post_settings_disabled) { $post_access_class = 'lasso--post-all-disabled'; }
46 46
 
47 47
 		// CSS class if shortcodify or (Aesop Shortcode Conversion) is disabled
48 48
 		$sc_saving_class = 'on' == $shortcodify_disabled ? 'shortcodify-disabled' : 'shortcodify-enabled';
@@ -58,29 +58,29 @@  discard block
 block discarded – undo
58 58
 		?>
59 59
 		<style>
60 60
 		.lasso-editor-controls--wrap, #lasso--post-settings2,#lasso--save,#lasso--exit,#lasso--publish {
61
-			background-image: -webkit-linear-gradient(top,<?php echo $button_color1;?> 0,<?php echo $button_color2;?> 100%);
62
-			background-image: -o-linear-gradient(top,<?php echo $button_color1;?> 0,<?php echo $button_color2;?> 100%);
63
-			background-image: linear-gradient(to bottom,<?php echo $button_color1;?> 0,<?php echo $button_color2;?> 100%);
64
-			color: <?php echo $text_color;?>;
61
+			background-image: -webkit-linear-gradient(top,<?php echo $button_color1; ?> 0,<?php echo $button_color2; ?> 100%);
62
+			background-image: -o-linear-gradient(top,<?php echo $button_color1; ?> 0,<?php echo $button_color2; ?> 100%);
63
+			background-image: linear-gradient(to bottom,<?php echo $button_color1; ?> 0,<?php echo $button_color2; ?> 100%);
64
+			color: <?php echo $text_color; ?>;
65 65
 		}
66 66
 		
67 67
 		.lasso--controls__right a:before, #lasso-toolbar--html__footer_desc {
68
-			color: <?php echo $text_color;?> !important;
68
+			color: <?php echo $text_color; ?> !important;
69 69
 		}
70 70
 		
71 71
 		ul.lasso-editor-controls li:hover, #lasso--exit:hover,#lasso--post-settings2:hover,#lasso--publish:hover,#lasso--save:hover {
72
-			background-image: -webkit-linear-gradient(top,<?php echo $hover_color1;?> 0,<?php echo $hover_color2;?> 100%);
73
-			background-image: -o-linear-gradient(top,<?php echo $hover_color1;?> 0,<?php echo $hover_color2;?> 100%);
74
-			background-image: linear-gradient(to bottom,<?php echo $hover_color1;?> 0,<?php echo $hover_color2;?> 100%);
72
+			background-image: -webkit-linear-gradient(top,<?php echo $hover_color1; ?> 0,<?php echo $hover_color2; ?> 100%);
73
+			background-image: -o-linear-gradient(top,<?php echo $hover_color1; ?> 0,<?php echo $hover_color2; ?> 100%);
74
+			background-image: linear-gradient(to bottom,<?php echo $hover_color1; ?> 0,<?php echo $hover_color2; ?> 100%);
75 75
 		}
76 76
 		
77 77
 		.lasso--modal__inner,.sweet-alert,#lasso-toolbar--components.toolbar--drop-up ul,#lasso-toolbar--components__list,#lasso-toolbar--html.html--drop-up #lasso-toolbar--html__wrap,
78 78
 		#lasso-toolbar--link.link--drop-up #lasso-toolbar--link__wrap		{
79
-			background: <?php echo $dialog_color;?>;
80
-			color: <?php echo $text_color;?>;
79
+			background: <?php echo $dialog_color; ?>;
80
+			color: <?php echo $text_color; ?>;
81 81
 		}
82 82
 		.sweet-alert p,.lasso--modal__inner label,.lasso--toolbar__inner label {
83
-			color: <?php echo $text_color;?> !important;
83
+			color: <?php echo $text_color; ?> !important;
84 84
 		}
85 85
 		
86 86
 		<?php if (!$is_mobile)?>
@@ -103,47 +103,47 @@  discard block
 block discarded – undo
103 103
 		}
104 104
 		<?php}?>
105 105
 		</style>
106
-		<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();?>" >
106
+		<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(); ?>" >
107 107
 
108
-			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class;?> "  <?php echo $mobile_style ?> >
108
+			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class; ?> "  <?php echo $mobile_style ?> >
109 109
 
110
-				<?php do_action( 'lasso_editor_controls_before' );
110
+				<?php do_action('lasso_editor_controls_before');
111 111
 
112
-				if ( $is_capable ) { ?>
112
+				if ($is_capable) { ?>
113 113
 
114
-					<li id="lasso--edit" title="<?php esc_attr_e( 'Edit Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
114
+					<li id="lasso--edit" title="<?php esc_attr_e('Edit Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
115 115
 
116
-					<?php if ( 'off' == $post_settings_disabled || empty( $post_settings_disabled ) ) { ?>
117
-						<li id="lasso--post-settings" title="<?php esc_attr_e( 'Post Settings', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
116
+					<?php if ('off' == $post_settings_disabled || empty($post_settings_disabled)) { ?>
117
+						<li id="lasso--post-settings" title="<?php esc_attr_e('Post Settings', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
118 118
 					<?php }
119 119
 
120 120
 				} ?>
121 121
 
122
-				<li id="lasso--post-all" title="<?php esc_attr_e( 'All Posts', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
122
+				<li id="lasso--post-all" title="<?php esc_attr_e('All Posts', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
123 123
 
124
-				<?php if ( $is_capable && wp_revisions_enabled( $post ) ) { ?>
125
-					<li id="lasso--post-revisions" title="<?php esc_attr_e( 'Revisions', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
124
+				<?php if ($is_capable && wp_revisions_enabled($post)) { ?>
125
+					<li id="lasso--post-revisions" title="<?php esc_attr_e('Revisions', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
126 126
 				<?php } ?>
127 127
 
128
-				<?php if ( ( 'off' == $post_new_disabled || empty( $post_new_disabled ) && lasso_user_can('edit_posts') ) ) { ?>
129
-					<li id="lasso--post-new" title="<?php esc_attr_e( 'Add Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
128
+				<?php if (('off' == $post_new_disabled || empty($post_new_disabled) && lasso_user_can('edit_posts'))) { ?>
129
+					<li id="lasso--post-new" title="<?php esc_attr_e('Add Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
130 130
 				<?php } ?>
131 131
 
132
-				<?php do_action( 'lasso_editor_controls_after' );?>
132
+				<?php do_action('lasso_editor_controls_after'); ?>
133 133
 
134 134
 			</ul>
135 135
 
136
-			<?php if ( is_singular() && !$is_mobile ) { ?>
136
+			<?php if (is_singular() && !$is_mobile) { ?>
137 137
 
138
-				<div class="lasso--controls__right" data-posttype="<?php echo get_post_type( get_the_ID() );?>" data-status="<?php echo $status;?>">
138
+				<div class="lasso--controls__right" data-posttype="<?php echo get_post_type(get_the_ID()); ?>" data-status="<?php echo $status; ?>">
139 139
 				
140
-				<a href="#" title="<?php esc_attr_e( 'Post Settings', 'lasso' );?>" id="lasso--post-settings2" class="lasso-save-post lasso--button <?php echo $sc_saving_class;?>"></a>
140
+				<a href="#" title="<?php esc_attr_e('Post Settings', 'lasso'); ?>" id="lasso--post-settings2" class="lasso-save-post lasso--button <?php echo $sc_saving_class; ?>"></a>
141 141
 
142 142
 
143
-					<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>
143
+					<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>
144 144
 
145
-					<?php if ( ('draft' == $status ) || ('pending' == $status && $can_publish) ) { ?>
146
-						<a href="#" title="<?php $can_publish ? esc_attr_e( 'Publish Post', 'lasso' ) : esc_attr_e( 'Submit For Review', 'lasso' );?>" id="lasso--publish" class="lasso-publish-post lasso--button <?php echo $sc_saving_class;?>"></a>
145
+					<?php if (('draft' == $status) || ('pending' == $status && $can_publish)) { ?>
146
+						<a href="#" title="<?php $can_publish ? esc_attr_e('Publish Post', 'lasso') : esc_attr_e('Submit For Review', 'lasso'); ?>" id="lasso--publish" class="lasso-publish-post lasso--button <?php echo $sc_saving_class; ?>"></a>
147 147
 					<?php } ?>
148 148
 
149 149
 				</div>
@@ -168,9 +168,9 @@  discard block
 block discarded – undo
168 168
 
169 169
 
170 170
 	// let users add custom css classes
171
-	$custom_classes = apply_filters( 'lasso_sidebar_classes', '' );
171
+	$custom_classes = apply_filters('lasso_sidebar_classes', '');
172 172
 	?>
173
-	<div id="lasso--sidebar" class="<?php echo sanitize_html_class( $custom_classes );?>" >
173
+	<div id="lasso--sidebar" class="<?php echo sanitize_html_class($custom_classes); ?>" >
174 174
 		<div class="lasso--sidebar__inner">
175 175
 			<div id="lasso--component__settings"></div>
176 176
 		</div>
@@ -192,20 +192,20 @@  discard block
 block discarded – undo
192 192
 	$is_mobile = wp_is_mobile();
193 193
 
194 194
 	// check for lasso story engine and add a class doniting this
195
-	$ase_status = class_exists( 'Aesop_Core' ) || defined( 'LASSO_CUSTOM' ) ? 'ase-active' : 'ase-not-active';
195
+	$ase_status = class_exists('Aesop_Core') || defined('LASSO_CUSTOM') ? 'ase-active' : 'ase-not-active';
196 196
 
197 197
 	// let users add custom css classes
198
-	$custom_classes = apply_filters( 'lasso_toolbar_classes', '' );
198
+	$custom_classes = apply_filters('lasso_toolbar_classes', '');
199 199
 
200 200
 	// are toolbar headings enabled
201
-	$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
202
-	$toolbar_headings_h4      = lasso_editor_get_option( 'toolbar_headings_h4', 'lasso_editor' );
201
+	$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
202
+	$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
203 203
 
204
-	$toolbar_class  = $toolbar_headings ? 'toolbar-extended' : false;
204
+	$toolbar_class = $toolbar_headings ? 'toolbar-extended' : false;
205 205
 	
206 206
 	// mobile styles
207 207
     $mobile_class = $is_mobile ? 'lasso-mobile' : false;
208
-	$mobile_style =$is_mobile ? 'style="bottom:0px;"' : null;
208
+	$mobile_style = $is_mobile ? 'style="bottom:0px;"' : null;
209 209
 	
210 210
 	//show color
211 211
 	$show_color = lasso_editor_get_option('toolbar_show_color', 'lasso_editor');
@@ -213,109 +213,109 @@  discard block
 block discarded – undo
213 213
 	//show alignment
214 214
 	$show_align = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor');
215 215
 	
216
-	$status = get_post_status( get_the_ID() );
216
+	$status = get_post_status(get_the_ID());
217 217
 
218 218
 
219 219
 	?>
220
-	<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 ?>>
221
-		<ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"';}?>>
222
-			<?php do_action( 'lasso_toolbar_components_before' );?>
223
-		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e( 'Bold', 'lasso' );?>"></li>
224
-		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e( 'Underline', 'lasso' );?>"></li>
225
-		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e( 'Italicize', 'lasso' );?>"></li>
226
-		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e( 'Strikethrough', 'lasso' );?>"></li>
227
-			<li id="lasso-toolbar--components" title="<?php esc_attr_e( 'Insert Component', 'lasso' );?>" style="color:#ffffa0;">
220
+	<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 ?>>
221
+		<ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"'; }?>>
222
+			<?php do_action('lasso_toolbar_components_before'); ?>
223
+		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e('Bold', 'lasso'); ?>"></li>
224
+		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e('Underline', 'lasso'); ?>"></li>
225
+		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e('Italicize', 'lasso'); ?>"></li>
226
+		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e('Strikethrough', 'lasso'); ?>"></li>
227
+			<li id="lasso-toolbar--components" title="<?php esc_attr_e('Insert Component', 'lasso'); ?>" style="color:#ffffa0;">
228 228
 			    <ul id="lasso-toolbar--components__list" style="display:none;color:white;">
229
-			    	<?php if ( 'ase-active' == $ase_status ): ?>
230
-						<li data-type="image" title="<?php esc_attr_e( 'Image', 'lasso' );?>" class="lasso-toolbar--component__image"></li>
231
-						<li data-type="character" title="<?php esc_attr_e( 'Character', 'lasso' );?>" class="lasso-toolbar--component__character"></li>
232
-						<li data-type="quote" title="<?php esc_attr_e( 'Quote', 'lasso' );?>"  class="lasso-toolbar--component__quote"></li>
233
-						<li data-type="content" title="<?php esc_attr_e( 'Content', 'lasso' );?>"  class="lasso-toolbar--component__content"></li>
234
-						<li data-type="chapter" title="<?php esc_attr_e( 'Chapter', 'lasso' );?>"  class="lasso-toolbar--component__chapter"></li>
235
-						<li data-type="parallax" title="<?php esc_attr_e( 'Parallax', 'lasso' );?>"  class="lasso-toolbar--component__parallax"></li>
236
-						<li data-type="audio" title="<?php esc_attr_e( 'Audio', 'lasso' );?>"  class="lasso-toolbar--component__audio"></li>
237
-						<li data-type="video" title="<?php esc_attr_e( 'Video', 'lasso' );?>"  class="lasso-toolbar--component__video"></li>
238
-						<li data-type="map" title="<?php esc_attr_e( 'Map', 'lasso' );?>"  class="lasso-toolbar--component__map"></li>
239
-						<li data-type="timeline_stop" title="<?php esc_attr_e( 'Timeline', 'lasso' );?>"  class="lasso-toolbar--component__timeline"></li>
240
-						<li data-type="document" title="<?php esc_attr_e( 'Document', 'lasso' );?>"  class="lasso-toolbar--component__document"></li>
241
-						<li data-type="collection" title="<?php esc_attr_e( 'Collection', 'lasso' );?>"  class="lasso-toolbar--component__collection"></li>
242
-						<li data-type="gallery" title="<?php esc_attr_e( 'Gallery', 'lasso' );?>"  class="lasso-toolbar--component__gallery"></li>
243
-						<?php if ( class_exists ('Aesop_GalleryPop') ) { ?>
244
-						     <li data-type="gallery" title="<?php esc_attr_e( 'Gallery Pop', 'lasso' );?>"  class="lasso-toolbar--component__gallerypop"></li>
229
+			    	<?php if ('ase-active' == $ase_status): ?>
230
+						<li data-type="image" title="<?php esc_attr_e('Image', 'lasso'); ?>" class="lasso-toolbar--component__image"></li>
231
+						<li data-type="character" title="<?php esc_attr_e('Character', 'lasso'); ?>" class="lasso-toolbar--component__character"></li>
232
+						<li data-type="quote" title="<?php esc_attr_e('Quote', 'lasso'); ?>"  class="lasso-toolbar--component__quote"></li>
233
+						<li data-type="content" title="<?php esc_attr_e('Content', 'lasso'); ?>"  class="lasso-toolbar--component__content"></li>
234
+						<li data-type="chapter" title="<?php esc_attr_e('Chapter', 'lasso'); ?>"  class="lasso-toolbar--component__chapter"></li>
235
+						<li data-type="parallax" title="<?php esc_attr_e('Parallax', 'lasso'); ?>"  class="lasso-toolbar--component__parallax"></li>
236
+						<li data-type="audio" title="<?php esc_attr_e('Audio', 'lasso'); ?>"  class="lasso-toolbar--component__audio"></li>
237
+						<li data-type="video" title="<?php esc_attr_e('Video', 'lasso'); ?>"  class="lasso-toolbar--component__video"></li>
238
+						<li data-type="map" title="<?php esc_attr_e('Map', 'lasso'); ?>"  class="lasso-toolbar--component__map"></li>
239
+						<li data-type="timeline_stop" title="<?php esc_attr_e('Timeline', 'lasso'); ?>"  class="lasso-toolbar--component__timeline"></li>
240
+						<li data-type="document" title="<?php esc_attr_e('Document', 'lasso'); ?>"  class="lasso-toolbar--component__document"></li>
241
+						<li data-type="collection" title="<?php esc_attr_e('Collection', 'lasso'); ?>"  class="lasso-toolbar--component__collection"></li>
242
+						<li data-type="gallery" title="<?php esc_attr_e('Gallery', 'lasso'); ?>"  class="lasso-toolbar--component__gallery"></li>
243
+						<?php if (class_exists('Aesop_GalleryPop')) { ?>
244
+						     <li data-type="gallery" title="<?php esc_attr_e('Gallery Pop', 'lasso'); ?>"  class="lasso-toolbar--component__gallerypop"></li>
245 245
 						<?php }?>
246
-						<?php if ( class_exists ('Aesop_Events') ) { ?>
247
-						     <li data-type="events" title="<?php esc_attr_e( 'Event', 'lasso' );?>"  class="lasso-toolbar--component__event"></li>
246
+						<?php if (class_exists('Aesop_Events')) { ?>
247
+						     <li data-type="events" title="<?php esc_attr_e('Event', 'lasso'); ?>"  class="lasso-toolbar--component__event"></li>
248 248
 						<?php }?>
249 249
 					<?php else: ?>
250
-						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );?>" class="image lasso-toolbar--component__image"></li>
251
-						<li data-type="wpquote" title="<?php esc_attr_e( 'WordPress Quote', 'lasso' );?>" class="quote lasso-toolbar--component__quote"></li>
252
-						<!--li data-type="wpvideo" title="<?php esc_attr_e( 'WordPress Video', 'lasso' );?>" class="video lasso-toolbar--component__video"></li-->
250
+						<li data-type="wpimg" title="<?php esc_attr_e('WordPress Image', 'lasso'); ?>" class="image lasso-toolbar--component__image"></li>
251
+						<li data-type="wpquote" title="<?php esc_attr_e('WordPress Quote', 'lasso'); ?>" class="quote lasso-toolbar--component__quote"></li>
252
+						<!--li data-type="wpvideo" title="<?php esc_attr_e('WordPress Video', 'lasso'); ?>" class="video lasso-toolbar--component__video"></li-->
253 253
 					<?php endif; ?>
254
-					<?php do_action( 'lasso_toolbar_components' );?>
254
+					<?php do_action('lasso_toolbar_components'); ?>
255 255
 			    </ul>
256 256
 			</li>
257
-		    <?php if ( $toolbar_headings ): ?>
258
-		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>"></li>
259
-		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>"></li>
257
+		    <?php if ($toolbar_headings): ?>
258
+		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>"></li>
259
+		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>"></li>
260 260
 			<?php endif; ?>
261
-			<?php if ( $toolbar_headings_h4 ): ?>
262
-		    <li id="lasso-toolbar--h4" title="<?php esc_attr_e( 'H4 Heading', 'lasso' );?>"></li>
263
-		    <li id="lasso-toolbar--h5" title="<?php esc_attr_e( 'H5 Heading', 'lasso' );?>"></li>
264
-			<li id="lasso-toolbar--h6" title="<?php esc_attr_e( 'H6 Heading', 'lasso' );?>"></li>
261
+			<?php if ($toolbar_headings_h4): ?>
262
+		    <li id="lasso-toolbar--h4" title="<?php esc_attr_e('H4 Heading', 'lasso'); ?>"></li>
263
+		    <li id="lasso-toolbar--h5" title="<?php esc_attr_e('H5 Heading', 'lasso'); ?>"></li>
264
+			<li id="lasso-toolbar--h6" title="<?php esc_attr_e('H6 Heading', 'lasso'); ?>"></li>
265 265
 			<?php endif; ?>
266 266
 			
267
-			<?php if ( $show_color ): ?>
268
-		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e( 'Set Color for Selected Text', 'lasso' );?>"></li>
269
-		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e( 'Choose Color', 'lasso' );?>"></li>
267
+			<?php if ($show_color): ?>
268
+		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e('Set Color for Selected Text', 'lasso'); ?>"></li>
269
+		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e('Choose Color', 'lasso'); ?>"></li>
270 270
 			<?php endif; ?>
271 271
 					
272 272
 		    
273
-			<li id="lasso-toolbar--link" title="<?php esc_attr_e( 'Anchor Link', 'lasso' );?>">
273
+			<li id="lasso-toolbar--link" title="<?php esc_attr_e('Anchor Link', 'lasso'); ?>">
274 274
 		    	<div id="lasso-toolbar--link__wrap" <?php echo $mobile_style ?> >
275
-		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'http://url.com', 'lasso' );?>"></div>
276
-		    		<a href="#" title="<?php esc_attr_e( 'Create Link', 'lasso' );?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
275
+		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e('http://url.com', 'lasso'); ?>"></div>
276
+		    		<a href="#" title="<?php esc_attr_e('Create Link', 'lasso'); ?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
277 277
 					<input class="styled-checkbox" type="checkbox" id="aesop-toolbar--link_newtab" checked/>
278
-                    <label for="aesop-toolbar--link_newtab"><?php esc_attr_e( 'Open in a New Tab', 'lasso' );?></label>
278
+                    <label for="aesop-toolbar--link_newtab"><?php esc_attr_e('Open in a New Tab', 'lasso'); ?></label>
279 279
 		    	</div>
280 280
 		    </li>
281
-		    <?php do_action( 'lasso_toolbar_components_after' );?>
282
-		    <li id="lasso-toolbar--html" title="<?php esc_attr_e( 'Insert HTML or Code', 'lasso' );?>">
281
+		    <?php do_action('lasso_toolbar_components_after'); ?>
282
+		    <li id="lasso-toolbar--html" title="<?php esc_attr_e('Insert HTML or Code', 'lasso'); ?>">
283 283
 		    	<div id="lasso-toolbar--html__wrap" <?php echo $mobile_style ?>>
284
-		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?>"></div>
284
+		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?>"></div>
285 285
 		    		<div id="lasso-toolbar--html__footer">
286 286
 					<div id="lasso-toolbar--html__footer_desc" >
287
-					<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?><br>
288
-					<?php esc_attr_e( 'You can also use Shortcodes', 'lasso' );?><br>
289
-					<?php esc_attr_e( 'You can also enter a URL to embed, such as Youtube, Vimeo and Twitter URLs.', 'lasso' );?>
287
+					<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?><br>
288
+					<?php esc_attr_e('You can also use Shortcodes', 'lasso'); ?><br>
289
+					<?php esc_attr_e('You can also enter a URL to embed, such as Youtube, Vimeo and Twitter URLs.', 'lasso'); ?>
290 290
 					</div>
291 291
 		    			<ul class="lasso-toolbar--html-snips">
292 292
 						
293
-		    				<?php if ( !$toolbar_headings ): ?>
294
-		    				<li id="lasso-html--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>">
295
-		    				<li id="lasso-html--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>">
293
+		    				<?php if (!$toolbar_headings): ?>
294
+		    				<li id="lasso-html--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>">
295
+		    				<li id="lasso-html--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>">
296 296
 		    				<?php endif; ?>
297
-		    				<li id="lasso-html--ul" title="<?php esc_attr_e( 'Unordered List', 'lasso' );?>">
298
-		    				<li id="lasso-html--ol" title="<?php esc_attr_e( 'Ordered List', 'lasso' );?>">
297
+		    				<li id="lasso-html--ul" title="<?php esc_attr_e('Unordered List', 'lasso'); ?>">
298
+		    				<li id="lasso-html--ol" title="<?php esc_attr_e('Ordered List', 'lasso'); ?>">
299 299
 		    			</ul>
300
-		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e( 'Cancel', 'lasso' );?></a>
301
-		    			<a href="#" title="<?php esc_attr_e( 'Insert HTML or Code', 'lasso' );?>" class="lasso-toolbar--html__control" id="lasso-toolbar--html__insert" ><?php _e( 'Insert', 'lasso' );?></a>
300
+		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e('Cancel', 'lasso'); ?></a>
301
+		    			<a href="#" title="<?php esc_attr_e('Insert HTML or Code', 'lasso'); ?>" class="lasso-toolbar--html__control" id="lasso-toolbar--html__insert" ><?php _e('Insert', 'lasso'); ?></a>
302 302
 		    		</div>
303 303
 		    	</div>
304 304
 		    </li>
305
-			<?php if ( $show_align ): ?>
306
-		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e( 'Text Left Align', 'lasso' );?>"></li>
307
-		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e( 'Text Center Align', 'lasso' );?>"></li>
308
-			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e( 'Text Right Align', 'lasso' );?>"></li>
305
+			<?php if ($show_align): ?>
306
+		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e('Text Left Align', 'lasso'); ?>"></li>
307
+		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e('Text Center Align', 'lasso'); ?>"></li>
308
+			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e('Text Right Align', 'lasso'); ?>"></li>
309 309
 			<?php endif; ?>
310 310
 		</ul>
311
-		<?php if ( is_singular() && $is_mobile ) { ?>
311
+		<?php if (is_singular() && $is_mobile) { ?>
312 312
 
313
-				<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;">
313
+				<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;">
314 314
 
315
-					<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>
315
+					<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>
316 316
 
317
-					<?php if ( 'draft' == $status && ( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') )  ) { ?>
318
-						<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>
317
+					<?php if ('draft' == $status && (lasso_user_can('publish_posts') || lasso_user_can('publish_pages'))) { ?>
318
+						<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>
319 319
 					<?php } ?>
320 320
 
321 321
 				</div>
@@ -333,20 +333,20 @@  discard block
 block discarded – undo
333 333
  */
334 334
 function lasso_editor_settings_toolbar() {
335 335
 
336
-	$delete_nonce = wp_create_nonce( 'lasso-delete-nonce' );
336
+	$delete_nonce = wp_create_nonce('lasso-delete-nonce');
337 337
 
338 338
 	ob_start();
339 339
 
340 340
 
341 341
 	// let users add custom css classes
342
-	$custom_classes = apply_filters( 'lasso_component_classes', '' );
342
+	$custom_classes = apply_filters('lasso_component_classes', '');
343 343
 
344 344
 	?>
345
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
346
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
347
-		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
348
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
349
-		<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>
345
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
346
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
347
+		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
348
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
349
+		<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>
350 350
 	</ul>
351 351
 
352 352
 	<?php return ob_get_clean();
@@ -364,13 +364,13 @@  discard block
 block discarded – undo
364 364
 
365 365
 
366 366
 	// has post thumbnail
367
-	$has_thumbnail = has_post_thumbnail( get_the_ID() ) ? 'class="lasso--featImg--has-thumb"' : false;
367
+	$has_thumbnail = has_post_thumbnail(get_the_ID()) ? 'class="lasso--featImg--has-thumb"' : false;
368 368
 
369 369
 	?>
370
-	<ul id="lasso--featImgControls" <?php echo $has_thumbnail;?>>
371
-		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e( 'Replace Image', 'lasso' );?>" href="#"><i class="lasso-icon-image"></i></a></li>
372
-		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e( 'Delete Image', 'lasso' );?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
373
-		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e( 'save', 'lasso' );?></a></li>
370
+	<ul id="lasso--featImgControls" <?php echo $has_thumbnail; ?>>
371
+		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e('Replace Image', 'lasso'); ?>" href="#"><i class="lasso-icon-image"></i></a></li>
372
+		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e('Delete Image', 'lasso'); ?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
373
+		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e('save', 'lasso'); ?></a></li>
374 374
 	</ul>
375 375
 
376 376
 	<?php return ob_get_clean();
@@ -394,51 +394,51 @@  discard block
 block discarded – undo
394 394
 
395 395
 	$postid = get_the_ID();
396 396
 
397
-	$status = get_post_status( $postid );
398
-	$nonce = wp_create_nonce( 'lasso-update-post-settings' );
397
+	$status = get_post_status($postid);
398
+	$nonce = wp_create_nonce('lasso-update-post-settings');
399 399
 
400 400
 	// let users add custom css classes
401
-	$custom_classes = apply_filters( 'lasso_modal_settings_classes', '' );
401
+	$custom_classes = apply_filters('lasso_modal_settings_classes', '');
402 402
 
403 403
 	// objects categories
404
-	$categories 		= lasso_get_post_objects( $postid, 'category' );
405
-	$tags 				= lasso_get_post_objects( $postid, 'tag' );
404
+	$categories = lasso_get_post_objects($postid, 'category');
405
+	$tags = lasso_get_post_objects($postid, 'tag');
406 406
 
407 407
 	// modal tabs
408
-	$tabs  				= lasso_modal_addons('tab');
409
-	$content 			= lasso_modal_addons('content');
408
+	$tabs = lasso_modal_addons('tab');
409
+	$content = lasso_modal_addons('content');
410 410
 	
411 411
 	//editor options
412 412
 	$allow_change_date = lasso_editor_get_option('allow_change_date', 'lasso_editor');
413 413
 
414 414
 	// are we singular
415
-	$is_singular 		= is_singular();
415
+	$is_singular = is_singular();
416 416
 	$is_singular_class 	= $is_singular ? 'lasso--postsettings__2col' : 'lasso--postsettings__1col';
417 417
 	$has_thumb_class    = has_post_thumbnail() ? 'has-thumbnail' : 'no-thumbnail';
418 418
 	$theme_supports     = current_theme_supports('post-thumbnails');
419
-	$default_image 		= LASSO_URL.'/admin/assets/img/empty-img.png';
419
+	$default_image = LASSO_URL.'/admin/assets/img/empty-img.png';
420 420
 
421 421
 ?>
422
-	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>">
422
+	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>">
423 423
 		<div class="lasso--modal__inner">
424 424
 
425
-			<?php if( $tabs ) { echo $tabs; } ?>
425
+			<?php if ($tabs) { echo $tabs; } ?>
426 426
 
427 427
 			<div class="lasso--modal__content modal__content--core visible" data-addon-content="core">
428
-				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class;?>" >
428
+				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class; ?>" >
429 429
 
430
-					<?php if ( $is_singular && $theme_supports ) : ?>
430
+					<?php if ($is_singular && $theme_supports) : ?>
431 431
 					<div class="lasso--postsettings__left">
432
-						<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>
433
-						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url( $default_image );?>">
432
+						<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>
433
+						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url($default_image); ?>">
434 434
 
435 435
 							<div id="lasso--post-thumb__controls" class="lasso--post-thumb__controls">
436
-								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image','lasso');?>" class="dashicons dashicons-edit"></i>
437
-								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image','lasso');?>" class="dashicons dashicons-no-alt"></i>
436
+								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image', 'lasso'); ?>" class="dashicons dashicons-edit"></i>
437
+								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image', 'lasso'); ?>" class="dashicons dashicons-no-alt"></i>
438 438
 								<i id="lasso--save-status" class="lasso-icon lasso-icon-spinner6 not-visible"></i>
439 439
 							</div>
440 440
 
441
-							<?php echo has_post_thumbnail() ? get_the_post_thumbnail( $post->ID, 'medium' ) : '<img src="'.$default_image.'">'; ?>
441
+							<?php echo has_post_thumbnail() ? get_the_post_thumbnail($post->ID, 'medium') : '<img src="'.$default_image.'">'; ?>
442 442
 
443 443
 						</div>
444 444
 						<div id="lasso--featImgSave"><a href="#" class="not-visible">Save</a></div>
@@ -448,13 +448,13 @@  discard block
 block discarded – undo
448 448
 
449 449
 					<div class="lasso--postsettings__right">
450 450
 
451
-						<?php if( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') ): ?>
451
+						<?php if (lasso_user_can('publish_posts') || lasso_user_can('publish_pages')): ?>
452 452
 						<div class="lasso--postsettings__option story-status-option">
453
-							<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>
454
-							<ul class="story-status story-status-<?php echo sanitize_html_class( $status );?>">
455
-								<li id="lasso--status-draft"><?php _e( 'Draft', 'lasso' );?></li>
456
-								<li id="lasso--status-pending"><?php _e( 'Pending', 'lasso' );?></li>
457
-								<li id="lasso--status-publish"><?php _e( 'Publish', 'lasso' );?></li>
453
+							<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>
454
+							<ul class="story-status story-status-<?php echo sanitize_html_class($status); ?>">
455
+								<li id="lasso--status-draft"><?php _e('Draft', 'lasso'); ?></li>
456
+								<li id="lasso--status-pending"><?php _e('Pending', 'lasso'); ?></li>
457
+								<li id="lasso--status-publish"><?php _e('Publish', 'lasso'); ?></li>
458 458
 							</ul>
459 459
 							<div class="lasso--slider_wrap">
460 460
 								<div id="lasso--slider"></div>
@@ -462,10 +462,10 @@  discard block
 block discarded – undo
462 462
 						</div>
463 463
 						<?php endif; ?>
464 464
 
465
-						<?php if ( 'publish' == $status ): ?>
465
+						<?php if ('publish' == $status): ?>
466 466
 						<div class="lasso--postsettings__option story-slug-option">
467
-							<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>
468
-							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset( $post ) ? esc_attr( $post->post_name ) : false;?>">
467
+							<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>
468
+							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset($post) ? esc_attr($post->post_name) : false; ?>">
469 469
 						</div>
470 470
 						<?php endif; ?>
471 471
 
@@ -474,20 +474,20 @@  discard block
 block discarded – undo
474 474
 					<div class="lasso--postsettings__middle">
475 475
 
476 476
 						<div class="lasso--postsettings__option story-categories-option">
477
-							<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>
478
-							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories;?>">
477
+							<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>
478
+							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories; ?>">
479 479
 						</div>
480 480
 
481 481
 						<div class="lasso--postsettings__option story-tags-option">
482
-							<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>
483
-							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags;?>">
482
+							<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>
483
+							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags; ?>">
484 484
 						</div>
485 485
 						<?php 
486 486
 						if ($allow_change_date) { 
487
-						    $dateformat = get_option( 'date_format' ); 
487
+						    $dateformat = get_option('date_format'); 
488 488
 						?>
489
-						    <label><?php _e( 'Post Date', 'lasso' ); ?></label>
490
-							<input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid);?>"/>
489
+						    <label><?php _e('Post Date', 'lasso'); ?></label>
490
+							<input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid); ?>"/>
491 491
 						<?php
492 492
 						}?>
493 493
 
@@ -509,23 +509,23 @@  discard block
 block discarded – undo
509 509
 					?>
510 510
 					<!--/div-->
511 511
 
512
-					<?php do_action( 'lasso_modal_post_form' ); // action ?>
512
+					<?php do_action('lasso_modal_post_form'); // action ?>
513 513
 
514 514
 					<div class="lasso--postsettings__footer" >
515
-						<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
515
+						<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
516 516
 						<input type="hidden" name="status" value="">
517 517
 						<input type="hidden" name="categories" value="">
518
-						<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
518
+						<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
519 519
 						<input type="hidden" name="action" value="process_update-object_post">
520
-						<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
521
-						<?php do_action( 'lasso_modal_post_form_footer' ); // action ?>
522
-						<input type="submit" id="lasso--postsettings-submit" value="<?php esc_attr_e( 'Save', 'lasso' );?>">
520
+						<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
521
+						<?php do_action('lasso_modal_post_form_footer'); // action ?>
522
+						<input type="submit" id="lasso--postsettings-submit" value="<?php esc_attr_e('Save', 'lasso'); ?>">
523 523
 					</div>
524 524
 
525 525
 				</form>
526 526
 			</div>
527 527
 
528
-			<?php if( $tabs ) { echo $content; } ?>
528
+			<?php if ($tabs) { echo $content; } ?>
529 529
 
530 530
 		</div>
531 531
 
@@ -547,41 +547,41 @@  discard block
 block discarded – undo
547 547
 	ob_start();
548 548
 
549 549
 
550
-	$status = get_post_status( get_the_ID() );
550
+	$status = get_post_status(get_the_ID());
551 551
 
552
-	$nonce = wp_create_nonce( 'lasso-editor-new-post' );
552
+	$nonce = wp_create_nonce('lasso-editor-new-post');
553 553
 
554 554
 	// let users add custom css classes
555
-	$custom_classes = apply_filters( 'lasso_modal_post_classes', '' );
555
+	$custom_classes = apply_filters('lasso_modal_post_classes', '');
556 556
 
557 557
 	// return the post type
558
-	$type = get_post_type( get_the_ID() );
558
+	$type = get_post_type(get_the_ID());
559 559
 
560 560
 	$mobile_style = "";
561 561
 	if (wp_is_mobile()) {
562 562
 		$mobile_style = 'style="top:140px !important;"';
563 563
 	}
564 564
 	?>
565
-	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" <?php echo $mobile_style;?>">
565
+	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" <?php echo $mobile_style; ?>">
566 566
 		<div class="lasso--modal__inner lasso--hasnewform">
567 567
 
568 568
 			<form id="lasso--postnew__form" enctype="multipart/form-data" class="lasso--post-form">
569 569
 
570 570
 				<div class="lasso--postsettings__option story-slug-option lasso--last-option">
571
-					<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>
572
-					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e( 'Grump Wizards Make Toxic Brew', 'lasso' );?>">
571
+					<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>
572
+					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e('Grump Wizards Make Toxic Brew', 'lasso'); ?>">
573 573
 						<div class="lasso--select-wrap" style="width:90px">
574 574
 						<select id="lasso--select-type" name="story_type">
575 575
 
576 576
 							<?php
577 577
 								$types = lasso_post_types_names();
578
-								if ( !empty( $types ) ) {
579
-									foreach( $types as $name => $label ) {										
580
-										$type = preg_replace( '/s\b/','', $name );
578
+								if (!empty($types)) {
579
+									foreach ($types as $name => $label) {										
580
+										$type = preg_replace('/s\b/', '', $name);
581 581
 										if ($type == 'page' && !current_user_can('edit_pages')) {
582 582
 											continue;
583 583
 										}
584
-										printf( '<option value="%s">%s</option>', lcfirst( esc_attr( $type ) ) , ucfirst( esc_attr( $label ) ) );
584
+										printf('<option value="%s">%s</option>', lcfirst(esc_attr($type)), ucfirst(esc_attr($label)));
585 585
 									}
586 586
 
587 587
 								}
@@ -592,18 +592,18 @@  discard block
 block discarded – undo
592 592
 				</div>
593 593
 
594 594
 				<div class="lasso--postsettings__footer">
595
-					<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
595
+					<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
596 596
 					<input type="hidden" name="action" value="process_new-object_post">
597 597
 					<?php
598
-						if ( !empty( $types ) ) {
598
+						if (!empty($types)) {
599 599
 							// get the first element
600 600
 						    $type = key($types);						
601
-							$type = preg_replace( '/s\b/','', $type );
602
-							printf( '<input type="hidden" name="object" value="%s">', lcfirst( esc_attr( $type ) ) );		
601
+							$type = preg_replace('/s\b/', '', $type);
602
+							printf('<input type="hidden" name="object" value="%s">', lcfirst(esc_attr($type)));		
603 603
 						}
604 604
 					?>
605
-					<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
606
-					<input type="submit" value="<?php esc_attr_e( 'Create', 'lasso' );?>">
605
+					<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
606
+					<input type="submit" value="<?php esc_attr_e('Create', 'lasso'); ?>">
607 607
 				</div>
608 608
 
609 609
 			</form>
@@ -631,18 +631,18 @@  discard block
 block discarded – undo
631 631
 	ob_start();
632 632
 
633 633
 	// post status
634
-	$status = get_post_status( get_the_ID() );
634
+	$status = get_post_status(get_the_ID());
635 635
 
636 636
 	// let users add custom css classes
637
-	$custom_classes = apply_filters( 'lasso_modal_all_post_classes', '' );
637
+	$custom_classes = apply_filters('lasso_modal_all_post_classes', '');
638 638
 
639 639
 	?>
640
-	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" style="max-height:100%">
640
+	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" style="max-height:100%">
641 641
 		<div class="lasso--modal__inner">
642 642
 
643 643
 			<div class="lasso--post-filtering not-visible">
644 644
 				<div class="lasso--search__results">
645
-					<span id="lasso--results-found"></span><?php _e('results found','lasso');?>
645
+					<span id="lasso--results-found"></span><?php _e('results found', 'lasso'); ?>
646 646
 				</div>
647 647
 				<div class="lasso--search">
648 648
 					<i id="lasso--search__toggle" class="dashicons dashicons-search"></i>
@@ -656,18 +656,18 @@  discard block
 block discarded – undo
656 656
 				$post_types = lasso_post_types_names();
657 657
 				$rest_bases = lasso_post_types_rest_base();
658 658
 
659
-				if ( ! empty( $post_types ) ) {
659
+				if (!empty($post_types)) {
660 660
 					$first = 'active';
661
-					foreach( $post_types as $name => $label ) {
661
+					foreach ($post_types as $name => $label) {
662 662
 						if (array_key_exists($name, $rest_bases)) {
663
-							printf( '<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr( $first), esc_attr( $rest_bases[$name] ), esc_attr( $label ) );
663
+							printf('<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr($first), esc_attr($rest_bases[$name]), esc_attr($label));
664 664
 						}
665 665
 						$first = '';
666 666
 					}
667 667
 
668 668
 				}
669 669
 
670
-				do_action('lasso_modal_post_objects');?>
670
+				do_action('lasso_modal_post_objects'); ?>
671 671
 
672 672
 			</ul>
673 673
 			<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
@@ -687,14 +687,14 @@  discard block
 block discarded – undo
687 687
 
688 688
 
689 689
 	// let users add custom css classes
690
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
690
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
691 691
 
692 692
 	?>
693
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
694
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
695
-		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
696
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
697
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
693
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
694
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
695
+		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
696
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
697
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
698 698
 	</ul>
699 699
 
700 700
 	<?php return ob_get_clean();
@@ -706,14 +706,14 @@  discard block
 block discarded – undo
706 706
 
707 707
 
708 708
 	// let users add custom css classes
709
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
709
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
710 710
 
711 711
 	?>
712
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
713
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
714
-		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
715
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
716
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
712
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
713
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
714
+		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
715
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
716
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
717 717
 	</ul>
718 718
 
719 719
 	<?php return ob_get_clean();
@@ -726,16 +726,16 @@  discard block
 block discarded – undo
726 726
  */
727 727
 function lasso_map_form_footer() {
728 728
 
729
-	$nonce = wp_create_nonce( 'lasso-process-map' );
729
+	$nonce = wp_create_nonce('lasso-process-map');
730 730
 
731 731
 	ob_start();
732 732
 
733 733
 	?>
734 734
 	<div class="lasso--map-form__footer">
735
-		<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
736
-		<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
735
+		<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
736
+		<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
737 737
 		<input type="hidden" name="action" value="process_map_save">
738
-		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e( 'Save Locations', 'lasso' );?>">
738
+		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e('Save Locations', 'lasso'); ?>">
739 739
 	</div>
740 740
 
741 741
 	<?php return ob_get_clean();
@@ -753,7 +753,7 @@  discard block
 block discarded – undo
753 753
 
754 754
 	?>
755 755
 	<div id="lasso--pagerefresh" class="visible">
756
-		<?php _e( 'Save this post and refesh the page to see these changes.', 'lasso' );?>
756
+		<?php _e('Save this post and refesh the page to see these changes.', 'lasso'); ?>
757 757
 	</div>
758 758
 
759 759
 	<?php return ob_get_clean();
@@ -767,43 +767,43 @@  discard block
 block discarded – undo
767 767
  */
768 768
 function lasso_editor_options_blob() {
769 769
 
770
-	$codes   = function_exists( 'aesop_shortcodes' ) ? aesop_shortcodes() : apply_filters( 'lasso_custom_options', '' );
771
-	$galleries  = function_exists( 'lasso_editor_galleries_exist' ) && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
770
+	$codes = function_exists('aesop_shortcodes') ? aesop_shortcodes() : apply_filters('lasso_custom_options', '');
771
+	$galleries = function_exists('lasso_editor_galleries_exist') && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
772 772
 
773
-	$nonce = wp_create_nonce( 'lasso_gallery' );
773
+	$nonce = wp_create_nonce('lasso_gallery');
774 774
 
775 775
 	$blob = array();
776 776
 
777
-	if ( empty( $codes ) )
777
+	if (empty($codes))
778 778
 		return;
779 779
 
780
-	foreach ( $codes as $slug => $shortcode ) {
780
+	foreach ($codes as $slug => $shortcode) {
781 781
 		$return = '';
782 782
 		// Shortcode has atts
783 783
 
784
-		if ( count( $shortcode['atts'] ) && $shortcode['atts'] ) {
784
+		if (count($shortcode['atts']) && $shortcode['atts']) {
785 785
 
786
-			foreach ( $shortcode['atts'] as $attr_name => $attr_info ) {
786
+			foreach ($shortcode['atts'] as $attr_name => $attr_info) {
787 787
 
788 788
 
789
-				$prefix = isset( $attr_info['prefix'] ) ? sprintf( '<span class="lasso-option-prefix">%s</span>', $attr_info['prefix'] ) : null;
789
+				$prefix = isset($attr_info['prefix']) ? sprintf('<span class="lasso-option-prefix">%s</span>', $attr_info['prefix']) : null;
790 790
 
791 791
 				$return .= '<form id="lasso--component-settings-form" class="'.$galleries.'" method="post">';
792 792
 				$return .= '<p data-option="'.$attr_name.'" class="lasso-option aesop-'.$slug.'-'.$attr_name.'">';
793
-				$return .= '<label for="aesop-generator-attr-' . $attr_name . '">' . $attr_info['desc'] . '</label>';
793
+				$return .= '<label for="aesop-generator-attr-'.$attr_name.'">'.$attr_info['desc'].'</label>';
794 794
 				$return .= '<small class="lasso-option-desc">'.$attr_info['tip'].'</small>';
795 795
 				// Select
796 796
 
797
-				if ( isset( $attr_info['values'] ) ) {
797
+				if (isset($attr_info['values'])) {
798 798
 
799
-					$return .= '<select name="' . $attr_name . '" id="aesop-generator-attr-' . $attr_name . '" class="lasso-generator-attr">';
799
+					$return .= '<select name="'.$attr_name.'" id="aesop-generator-attr-'.$attr_name.'" class="lasso-generator-attr">';
800 800
 
801
-					$i=0;
801
+					$i = 0;
802 802
 
803
-					foreach ( $attr_info['values'] as $attr_value ) {
803
+					foreach ($attr_info['values'] as $attr_value) {
804 804
 						$attr_value_selected = $attr_info['default'] == $attr_value ? ' selected="selected"' : '';
805 805
 
806
-						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" ' . $attr_value_selected . '>'.$attr_info['values'][$i]['name'].'</option>';
806
+						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" '.$attr_value_selected.'>'.$attr_info['values'][$i]['name'].'</option>';
807 807
 
808 808
 						$i++;
809 809
 					}
@@ -812,24 +812,24 @@  discard block
 block discarded – undo
812 812
 
813 813
 				} else {
814 814
 
815
-					$attr_field_type = isset( $attr_info['type'] ) ? $attr_info['type'] : 'text';
815
+					$attr_field_type = isset($attr_info['type']) ? $attr_info['type'] : 'text';
816 816
 
817 817
 					// image upload
818
-					if ( 'media_upload' == $attr_info['type'] ) {
818
+					if ('media_upload' == $attr_info['type']) {
819 819
 
820
-						$return .= '<input type="' . $attr_field_type . '" name="' . $attr_name . '" value="'.$attr_info['default'].'" id="aesop-generator-attr-' . $attr_name . '" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" />';
820
+						$return .= '<input type="'.$attr_field_type.'" name="'.$attr_name.'" value="'.$attr_info['default'].'" id="aesop-generator-attr-'.$attr_name.'" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" />';
821 821
 						$return .= '<a href="#" id="lasso-upload-img" class="lasso-option-button" /></a>';
822 822
 
823
-					} elseif ( 'color' == $attr_info['type'] ) {
823
+					} elseif ('color' == $attr_info['type']) {
824 824
 
825
-						$return .= '<input type="color" name="' . $attr_name . '" value="'.$attr_info['default'].'" id="aesop-generator-attr-' . $attr_name . '" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" />';
825
+						$return .= '<input type="color" name="'.$attr_name.'" value="'.$attr_info['default'].'" id="aesop-generator-attr-'.$attr_name.'" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" />';
826 826
 
827
-					} elseif ( 'text_area' == $attr_info['type'] ) {
827
+					} elseif ('text_area' == $attr_info['type']) {
828 828
 
829
-						$return .= '<textarea name="' . $attr_name . '" id="aesop-generator-attr-' . $attr_name . '" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" placeholder="'.$attr_info['default'].'" /></textarea>'.$prefix.'';
829
+						$return .= '<textarea name="'.$attr_name.'" id="aesop-generator-attr-'.$attr_name.'" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" placeholder="'.$attr_info['default'].'" /></textarea>'.$prefix.'';
830 830
 
831 831
 					} else {
832
-						$return .= '<input type="' . $attr_field_type . '" name="' . $attr_name . '" value="'.$attr_info['default'].'" id="aesop-generator-attr-' . $attr_name . '" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" />'.$prefix.'';
832
+						$return .= '<input type="'.$attr_field_type.'" name="'.$attr_name.'" value="'.$attr_info['default'].'" id="aesop-generator-attr-'.$attr_name.'" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" />'.$prefix.'';
833 833
 					}
834 834
 				}
835 835
 				$return .= '</p>';
@@ -840,9 +840,9 @@  discard block
 block discarded – undo
840 840
 		///////////////////////////
841 841
 		// START GALLERY AND MAP FRONT END STUFFS
842 842
 		///////////////////////////
843
-		if ( isset( $shortcode['front'] ) && true == $shortcode['front'] ) {
843
+		if (isset($shortcode['front']) && true == $shortcode['front']) {
844 844
 
845
-			if ( 'gallery' == $shortcode['front_type'] ) {
845
+			if ('gallery' == $shortcode['front_type']) {
846 846
 
847 847
 				$return .= lasso_gallery_editor_module();
848 848
 
@@ -853,13 +853,13 @@  discard block
 block discarded – undo
853 853
 		///////////////////////////
854 854
 
855 855
 		// Single shortcode (not closed)
856
-		if ( 'single' == $shortcode['type'] ) {
856
+		if ('single' == $shortcode['type']) {
857 857
 
858 858
 			$return .= '<input type="hidden" name="lasso-generator-content" id="lasso-generator-content" value="false" />';
859 859
 
860 860
 		} else {
861 861
 
862
-			$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>';
862
+			$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>';
863 863
 		}
864 864
 
865 865
 		$return .= '<p class="lasso-buttoninsert-wrap"><a href="#" class="lasso-generator-cancel" id="lasso--sidebar__close">Cancel</a><input type="submit" id="lasso-generator-insert" value="Save Settings"></p>';
@@ -895,14 +895,14 @@  discard block
 block discarded – undo
895 895
 				<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
896 896
 				<div id="lasso--hide" style="display:none;" class="lasso--post-form">
897 897
 					<i class="lasso-icon lasso-icon-move"></i>
898
-					<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>
898
+					<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>
899 899
 					<div class="lasso--slider_wrap">
900 900
 						<div id="lasso--slider"></div>
901 901
 					</div>
902 902
 					<ul id="lasso--revision-list"></ul>
903 903
 					<div class="lasso--btn-group lasso--btn-group-small">
904
-						<a href="#" class="lasso--btn-secondary" id="lasso--close-modal"><?php _e( 'Cancel', 'lasso' );?></a>
905
-						<a href="#" class="lasso--btn-primary" id="lasso--select-revision"><?php _e( 'Select', 'lasso' );?></a>
904
+						<a href="#" class="lasso--btn-secondary" id="lasso--close-modal"><?php _e('Cancel', 'lasso'); ?></a>
905
+						<a href="#" class="lasso--btn-primary" id="lasso--select-revision"><?php _e('Select', 'lasso'); ?></a>
906 906
 					</div>
907 907
 				</div>
908 908
 
@@ -925,7 +925,7 @@  discard block
 block discarded – undo
925 925
     // Normalize into a six character long hex string
926 926
     $hex = str_replace('#', '', $hex);
927 927
     if (strlen($hex) == 3) {
928
-        $hex = str_repeat(substr($hex,0,1), 2).str_repeat(substr($hex,1,1), 2).str_repeat(substr($hex,2,1), 2);
928
+        $hex = str_repeat(substr($hex, 0, 1), 2).str_repeat(substr($hex, 1, 1), 2).str_repeat(substr($hex, 2, 1), 2);
929 929
     }
930 930
 
931 931
     // Split into three parts: R, G and B
@@ -934,7 +934,7 @@  discard block
 block discarded – undo
934 934
 
935 935
     foreach ($color_parts as $color) {
936 936
         $color   = hexdec($color); // Convert to decimal
937
-        $color   = max(0,min(255,$color + $steps)); // Adjust color
937
+        $color   = max(0, min(255, $color + $steps)); // Adjust color
938 938
         $return .= str_pad(dechex($color), 2, '0', STR_PAD_LEFT); // Make two char hex code
939 939
     }
940 940
 
Please login to merge, or discard this patch.
Braces   +13 added lines, -6 removed lines patch added patch discarded remove patch
@@ -83,7 +83,8 @@  discard block
 block discarded – undo
83 83
 			color: <?php echo $text_color;?> !important;
84 84
 		}
85 85
 		
86
-		<?php if (!$is_mobile)?>
86
+		<?php if (!$is_mobile) {
87
+	?>
87 88
 		.lasso-editor-controls--wrap {
88 89
 			display:table;
89 90
 		}
@@ -103,7 +104,9 @@  discard block
 block discarded – undo
103 104
 		}
104 105
 		<?php}?>
105 106
 		</style>
106
-		<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();?>" >
107
+		<div id="lasso--controls" class="lasso-post-status--<?php echo sanitize_html_class( $status );
108
+}
109
+?> <?php echo sanitize_html_class( $custom_classes );?>" data-post-id="<?php echo get_the_ID();?>" >
107 110
 
108 111
 			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class;?> "  <?php echo $mobile_style ?> >
109 112
 
@@ -246,8 +249,11 @@  discard block
 block discarded – undo
246 249
 						<?php if ( class_exists ('Aesop_Events') ) { ?>
247 250
 						     <li data-type="events" title="<?php esc_attr_e( 'Event', 'lasso' );?>"  class="lasso-toolbar--component__event"></li>
248 251
 						<?php }?>
249
-					<?php else: ?>
250
-						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );?>" class="image lasso-toolbar--component__image"></li>
252
+					<?php else {
253
+	: ?>
254
+						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );
255
+}
256
+?>" class="image lasso-toolbar--component__image"></li>
251 257
 						<li data-type="wpquote" title="<?php esc_attr_e( 'WordPress Quote', 'lasso' );?>" class="quote lasso-toolbar--component__quote"></li>
252 258
 						<!--li data-type="wpvideo" title="<?php esc_attr_e( 'WordPress Video', 'lasso' );?>" class="video lasso-toolbar--component__video"></li-->
253 259
 					<?php endif; ?>
@@ -774,8 +780,9 @@  discard block
 block discarded – undo
774 780
 
775 781
 	$blob = array();
776 782
 
777
-	if ( empty( $codes ) )
778
-		return;
783
+	if ( empty( $codes ) ) {
784
+			return;
785
+	}
779 786
 
780 787
 	foreach ( $codes as $slug => $shortcode ) {
781 788
 		$return = '';
Please login to merge, or discard this patch.
admin/includes/load_admin.php 2 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -99,8 +99,8 @@  discard block
 block discarded – undo
99 99
 
100 100
 		foreach ( $pages as $page ) {
101 101
 			wp_enqueue_media();
102
-            wp_enqueue_style( 'wp-color-picker');
103
-            wp_enqueue_script( 'wp-color-picker');
102
+			wp_enqueue_style( 'wp-color-picker');
103
+			wp_enqueue_script( 'wp-color-picker');
104 104
 		
105 105
 			wp_enqueue_script( 'lasso-editor-settings-script', LASSO_URL.'/admin/assets/js/lasso-editor-settings.js', array( 'jquery','wp-color-picker' ), LASSO_VERSION, true );
106 106
 			wp_enqueue_style( 'lasso-editor-settings-style', LASSO_URL.'/admin/assets/css/lasso-editor-settings.css', LASSO_VERSION );
@@ -131,11 +131,11 @@  discard block
 block discarded – undo
131 131
 	}
132 132
 
133 133
 	/**
134
-	*	Adds an admin notice reminding the user if their license key has not been saved
135
-	*
136
-	*	@since 0.9.7
137
-	*	@todo make dismissible
138
-	*/
134
+	 *	Adds an admin notice reminding the user if their license key has not been saved
135
+	 *
136
+	 *	@since 0.9.7
137
+	 *	@todo make dismissible
138
+	 */
139 139
 	public function license_nag(){
140 140
 
141 141
 		$screen 	= get_current_screen();
@@ -156,26 +156,26 @@  discard block
 block discarded – undo
156 156
 
157 157
 			if ( empty( $license ) ) {
158 158
 
159
-        		printf('<div class="lasso-notice error" style="position:relative;"><p>%s %s</p>%s</div>', $message_empty, $license_link, $dismiss_link );
159
+				printf('<div class="lasso-notice error" style="position:relative;"><p>%s %s</p>%s</div>', $message_empty, $license_link, $dismiss_link );
160 160
 
161
-        	} else if ( 'invalid' == $status ){ // license key entered wrong or something
161
+			} else if ( 'invalid' == $status ){ // license key entered wrong or something
162 162
 
163 163
 				printf('<div class="lasso-notice error" style="position:relative;"><p>%s %s</p>%s</div>', $message_invalid, $license_link , $dismiss_link );
164 164
 
165
-        	} else if ( empty( $status ) ){ // license key saved but not activated
165
+			} else if ( empty( $status ) ){ // license key saved but not activated
166 166
 
167 167
 				printf('<div class="lasso-notice error" style="position:relative;"><p>%s %s</p>%s</div>', $message_inactive, $license_link, $dismiss_link );
168 168
 
169
-        	}
169
+			}
170 170
 		}
171 171
 
172 172
 	}
173 173
 
174 174
 	/**
175
-	*  Process hiding the dimiss
176
-	*
177
-	* @since 0.9.7
178
-	*/
175
+	 *  Process hiding the dimiss
176
+	 *
177
+	 * @since 0.9.7
178
+	 */
179 179
 	public function dismiss_nag() {
180 180
 
181 181
 		if ( isset( $_GET['lasso-notice'] ) && 'dismiss' == $_GET['lasso-notice'] && current_user_can('manage_options') ) {
Please login to merge, or discard this patch.
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -43,23 +43,23 @@  discard block
 block discarded – undo
43 43
 		$plugin = lasso::get_instance();
44 44
 		$this->plugin_slug = $plugin->get_plugin_slug();
45 45
 
46
-		add_action( 'admin_head',  			array( $this, 'admin_assets' ) );
47
-		add_action( 'admin_notices', 		array( $this, 'license_nag' ) );
48
-		add_action( 'admin_head', 			array( $this, 'dismiss_nag' ) );
49
-		add_filter( 'plugin_row_meta',    	array( $this, 'plugin_meta' ), 10, 2 );
46
+		add_action('admin_head', array($this, 'admin_assets'));
47
+		add_action('admin_notices', array($this, 'license_nag'));
48
+		add_action('admin_head', array($this, 'dismiss_nag'));
49
+		add_filter('plugin_row_meta', array($this, 'plugin_meta'), 10, 2);
50 50
 
51
-		if ( !class_exists( 'EDD_SL_Plugin_Updater' ) ) {
51
+		if (!class_exists('EDD_SL_Plugin_Updater')) {
52 52
 			include LASSO_DIR.'admin/includes/EDD_SL_Plugin_Updater.php';
53 53
 		}
54 54
 
55
-		if ( !class_exists( 'TGM_Plugin_Activation' ) ) {
55
+		if (!class_exists('TGM_Plugin_Activation')) {
56 56
 			include LASSO_DIR.'admin/includes/class-tgm-plugin-activation.php';
57 57
 		}
58 58
 
59 59
 		new menus\welcome();
60 60
 		new menus\settings();
61 61
 
62
-		if ( !defined( 'LASSO_AGENCY_MODE' ) ) {
62
+		if (!defined('LASSO_AGENCY_MODE')) {
63 63
 			new menus\license();
64 64
 		}
65 65
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 	public static function get_instance() {
76 76
 
77 77
 		// If the single instance hasn't been set, set it now.
78
-		if ( null == self::$instance ) {
78
+		if (null == self::$instance) {
79 79
 			self::$instance = new self;
80 80
 		}
81 81
 
@@ -97,13 +97,13 @@  discard block
 block discarded – undo
97 97
 			'dashboard_page_lasso-welcome-screen'
98 98
 		);
99 99
 
100
-		foreach ( $pages as $page ) {
100
+		foreach ($pages as $page) {
101 101
 			wp_enqueue_media();
102
-            wp_enqueue_style( 'wp-color-picker');
103
-            wp_enqueue_script( 'wp-color-picker');
102
+            wp_enqueue_style('wp-color-picker');
103
+            wp_enqueue_script('wp-color-picker');
104 104
 		
105
-			wp_enqueue_script( 'lasso-editor-settings-script', LASSO_URL.'/admin/assets/js/lasso-editor-settings.js', array( 'jquery','wp-color-picker' ), LASSO_VERSION, true );
106
-			wp_enqueue_style( 'lasso-editor-settings-style', LASSO_URL.'/admin/assets/css/lasso-editor-settings.css', LASSO_VERSION );
105
+			wp_enqueue_script('lasso-editor-settings-script', LASSO_URL.'/admin/assets/js/lasso-editor-settings.js', array('jquery', 'wp-color-picker'), LASSO_VERSION, true);
106
+			wp_enqueue_style('lasso-editor-settings-style', LASSO_URL.'/admin/assets/css/lasso-editor-settings.css', LASSO_VERSION);
107 107
 		}
108 108
 	}
109 109
 
@@ -116,15 +116,15 @@  discard block
 block discarded – undo
116 116
 	 *
117 117
 	 * @return array new array of links for our plugin listing on plugins.php
118 118
 	 */
119
-	public function plugin_meta( $links, $file ) {
119
+	public function plugin_meta($links, $file) {
120 120
 
121
-		if ( strpos( $file, 'lasso.php' ) !== false && !defined( 'LASSO_AGENCY_MODE' ) ) {
121
+		if (strpos($file, 'lasso.php') !== false && !defined('LASSO_AGENCY_MODE')) {
122 122
 
123 123
 			$new_links = array(
124 124
 				'<a href="http://edituswp.com/help" target="_blank">Help</a>'
125 125
 			);
126 126
 
127
-			$links = array_merge( $links, $new_links );
127
+			$links = array_merge($links, $new_links);
128 128
 		}
129 129
 
130 130
 		return $links;
@@ -136,35 +136,35 @@  discard block
 block discarded – undo
136 136
 	*	@since 0.9.7
137 137
 	*	@todo make dismissible
138 138
 	*/
139
-	public function license_nag(){
139
+	public function license_nag() {
140 140
 
141
-		$screen 	= get_current_screen();
142
-		$welcome    = 'toplevel_page_lasso-editor' == $screen->id;
143
-		$license  	= get_option( 'lasso_license_key' );
144
-		$status   	= get_option( 'lasso_license_status' );
141
+		$screen = get_current_screen();
142
+		$welcome = 'toplevel_page_lasso-editor' == $screen->id;
143
+		$license  	= get_option('lasso_license_key');
144
+		$status   	= get_option('lasso_license_status');
145 145
 
146
-		$message_empty    = apply_filters('lasso_empty_license_message','Your license key for support and automatic updates for Editus is missing!');
147
-		$message_invalid  = apply_filters('lasso_invalid_license_message','Oh snap! It looks like your Editus license key is invalid. Might check here to see if its been added correctly.');
148
-		$message_inactive  = apply_filters('lasso_inactive_license_message','It looks like your license key has not yet been activated.');
146
+		$message_empty    = apply_filters('lasso_empty_license_message', 'Your license key for support and automatic updates for Editus is missing!');
147
+		$message_invalid  = apply_filters('lasso_invalid_license_message', 'Oh snap! It looks like your Editus license key is invalid. Might check here to see if its been added correctly.');
148
+		$message_inactive = apply_filters('lasso_inactive_license_message', 'It looks like your license key has not yet been activated.');
149 149
 
150
-		$license_link 	  = sprintf('<a href="%s">Update License</a>', esc_url( add_query_arg( array( 'page' => 'lasso-license' ), admin_url('admin.php') ) ) );
151
-		$dismiss_link     = sprintf('<a style="text-decoration:none;" href="%s" id="lasso-dismiss-notice" class="notice-dismiss"><span class="screen-reader-text">%s</span></a>', esc_url( add_query_arg( 'lasso-notice', 'dismiss' ) ), __('Dismiss this notice.','lasso') );
150
+		$license_link = sprintf('<a href="%s">Update License</a>', esc_url(add_query_arg(array('page' => 'lasso-license'), admin_url('admin.php'))));
151
+		$dismiss_link     = sprintf('<a style="text-decoration:none;" href="%s" id="lasso-dismiss-notice" class="notice-dismiss"><span class="screen-reader-text">%s</span></a>', esc_url(add_query_arg('lasso-notice', 'dismiss')), __('Dismiss this notice.', 'lasso'));
152 152
 
153
-		$not_hidden       = get_user_meta( get_current_user_ID(), 'lasso_license_nag_dismissed', true );
153
+		$not_hidden       = get_user_meta(get_current_user_ID(), 'lasso_license_nag_dismissed', true);
154 154
 
155
-		if ( current_user_can('manage_options') && !$welcome && !defined( 'LASSO_AGENCY_MODE') && !$not_hidden ) {
155
+		if (current_user_can('manage_options') && !$welcome && !defined('LASSO_AGENCY_MODE') && !$not_hidden) {
156 156
 
157
-			if ( empty( $license ) ) {
157
+			if (empty($license)) {
158 158
 
159
-        		printf('<div class="lasso-notice error" style="position:relative;"><p>%s %s</p>%s</div>', $message_empty, $license_link, $dismiss_link );
159
+        		printf('<div class="lasso-notice error" style="position:relative;"><p>%s %s</p>%s</div>', $message_empty, $license_link, $dismiss_link);
160 160
 
161
-        	} else if ( 'invalid' == $status ){ // license key entered wrong or something
161
+        	} else if ('invalid' == $status) { // license key entered wrong or something
162 162
 
163
-				printf('<div class="lasso-notice error" style="position:relative;"><p>%s %s</p>%s</div>', $message_invalid, $license_link , $dismiss_link );
163
+				printf('<div class="lasso-notice error" style="position:relative;"><p>%s %s</p>%s</div>', $message_invalid, $license_link, $dismiss_link);
164 164
 
165
-        	} else if ( empty( $status ) ){ // license key saved but not activated
165
+        	} else if (empty($status)) { // license key saved but not activated
166 166
 
167
-				printf('<div class="lasso-notice error" style="position:relative;"><p>%s %s</p>%s</div>', $message_inactive, $license_link, $dismiss_link );
167
+				printf('<div class="lasso-notice error" style="position:relative;"><p>%s %s</p>%s</div>', $message_inactive, $license_link, $dismiss_link);
168 168
 
169 169
         	}
170 170
 		}
@@ -178,8 +178,8 @@  discard block
 block discarded – undo
178 178
 	*/
179 179
 	public function dismiss_nag() {
180 180
 
181
-		if ( isset( $_GET['lasso-notice'] ) && 'dismiss' == $_GET['lasso-notice'] && current_user_can('manage_options') ) {
182
-			update_user_meta( get_current_user_id(), 'lasso_license_nag_dismissed', 1 );
181
+		if (isset($_GET['lasso-notice']) && 'dismiss' == $_GET['lasso-notice'] && current_user_can('manage_options')) {
182
+			update_user_meta(get_current_user_id(), 'lasso_license_nag_dismissed', 1);
183 183
 		}
184 184
 	}
185 185
 }
Please login to merge, or discard this patch.