Completed
Push — master ( df1b2a...9a7ab7 )
by
unknown
34:48
created
admin/includes/menus/settings.php 1 patch
Spacing   +135 added lines, -135 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,39 +95,39 @@  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
-		$use_old_ui      = lasso_editor_get_option( 'use_old_ui', 'lasso_editor' );
114
-		$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
115
-		$toolbar_headings_h4      = lasso_editor_get_option( 'toolbar_headings_h4', 'lasso_editor' );
116
-		$toolbar_show_color      = lasso_editor_get_option( 'toolbar_show_color', 'lasso_editor' );
117
-		$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
+		$use_old_ui = lasso_editor_get_option('use_old_ui', 'lasso_editor');
114
+		$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
115
+		$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
116
+		$toolbar_show_color      = lasso_editor_get_option('toolbar_show_color', 'lasso_editor');
117
+		$toolbar_show_alignment  = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor');
118 118
 		
119
-		$objectsNoSave  	= lasso_editor_get_option('dont_save', 'lasso_editor');
120
-		$objectsNonEditable  	= lasso_editor_get_option('non_editable', 'lasso_editor');
119
+		$objectsNoSave = lasso_editor_get_option('dont_save', 'lasso_editor');
120
+		$objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor');
121 121
 		$disable_tour = lasso_editor_get_option('disable_tour', 'lasso_editor');
122 122
 		$show_ignored_items = lasso_editor_get_option('show_ignored_items', 'lasso_editor');
123 123
 		$save_using_rest_disabled = lasso_editor_get_option('save_using_rest_disabled', 'lasso_editor');
124 124
 		
125
-		$default_post_types = apply_filters( 'lasso_allowed_post_types', array( 'post', 'page'));
126
-		$allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor',  $default_post_types);
125
+		$default_post_types = apply_filters('lasso_allowed_post_types', array('post', 'page'));
126
+		$allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', $default_post_types);
127 127
 		
128 128
 		$links_editable = lasso_editor_get_option('links_editable', 'lasso_editor', false);
129
-		$bold_tag = lasso_editor_get_option( 'bold_tag', 'lasso_editor',  "b");
130
-		$i_tag = lasso_editor_get_option( 'i_tag', 'lasso_editor',  "i");
129
+		$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor', "b");
130
+		$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor', "i");
131 131
 		
132 132
 		$insert_comp_ui = lasso_editor_get_option('insert_comp_ui', 'lasso_editor');
133 133
 		if (!$insert_comp_ui) {
@@ -137,31 +137,31 @@  discard block
 block discarded – undo
137 137
 ?>
138 138
 		<div class="wrap">
139 139
 
140
-	    	<h2><?php _e( 'Editus Settings', 'lasso' );?></h2>
140
+	    	<h2><?php _e('Editus Settings', 'lasso'); ?></h2>
141 141
 
142 142
 			<form id="lasso-editor-settings-form" class="lasso--form-settings" method="post" enctype="multipart/form-data">
143 143
 
144
-				<?php do_action('lasso_settings_before');?>
144
+				<?php do_action('lasso_settings_before'); ?>
145 145
 				
146 146
 				
147 147
 				
148
-				<h3><?php _e( 'Enable for:', 'lasso' );?></h3>
148
+				<h3><?php _e('Enable for:', 'lasso'); ?></h3>
149 149
 				<div class="lasso-editor-settings--option-wrap">
150 150
 					<div class="lasso-editor-settings--option-inner">
151 151
 						
152
-						<span class="lasso--setting-description"><?php _e( 'Enable Editus for the following post types.', 'lasso' );?></span>
152
+						<span class="lasso--setting-description"><?php _e('Enable Editus for the following post types.', 'lasso'); ?></span>
153 153
 						<?php
154 154
 						$args = array(
155 155
 							'public'   => true
156 156
 						);
157 157
 						 
158
-						$allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
159
-						$post_types = get_post_types( $args, 'objects' );
158
+						$allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
159
+						$post_types = get_post_types($args, 'objects');
160 160
 						 
161
-						foreach ( $post_types  as $post_type ) {
161
+						foreach ($post_types  as $post_type) {
162 162
 						   if ($post_type->name == 'attachment') continue;
163
-						   $checked ="";
164
-						   if (  in_array( $post_type->name, $allowed_post_types )  ) {
163
+						   $checked = "";
164
+						   if (in_array($post_type->name, $allowed_post_types)) {
165 165
 								$checked = 'checked="checked"';
166 166
 						   }
167 167
 						   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>';
@@ -171,104 +171,104 @@  discard block
 block discarded – undo
171 171
 				</div>
172 172
 				
173 173
 
174
-				<h3><?php _e( 'Internal Settings', 'lasso' );?></h3>
174
+				<h3><?php _e('Internal Settings', 'lasso'); ?></h3>
175 175
 				<div class="lasso-editor-settings--option-wrap">
176 176
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
177
-						<label><?php _e( 'Article Class', 'lasso' );?></label>
178
-						<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>
179
-						<input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr( $article_object );?>" placeholder=".entry-content">
177
+						<label><?php _e('Article Class', 'lasso'); ?></label>
178
+						<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>
179
+						<input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr($article_object); ?>" placeholder=".entry-content">
180 180
 					</div>
181 181
 				
182 182
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
183
-						<label><?php _e( 'Featured Image Class', 'lasso' );?></label>
184
-						<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>
185
-						<input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr( $featImgClass );?>" placeholder=".entry-content">
183
+						<label><?php _e('Featured Image Class', 'lasso'); ?></label>
184
+						<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>
185
+						<input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr($featImgClass); ?>" placeholder=".entry-content">
186 186
 					</div>
187 187
 				
188 188
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
189
-						<label><?php _e( 'Article Title Class', 'lasso' );?></label>
190
-						<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>
191
-						<input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr( $titleClass );?>" placeholder=".entry-content">
189
+						<label><?php _e('Article Title Class', 'lasso'); ?></label>
190
+						<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>
191
+						<input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr($titleClass); ?>" placeholder=".entry-content">
192 192
 					</div>
193 193
 				
194 194
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
195
-						<label><?php _e( 'Ignored Items to Save', 'lasso' );?></label>
196
-						<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>
197
-						<textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNoSave );?></textarea>
195
+						<label><?php _e('Ignored Items to Save', 'lasso'); ?></label>
196
+						<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>
197
+						<textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNoSave); ?></textarea>
198 198
 					</div>
199 199
 				
200 200
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
201
-						<label><?php _e( 'Read Only Items', 'lasso' );?></label>
202
-						<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>
203
-						<textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNonEditable );?></textarea>
201
+						<label><?php _e('Read Only Items', 'lasso'); ?></label>
202
+						<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>
203
+						<textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNonEditable); ?></textarea>
204 204
 					</div>
205 205
 				
206 206
 					<div class="lasso-editor-settings--option-inner" >
207
-						<input type="checkbox" class="checkbox" name="lasso_editor[show_ignored_items]" id="lasso_editor[show_ignored_items]" <?php echo checked( $show_ignored_items, 'on' );?> >
208
-						<label for="lasso_editor[show_ignored_items]"> <?php _e( 'Show Ignored Items', 'lasso' );?></label>
209
-						<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>
207
+						<input type="checkbox" class="checkbox" name="lasso_editor[show_ignored_items]" id="lasso_editor[show_ignored_items]" <?php echo checked($show_ignored_items, 'on'); ?> >
208
+						<label for="lasso_editor[show_ignored_items]"> <?php _e('Show Ignored Items', 'lasso'); ?></label>
209
+						<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>
210 210
 					</div>
211 211
 				</div>
212 212
 
213
-				<h3><?php _e( 'Editor UI', 'lasso' );?></h3>
213
+				<h3><?php _e('Editor UI', 'lasso'); ?></h3>
214 214
 				<div class="lasso-editor-settings--option-wrap">
215 215
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
216
-						<input type="checkbox" class="checkbox" name="lasso_editor[use_old_ui]" id="lasso_editor_use_old_ui" <?php echo checked( $use_old_ui, 'on' );?> >
217
-						<label for="lasso_editor[use_old_ui]"><?php _e( 'Use the Old Toolbar', 'lasso' );?></label>
218
-						<span class="lasso--setting-description"><?php _e( 'Use this option to disable the new color options and use the pre-1.0 toolbar.', 'lasso' );?></span>
216
+						<input type="checkbox" class="checkbox" name="lasso_editor[use_old_ui]" id="lasso_editor_use_old_ui" <?php echo checked($use_old_ui, 'on'); ?> >
217
+						<label for="lasso_editor[use_old_ui]"><?php _e('Use the Old Toolbar', 'lasso'); ?></label>
218
+						<span class="lasso--setting-description"><?php _e('Use this option to disable the new color options and use the pre-1.0 toolbar.', 'lasso'); ?></span>
219 219
 					</div>
220 220
 				    <div id="lasso-editor-settings--colors">
221 221
 					<?php
222
-					self::create_section_for_color_picker('button-color1', _e( 'Editor Bar Color Top', 'lasso' ), '#0000ff');
223
-					self::create_section_for_color_picker('button-color2', _e( 'Editor Bar Color Bottom', 'lasso' ), '#000030');
224
-					self::create_section_for_color_picker('dialog-color', _e( 'Dialog Color', 'lasso' ), '#000055');
225
-					self::create_section_for_color_picker('text-color', _e( 'Icon/Text Color', 'lasso' ), '#ffffff');
222
+					self::create_section_for_color_picker('button-color1', _e('Editor Bar Color Top', 'lasso'), '#0000ff');
223
+					self::create_section_for_color_picker('button-color2', _e('Editor Bar Color Bottom', 'lasso'), '#000030');
224
+					self::create_section_for_color_picker('dialog-color', _e('Dialog Color', 'lasso'), '#000055');
225
+					self::create_section_for_color_picker('text-color', _e('Icon/Text Color', 'lasso'), '#ffffff');
226 226
 					?>
227
-					<button type="button" id="lasso-editor-settings--default-colors" ><?php _e( 'Default Colors', 'lasso' );?></button>
227
+					<button type="button" id="lasso-editor-settings--default-colors" ><?php _e('Default Colors', 'lasso'); ?></button>
228 228
 				    <div style="height:50px;"></div>
229 229
 					</div>
230 230
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
231
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked( $toolbar_headings, 'on' );?> >
232
-						<label for="lasso_editor[toolbar_headings]"><?php _e( 'Enable H2 and H3 Buttons', 'lasso' );?></label>
233
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set H2 and H3 settings.', 'lasso' );?></span>
231
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked($toolbar_headings, 'on'); ?> >
232
+						<label for="lasso_editor[toolbar_headings]"><?php _e('Enable H2 and H3 Buttons', 'lasso'); ?></label>
233
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set H2 and H3 settings.', 'lasso'); ?></span>
234 234
 
235 235
 					</div>
236 236
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
237
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings_h4]" id="lasso_editor[toolbar_headings_h4]" <?php echo checked( $toolbar_headings_h4, 'on' );?> >
238
-						<label for="lasso_editor[toolbar_headings_h4]"><?php _e( 'Enable H4/H5/H6 Buttons', 'lasso' );?></label>
239
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set H4/H5/H6 settings.', 'lasso' );?></span>
237
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings_h4]" id="lasso_editor[toolbar_headings_h4]" <?php echo checked($toolbar_headings_h4, 'on'); ?> >
238
+						<label for="lasso_editor[toolbar_headings_h4]"><?php _e('Enable H4/H5/H6 Buttons', 'lasso'); ?></label>
239
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set H4/H5/H6 settings.', 'lasso'); ?></span>
240 240
 
241 241
 					</div>
242 242
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
243
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked( $toolbar_show_color, 'on' );?> >
244
-						<label for="lasso_editor[toolbar_show_color]"><?php _e( 'Enable Text Color Buttons', 'lasso' );?></label>
245
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set text colors.', 'lasso' );?></span>
243
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked($toolbar_show_color, 'on'); ?> >
244
+						<label for="lasso_editor[toolbar_show_color]"><?php _e('Enable Text Color Buttons', 'lasso'); ?></label>
245
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set text colors.', 'lasso'); ?></span>
246 246
 
247 247
 					</div>
248 248
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
249
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked( $toolbar_show_alignment, 'on' );?> >
250
-						<label for="lasso_editor[toolbar_show_alignment]"><?php _e( 'Enable Text Align Buttons', 'lasso' );?></label>
251
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set text alignment.', 'lasso' );?></span>
249
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked($toolbar_show_alignment, 'on'); ?> >
250
+						<label for="lasso_editor[toolbar_show_alignment]"><?php _e('Enable Text Align Buttons', 'lasso'); ?></label>
251
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set text alignment.', 'lasso'); ?></span>
252 252
 
253 253
 					</div>
254 254
 					
255 255
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
256
-						<input type="checkbox" class="checkbox" name="lasso_editor[links_editable]" id="lasso_editor[links_editable]" <?php echo checked( $links_editable, 'on' );?> >
257
-						<label for="lasso_editor[links_editable]"><?php _e( 'Make links editable under the Editing Mode', 'lasso' );?></label>
258
-						<span class="lasso--setting-description"><?php _e( 'Make links editable under the Editing Mode. Turning this on will make the links non-clickable while editing.', 'lasso' );?></span>
256
+						<input type="checkbox" class="checkbox" name="lasso_editor[links_editable]" id="lasso_editor[links_editable]" <?php echo checked($links_editable, 'on'); ?> >
257
+						<label for="lasso_editor[links_editable]"><?php _e('Make links editable under the Editing Mode', 'lasso'); ?></label>
258
+						<span class="lasso--setting-description"><?php _e('Make links editable under the Editing Mode. Turning this on will make the links non-clickable while editing.', 'lasso'); ?></span>
259 259
 
260 260
 					</div>
261 261
 					<div class="lasso-editor-settings--option-inner">
262
-					    <label for="lasso_editor[insert_comp_ui]"> <?php _e( 'Insert Component UI', 'lasso' );?></label>
263
-						<span class="lasso--setting-description"><?php _e( 'UI mechanism to insert components', 'lasso' );?></span>
262
+					    <label for="lasso_editor[insert_comp_ui]"> <?php _e('Insert Component UI', 'lasso'); ?></label>
263
+						<span class="lasso--setting-description"><?php _e('UI mechanism to insert components', 'lasso'); ?></span>
264 264
 						<div class="lasso-editor-settings--option-inner" style="border:none;">
265
-					       <input type="radio" name="lasso_editor[insert_comp_ui]" value='drag' <?php echo checked( $insert_comp_ui, 'drag' );?>> <?php _e( 'Drag and Drop', 'lasso' );?>
265
+					       <input type="radio" name="lasso_editor[insert_comp_ui]" value='drag' <?php echo checked($insert_comp_ui, 'drag'); ?>> <?php _e('Drag and Drop', 'lasso'); ?>
266 266
 						</div>
267 267
 						<div class="lasso-editor-settings--option-inner" style="border:none;">
268
-						<input type="radio" name="lasso_editor[insert_comp_ui]" value="click" <?php echo checked( $insert_comp_ui, 'click' );?>> <?php _e( 'Click', 'lasso' );?>
268
+						<input type="radio" name="lasso_editor[insert_comp_ui]" value="click" <?php echo checked($insert_comp_ui, 'click'); ?>> <?php _e('Click', 'lasso'); ?>
269 269
 						</div>
270 270
 						<div class="lasso-editor-settings--option-inner" style="border:none;">
271
-						<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' );?>
271
+						<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'); ?>
272 272
 						</div>
273 273
 					</div>
274 274
 				</div>
@@ -277,82 +277,82 @@  discard block
 block discarded – undo
277 277
 				
278 278
 				
279 279
 
280
-				<h3><?php _e( 'Post Settings UI', 'lasso' );?></h3>
280
+				<h3><?php _e('Post Settings UI', 'lasso'); ?></h3>
281 281
 				<div class="lasso-editor-settings--option-wrap"  >
282 282
 					<div class="lasso-editor-settings--option-inner" style="border:none">
283
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked( $post_settings_disabled, 'on' );?> >
284
-						<label for="lasso_editor[post_settings_disabled]"> <?php _e( 'Disable Post Settings', 'lasso' );?></label>
285
-						<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>
283
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked($post_settings_disabled, 'on'); ?> >
284
+						<label for="lasso_editor[post_settings_disabled]"> <?php _e('Disable Post Settings', 'lasso'); ?></label>
285
+						<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>
286 286
 					</div>
287 287
 					
288 288
 					<div class="lasso-editor-settings--option-inner" style="border:none">
289
-						<input type="checkbox" class="checkbox" name="lasso_editor[allow_change_date]" id="lasso_editor[allow_change_date]" <?php echo checked( $allow_change_date, 'on' );?> >
290
-						<label for="lasso_editor[allow_change_date]"> <?php _e( 'Allow Changing Post Date', 'lasso' );?></label>
291
-						<span class="lasso--setting-description"><?php _e( 'Add the date selector to change the post\'s date to the Post Setting dialog', 'lasso' );?></span>
289
+						<input type="checkbox" class="checkbox" name="lasso_editor[allow_change_date]" id="lasso_editor[allow_change_date]" <?php echo checked($allow_change_date, 'on'); ?> >
290
+						<label for="lasso_editor[allow_change_date]"> <?php _e('Allow Changing Post Date', 'lasso'); ?></label>
291
+						<span class="lasso--setting-description"><?php _e('Add the date selector to change the post\'s date to the Post Setting dialog', 'lasso'); ?></span>
292 292
 					</div>
293 293
 					
294 294
 					<div class="lasso-editor-settings--option-inner" style="border:none">
295
-						<input type="checkbox" class="checkbox" name="lasso_editor[allow_new_category]" id="lasso_editor[allow_new_category]" <?php echo checked( $allow_new_category, 'on' );?> >
296
-						<label for="lasso_editor[allow_new_category]"> <?php _e( 'Allow Adding New Category', 'lasso' );?></label>
297
-						<span class="lasso--setting-description"><?php _e( 'Add the user to create new, previously non-existing categories for posts.', 'lasso' );?></span>
295
+						<input type="checkbox" class="checkbox" name="lasso_editor[allow_new_category]" id="lasso_editor[allow_new_category]" <?php echo checked($allow_new_category, 'on'); ?> >
296
+						<label for="lasso_editor[allow_new_category]"> <?php _e('Allow Adding New Category', 'lasso'); ?></label>
297
+						<span class="lasso--setting-description"><?php _e('Add the user to create new, previously non-existing categories for posts.', 'lasso'); ?></span>
298 298
 					</div>
299 299
 				
300 300
 					<div class="lasso-editor-settings--option-inner" >
301
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked( $post_new_disabled, 'on' );?> >
302
-						<label for="lasso_editor[post_adding_disabled]"><?php _e( 'Disable Post Adding', 'lasso' );?></label>
303
-						<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>
301
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked($post_new_disabled, 'on'); ?> >
302
+						<label for="lasso_editor[post_adding_disabled]"><?php _e('Disable Post Adding', 'lasso'); ?></label>
303
+						<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>
304 304
 					</div>
305 305
 					
306 306
 
307 307
 				</div>
308 308
 				
309
-				<h3><?php _e( 'Misc', 'lasso' );?></h3>
309
+				<h3><?php _e('Misc', 'lasso'); ?></h3>
310 310
 				<div class="lasso-editor-settings--option-wrap">
311 311
 					<div class="lasso-editor-settings--option-inner" style="border:none">
312
-						<input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked( $disable_tour, 'on' );?> >
313
-						<label for="lasso_editor[disable_tour]"> <?php _e( 'Do Not Show Tour Dialog', 'lasso' );?></label>
314
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable the tour dialog box for all users.', 'lasso' );?></span>
312
+						<input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked($disable_tour, 'on'); ?> >
313
+						<label for="lasso_editor[disable_tour]"> <?php _e('Do Not Show Tour Dialog', 'lasso'); ?></label>
314
+						<span class="lasso--setting-description"><?php _e('Check this box to disable the tour dialog box for all users.', 'lasso'); ?></span>
315 315
 					</div>
316 316
 
317 317
 					<div class="lasso-editor-settings--option-inner" style="border:none">
318
-					    <label for="lasso_editor[bold_tag]"> <?php _e( '"Bold" Tag', 'lasso' );?></label>
319
-						<span class="lasso--setting-description"><?php _e( 'Choose the HTML tag used for the "Bold" style.', 'lasso' );?></span>
320
-					    <input type="radio" name="lasso_editor[bold_tag]" value='b' <?php echo checked( $bold_tag, 'b' );?>> b
321
-						<input type="radio" name="lasso_editor[bold_tag]" value="strong" <?php echo checked( $bold_tag, 'strong' );?>> strong
318
+					    <label for="lasso_editor[bold_tag]"> <?php _e('"Bold" Tag', 'lasso'); ?></label>
319
+						<span class="lasso--setting-description"><?php _e('Choose the HTML tag used for the "Bold" style.', 'lasso'); ?></span>
320
+					    <input type="radio" name="lasso_editor[bold_tag]" value='b' <?php echo checked($bold_tag, 'b'); ?>> b
321
+						<input type="radio" name="lasso_editor[bold_tag]" value="strong" <?php echo checked($bold_tag, 'strong'); ?>> strong
322 322
 					</div>
323 323
 					<div class="lasso-editor-settings--option-inner" >
324
-					    <label for="lasso_editor[i_tag]"> <?php _e( '"Italic" Tag', 'lasso' );?></label>
325
-						<span class="lasso--setting-description"><?php _e( 'Choose the HTML tag used for the "Italic" style.', 'lasso' );?></span>
326
-					    <input type="radio" name="lasso_editor[i_tag]" value='i' <?php echo checked( $i_tag, 'i' );?>> i
327
-						<input type="radio" name="lasso_editor[i_tag]" value="em" <?php echo checked( $i_tag, 'em' );?>> em
324
+					    <label for="lasso_editor[i_tag]"> <?php _e('"Italic" Tag', 'lasso'); ?></label>
325
+						<span class="lasso--setting-description"><?php _e('Choose the HTML tag used for the "Italic" style.', 'lasso'); ?></span>
326
+					    <input type="radio" name="lasso_editor[i_tag]" value='i' <?php echo checked($i_tag, 'i'); ?>> i
327
+						<input type="radio" name="lasso_editor[i_tag]" value="em" <?php echo checked($i_tag, 'em'); ?>> em
328 328
 					</div>
329 329
 				</div>
330 330
 
331
-				<h3><?php _e( 'Advanced', 'lasso' );?></h3>
331
+				<h3><?php _e('Advanced', 'lasso'); ?></h3>
332 332
 				<div class="lasso-editor-settings--option-wrap ">
333 333
 					<div class="lasso-editor-settings--option-inner" style="border:none">
334
-						<input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked( $shortcodify_disabled, 'on' );?> >
335
-						<label for="lasso_editor[shortcodify_disabled]"><?php _e( 'Disable Aesop Component Conversion', 'lasso' );?></label>
336
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso' );?></span>
334
+						<input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked($shortcodify_disabled, 'on'); ?> >
335
+						<label for="lasso_editor[shortcodify_disabled]"><?php _e('Disable Aesop Component Conversion', 'lasso'); ?></label>
336
+						<span class="lasso--setting-description"><?php _e('Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso'); ?></span>
337 337
 					</div>
338 338
 				
339 339
 					<div class="lasso-editor-settings--option-inner" style="border:none">
340
-						<input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked( $enable_autosave, 'on' );?> >
341
-						<label for="lasso_editor[enable_autosave]"><?php _e( 'Enable Auto Save', 'lasso' );?></label>
342
-						<span class="lasso--setting-description"><?php _e( 'Check this box to enable auto save.', 'lasso' );?></span>
340
+						<input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked($enable_autosave, 'on'); ?> >
341
+						<label for="lasso_editor[enable_autosave]"><?php _e('Enable Auto Save', 'lasso'); ?></label>
342
+						<span class="lasso--setting-description"><?php _e('Check this box to enable auto save.', 'lasso'); ?></span>
343 343
 					</div>
344 344
 				
345 345
 					<div class="lasso-editor-settings--option-inner" style="border:none">
346
-						<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' );?> >
347
-						<label for="lasso_editor[post_save_disabled]"><?php _e( 'Disable Post Saving', 'lasso' );?></label>
348
-						<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>
346
+						<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'); ?> >
347
+						<label for="lasso_editor[post_save_disabled]"><?php _e('Disable Post Saving', 'lasso'); ?></label>
348
+						<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>
349 349
 
350 350
 					</div>
351 351
 				
352 352
 					<div class="lasso-editor-settings--option-inner">
353
-						<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' );?> >
354
-						<label for="lasso_editor[save_using_rest_disabled]"><?php _e( "Don't Use REST API to Save", 'lasso' );?></label>
355
-						<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>
353
+						<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'); ?> >
354
+						<label for="lasso_editor[save_using_rest_disabled]"><?php _e("Don't Use REST API to Save", 'lasso'); ?></label>
355
+						<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>
356 356
 
357 357
 					</div>
358 358
 				</div>
@@ -362,11 +362,11 @@  discard block
 block discarded – undo
362 362
 
363 363
 				<div class="lasso-editor-settings--submit">
364 364
 				    <input type="hidden" name="action" value="lasso-editor-settings" />
365
-				    <input type="submit" class="button-primary" value="<?php esc_attr_e( 'Save Settings', 'lasso' );?>" />
366
-					<?php wp_nonce_field( 'nonce', 'lasso_editor_settings' ); ?>
365
+				    <input type="submit" class="button-primary" value="<?php esc_attr_e('Save Settings', 'lasso'); ?>" />
366
+					<?php wp_nonce_field('nonce', 'lasso_editor_settings'); ?>
367 367
 				</div>
368 368
 				
369
-				<?php do_action('lasso_settings_after');?>
369
+				<?php do_action('lasso_settings_after'); ?>
370 370
 			</form>
371 371
 
372 372
 		</div><?php
Please login to merge, or discard this patch.
public/includes/assets.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -20,10 +20,10 @@  discard block
 block discarded – undo
20 20
 	
21 21
 		global $post;
22 22
 		if ( lasso_user_can('edit_posts') && 
23
-		     !( function_exists( 'is_gutenberg_page' ) && has_blocks( $post->post_content) )) {// bail if the post has Gutenberg bloc
23
+			 !( function_exists( 'is_gutenberg_page' ) && has_blocks( $post->post_content) )) {// bail if the post has Gutenberg bloc
24 24
 			
25 25
 			/**    Returns the time offset from UTC
26
-			*/
26
+			 */
27 27
 			function get_UTC_offset() {
28 28
 				$timezone_string = get_option( 'timezone_string' );
29 29
 				if (empty( $timezone_string ) ) {
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
 			wp_enqueue_style('lasso-style', LASSO_URL.'/public/assets/css/lasso.css', LASSO_VERSION, true);
40 40
 
41
-            //don't load autocomplete if it's a stockholm theme
41
+			//don't load autocomplete if it's a stockholm theme
42 42
 			$themename  	= wp_get_theme()->get('Name');
43 43
 			if ($themename !='Stockholm' ) {
44 44
 				wp_enqueue_script('jquery-ui-autocomplete');
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 			$tz_offset = get_UTC_offset();
110 110
 			$post_date = get_the_time('U', $postid);
111 111
 			$time = (time()+$tz_offset);
112
-            $delta = $time - $post_date;
112
+			$delta = $time - $post_date;
113 113
 
114 114
 			$strings = array(
115 115
 				'save' 				=> __('Save','lasso'),
@@ -161,11 +161,11 @@  discard block
 block discarded – undo
161 161
 			$gallery_nonce = wp_create_nonce( $gallery_nonce_action );
162 162
 			
163 163
 			
164
-            if ($allow_change_date) {
165
-			    $permalink = get_site_url().'/?p='.$postid;
166
-            } else {
167
-                $permalink = get_permalink($postid);
168
-            }
164
+			if ($allow_change_date) {
165
+				$permalink = get_site_url().'/?p='.$postid;
166
+			} else {
167
+				$permalink = get_permalink($postid);
168
+			}
169 169
 			
170 170
 			// rest api
171 171
 			$rest_nonce = '';
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 				'customFields'      => $custom_fields,
258 258
 				'clickToInsert'     => ($insert_comp_ui =='click'),
259 259
 				'buttonOnEmptyP'     => ($insert_comp_ui =='mediumcom'),      // auto show a button to insert components on an empty paragraph      
260
-                'rtl'               => is_rtl(),				
260
+				'rtl'               => is_rtl(),				
261 261
 				'skipToEdit'        =>( $delta < 10 && $delta >=0 ), // if it's a new post, skip to edit mode
262 262
 				'links_editable'    => $links_editable
263 263
 			);
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 			
268 268
 			
269 269
 			if (!$using_restapiv2) {
270
-               // enqueue REST API V1
270
+			   // enqueue REST API V1
271 271
 			   wp_enqueue_script( 'wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
272 272
 			   $settings = array( 'root' => home_url( $home_url ), 'nonce' => wp_create_nonce( 'wp_json' ) );
273 273
 			   wp_localize_script( 'wp-api-js', 'WP_API_Settings', $settings );
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 			if ($show_color) {
284 284
 				wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api','iris'), LASSO_VERSION, true);
285 285
 			} else {
286
-			    wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
286
+				wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
287 287
 			}
288 288
 			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects ) );
289 289
 
Please login to merge, or discard this patch.
Spacing   +91 added lines, -91 removed lines patch added patch discarded remove patch
@@ -10,24 +10,24 @@  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 21
 		global $post;
22
-		if ( lasso_user_can('edit_posts') && 
23
-		     !( function_exists( 'is_gutenberg_page' ) && has_blocks( $post->post_content) )) {// bail if the post has Gutenberg bloc
22
+		if (lasso_user_can('edit_posts') && 
23
+		     !(function_exists('is_gutenberg_page') && has_blocks($post->post_content))) {// bail if the post has Gutenberg bloc
24 24
 			
25 25
 			/**    Returns the time offset from UTC
26 26
 			*/
27 27
 			function get_UTC_offset() {
28
-				$timezone_string = get_option( 'timezone_string' );
29
-				if (empty( $timezone_string ) ) {
30
-					return get_option('gmt_offset')*3600;
28
+				$timezone_string = get_option('timezone_string');
29
+				if (empty($timezone_string)) {
30
+					return get_option('gmt_offset') * 3600;
31 31
 				}
32 32
 				
33 33
 				$origin_dtz = new \DateTimeZone($timezone_string);				
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
 			wp_enqueue_style('lasso-style', LASSO_URL.'/public/assets/css/lasso.css', LASSO_VERSION, true);
40 40
 
41 41
             //don't load autocomplete if it's a stockholm theme
42
-			$themename  	= wp_get_theme()->get('Name');
43
-			if ($themename !='Stockholm' ) {
42
+			$themename = wp_get_theme()->get('Name');
43
+			if ($themename != 'Stockholm') {
44 44
 				wp_enqueue_script('jquery-ui-autocomplete');
45 45
 			}
46 46
 			wp_enqueue_script('jquery-ui-draggable');
@@ -53,27 +53,27 @@  discard block
 block discarded – undo
53 53
 			// url for json api
54 54
 			$home_url = function_exists('json_get_url_prefix') ? json_get_url_prefix() : false;
55 55
 
56
-			$article_object 	= lasso_editor_get_option('article_class','lasso_editor');
56
+			$article_object 	= lasso_editor_get_option('article_class', 'lasso_editor');
57 57
 
58
-			$article_object 	= empty( $article_object ) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object;
58
+			$article_object 	= empty($article_object) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object;
59 59
 
60
-			$featImgClass 		= lasso_editor_get_option('featimg_class','lasso_editor');
61
-			if (empty( $featImgClass )) {
60
+			$featImgClass = lasso_editor_get_option('featimg_class', 'lasso_editor');
61
+			if (empty($featImgClass)) {
62 62
 				$featImgClass = lasso_get_supported_theme_featured_image_class();
63 63
 			}
64
-			$titleClass 		= lasso_editor_get_option('title_class','lasso_editor');
65
-			if (empty( $titleClass )) {
64
+			$titleClass = lasso_editor_get_option('title_class', 'lasso_editor');
65
+			if (empty($titleClass)) {
66 66
 				$titleClass = lasso_get_supported_theme_title_class();
67 67
 			}
68
-			$toolbar_headings  	= lasso_editor_get_option('toolbar_headings', 'lasso_editor');
69
-			$toolbar_headings_h4  	= lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
68
+			$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
69
+			$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
70 70
 			$objectsNoSave  	= lasso_editor_get_option('dont_save', 'lasso_editor');
71
-			$objectsNonEditable  	= lasso_editor_get_option('non_editable', 'lasso_editor');
71
+			$objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor');
72 72
 			$disableRESTSave = lasso_editor_get_option('save_using_rest_disabled', 'lasso_editor');
73
-			$save_to_post_disabled  = lasso_editor_get_option( 'post_save_disabled', 'lasso_editor' );
73
+			$save_to_post_disabled = lasso_editor_get_option('post_save_disabled', 'lasso_editor');
74 74
 			
75
-			$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor','b');
76
-			$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor','i');
75
+			$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor', 'b');
76
+			$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor', 'i');
77 77
 
78 78
 			
79 79
 			//text alignement
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
 			
91 91
 			if ($show_color) {
92 92
 				//color picker
93
-				wp_enqueue_style( 'wp-color-picker' );
94
-				wp_enqueue_script( 'iris', admin_url( 'js/iris.min.js' ), array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), false, 1 );
93
+				wp_enqueue_style('wp-color-picker');
94
+				wp_enqueue_script('iris', admin_url('js/iris.min.js'), array('jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch'), false, 1);
95 95
 			}
96 96
 			
97 97
 			// click to insert components, not drag and drop
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 			
101 101
 			// custom fields
102 102
 			
103
-			$custom_fields = apply_filters( 'editus_custom_fields', null ); //array('testFieldName' => '#field1');
103
+			$custom_fields = apply_filters('editus_custom_fields', null); //array('testFieldName' => '#field1');
104 104
 
105 105
 
106 106
 
@@ -108,57 +108,57 @@  discard block
 block discarded – undo
108 108
 			$postid 			= get_the_ID();
109 109
 			$tz_offset = get_UTC_offset();
110 110
 			$post_date = get_the_time('U', $postid);
111
-			$time = (time()+$tz_offset);
111
+			$time = (time() + $tz_offset);
112 112
             $delta = $time - $post_date;
113 113
 
114 114
 			$strings = array(
115
-				'save' 				=> __('Save','lasso'),
116
-				'selectText'	  	=> __('Please Select Text First.','lasso'),
117
-				'cancel' 			=> __('Cancel','lasso'),
118
-				'exiteditor' 		=> __('Exit Editor','lasso'),
119
-				'saving' 			=> __('Saving...','lasso'),
120
-				'saved'				=> __('Saved!','lasso'),
121
-				'adding' 			=> __('Adding...','lasso'),
122
-				'added'				=> __('Added!','lasso'),
123
-				'loading' 			=> __('Loading...','lasso'),
124
-				'loadMore'			=> __('Load More','lasso'),
125
-				'close'			=> __('Close','lasso'),
126
-				'noPostsFound'		=> __('No more posts found','lasso'),
127
-				'fetchFail'	    	=> __('Fetching failed.','lasso'),
128
-				'galleryCreated' 	=> __('Gallery Created!','lasso'),
129
-				'galleryUpdated' 	=> __('Gallery Updated!','lasso'),
130
-				'justWrite'			=> __('Just write...','lasso'),
131
-				'chooseImage'		=> __('Choose an image','lasso'),
132
-				'updateImage'		=> __('Update Image','lasso'),
133
-				'insertImage'		=> __('Insert Image','lasso'),
134
-				'selectImage'		=> __('Select Image','lasso'),
135
-				'removeFeatImg'     => __('Remove featured image?','lasso'),
136
-				'updateSelectedImg' => __('Update Selected Image','lasso'),
137
-				'chooseImages'		=> __('Choose images','lasso'),
138
-				'editImage'			=> __('Edit Image','lasso'),
139
-				'addImages'			=> __('Add Images','lasso'),
140
-				'addNewGallery'		=> __('Add New Gallery','lasso'),
141
-				'selectGallery'		=> __('Select Editus Gallery Image','lasso'),
142
-				'useSelectedImages' => __('Use Selected Images','lasso'),
143
-				'publishPost'		=> __('Publish Post?','lasso'),
144
-				'publishYes'		=> __('Yes, publish it!','lasso'),
145
-				'deletePost'		=> __('Trash Post?','lasso'),
146
-				'deleteYes'			=> __('Yes, trash it!','lasso'),
147
-				'warning'			=> __('Oh snap!','laso'),
148
-				'cancelText'		=> __('O.K. got it!','lasso'),
149
-				'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'),
115
+				'save' 				=> __('Save', 'lasso'),
116
+				'selectText'	  	=> __('Please Select Text First.', 'lasso'),
117
+				'cancel' 			=> __('Cancel', 'lasso'),
118
+				'exiteditor' 		=> __('Exit Editor', 'lasso'),
119
+				'saving' 			=> __('Saving...', 'lasso'),
120
+				'saved'				=> __('Saved!', 'lasso'),
121
+				'adding' 			=> __('Adding...', 'lasso'),
122
+				'added'				=> __('Added!', 'lasso'),
123
+				'loading' 			=> __('Loading...', 'lasso'),
124
+				'loadMore'			=> __('Load More', 'lasso'),
125
+				'close'			=> __('Close', 'lasso'),
126
+				'noPostsFound'		=> __('No more posts found', 'lasso'),
127
+				'fetchFail'	    	=> __('Fetching failed.', 'lasso'),
128
+				'galleryCreated' 	=> __('Gallery Created!', 'lasso'),
129
+				'galleryUpdated' 	=> __('Gallery Updated!', 'lasso'),
130
+				'justWrite'			=> __('Just write...', 'lasso'),
131
+				'chooseImage'		=> __('Choose an image', 'lasso'),
132
+				'updateImage'		=> __('Update Image', 'lasso'),
133
+				'insertImage'		=> __('Insert Image', 'lasso'),
134
+				'selectImage'		=> __('Select Image', 'lasso'),
135
+				'removeFeatImg'     => __('Remove featured image?', 'lasso'),
136
+				'updateSelectedImg' => __('Update Selected Image', 'lasso'),
137
+				'chooseImages'		=> __('Choose images', 'lasso'),
138
+				'editImage'			=> __('Edit Image', 'lasso'),
139
+				'addImages'			=> __('Add Images', 'lasso'),
140
+				'addNewGallery'		=> __('Add New Gallery', 'lasso'),
141
+				'selectGallery'		=> __('Select Editus Gallery Image', 'lasso'),
142
+				'useSelectedImages' => __('Use Selected Images', 'lasso'),
143
+				'publishPost'		=> __('Publish Post?', 'lasso'),
144
+				'publishYes'		=> __('Yes, publish it!', 'lasso'),
145
+				'deletePost'		=> __('Trash Post?', 'lasso'),
146
+				'deleteYes'			=> __('Yes, trash it!', 'lasso'),
147
+				'warning'			=> __('Oh snap!', 'laso'),
148
+				'cancelText'		=> __('O.K. got it!', 'lasso'),
149
+				'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'),
150 150
 				'missingConfirm'	=> __('Update Settings', 'lasso'),
151
-				'helperText'		=> __('one more letter','lasso'),
151
+				'helperText'		=> __('one more letter', 'lasso'),
152 152
 				'editingBackup'  	=> __('You are currently editing a backup copy of this post.'),
153 153
 				
154 154
 				
155 155
 			);
156 156
 
157
-			$api_url = trailingslashit( home_url() ) . 'lasso-internal-api';
157
+			$api_url = trailingslashit(home_url()).'lasso-internal-api';
158 158
 
159 159
 			$gallery_class = new gallery();
160 160
 			$gallery_nonce_action = $gallery_class->nonce_action;
161
-			$gallery_nonce = wp_create_nonce( $gallery_nonce_action );
161
+			$gallery_nonce = wp_create_nonce($gallery_nonce_action);
162 162
 			
163 163
 			
164 164
             if ($allow_change_date) {
@@ -173,13 +173,13 @@  discard block
 block discarded – undo
173 173
 			  
174 174
 			if (function_exists('rest_url')) {
175 175
 				//$rest_root = esc_url_raw( rest_url());
176
-				$rest_nonce = wp_create_nonce( 'wp_rest' );
177
-				$settings = array( 'root' => $rest_root, 'nonce' => $rest_nonce );
178
-				wp_enqueue_script( 'wp-api', '', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
179
-				wp_localize_script( 'wp-api', 'wpApiSettings', $settings );
180
-				wp_localize_script( 'wp-api', 'WP_API_Settings', $settings );
176
+				$rest_nonce = wp_create_nonce('wp_rest');
177
+				$settings = array('root' => $rest_root, 'nonce' => $rest_nonce);
178
+				wp_enqueue_script('wp-api', '', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true);
179
+				wp_localize_script('wp-api', 'wpApiSettings', $settings);
180
+				wp_localize_script('wp-api', 'WP_API_Settings', $settings);
181 181
 				
182
-				if ( class_exists( 'WP_REST_Controller' )) {
182
+				if (class_exists('WP_REST_Controller')) {
183 183
 					// we are using REST API V2
184 184
 					$using_restapiv2 = true;
185 185
 				}
@@ -187,8 +187,8 @@  discard block
 block discarded – undo
187 187
 
188 188
 			// localized objects
189 189
 			$objects = array(
190
-				'ajaxurl' 			=> esc_url( $api_url ),
191
-				'ajaxurl2' 			=> esc_url( admin_url( 'admin-ajax.php' )),
190
+				'ajaxurl' 			=> esc_url($api_url),
191
+				'ajaxurl2' 			=> esc_url(admin_url('admin-ajax.php')),
192 192
 				'rest_root'         => $rest_root,
193 193
 				'rest_nonce'        => $rest_nonce,
194 194
 				'editor' 			=> 'lasso--content', // ID of editable content (without #) DONT CHANGE
@@ -196,13 +196,13 @@  discard block
 block discarded – undo
196 196
 				'featImgClass'		=> $featImgClass,
197 197
 				'titleClass'		=> $titleClass,
198 198
 				'strings'			=> $strings,
199
-				'settingsLink'		=> function_exists('is_multisite') && is_multisite() ? network_admin_url( 'settings.php?page=lasso-editor' ) : admin_url( 'admin.php?page=lasso-editor-settings' ),
200
-				'post_status'		=> get_post_status( $postid ),
199
+				'settingsLink'		=> function_exists('is_multisite') && is_multisite() ? network_admin_url('settings.php?page=lasso-editor') : admin_url('admin.php?page=lasso-editor-settings'),
200
+				'post_status'		=> get_post_status($postid),
201 201
 				'postid'			=> $postid,
202 202
 				'permalink'			=> $permalink,
203 203
 				'edit_others_pages'	=> current_user_can('edit_others_pages') ? true : false,
204 204
 				'edit_others_posts'	=> current_user_can('edit_others_posts') ? true : false,
205
-				'userCanEdit'		=> current_user_can('edit_post', $postid ),
205
+				'userCanEdit'		=> current_user_can('edit_post', $postid),
206 206
 				'can_publish'		=> is_page() ? current_user_can('publish_pages') : current_user_can('publish_posts'),
207 207
 				//'can_publish_posts'	=> current_user_can('publish_posts'),
208 208
 				//'can_publish_pages'	=> current_user_can('publish_pages'),
@@ -238,27 +238,27 @@  discard block
 block discarded – undo
238 238
 				'postTags'    		=> lasso_get_objects('tag'),
239 239
 				'noResultsDiv'		=> lasso_editor_empty_results(),
240 240
 				'noRevisionsDiv'	=> lasso_editor_empty_results('revision'),
241
-				'mapTileProvider'   => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider( $postid ) : false,
242
-				'mapLocations'		=> get_post_meta( $postid, 'ase_map_component_locations' ),
243
-				'mapStart'			=> get_post_meta( $postid, 'ase_map_component_start_point', true ),
244
-				'mapZoom'			=> get_post_meta( $postid, 'ase_map_component_zoom', true ),
241
+				'mapTileProvider'   => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider($postid) : false,
242
+				'mapLocations'		=> get_post_meta($postid, 'ase_map_component_locations'),
243
+				'mapStart'			=> get_post_meta($postid, 'ase_map_component_start_point', true),
244
+				'mapZoom'			=> get_post_meta($postid, 'ase_map_component_zoom', true),
245 245
 				'revisionModal' 	=> lasso_editor_revision_modal(),
246 246
 				'isMobile'          => wp_is_mobile(),
247
-				'enableAutoSave'    => lasso_editor_get_option( 'enable_autosave', 'lasso_editor' ),
247
+				'enableAutoSave'    => lasso_editor_get_option('enable_autosave', 'lasso_editor'),
248 248
 				'showColor'         => $show_color,
249 249
 				'showAlignment'     => $show_align,
250 250
 				'showIgnoredItems'  => lasso_editor_get_option('show_ignored_items', 'lasso_editor'),
251 251
 				'restapi2'          => $using_restapiv2,
252 252
 				'saveusingrest'     => $using_restapiv2 && !$disableRESTSave,
253
-				'newObjectContent'  => '<p>'.apply_filters( 'lasso_new_object_content', __( 'Once upon a time...','lasso') ).'</p>',
253
+				'newObjectContent'  => '<p>'.apply_filters('lasso_new_object_content', __('Once upon a time...', 'lasso')).'</p>',
254 254
 				'disableSavePost'   => $save_to_post_disabled,
255 255
 				'boldTag'           => $bold_tag,
256 256
 				'iTag'           	=> $i_tag,
257 257
 				'customFields'      => $custom_fields,
258
-				'clickToInsert'     => ($insert_comp_ui =='click'),
259
-				'buttonOnEmptyP'     => ($insert_comp_ui =='mediumcom'),      // auto show a button to insert components on an empty paragraph      
258
+				'clickToInsert'     => ($insert_comp_ui == 'click'),
259
+				'buttonOnEmptyP'     => ($insert_comp_ui == 'mediumcom'), // auto show a button to insert components on an empty paragraph      
260 260
                 'rtl'               => is_rtl(),				
261
-				'skipToEdit'        =>( $delta < 10 && $delta >=0 ), // if it's a new post, skip to edit mode
261
+				'skipToEdit'        =>($delta < 10 && $delta >= 0), // if it's a new post, skip to edit mode
262 262
 				'links_editable'    => $links_editable
263 263
 			);
264 264
 
@@ -268,9 +268,9 @@  discard block
 block discarded – undo
268 268
 			
269 269
 			if (!$using_restapiv2) {
270 270
                // enqueue REST API V1
271
-			   wp_enqueue_script( 'wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
272
-			   $settings = array( 'root' => home_url( $home_url ), 'nonce' => wp_create_nonce( 'wp_json' ) );
273
-			   wp_localize_script( 'wp-api-js', 'WP_API_Settings', $settings );
271
+			   wp_enqueue_script('wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true);
272
+			   $settings = array('root' => home_url($home_url), 'nonce' => wp_create_nonce('wp_json'));
273
+			   wp_localize_script('wp-api-js', 'WP_API_Settings', $settings);
274 274
 			}
275 275
 			
276 276
 			if ($allow_change_date) {
@@ -279,13 +279,13 @@  discard block
 block discarded – undo
279 279
 				wp_enqueue_style('jquery-ui');
280 280
 			}
281 281
 
282
-			$postfix = ( defined( 'SCRIPT_DEBUG' ) && true === SCRIPT_DEBUG ) ? '' : '.min';
282
+			$postfix = (defined('SCRIPT_DEBUG') && true === SCRIPT_DEBUG) ? '' : '.min';
283 283
 			if ($show_color) {
284
-				wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api','iris'), LASSO_VERSION, true);
284
+				wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api', 'iris'), LASSO_VERSION, true);
285 285
 			} else {
286
-			    wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
286
+			    wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
287 287
 			}
288
-			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects ) );
288
+			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects));
289 289
 
290 290
 
291 291
 		}
Please login to merge, or discard this patch.
public/includes/editor-modules.php 1 patch
Spacing   +247 added lines, -247 removed lines patch added patch discarded remove patch
@@ -11,39 +11,39 @@  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
-		$use_old_ui   = lasso_editor_get_option( 'use_old_ui', 'lasso_editor' );
23
-		$button_color1 = lasso_editor_get_option('button-color1', 'lasso_editor','#0000ff');
24
-		$button_color2 = lasso_editor_get_option('button-color2', 'lasso_editor','#000000');
25
-		$dialog_color = lasso_editor_get_option('dialog-color', 'lasso_editor','#000055');
26
-		$text_color = lasso_editor_get_option('text-color', 'lasso_editor','#ffffff');
21
+		$status = get_post_status(get_the_ID());
22
+		$use_old_ui   = lasso_editor_get_option('use_old_ui', 'lasso_editor');
23
+		$button_color1 = lasso_editor_get_option('button-color1', 'lasso_editor', '#0000ff');
24
+		$button_color2 = lasso_editor_get_option('button-color2', 'lasso_editor', '#000000');
25
+		$dialog_color = lasso_editor_get_option('dialog-color', 'lasso_editor', '#000055');
26
+		$text_color = lasso_editor_get_option('text-color', 'lasso_editor', '#ffffff');
27 27
 		$hover_color1 = lasso_editor_adjustBrightness($button_color1, 50);
28 28
 		$hover_color2 = lasso_editor_adjustBrightness($button_color2, 50);
29 29
 
30 30
 		// let users add custom css classes
31
-		$custom_classes = apply_filters( 'lasso_control_classes', '' );
31
+		$custom_classes = apply_filters('lasso_control_classes', '');
32 32
 
33 33
 		$post_access_class   = '';
34
-		$post_new_disabled   = lasso_editor_get_option( 'post_adding_disabled', 'lasso_editor' );
35
-		$post_settings_disabled = lasso_editor_get_option( 'post_settings_disabled', 'lasso_editor' );
36
-		$shortcodify_disabled = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
34
+		$post_new_disabled   = lasso_editor_get_option('post_adding_disabled', 'lasso_editor');
35
+		$post_settings_disabled = lasso_editor_get_option('post_settings_disabled', 'lasso_editor');
36
+		$shortcodify_disabled = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor');
37 37
 
38 38
 
39 39
 		// CSS class if adding new post objects is disabled
40
-		if ( 'on' == $post_new_disabled ) { $post_access_class = 'lasso--post-new-disabled'; }
40
+		if ('on' == $post_new_disabled) { $post_access_class = 'lasso--post-new-disabled'; }
41 41
 
42 42
 		// CSS class if adjust settings is disabled
43
-		if ( 'on' == $post_settings_disabled ) { $post_access_class = 'lasso--post-settings-disabled'; }
43
+		if ('on' == $post_settings_disabled) { $post_access_class = 'lasso--post-settings-disabled'; }
44 44
 
45 45
 		// CSS class if adding new post objects AND settings are disabled
46
-		if ( 'on' == $post_new_disabled && 'on' == $post_settings_disabled ) { $post_access_class = 'lasso--post-all-disabled'; }
46
+		if ('on' == $post_new_disabled && 'on' == $post_settings_disabled) { $post_access_class = 'lasso--post-all-disabled'; }
47 47
 
48 48
 		// CSS class if shortcodify or (Aesop Shortcode Conversion) is disabled
49 49
 		$sc_saving_class = 'on' == $shortcodify_disabled ? 'shortcodify-disabled' : 'shortcodify-enabled';
@@ -60,29 +60,29 @@  discard block
 block discarded – undo
60 60
 		?>
61 61
 		<style>
62 62
 		.lasso-editor-controls--wrap, #lasso--post-settings2,#lasso--save,#lasso--exit,#lasso--publish {
63
-			background-image: -webkit-linear-gradient(top,<?php echo $button_color1;?> 0,<?php echo $button_color2;?> 100%);
64
-			background-image: -o-linear-gradient(top,<?php echo $button_color1;?> 0,<?php echo $button_color2;?> 100%);
65
-			background-image: linear-gradient(to bottom,<?php echo $button_color1;?> 0,<?php echo $button_color2;?> 100%);
66
-			color: <?php echo $text_color;?>;
63
+			background-image: -webkit-linear-gradient(top,<?php echo $button_color1; ?> 0,<?php echo $button_color2; ?> 100%);
64
+			background-image: -o-linear-gradient(top,<?php echo $button_color1; ?> 0,<?php echo $button_color2; ?> 100%);
65
+			background-image: linear-gradient(to bottom,<?php echo $button_color1; ?> 0,<?php echo $button_color2; ?> 100%);
66
+			color: <?php echo $text_color; ?>;
67 67
 		}
68 68
 		
69 69
 		.lasso--controls__right a:before, #lasso-toolbar--html__footer_desc {
70
-			color: <?php echo $text_color;?> !important;
70
+			color: <?php echo $text_color; ?> !important;
71 71
 		}
72 72
 		
73 73
 		ul.lasso-editor-controls li:hover, #lasso--exit:hover,#lasso--post-settings2:hover,#lasso--publish:hover,#lasso--save:hover {
74
-			background-image: -webkit-linear-gradient(top,<?php echo $hover_color1;?> 0,<?php echo $hover_color2;?> 100%);
75
-			background-image: -o-linear-gradient(top,<?php echo $hover_color1;?> 0,<?php echo $hover_color2;?> 100%);
76
-			background-image: linear-gradient(to bottom,<?php echo $hover_color1;?> 0,<?php echo $hover_color2;?> 100%);
74
+			background-image: -webkit-linear-gradient(top,<?php echo $hover_color1; ?> 0,<?php echo $hover_color2; ?> 100%);
75
+			background-image: -o-linear-gradient(top,<?php echo $hover_color1; ?> 0,<?php echo $hover_color2; ?> 100%);
76
+			background-image: linear-gradient(to bottom,<?php echo $hover_color1; ?> 0,<?php echo $hover_color2; ?> 100%);
77 77
 		}
78 78
 		
79 79
 		.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,
80 80
 		#lasso-toolbar--link.link--drop-up #lasso-toolbar--link__wrap		{
81
-			background: <?php echo $dialog_color;?>;
82
-			color: <?php echo $text_color;?>;
81
+			background: <?php echo $dialog_color; ?>;
82
+			color: <?php echo $text_color; ?>;
83 83
 		}
84 84
 		.sweet-alert p,.lasso--modal__inner label,.lasso--toolbar__inner label {
85
-			color: <?php echo $text_color;?> !important;
85
+			color: <?php echo $text_color; ?> !important;
86 86
 		}
87 87
 		
88 88
 		<?php if (!$is_mobile) { ?>
@@ -112,47 +112,47 @@  discard block
 block discarded – undo
112 112
 		<?php
113 113
 		} 
114 114
 		?>
115
-		<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();?>" >
115
+		<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(); ?>" >
116 116
 
117
-			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class;?> "  <?php echo $mobile_style ?> >
117
+			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class; ?> "  <?php echo $mobile_style ?> >
118 118
 
119
-				<?php do_action( 'lasso_editor_controls_before' );
119
+				<?php do_action('lasso_editor_controls_before');
120 120
 
121
-				if ( $is_capable ) { ?>
121
+				if ($is_capable) { ?>
122 122
 
123
-					<li id="lasso--edit" title="<?php esc_attr_e( 'Edit Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
123
+					<li id="lasso--edit" title="<?php esc_attr_e('Edit Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
124 124
 
125
-					<?php if ( 'off' == $post_settings_disabled || empty( $post_settings_disabled ) ) { ?>
126
-						<li id="lasso--post-settings" title="<?php esc_attr_e( 'Post Settings', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
125
+					<?php if ('off' == $post_settings_disabled || empty($post_settings_disabled)) { ?>
126
+						<li id="lasso--post-settings" title="<?php esc_attr_e('Post Settings', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
127 127
 					<?php }
128 128
 
129 129
 				} ?>
130 130
 
131
-				<li id="lasso--post-all" title="<?php esc_attr_e( 'All Posts', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
131
+				<li id="lasso--post-all" title="<?php esc_attr_e('All Posts', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
132 132
 
133
-				<?php if ( $is_capable && wp_revisions_enabled( $post ) ) { ?>
134
-					<li id="lasso--post-revisions" title="<?php esc_attr_e( 'Revisions', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
133
+				<?php if ($is_capable && wp_revisions_enabled($post)) { ?>
134
+					<li id="lasso--post-revisions" title="<?php esc_attr_e('Revisions', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
135 135
 				<?php } ?>
136 136
 
137
-				<?php if ( ( 'off' == $post_new_disabled || empty( $post_new_disabled ) && lasso_user_can('edit_posts') ) ) { ?>
138
-					<li id="lasso--post-new" title="<?php esc_attr_e( 'Add Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
137
+				<?php if (('off' == $post_new_disabled || empty($post_new_disabled) && lasso_user_can('edit_posts'))) { ?>
138
+					<li id="lasso--post-new" title="<?php esc_attr_e('Add Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
139 139
 				<?php } ?>
140 140
 
141
-				<?php do_action( 'lasso_editor_controls_after' );?>
141
+				<?php do_action('lasso_editor_controls_after'); ?>
142 142
 
143 143
 			</ul>
144 144
 
145
-			<?php if ( is_singular() && !$is_mobile ) { ?>
145
+			<?php if (is_singular() && !$is_mobile) { ?>
146 146
 
147
-				<div class="lasso--controls__right" data-posttype="<?php echo get_post_type( get_the_ID() );?>" data-status="<?php echo $status;?>">
147
+				<div class="lasso--controls__right" data-posttype="<?php echo get_post_type(get_the_ID()); ?>" data-status="<?php echo $status; ?>">
148 148
 				
149
-				<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>
149
+				<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>
150 150
 
151 151
 
152
-					<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>
152
+					<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>
153 153
 
154
-					<?php if ( ('draft' == $status ) || ('pending' == $status && $can_publish) ) { ?>
155
-						<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>
154
+					<?php if (('draft' == $status) || ('pending' == $status && $can_publish)) { ?>
155
+						<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>
156 156
 					<?php } ?>
157 157
 
158 158
 				</div>
@@ -177,9 +177,9 @@  discard block
 block discarded – undo
177 177
 
178 178
 
179 179
 	// let users add custom css classes
180
-	$custom_classes = apply_filters( 'lasso_sidebar_classes', '' );
180
+	$custom_classes = apply_filters('lasso_sidebar_classes', '');
181 181
 	?>
182
-	<div id="lasso--sidebar" class="<?php echo sanitize_html_class( $custom_classes );?>" >
182
+	<div id="lasso--sidebar" class="<?php echo sanitize_html_class($custom_classes); ?>" >
183 183
 		<div class="lasso--sidebar__inner">
184 184
 			<div id="lasso--component__settings"></div>
185 185
 		</div>
@@ -201,20 +201,20 @@  discard block
 block discarded – undo
201 201
 	$is_mobile = wp_is_mobile();
202 202
 
203 203
 	// check for lasso story engine and add a class doniting this
204
-	$ase_status = class_exists( 'Aesop_Core' ) || defined( 'LASSO_CUSTOM' ) ? 'ase-active' : 'ase-not-active';
204
+	$ase_status = class_exists('Aesop_Core') || defined('LASSO_CUSTOM') ? 'ase-active' : 'ase-not-active';
205 205
 
206 206
 	// let users add custom css classes
207
-	$custom_classes = apply_filters( 'lasso_toolbar_classes', '' );
207
+	$custom_classes = apply_filters('lasso_toolbar_classes', '');
208 208
 
209 209
 	// are toolbar headings enabled
210
-	$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
211
-	$toolbar_headings_h4      = lasso_editor_get_option( 'toolbar_headings_h4', 'lasso_editor' );
210
+	$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
211
+	$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
212 212
 
213
-	$toolbar_class  = $toolbar_headings ? 'toolbar-extended' : false;
213
+	$toolbar_class = $toolbar_headings ? 'toolbar-extended' : false;
214 214
 	
215 215
 	// mobile styles
216 216
     $mobile_class = $is_mobile ? 'lasso-mobile' : false;
217
-	$mobile_style =$is_mobile ? 'style="bottom:0px;"' : null;
217
+	$mobile_style = $is_mobile ? 'style="bottom:0px;"' : null;
218 218
 	
219 219
 	//show color
220 220
 	$show_color = lasso_editor_get_option('toolbar_show_color', 'lasso_editor');
@@ -222,109 +222,109 @@  discard block
 block discarded – undo
222 222
 	//show alignment
223 223
 	$show_align = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor');
224 224
 	
225
-	$status = get_post_status( get_the_ID() );
225
+	$status = get_post_status(get_the_ID());
226 226
 
227 227
 
228 228
 	?>
229
-	<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 ?>>
230
-		<ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"';}?>>
231
-			<?php do_action( 'lasso_toolbar_components_before' );?>
232
-		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e( 'Bold', 'lasso' );?>"></li>
233
-		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e( 'Underline', 'lasso' );?>"></li>
234
-		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e( 'Italicize', 'lasso' );?>"></li>
235
-		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e( 'Strikethrough', 'lasso' );?>"></li>
236
-			<li id="lasso-toolbar--components" title="<?php esc_attr_e( 'Insert Component', 'lasso' );?>" style="color:#ffffa0;">
229
+	<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 ?>>
230
+		<ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"'; }?>>
231
+			<?php do_action('lasso_toolbar_components_before'); ?>
232
+		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e('Bold', 'lasso'); ?>"></li>
233
+		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e('Underline', 'lasso'); ?>"></li>
234
+		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e('Italicize', 'lasso'); ?>"></li>
235
+		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e('Strikethrough', 'lasso'); ?>"></li>
236
+			<li id="lasso-toolbar--components" title="<?php esc_attr_e('Insert Component', 'lasso'); ?>" style="color:#ffffa0;">
237 237
 			    <ul id="lasso-toolbar--components__list" style="display:none;color:white;">
238
-			    	<?php if ( 'ase-active' == $ase_status ): ?>
239
-						<li data-type="image" title="<?php esc_attr_e( 'Image', 'lasso' );?>" class="lasso-toolbar--component__image"></li>
240
-						<li data-type="character" title="<?php esc_attr_e( 'Character', 'lasso' );?>" class="lasso-toolbar--component__character"></li>
241
-						<li data-type="quote" title="<?php esc_attr_e( 'Quote', 'lasso' );?>"  class="lasso-toolbar--component__quote"></li>
242
-						<li data-type="content" title="<?php esc_attr_e( 'Content', 'lasso' );?>"  class="lasso-toolbar--component__content"></li>
243
-						<li data-type="chapter" title="<?php esc_attr_e( 'Chapter', 'lasso' );?>"  class="lasso-toolbar--component__chapter"></li>
244
-						<li data-type="parallax" title="<?php esc_attr_e( 'Parallax', 'lasso' );?>"  class="lasso-toolbar--component__parallax"></li>
245
-						<li data-type="audio" title="<?php esc_attr_e( 'Audio', 'lasso' );?>"  class="lasso-toolbar--component__audio"></li>
246
-						<li data-type="video" title="<?php esc_attr_e( 'Video', 'lasso' );?>"  class="lasso-toolbar--component__video"></li>
247
-						<li data-type="map" title="<?php esc_attr_e( 'Map', 'lasso' );?>"  class="lasso-toolbar--component__map"></li>
248
-						<li data-type="timeline_stop" title="<?php esc_attr_e( 'Timeline', 'lasso' );?>"  class="lasso-toolbar--component__timeline"></li>
249
-						<li data-type="document" title="<?php esc_attr_e( 'Document', 'lasso' );?>"  class="lasso-toolbar--component__document"></li>
250
-						<li data-type="collection" title="<?php esc_attr_e( 'Collection', 'lasso' );?>"  class="lasso-toolbar--component__collection"></li>
251
-						<li data-type="gallery" title="<?php esc_attr_e( 'Gallery', 'lasso' );?>"  class="lasso-toolbar--component__gallery"></li>
252
-						<?php if ( class_exists ('Aesop_GalleryPop') ) { ?>
253
-						     <li data-type="gallery" title="<?php esc_attr_e( 'Gallery Pop', 'lasso' );?>"  class="lasso-toolbar--component__gallerypop"></li>
238
+			    	<?php if ('ase-active' == $ase_status): ?>
239
+						<li data-type="image" title="<?php esc_attr_e('Image', 'lasso'); ?>" class="lasso-toolbar--component__image"></li>
240
+						<li data-type="character" title="<?php esc_attr_e('Character', 'lasso'); ?>" class="lasso-toolbar--component__character"></li>
241
+						<li data-type="quote" title="<?php esc_attr_e('Quote', 'lasso'); ?>"  class="lasso-toolbar--component__quote"></li>
242
+						<li data-type="content" title="<?php esc_attr_e('Content', 'lasso'); ?>"  class="lasso-toolbar--component__content"></li>
243
+						<li data-type="chapter" title="<?php esc_attr_e('Chapter', 'lasso'); ?>"  class="lasso-toolbar--component__chapter"></li>
244
+						<li data-type="parallax" title="<?php esc_attr_e('Parallax', 'lasso'); ?>"  class="lasso-toolbar--component__parallax"></li>
245
+						<li data-type="audio" title="<?php esc_attr_e('Audio', 'lasso'); ?>"  class="lasso-toolbar--component__audio"></li>
246
+						<li data-type="video" title="<?php esc_attr_e('Video', 'lasso'); ?>"  class="lasso-toolbar--component__video"></li>
247
+						<li data-type="map" title="<?php esc_attr_e('Map', 'lasso'); ?>"  class="lasso-toolbar--component__map"></li>
248
+						<li data-type="timeline_stop" title="<?php esc_attr_e('Timeline', 'lasso'); ?>"  class="lasso-toolbar--component__timeline"></li>
249
+						<li data-type="document" title="<?php esc_attr_e('Document', 'lasso'); ?>"  class="lasso-toolbar--component__document"></li>
250
+						<li data-type="collection" title="<?php esc_attr_e('Collection', 'lasso'); ?>"  class="lasso-toolbar--component__collection"></li>
251
+						<li data-type="gallery" title="<?php esc_attr_e('Gallery', 'lasso'); ?>"  class="lasso-toolbar--component__gallery"></li>
252
+						<?php if (class_exists('Aesop_GalleryPop')) { ?>
253
+						     <li data-type="gallery" title="<?php esc_attr_e('Gallery Pop', 'lasso'); ?>"  class="lasso-toolbar--component__gallerypop"></li>
254 254
 						<?php }?>
255
-						<?php if ( class_exists ('Aesop_Events') ) { ?>
256
-						     <li data-type="events" title="<?php esc_attr_e( 'Event', 'lasso' );?>"  class="lasso-toolbar--component__event"></li>
255
+						<?php if (class_exists('Aesop_Events')) { ?>
256
+						     <li data-type="events" title="<?php esc_attr_e('Event', 'lasso'); ?>"  class="lasso-toolbar--component__event"></li>
257 257
 						<?php }?>
258 258
 					<?php else: ?>
259
-						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );?>" class="image lasso-toolbar--component__image"></li>
260
-						<li data-type="wpquote" title="<?php esc_attr_e( 'WordPress Quote', 'lasso' );?>" class="quote lasso-toolbar--component__quote"></li>
261
-						<!--li data-type="wpvideo" title="<?php esc_attr_e( 'WordPress Video', 'lasso' );?>" class="video lasso-toolbar--component__video"></li-->
259
+						<li data-type="wpimg" title="<?php esc_attr_e('WordPress Image', 'lasso'); ?>" class="image lasso-toolbar--component__image"></li>
260
+						<li data-type="wpquote" title="<?php esc_attr_e('WordPress Quote', 'lasso'); ?>" class="quote lasso-toolbar--component__quote"></li>
261
+						<!--li data-type="wpvideo" title="<?php esc_attr_e('WordPress Video', 'lasso'); ?>" class="video lasso-toolbar--component__video"></li-->
262 262
 					<?php endif; ?>
263
-					<?php do_action( 'lasso_toolbar_components' );?>
263
+					<?php do_action('lasso_toolbar_components'); ?>
264 264
 			    </ul>
265 265
 			</li>
266
-		    <?php if ( $toolbar_headings ): ?>
267
-		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>"></li>
268
-		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>"></li>
266
+		    <?php if ($toolbar_headings): ?>
267
+		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>"></li>
268
+		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>"></li>
269 269
 			<?php endif; ?>
270
-			<?php if ( $toolbar_headings_h4 ): ?>
271
-		    <li id="lasso-toolbar--h4" title="<?php esc_attr_e( 'H4 Heading', 'lasso' );?>"></li>
272
-		    <li id="lasso-toolbar--h5" title="<?php esc_attr_e( 'H5 Heading', 'lasso' );?>"></li>
273
-			<li id="lasso-toolbar--h6" title="<?php esc_attr_e( 'H6 Heading', 'lasso' );?>"></li>
270
+			<?php if ($toolbar_headings_h4): ?>
271
+		    <li id="lasso-toolbar--h4" title="<?php esc_attr_e('H4 Heading', 'lasso'); ?>"></li>
272
+		    <li id="lasso-toolbar--h5" title="<?php esc_attr_e('H5 Heading', 'lasso'); ?>"></li>
273
+			<li id="lasso-toolbar--h6" title="<?php esc_attr_e('H6 Heading', 'lasso'); ?>"></li>
274 274
 			<?php endif; ?>
275 275
 			
276
-			<?php if ( $show_color ): ?>
277
-		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e( 'Set Color for Selected Text', 'lasso' );?>"></li>
278
-		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e( 'Choose Color', 'lasso' );?>"></li>
276
+			<?php if ($show_color): ?>
277
+		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e('Set Color for Selected Text', 'lasso'); ?>"></li>
278
+		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e('Choose Color', 'lasso'); ?>"></li>
279 279
 			<?php endif; ?>
280 280
 					
281 281
 		    
282
-			<li id="lasso-toolbar--link" title="<?php esc_attr_e( 'Anchor Link', 'lasso' );?>">
282
+			<li id="lasso-toolbar--link" title="<?php esc_attr_e('Anchor Link', 'lasso'); ?>">
283 283
 		    	<div id="lasso-toolbar--link__wrap" <?php echo $mobile_style ?> >
284
-		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'http://url.com', 'lasso' );?>"></div>
285
-		    		<a href="#" title="<?php esc_attr_e( 'Create Link', 'lasso' );?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
284
+		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e('http://url.com', 'lasso'); ?>"></div>
285
+		    		<a href="#" title="<?php esc_attr_e('Create Link', 'lasso'); ?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
286 286
 					<input class="styled-checkbox" type="checkbox" id="aesop-toolbar--link_newtab" checked/>
287
-                    <label for="aesop-toolbar--link_newtab"><?php esc_attr_e( 'Open in a New Tab', 'lasso' );?></label>
287
+                    <label for="aesop-toolbar--link_newtab"><?php esc_attr_e('Open in a New Tab', 'lasso'); ?></label>
288 288
 		    	</div>
289 289
 		    </li>
290
-		    <?php do_action( 'lasso_toolbar_components_after' );?>
291
-		    <li id="lasso-toolbar--html" title="<?php esc_attr_e( 'Insert HTML or Code', 'lasso' );?>">
290
+		    <?php do_action('lasso_toolbar_components_after'); ?>
291
+		    <li id="lasso-toolbar--html" title="<?php esc_attr_e('Insert HTML or Code', 'lasso'); ?>">
292 292
 		    	<div id="lasso-toolbar--html__wrap" <?php echo $mobile_style ?>>
293
-		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?>"></div>
293
+		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?>"></div>
294 294
 		    		<div id="lasso-toolbar--html__footer">
295 295
 					<div id="lasso-toolbar--html__footer_desc" >
296
-					<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?><br>
297
-					<?php esc_attr_e( 'You can also use Shortcodes', 'lasso' );?><br>
298
-					<?php esc_attr_e( 'You can also enter a URL to embed, such as Youtube, Vimeo and Twitter URLs.', 'lasso' );?>
296
+					<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?><br>
297
+					<?php esc_attr_e('You can also use Shortcodes', 'lasso'); ?><br>
298
+					<?php esc_attr_e('You can also enter a URL to embed, such as Youtube, Vimeo and Twitter URLs.', 'lasso'); ?>
299 299
 					</div>
300 300
 		    			<ul class="lasso-toolbar--html-snips">
301 301
 						
302
-		    				<?php if ( !$toolbar_headings ): ?>
303
-		    				<li id="lasso-html--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>">
304
-		    				<li id="lasso-html--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>">
302
+		    				<?php if (!$toolbar_headings): ?>
303
+		    				<li id="lasso-html--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>">
304
+		    				<li id="lasso-html--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>">
305 305
 		    				<?php endif; ?>
306
-		    				<li id="lasso-html--ul" title="<?php esc_attr_e( 'Unordered List', 'lasso' );?>">
307
-		    				<li id="lasso-html--ol" title="<?php esc_attr_e( 'Ordered List', 'lasso' );?>">
306
+		    				<li id="lasso-html--ul" title="<?php esc_attr_e('Unordered List', 'lasso'); ?>">
307
+		    				<li id="lasso-html--ol" title="<?php esc_attr_e('Ordered List', 'lasso'); ?>">
308 308
 		    			</ul>
309
-		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e( 'Cancel', 'lasso' );?></a>
310
-		    			<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>
309
+		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e('Cancel', 'lasso'); ?></a>
310
+		    			<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>
311 311
 		    		</div>
312 312
 		    	</div>
313 313
 		    </li>
314
-			<?php if ( $show_align ): ?>
315
-		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e( 'Text Left Align', 'lasso' );?>"></li>
316
-		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e( 'Text Center Align', 'lasso' );?>"></li>
317
-			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e( 'Text Right Align', 'lasso' );?>"></li>
314
+			<?php if ($show_align): ?>
315
+		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e('Text Left Align', 'lasso'); ?>"></li>
316
+		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e('Text Center Align', 'lasso'); ?>"></li>
317
+			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e('Text Right Align', 'lasso'); ?>"></li>
318 318
 			<?php endif; ?>
319 319
 		</ul>
320
-		<?php if ( is_singular() && $is_mobile ) { ?>
320
+		<?php if (is_singular() && $is_mobile) { ?>
321 321
 
322
-				<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;">
322
+				<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;">
323 323
 
324
-					<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>
324
+					<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>
325 325
 
326
-					<?php if ( 'draft' == $status && ( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') )  ) { ?>
327
-						<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>
326
+					<?php if ('draft' == $status && (lasso_user_can('publish_posts') || lasso_user_can('publish_pages'))) { ?>
327
+						<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>
328 328
 					<?php } ?>
329 329
 
330 330
 				</div>
@@ -342,20 +342,20 @@  discard block
 block discarded – undo
342 342
  */
343 343
 function lasso_editor_settings_toolbar() {
344 344
 
345
-	$delete_nonce = wp_create_nonce( 'lasso-delete-nonce' );
345
+	$delete_nonce = wp_create_nonce('lasso-delete-nonce');
346 346
 
347 347
 	ob_start();
348 348
 
349 349
 
350 350
 	// let users add custom css classes
351
-	$custom_classes = apply_filters( 'lasso_component_classes', '' );
351
+	$custom_classes = apply_filters('lasso_component_classes', '');
352 352
 
353 353
 	?>
354
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
355
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
356
-		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
357
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
358
-		<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>
354
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
355
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
356
+		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
357
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
358
+		<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>
359 359
 	</ul>
360 360
 
361 361
 	<?php return ob_get_clean();
@@ -373,13 +373,13 @@  discard block
 block discarded – undo
373 373
 
374 374
 
375 375
 	// has post thumbnail
376
-	$has_thumbnail = has_post_thumbnail( get_the_ID() ) ? 'class="lasso--featImg--has-thumb"' : false;
376
+	$has_thumbnail = has_post_thumbnail(get_the_ID()) ? 'class="lasso--featImg--has-thumb"' : false;
377 377
 
378 378
 	?>
379
-	<ul id="lasso--featImgControls" <?php echo $has_thumbnail;?>>
380
-		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e( 'Replace Image', 'lasso' );?>" href="#"><i class="lasso-icon-image"></i></a></li>
381
-		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e( 'Delete Image', 'lasso' );?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
382
-		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e( 'save', 'lasso' );?></a></li>
379
+	<ul id="lasso--featImgControls" <?php echo $has_thumbnail; ?>>
380
+		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e('Replace Image', 'lasso'); ?>" href="#"><i class="lasso-icon-image"></i></a></li>
381
+		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e('Delete Image', 'lasso'); ?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
382
+		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e('save', 'lasso'); ?></a></li>
383 383
 	</ul>
384 384
 
385 385
 	<?php return ob_get_clean();
@@ -403,51 +403,51 @@  discard block
 block discarded – undo
403 403
 
404 404
 	$postid = get_the_ID();
405 405
 
406
-	$status = get_post_status( $postid );
407
-	$nonce = wp_create_nonce( 'lasso-update-post-settings' );
406
+	$status = get_post_status($postid);
407
+	$nonce = wp_create_nonce('lasso-update-post-settings');
408 408
 
409 409
 	// let users add custom css classes
410
-	$custom_classes = apply_filters( 'lasso_modal_settings_classes', '' );
410
+	$custom_classes = apply_filters('lasso_modal_settings_classes', '');
411 411
 
412 412
 	// objects categories
413
-	$categories 		= lasso_get_post_objects( $postid, 'category' );
414
-	$tags 				= lasso_get_post_objects( $postid, 'tag' );
413
+	$categories = lasso_get_post_objects($postid, 'category');
414
+	$tags = lasso_get_post_objects($postid, 'tag');
415 415
 
416 416
 	// modal tabs
417
-	$tabs  				= lasso_modal_addons('tab');
418
-	$content 			= lasso_modal_addons('content');
417
+	$tabs = lasso_modal_addons('tab');
418
+	$content = lasso_modal_addons('content');
419 419
 	
420 420
 	//editor options
421 421
 	$allow_change_date = lasso_editor_get_option('allow_change_date', 'lasso_editor');
422 422
 
423 423
 	// are we singular
424
-	$is_singular 		= is_singular();
424
+	$is_singular = is_singular();
425 425
 	$is_singular_class 	= $is_singular ? 'lasso--postsettings__2col' : 'lasso--postsettings__1col';
426 426
 	$has_thumb_class    = has_post_thumbnail() ? 'has-thumbnail' : 'no-thumbnail';
427 427
 	$theme_supports     = current_theme_supports('post-thumbnails');
428
-	$default_image 		= LASSO_URL.'/admin/assets/img/empty-img.png';
428
+	$default_image = LASSO_URL.'/admin/assets/img/empty-img.png';
429 429
 
430 430
 ?>
431
-	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>">
431
+	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>">
432 432
 		<div class="lasso--modal__inner">
433 433
 
434
-			<?php if( $tabs ) { echo $tabs; } ?>
434
+			<?php if ($tabs) { echo $tabs; } ?>
435 435
 
436 436
 			<div class="lasso--modal__content modal__content--core visible" data-addon-content="core">
437
-				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class;?>" >
437
+				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class; ?>" >
438 438
 
439
-					<?php if ( $is_singular && $theme_supports ) : ?>
439
+					<?php if ($is_singular && $theme_supports) : ?>
440 440
 					<div class="lasso--postsettings__left">
441
-						<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>
442
-						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url( $default_image );?>">
441
+						<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>
442
+						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url($default_image); ?>">
443 443
 
444 444
 							<div id="lasso--post-thumb__controls" class="lasso--post-thumb__controls">
445
-								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image','lasso');?>" class="dashicons dashicons-edit"></i>
446
-								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image','lasso');?>" class="dashicons dashicons-no-alt"></i>
445
+								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image', 'lasso'); ?>" class="dashicons dashicons-edit"></i>
446
+								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image', 'lasso'); ?>" class="dashicons dashicons-no-alt"></i>
447 447
 								<i id="lasso--save-status" class="lasso-icon lasso-icon-spinner6 not-visible"></i>
448 448
 							</div>
449 449
 
450
-							<?php echo has_post_thumbnail() ? get_the_post_thumbnail( $post->ID, 'medium' ) : '<img src="'.$default_image.'">'; ?>
450
+							<?php echo has_post_thumbnail() ? get_the_post_thumbnail($post->ID, 'medium') : '<img src="'.$default_image.'">'; ?>
451 451
 
452 452
 						</div>
453 453
 						<div id="lasso--featImgSave"><a href="#" class="not-visible">Save</a></div>
@@ -457,13 +457,13 @@  discard block
 block discarded – undo
457 457
 
458 458
 					<div class="lasso--postsettings__right">
459 459
 
460
-						<?php if( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') ): ?>
460
+						<?php if (lasso_user_can('publish_posts') || lasso_user_can('publish_pages')): ?>
461 461
 						<div class="lasso--postsettings__option story-status-option">
462
-							<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>
463
-							<ul class="story-status story-status-<?php echo sanitize_html_class( $status );?>">
464
-								<li id="lasso--status-draft"><?php _e( 'Draft', 'lasso' );?></li>
465
-								<li id="lasso--status-pending"><?php _e( 'Pending', 'lasso' );?></li>
466
-								<li id="lasso--status-publish"><?php _e( 'Publish', 'lasso' );?></li>
462
+							<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>
463
+							<ul class="story-status story-status-<?php echo sanitize_html_class($status); ?>">
464
+								<li id="lasso--status-draft"><?php _e('Draft', 'lasso'); ?></li>
465
+								<li id="lasso--status-pending"><?php _e('Pending', 'lasso'); ?></li>
466
+								<li id="lasso--status-publish"><?php _e('Publish', 'lasso'); ?></li>
467 467
 							</ul>
468 468
 							<div class="lasso--slider_wrap">
469 469
 								<div id="lasso--slider"></div>
@@ -471,10 +471,10 @@  discard block
 block discarded – undo
471 471
 						</div>
472 472
 						<?php endif; ?>
473 473
 
474
-						<?php if ( 'publish' == $status ): ?>
474
+						<?php if ('publish' == $status): ?>
475 475
 						<div class="lasso--postsettings__option story-slug-option">
476
-							<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>
477
-							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset( $post ) ? esc_attr( $post->post_name ) : false;?>">
476
+							<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>
477
+							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset($post) ? esc_attr($post->post_name) : false; ?>">
478 478
 						</div>
479 479
 						<?php endif; ?>
480 480
 
@@ -483,20 +483,20 @@  discard block
 block discarded – undo
483 483
 					<div class="lasso--postsettings__middle">
484 484
 
485 485
 						<div class="lasso--postsettings__option story-categories-option">
486
-							<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>
487
-							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories;?>">
486
+							<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>
487
+							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories; ?>">
488 488
 						</div>
489 489
 
490 490
 						<div class="lasso--postsettings__option story-tags-option">
491
-							<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>
492
-							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags;?>">
491
+							<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>
492
+							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags; ?>">
493 493
 						</div>
494 494
 						<?php 
495 495
 						if ($allow_change_date) { 
496
-						    $dateformat = get_option( 'date_format' ); 
496
+						    $dateformat = get_option('date_format'); 
497 497
 						?>
498
-						    <label><?php _e( 'Post Date', 'lasso' ); ?></label>
499
-							<input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid);?>"/>
498
+						    <label><?php _e('Post Date', 'lasso'); ?></label>
499
+							<input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid); ?>"/>
500 500
 						<?php
501 501
 						}?>
502 502
 
@@ -518,23 +518,23 @@  discard block
 block discarded – undo
518 518
 					?>
519 519
 					<!--/div-->
520 520
 
521
-					<?php do_action( 'lasso_modal_post_form' ); // action ?>
521
+					<?php do_action('lasso_modal_post_form'); // action ?>
522 522
 
523 523
 					<div class="lasso--postsettings__footer" >
524
-						<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
524
+						<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
525 525
 						<input type="hidden" name="status" value="">
526 526
 						<input type="hidden" name="categories" value="">
527
-						<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
527
+						<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
528 528
 						<input type="hidden" name="action" value="process_update-object_post">
529
-						<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
530
-						<?php do_action( 'lasso_modal_post_form_footer' ); // action ?>
531
-						<input type="submit" id="lasso--postsettings-submit" value="<?php esc_attr_e( 'Save', 'lasso' );?>">
529
+						<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
530
+						<?php do_action('lasso_modal_post_form_footer'); // action ?>
531
+						<input type="submit" id="lasso--postsettings-submit" value="<?php esc_attr_e('Save', 'lasso'); ?>">
532 532
 					</div>
533 533
 
534 534
 				</form>
535 535
 			</div>
536 536
 
537
-			<?php if( $tabs ) { echo $content; } ?>
537
+			<?php if ($tabs) { echo $content; } ?>
538 538
 
539 539
 		</div>
540 540
 
@@ -556,41 +556,41 @@  discard block
 block discarded – undo
556 556
 	ob_start();
557 557
 
558 558
 
559
-	$status = get_post_status( get_the_ID() );
559
+	$status = get_post_status(get_the_ID());
560 560
 
561
-	$nonce = wp_create_nonce( 'lasso-editor-new-post' );
561
+	$nonce = wp_create_nonce('lasso-editor-new-post');
562 562
 
563 563
 	// let users add custom css classes
564
-	$custom_classes = apply_filters( 'lasso_modal_post_classes', '' );
564
+	$custom_classes = apply_filters('lasso_modal_post_classes', '');
565 565
 
566 566
 	// return the post type
567
-	$type = get_post_type( get_the_ID() );
567
+	$type = get_post_type(get_the_ID());
568 568
 
569 569
 	$mobile_style = "";
570 570
 	if (wp_is_mobile()) {
571 571
 		$mobile_style = 'style="top:140px !important;"';
572 572
 	}
573 573
 	?>
574
-	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" <?php echo $mobile_style;?>">
574
+	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" <?php echo $mobile_style; ?>">
575 575
 		<div class="lasso--modal__inner lasso--hasnewform">
576 576
 
577 577
 			<form id="lasso--postnew__form" enctype="multipart/form-data" class="lasso--post-form">
578 578
 
579 579
 				<div class="lasso--postsettings__option story-slug-option lasso--last-option">
580
-					<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>
581
-					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e( 'Type Your Title Here', 'lasso' );?>">
580
+					<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>
581
+					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e('Type Your Title Here', 'lasso'); ?>">
582 582
 						<div class="lasso--select-wrap" style="width:90px">
583 583
 						<select id="lasso--select-type" name="story_type">
584 584
 
585 585
 							<?php
586 586
 								$types = lasso_post_types_names();
587
-								if ( !empty( $types ) ) {
588
-									foreach( $types as $name => $label ) {										
589
-										$type = preg_replace( '/s\b/','', $name );
587
+								if (!empty($types)) {
588
+									foreach ($types as $name => $label) {										
589
+										$type = preg_replace('/s\b/', '', $name);
590 590
 										if ($type == 'page' && !current_user_can('edit_pages')) {
591 591
 											continue;
592 592
 										}
593
-										printf( '<option value="%s">%s</option>', lcfirst( esc_attr( $type ) ) , ucfirst( esc_attr( $label ) ) );
593
+										printf('<option value="%s">%s</option>', lcfirst(esc_attr($type)), ucfirst(esc_attr($label)));
594 594
 									}
595 595
 
596 596
 								}
@@ -601,19 +601,19 @@  discard block
 block discarded – undo
601 601
 				</div>
602 602
 
603 603
 				<div class="lasso--postsettings__footer">
604
-					<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
604
+					<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
605 605
 					<input type="hidden" name="action" value="process_new-object_post">
606 606
 					<?php
607
-						if ( !empty( $types ) ) {
607
+						if (!empty($types)) {
608 608
 							// get the first element
609 609
 							$keys = array_keys($types);
610
-						    $type =$keys[0];						
611
-							$type = preg_replace( '/s\b/','', $type );
612
-							printf( '<input type="hidden" name="object" value="%s">', lcfirst( esc_attr( $type ) ) );		
610
+						    $type = $keys[0];						
611
+							$type = preg_replace('/s\b/', '', $type);
612
+							printf('<input type="hidden" name="object" value="%s">', lcfirst(esc_attr($type)));		
613 613
 						}
614 614
 					?>
615
-					<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
616
-					<input type="submit" value="<?php esc_attr_e( 'Create', 'lasso' );?>">
615
+					<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
616
+					<input type="submit" value="<?php esc_attr_e('Create', 'lasso'); ?>">
617 617
 				</div>
618 618
 
619 619
 			</form>
@@ -641,18 +641,18 @@  discard block
 block discarded – undo
641 641
 	ob_start();
642 642
 
643 643
 	// post status
644
-	$status = get_post_status( get_the_ID() );
644
+	$status = get_post_status(get_the_ID());
645 645
 
646 646
 	// let users add custom css classes
647
-	$custom_classes = apply_filters( 'lasso_modal_all_post_classes', '' );
647
+	$custom_classes = apply_filters('lasso_modal_all_post_classes', '');
648 648
 
649 649
 	?>
650
-	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" style="max-height:100%">
650
+	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" style="max-height:100%">
651 651
 		<div class="lasso--modal__inner">
652 652
 
653 653
 			<div class="lasso--post-filtering not-visible">
654 654
 				<div class="lasso--search__results">
655
-					<span id="lasso--results-found"></span><?php _e('results found','lasso');?>
655
+					<span id="lasso--results-found"></span><?php _e('results found', 'lasso'); ?>
656 656
 				</div>
657 657
 				<div class="lasso--search">
658 658
 					<i id="lasso--search__toggle" class="dashicons dashicons-search"></i>
@@ -666,18 +666,18 @@  discard block
 block discarded – undo
666 666
 				$post_types = lasso_post_types_names();
667 667
 				$rest_bases = lasso_post_types_rest_base();
668 668
 
669
-				if ( ! empty( $post_types ) ) {
669
+				if (!empty($post_types)) {
670 670
 					$first = 'active';
671
-					foreach( $post_types as $name => $label ) {
671
+					foreach ($post_types as $name => $label) {
672 672
 						if (array_key_exists($name, $rest_bases)) {
673
-							printf( '<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr( $first), esc_attr( $rest_bases[$name] ), esc_attr( $label ) );
673
+							printf('<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr($first), esc_attr($rest_bases[$name]), esc_attr($label));
674 674
 						}
675 675
 						$first = '';
676 676
 					}
677 677
 
678 678
 				}
679 679
 
680
-				do_action('lasso_modal_post_objects');?>
680
+				do_action('lasso_modal_post_objects'); ?>
681 681
 
682 682
 			</ul>
683 683
 			<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
@@ -697,14 +697,14 @@  discard block
 block discarded – undo
697 697
 
698 698
 
699 699
 	// let users add custom css classes
700
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
700
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
701 701
 
702 702
 	?>
703
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
704
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
705
-		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
706
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
707
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
703
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
704
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
705
+		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
706
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
707
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
708 708
 	</ul>
709 709
 
710 710
 	<?php return ob_get_clean();
@@ -716,14 +716,14 @@  discard block
 block discarded – undo
716 716
 
717 717
 
718 718
 	// let users add custom css classes
719
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
719
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
720 720
 
721 721
 	?>
722
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
723
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
724
-		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
725
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
726
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
722
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
723
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
724
+		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
725
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
726
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
727 727
 	</ul>
728 728
 
729 729
 	<?php return ob_get_clean();
@@ -736,16 +736,16 @@  discard block
 block discarded – undo
736 736
  */
737 737
 function lasso_map_form_footer() {
738 738
 
739
-	$nonce = wp_create_nonce( 'lasso-process-map' );
739
+	$nonce = wp_create_nonce('lasso-process-map');
740 740
 
741 741
 	ob_start();
742 742
 
743 743
 	?>
744 744
 	<div class="lasso--map-form__footer">
745
-		<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
746
-		<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
745
+		<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
746
+		<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
747 747
 		<input type="hidden" name="action" value="process_map_save">
748
-		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e( 'Save Locations', 'lasso' );?>">
748
+		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e('Save Locations', 'lasso'); ?>">
749 749
 	</div>
750 750
 
751 751
 	<?php return ob_get_clean();
@@ -763,7 +763,7 @@  discard block
 block discarded – undo
763 763
 
764 764
 	?>
765 765
 	<div id="lasso--pagerefresh" class="visible">
766
-		<?php _e( 'Save this post and refesh the page to see these changes.', 'lasso' );?>
766
+		<?php _e('Save this post and refesh the page to see these changes.', 'lasso'); ?>
767 767
 	</div>
768 768
 
769 769
 	<?php return ob_get_clean();
@@ -777,43 +777,43 @@  discard block
 block discarded – undo
777 777
  */
778 778
 function lasso_editor_options_blob() {
779 779
 
780
-	$codes   = function_exists( 'aesop_shortcodes' ) ? aesop_shortcodes() : apply_filters( 'lasso_custom_options', '' );
781
-	$galleries  = function_exists( 'lasso_editor_galleries_exist' ) && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
780
+	$codes = function_exists('aesop_shortcodes') ? aesop_shortcodes() : apply_filters('lasso_custom_options', '');
781
+	$galleries = function_exists('lasso_editor_galleries_exist') && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
782 782
 
783
-	$nonce = wp_create_nonce( 'lasso_gallery' );
783
+	$nonce = wp_create_nonce('lasso_gallery');
784 784
 
785 785
 	$blob = array();
786 786
 
787
-	if ( empty( $codes ) )
787
+	if (empty($codes))
788 788
 		return;
789 789
 
790
-	foreach ( $codes as $slug => $shortcode ) {
790
+	foreach ($codes as $slug => $shortcode) {
791 791
 		$return = '';
792 792
 		// Shortcode has atts
793 793
 
794
-		if ( count( $shortcode['atts'] ) && $shortcode['atts'] ) {
794
+		if (count($shortcode['atts']) && $shortcode['atts']) {
795 795
 
796
-			foreach ( $shortcode['atts'] as $attr_name => $attr_info ) {
796
+			foreach ($shortcode['atts'] as $attr_name => $attr_info) {
797 797
 
798 798
 
799
-				$prefix = isset( $attr_info['prefix'] ) ? sprintf( '<span class="lasso-option-prefix">%s</span>', $attr_info['prefix'] ) : null;
799
+				$prefix = isset($attr_info['prefix']) ? sprintf('<span class="lasso-option-prefix">%s</span>', $attr_info['prefix']) : null;
800 800
 
801 801
 				$return .= '<form id="lasso--component-settings-form" class="'.$galleries.'" method="post">';
802 802
 				$return .= '<p data-option="'.$attr_name.'" class="lasso-option aesop-'.$slug.'-'.$attr_name.'">';
803
-				$return .= '<label for="aesop-generator-attr-' . $attr_name . '">' . $attr_info['desc'] . '</label>';
803
+				$return .= '<label for="aesop-generator-attr-'.$attr_name.'">'.$attr_info['desc'].'</label>';
804 804
 				$return .= '<small class="lasso-option-desc">'.$attr_info['tip'].'</small>';
805 805
 				// Select
806 806
 
807
-				if ( isset( $attr_info['values'] ) ) {
807
+				if (isset($attr_info['values'])) {
808 808
 
809
-					$return .= '<select name="' . $attr_name . '" id="aesop-generator-attr-' . $attr_name . '" class="lasso-generator-attr">';
809
+					$return .= '<select name="'.$attr_name.'" id="aesop-generator-attr-'.$attr_name.'" class="lasso-generator-attr">';
810 810
 
811
-					$i=0;
811
+					$i = 0;
812 812
 
813
-					foreach ( $attr_info['values'] as $attr_value ) {
813
+					foreach ($attr_info['values'] as $attr_value) {
814 814
 						$attr_value_selected = $attr_info['default'] == $attr_value ? ' selected="selected"' : '';
815 815
 
816
-						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" ' . $attr_value_selected . '>'.$attr_info['values'][$i]['name'].'</option>';
816
+						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" '.$attr_value_selected.'>'.$attr_info['values'][$i]['name'].'</option>';
817 817
 
818 818
 						$i++;
819 819
 					}
@@ -822,24 +822,24 @@  discard block
 block discarded – undo
822 822
 
823 823
 				} else {
824 824
 
825
-					$attr_field_type = isset( $attr_info['type'] ) ? $attr_info['type'] : 'text';
825
+					$attr_field_type = isset($attr_info['type']) ? $attr_info['type'] : 'text';
826 826
 
827 827
 					// image upload
828
-					if ( 'media_upload' == $attr_info['type'] ) {
828
+					if ('media_upload' == $attr_info['type']) {
829 829
 
830
-						$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.'" />';
830
+						$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.'" />';
831 831
 						$return .= '<a href="#" id="lasso-upload-img" class="lasso-option-button" /></a>';
832 832
 
833
-					} elseif ( 'color' == $attr_info['type'] ) {
833
+					} elseif ('color' == $attr_info['type']) {
834 834
 
835
-						$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.'" />';
835
+						$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.'" />';
836 836
 
837
-					} elseif ( 'text_area' == $attr_info['type'] ) {
837
+					} elseif ('text_area' == $attr_info['type']) {
838 838
 
839
-						$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.'';
839
+						$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.'';
840 840
 
841 841
 					} else {
842
-						$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.'';
842
+						$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.'';
843 843
 					}
844 844
 				}
845 845
 				$return .= '</p>';
@@ -850,9 +850,9 @@  discard block
 block discarded – undo
850 850
 		///////////////////////////
851 851
 		// START GALLERY AND MAP FRONT END STUFFS
852 852
 		///////////////////////////
853
-		if ( isset( $shortcode['front'] ) && true == $shortcode['front'] ) {
853
+		if (isset($shortcode['front']) && true == $shortcode['front']) {
854 854
 
855
-			if ( 'gallery' == $shortcode['front_type'] ) {
855
+			if ('gallery' == $shortcode['front_type']) {
856 856
 
857 857
 				$return .= lasso_gallery_editor_module();
858 858
 
@@ -863,13 +863,13 @@  discard block
 block discarded – undo
863 863
 		///////////////////////////
864 864
 
865 865
 		// Single shortcode (not closed)
866
-		if ( 'single' == $shortcode['type'] ) {
866
+		if ('single' == $shortcode['type']) {
867 867
 
868 868
 			$return .= '<input type="hidden" name="lasso-generator-content" id="lasso-generator-content" value="false" />';
869 869
 
870 870
 		} else {
871 871
 
872
-			$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>';
872
+			$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>';
873 873
 		}
874 874
 
875 875
 		$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>';
@@ -905,14 +905,14 @@  discard block
 block discarded – undo
905 905
 				<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
906 906
 				<div id="lasso--hide" style="display:none;" class="lasso--post-form">
907 907
 					<i class="lasso-icon lasso-icon-move"></i>
908
-					<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>
908
+					<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>
909 909
 					<div class="lasso--slider_wrap">
910 910
 						<div id="lasso--slider"></div>
911 911
 					</div>
912 912
 					<ul id="lasso--revision-list"></ul>
913 913
 					<div class="lasso--btn-group lasso--btn-group-small">
914
-						<a href="#" class="lasso--btn-secondary" id="lasso--close-modal"><?php _e( 'Cancel', 'lasso' );?></a>
915
-						<a href="#" class="lasso--btn-primary" id="lasso--select-revision"><?php _e( 'Select', 'lasso' );?></a>
914
+						<a href="#" class="lasso--btn-secondary" id="lasso--close-modal"><?php _e('Cancel', 'lasso'); ?></a>
915
+						<a href="#" class="lasso--btn-primary" id="lasso--select-revision"><?php _e('Select', 'lasso'); ?></a>
916 916
 					</div>
917 917
 				</div>
918 918
 
@@ -935,7 +935,7 @@  discard block
 block discarded – undo
935 935
     // Normalize into a six character long hex string
936 936
     $hex = str_replace('#', '', $hex);
937 937
     if (strlen($hex) == 3) {
938
-        $hex = str_repeat(substr($hex,0,1), 2).str_repeat(substr($hex,1,1), 2).str_repeat(substr($hex,2,1), 2);
938
+        $hex = str_repeat(substr($hex, 0, 1), 2).str_repeat(substr($hex, 1, 1), 2).str_repeat(substr($hex, 2, 1), 2);
939 939
     }
940 940
 
941 941
     // Split into three parts: R, G and B
@@ -944,7 +944,7 @@  discard block
 block discarded – undo
944 944
 
945 945
     foreach ($color_parts as $color) {
946 946
         $color   = hexdec($color); // Convert to decimal
947
-        $color   = max(0,min(255,$color + $steps)); // Adjust color
947
+        $color   = max(0, min(255, $color + $steps)); // Adjust color
948 948
         $return .= str_pad(dechex($color), 2, '0', STR_PAD_LEFT); // Make two char hex code
949 949
     }
950 950
 
Please login to merge, or discard this patch.