Completed
Push — master ( ac2841...fa47c0 )
by
unknown
02:07
created
public/includes/assets.php 1 patch
Spacing   +86 added lines, -86 removed lines patch added patch discarded remove patch
@@ -10,21 +10,21 @@  discard block
 block discarded – undo
10 10
 
11 11
 class assets {
12 12
 
13
-	public function __construct(){
13
+	public function __construct() {
14 14
 
15
-		add_action('wp_enqueue_scripts', array($this,'scripts'));
15
+		add_action('wp_enqueue_scripts', array($this, 'scripts'));
16 16
 	}
17 17
 
18
-	public function scripts(){
18
+	public function scripts() {
19 19
 
20 20
 	
21
-		if ( lasso_user_can('edit_posts')) {
21
+		if (lasso_user_can('edit_posts')) {
22 22
 
23 23
 			wp_enqueue_style('lasso-style', LASSO_URL.'/public/assets/css/lasso.css', LASSO_VERSION, true);
24 24
 
25 25
             //don't load autocomplete if it's a stockholm theme
26
-			$themename  	= wp_get_theme()->get('Name');
27
-			if ($themename !='Stockholm' ) {
26
+			$themename = wp_get_theme()->get('Name');
27
+			if ($themename != 'Stockholm') {
28 28
 				wp_enqueue_script('jquery-ui-autocomplete');
29 29
 			}
30 30
 			wp_enqueue_script('jquery-ui-draggable');
@@ -37,27 +37,27 @@  discard block
 block discarded – undo
37 37
 			// url for json api
38 38
 			$home_url = function_exists('json_get_url_prefix') ? json_get_url_prefix() : false;
39 39
 
40
-			$article_object 	= lasso_editor_get_option('article_class','lasso_editor');
40
+			$article_object 	= lasso_editor_get_option('article_class', 'lasso_editor');
41 41
 
42
-			$article_object 	= empty( $article_object ) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object;
42
+			$article_object 	= empty($article_object) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object;
43 43
 
44
-			$featImgClass 		= lasso_editor_get_option('featimg_class','lasso_editor');
45
-			if (empty( $featImgClass )) {
44
+			$featImgClass = lasso_editor_get_option('featimg_class', 'lasso_editor');
45
+			if (empty($featImgClass)) {
46 46
 				$featImgClass = lasso_get_supported_theme_featured_image_class();
47 47
 			}
48
-			$titleClass 		= lasso_editor_get_option('title_class','lasso_editor');
49
-			if (empty( $titleClass )) {
48
+			$titleClass = lasso_editor_get_option('title_class', 'lasso_editor');
49
+			if (empty($titleClass)) {
50 50
 				$titleClass = lasso_get_supported_theme_title_class();
51 51
 			}
52
-			$toolbar_headings  	= lasso_editor_get_option('toolbar_headings', 'lasso_editor');
53
-			$toolbar_headings_h4  	= lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
52
+			$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
53
+			$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
54 54
 			$objectsNoSave  	= lasso_editor_get_option('dont_save', 'lasso_editor');
55
-			$objectsNonEditable  	= lasso_editor_get_option('non_editable', 'lasso_editor');
55
+			$objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor');
56 56
 			$disableRESTSave = lasso_editor_get_option('save_using_rest_disabled', 'lasso_editor');
57
-			$save_to_post_disabled  = lasso_editor_get_option( 'post_save_disabled', 'lasso_editor' );
57
+			$save_to_post_disabled = lasso_editor_get_option('post_save_disabled', 'lasso_editor');
58 58
 			
59
-			$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor','b');
60
-			$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor','i');
59
+			$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor', 'b');
60
+			$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor', 'i');
61 61
 
62 62
 			
63 63
 			//text alignement
@@ -71,8 +71,8 @@  discard block
 block discarded – undo
71 71
 			
72 72
 			if ($show_color) {
73 73
 				//color picker
74
-				wp_enqueue_style( 'wp-color-picker' );
75
-				wp_enqueue_script( 'iris', admin_url( 'js/iris.min.js' ), array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), false, 1 );
74
+				wp_enqueue_style('wp-color-picker');
75
+				wp_enqueue_script('iris', admin_url('js/iris.min.js'), array('jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch'), false, 1);
76 76
 			}
77 77
 			
78 78
 			// click to insert components, not drag and drop
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 			
82 82
 			// custom fields
83 83
 			
84
-			$custom_fields = apply_filters( 'editus_custom_fields', null ); //array('testFieldName' => '#field1');
84
+			$custom_fields = apply_filters('editus_custom_fields', null); //array('testFieldName' => '#field1');
85 85
 
86 86
 
87 87
 
@@ -92,53 +92,53 @@  discard block
 block discarded – undo
92 92
             $delta = time() - $post_date;
93 93
 
94 94
 			$strings = array(
95
-				'save' 				=> __('Save','lasso'),
96
-				'selectText'	  	=> __('Please Select Text First.','lasso'),
97
-				'cancel' 			=> __('Cancel','lasso'),
98
-				'exiteditor' 		=> __('Exit Editor','lasso'),
99
-				'saving' 			=> __('Saving...','lasso'),
100
-				'saved'				=> __('Saved!','lasso'),
101
-				'adding' 			=> __('Adding...','lasso'),
102
-				'added'				=> __('Added!','lasso'),
103
-				'loading' 			=> __('Loading...','lasso'),
104
-				'loadMore'			=> __('Load More','lasso'),
105
-				'close'			=> __('Close','lasso'),
106
-				'noPostsFound'		=> __('No more posts found','lasso'),
107
-				'fetchFail'	    	=> __('Fetching failed.','lasso'),
108
-				'galleryCreated' 	=> __('Gallery Created!','lasso'),
109
-				'galleryUpdated' 	=> __('Gallery Updated!','lasso'),
110
-				'justWrite'			=> __('Just write...','lasso'),
111
-				'chooseImage'		=> __('Choose an image','lasso'),
112
-				'updateImage'		=> __('Update Image','lasso'),
113
-				'insertImage'		=> __('Insert Image','lasso'),
114
-				'selectImage'		=> __('Select Image','lasso'),
115
-				'removeFeatImg'     => __('Remove featured image?','lasso'),
116
-				'updateSelectedImg' => __('Update Selected Image','lasso'),
117
-				'chooseImages'		=> __('Choose images','lasso'),
118
-				'editImage'			=> __('Edit Image','lasso'),
119
-				'addImages'			=> __('Add Images','lasso'),
120
-				'addNewGallery'		=> __('Add New Gallery','lasso'),
121
-				'selectGallery'		=> __('Select Lasso Gallery Image','lasso'),
122
-				'useSelectedImages' => __('Use Selected Images','lasso'),
123
-				'publishPost'		=> __('Publish Post?','lasso'),
124
-				'publishYes'		=> __('Yes, publish it!','lasso'),
125
-				'deletePost'		=> __('Trash Post?','lasso'),
126
-				'deleteYes'			=> __('Yes, trash it!','lasso'),
127
-				'warning'			=> __('Oh snap!','laso'),
128
-				'cancelText'		=> __('O.K. got it!','lasso'),
129
-				'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'),
95
+				'save' 				=> __('Save', 'lasso'),
96
+				'selectText'	  	=> __('Please Select Text First.', 'lasso'),
97
+				'cancel' 			=> __('Cancel', 'lasso'),
98
+				'exiteditor' 		=> __('Exit Editor', 'lasso'),
99
+				'saving' 			=> __('Saving...', 'lasso'),
100
+				'saved'				=> __('Saved!', 'lasso'),
101
+				'adding' 			=> __('Adding...', 'lasso'),
102
+				'added'				=> __('Added!', 'lasso'),
103
+				'loading' 			=> __('Loading...', 'lasso'),
104
+				'loadMore'			=> __('Load More', 'lasso'),
105
+				'close'			=> __('Close', 'lasso'),
106
+				'noPostsFound'		=> __('No more posts found', 'lasso'),
107
+				'fetchFail'	    	=> __('Fetching failed.', 'lasso'),
108
+				'galleryCreated' 	=> __('Gallery Created!', 'lasso'),
109
+				'galleryUpdated' 	=> __('Gallery Updated!', 'lasso'),
110
+				'justWrite'			=> __('Just write...', 'lasso'),
111
+				'chooseImage'		=> __('Choose an image', 'lasso'),
112
+				'updateImage'		=> __('Update Image', 'lasso'),
113
+				'insertImage'		=> __('Insert Image', 'lasso'),
114
+				'selectImage'		=> __('Select Image', 'lasso'),
115
+				'removeFeatImg'     => __('Remove featured image?', 'lasso'),
116
+				'updateSelectedImg' => __('Update Selected Image', 'lasso'),
117
+				'chooseImages'		=> __('Choose images', 'lasso'),
118
+				'editImage'			=> __('Edit Image', 'lasso'),
119
+				'addImages'			=> __('Add Images', 'lasso'),
120
+				'addNewGallery'		=> __('Add New Gallery', 'lasso'),
121
+				'selectGallery'		=> __('Select Lasso Gallery Image', 'lasso'),
122
+				'useSelectedImages' => __('Use Selected Images', 'lasso'),
123
+				'publishPost'		=> __('Publish Post?', 'lasso'),
124
+				'publishYes'		=> __('Yes, publish it!', 'lasso'),
125
+				'deletePost'		=> __('Trash Post?', 'lasso'),
126
+				'deleteYes'			=> __('Yes, trash it!', 'lasso'),
127
+				'warning'			=> __('Oh snap!', 'laso'),
128
+				'cancelText'		=> __('O.K. got it!', 'lasso'),
129
+				'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'),
130 130
 				'missingConfirm'	=> __('Update Settings', 'lasso'),
131
-				'helperText'		=> __('one more letter','lasso'),
131
+				'helperText'		=> __('one more letter', 'lasso'),
132 132
 				'editingBackup'  	=> __('You are currently editing a backup copy of this post.'),
133 133
 				
134 134
 				
135 135
 			);
136 136
 
137
-			$api_url = trailingslashit( home_url() ) . 'lasso-internal-api';
137
+			$api_url = trailingslashit(home_url()).'lasso-internal-api';
138 138
 
139 139
 			$gallery_class = new gallery();
140 140
 			$gallery_nonce_action = $gallery_class->nonce_action;
141
-			$gallery_nonce = wp_create_nonce( $gallery_nonce_action );
141
+			$gallery_nonce = wp_create_nonce($gallery_nonce_action);
142 142
 			
143 143
 			
144 144
             if ($allow_change_date) {
@@ -153,13 +153,13 @@  discard block
 block discarded – undo
153 153
 			  
154 154
 			if (function_exists('rest_url')) {
155 155
 				//$rest_root = esc_url_raw( rest_url());
156
-				$rest_nonce = wp_create_nonce( 'wp_rest' );
157
-				$settings = array( 'root' => $rest_root, 'nonce' => $rest_nonce );
158
-				wp_enqueue_script( 'wp-api', '', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
159
-				wp_localize_script( 'wp-api', 'wpApiSettings', $settings );
160
-				wp_localize_script( 'wp-api', 'WP_API_Settings', $settings );
156
+				$rest_nonce = wp_create_nonce('wp_rest');
157
+				$settings = array('root' => $rest_root, 'nonce' => $rest_nonce);
158
+				wp_enqueue_script('wp-api', '', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true);
159
+				wp_localize_script('wp-api', 'wpApiSettings', $settings);
160
+				wp_localize_script('wp-api', 'WP_API_Settings', $settings);
161 161
 				
162
-				if ( class_exists( 'WP_REST_Controller' )) {
162
+				if (class_exists('WP_REST_Controller')) {
163 163
 					// we are using REST API V2
164 164
 					$using_restapiv2 = true;
165 165
 				}
@@ -167,8 +167,8 @@  discard block
 block discarded – undo
167 167
 
168 168
 			// localized objects
169 169
 			$objects = array(
170
-				'ajaxurl' 			=> esc_url( $api_url ),
171
-				'ajaxurl2' 			=> esc_url( admin_url( 'admin-ajax.php' )),
170
+				'ajaxurl' 			=> esc_url($api_url),
171
+				'ajaxurl2' 			=> esc_url(admin_url('admin-ajax.php')),
172 172
 				'rest_root'         => $rest_root,
173 173
 				'rest_nonce'        => $rest_nonce,
174 174
 				'editor' 			=> 'lasso--content', // ID of editable content (without #) DONT CHANGE
@@ -176,13 +176,13 @@  discard block
 block discarded – undo
176 176
 				'featImgClass'		=> $featImgClass,
177 177
 				'titleClass'		=> $titleClass,
178 178
 				'strings'			=> $strings,
179
-				'settingsLink'		=> function_exists('is_multisite') && is_multisite() ? network_admin_url( 'settings.php?page=lasso-editor' ) : admin_url( 'admin.php?page=lasso-editor-settings' ),
180
-				'post_status'		=> get_post_status( $postid ),
179
+				'settingsLink'		=> function_exists('is_multisite') && is_multisite() ? network_admin_url('settings.php?page=lasso-editor') : admin_url('admin.php?page=lasso-editor-settings'),
180
+				'post_status'		=> get_post_status($postid),
181 181
 				'postid'			=> $postid,
182 182
 				'permalink'			=> $permalink,
183 183
 				'edit_others_pages'	=> current_user_can('edit_others_pages') ? true : false,
184 184
 				'edit_others_posts'	=> current_user_can('edit_others_posts') ? true : false,
185
-				'userCanEdit'		=> current_user_can('edit_post', $postid ),
185
+				'userCanEdit'		=> current_user_can('edit_post', $postid),
186 186
 				'can_publish'		=> is_page() ? current_user_can('publish_pages') : current_user_can('publish_posts'),
187 187
 				//'can_publish_posts'	=> current_user_can('publish_posts'),
188 188
 				//'can_publish_pages'	=> current_user_can('publish_pages'),
@@ -218,26 +218,26 @@  discard block
 block discarded – undo
218 218
 				'postTags'    		=> lasso_get_objects('tag'),
219 219
 				'noResultsDiv'		=> lasso_editor_empty_results(),
220 220
 				'noRevisionsDiv'	=> lasso_editor_empty_results('revision'),
221
-				'mapTileProvider'   => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider( $postid ) : false,
222
-				'mapLocations'		=> get_post_meta( $postid, 'ase_map_component_locations' ),
223
-				'mapStart'			=> get_post_meta( $postid, 'ase_map_component_start_point', true ),
224
-				'mapZoom'			=> get_post_meta( $postid, 'ase_map_component_zoom', true ),
221
+				'mapTileProvider'   => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider($postid) : false,
222
+				'mapLocations'		=> get_post_meta($postid, 'ase_map_component_locations'),
223
+				'mapStart'			=> get_post_meta($postid, 'ase_map_component_start_point', true),
224
+				'mapZoom'			=> get_post_meta($postid, 'ase_map_component_zoom', true),
225 225
 				'revisionModal' 	=> lasso_editor_revision_modal(),
226 226
 				'isMobile'          => wp_is_mobile(),
227
-				'enableAutoSave'    => lasso_editor_get_option( 'enable_autosave', 'lasso_editor' ),
227
+				'enableAutoSave'    => lasso_editor_get_option('enable_autosave', 'lasso_editor'),
228 228
 				'showColor'         => $show_color,
229 229
 				'showAlignment'     => $show_align,
230 230
 				'showIgnoredItems'  => lasso_editor_get_option('show_ignored_items', 'lasso_editor'),
231 231
 				'restapi2'          => $using_restapiv2,
232 232
 				'saveusingrest'     => $using_restapiv2 && !$disableRESTSave,
233
-				'newObjectContent'  => '<p>'.apply_filters( 'lasso_new_object_content', __( 'Once upon a time...','lasso') ).'</p>',
233
+				'newObjectContent'  => '<p>'.apply_filters('lasso_new_object_content', __('Once upon a time...', 'lasso')).'</p>',
234 234
 				'disableSavePost'   => $save_to_post_disabled,
235 235
 				'boldTag'           => $bold_tag,
236 236
 				'iTag'           	=> $i_tag,
237 237
 				'customFields'      => $custom_fields,
238
-				'clickToInsert'     => ($insert_comp_ui !='drag'),
239
-				'buttonOnEmptyP'     => ($insert_comp_ui =='mediumcom'),      // auto show a button to insert components on an empty paragraph           
240
-				'skipToEdit'        =>( $delta < 10 ) // if it's a new post, skip to edit mode
238
+				'clickToInsert'     => ($insert_comp_ui != 'drag'),
239
+				'buttonOnEmptyP'     => ($insert_comp_ui == 'mediumcom'), // auto show a button to insert components on an empty paragraph           
240
+				'skipToEdit'        =>($delta < 10) // if it's a new post, skip to edit mode
241 241
 			);
242 242
 
243 243
 
@@ -246,9 +246,9 @@  discard block
 block discarded – undo
246 246
 			
247 247
 			if (!$using_restapiv2) {
248 248
                // enqueue REST API V1
249
-			   wp_enqueue_script( 'wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
250
-			   $settings = array( 'root' => home_url( $home_url ), 'nonce' => wp_create_nonce( 'wp_json' ) );
251
-			   wp_localize_script( 'wp-api-js', 'WP_API_Settings', $settings );
249
+			   wp_enqueue_script('wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true);
250
+			   $settings = array('root' => home_url($home_url), 'nonce' => wp_create_nonce('wp_json'));
251
+			   wp_localize_script('wp-api-js', 'WP_API_Settings', $settings);
252 252
 			}
253 253
 			
254 254
 			if ($allow_change_date) {
@@ -257,13 +257,13 @@  discard block
 block discarded – undo
257 257
 				wp_enqueue_style('jquery-ui');
258 258
 			}
259 259
 
260
-			$postfix = ( defined( 'SCRIPT_DEBUG' ) && true === SCRIPT_DEBUG ) ? '' : '.min';
260
+			$postfix = (defined('SCRIPT_DEBUG') && true === SCRIPT_DEBUG) ? '' : '.min';
261 261
 			if ($show_color) {
262
-				wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api','iris'), LASSO_VERSION, true);
262
+				wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api', 'iris'), LASSO_VERSION, true);
263 263
 			} else {
264
-			    wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
264
+			    wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
265 265
 			}
266
-			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects ) );
266
+			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects));
267 267
 
268 268
 
269 269
 		}
Please login to merge, or discard this patch.
public/includes/editor-modules.php 1 patch
Spacing   +227 added lines, -227 removed lines patch added patch discarded remove patch
@@ -11,32 +11,32 @@  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() );
21
+		$status = get_post_status(get_the_ID());
22 22
 
23 23
 		// let users add custom css classes
24
-		$custom_classes = apply_filters( 'lasso_control_classes', '' );
24
+		$custom_classes = apply_filters('lasso_control_classes', '');
25 25
 
26 26
 		$post_access_class   = '';
27
-		$post_new_disabled   = lasso_editor_get_option( 'post_adding_disabled', 'lasso_editor' );
28
-		$post_settings_disabled = lasso_editor_get_option( 'post_settings_disabled', 'lasso_editor' );
29
-		$shortcodify_disabled = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
27
+		$post_new_disabled   = lasso_editor_get_option('post_adding_disabled', 'lasso_editor');
28
+		$post_settings_disabled = lasso_editor_get_option('post_settings_disabled', 'lasso_editor');
29
+		$shortcodify_disabled = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor');
30 30
 
31 31
 
32 32
 		// CSS class if adding new post objects is disabled
33
-		if ( 'on' == $post_new_disabled ) { $post_access_class = 'lasso--post-new-disabled'; }
33
+		if ('on' == $post_new_disabled) { $post_access_class = 'lasso--post-new-disabled'; }
34 34
 
35 35
 		// CSS class if adjust settings is disabled
36
-		if ( 'on' == $post_settings_disabled ) { $post_access_class = 'lasso--post-settings-disabled'; }
36
+		if ('on' == $post_settings_disabled) { $post_access_class = 'lasso--post-settings-disabled'; }
37 37
 
38 38
 		// CSS class if adding new post objects AND settings are disabled
39
-		if ( 'on' == $post_new_disabled && 'on' == $post_settings_disabled ) { $post_access_class = 'lasso--post-all-disabled'; }
39
+		if ('on' == $post_new_disabled && 'on' == $post_settings_disabled) { $post_access_class = 'lasso--post-all-disabled'; }
40 40
 
41 41
 		// CSS class if shortcodify or (Aesop Shortcode Conversion) is disabled
42 42
 		$sc_saving_class = 'on' == $shortcodify_disabled ? 'shortcodify-disabled' : 'shortcodify-enabled';
@@ -49,44 +49,44 @@  discard block
 block discarded – undo
49 49
 		$can_publish = lasso_user_can('publish_posts') || lasso_user_can('publish_pages');
50 50
 		
51 51
 
52
-		?><div id="lasso--controls" class="lasso-post-status--<?php echo sanitize_html_class( $status );?> <?php echo sanitize_html_class( $custom_classes );?>" data-post-id="<?php echo get_the_ID();?>" >
52
+		?><div id="lasso--controls" class="lasso-post-status--<?php echo sanitize_html_class($status); ?> <?php echo sanitize_html_class($custom_classes); ?>" data-post-id="<?php echo get_the_ID(); ?>" >
53 53
 
54
-			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class;?> "  <?php echo $mobile_style ?> >
54
+			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class; ?> "  <?php echo $mobile_style ?> >
55 55
 
56
-				<?php do_action( 'lasso_editor_controls_before' );
56
+				<?php do_action('lasso_editor_controls_before');
57 57
 
58
-				if ( $is_capable ) { ?>
58
+				if ($is_capable) { ?>
59 59
 
60
-					<li id="lasso--edit" title="<?php esc_attr_e( 'Edit Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
60
+					<li id="lasso--edit" title="<?php esc_attr_e('Edit Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
61 61
 
62
-					<?php if ( 'off' == $post_settings_disabled || empty( $post_settings_disabled ) ) { ?>
63
-						<li id="lasso--post-settings" title="<?php esc_attr_e( 'Post Settings', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
62
+					<?php if ('off' == $post_settings_disabled || empty($post_settings_disabled)) { ?>
63
+						<li id="lasso--post-settings" title="<?php esc_attr_e('Post Settings', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
64 64
 					<?php }
65 65
 
66 66
 				} ?>
67 67
 
68
-				<li id="lasso--post-all" title="<?php esc_attr_e( 'All Posts', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
68
+				<li id="lasso--post-all" title="<?php esc_attr_e('All Posts', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
69 69
 
70
-				<?php if ( $is_capable && wp_revisions_enabled( $post ) ) { ?>
71
-					<li id="lasso--post-revisions" title="<?php esc_attr_e( 'Revisions', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
70
+				<?php if ($is_capable && wp_revisions_enabled($post)) { ?>
71
+					<li id="lasso--post-revisions" title="<?php esc_attr_e('Revisions', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
72 72
 				<?php } ?>
73 73
 
74
-				<?php if ( ( 'off' == $post_new_disabled || empty( $post_new_disabled ) && lasso_user_can('publish_posts') ) ) { ?>
75
-					<li id="lasso--post-new" title="<?php esc_attr_e( 'Add Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
74
+				<?php if (('off' == $post_new_disabled || empty($post_new_disabled) && lasso_user_can('publish_posts'))) { ?>
75
+					<li id="lasso--post-new" title="<?php esc_attr_e('Add Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
76 76
 				<?php } ?>
77 77
 
78
-				<?php do_action( 'lasso_editor_controls_after' );?>
78
+				<?php do_action('lasso_editor_controls_after'); ?>
79 79
 
80 80
 			</ul>
81 81
 
82
-			<?php if ( is_singular() && !$is_mobile ) { ?>
82
+			<?php if (is_singular() && !$is_mobile) { ?>
83 83
 
84
-				<div class="lasso--controls__right" data-posttype="<?php echo get_post_type( get_the_ID() );?>" data-status="<?php echo $status;?>">
84
+				<div class="lasso--controls__right" data-posttype="<?php echo get_post_type(get_the_ID()); ?>" data-status="<?php echo $status; ?>">
85 85
 
86
-					<a href="#" title="<?php esc_attr_e( 'Save Post', 'lasso' );?>" id="lasso--save" class="lasso-save-post lasso--button <?php echo $sc_saving_class;?>"></a>
86
+					<a href="#" title="<?php esc_attr_e('Save Post', 'lasso'); ?>" id="lasso--save" class="lasso-save-post lasso--button <?php echo $sc_saving_class; ?>"></a>
87 87
 
88
-					<?php if ( ('draft' == $status ) || ('pending' == $status && $can_publish) ) { ?>
89
-						<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>
88
+					<?php if (('draft' == $status) || ('pending' == $status && $can_publish)) { ?>
89
+						<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>
90 90
 					<?php } ?>
91 91
 
92 92
 				</div>
@@ -111,9 +111,9 @@  discard block
 block discarded – undo
111 111
 
112 112
 
113 113
 	// let users add custom css classes
114
-	$custom_classes = apply_filters( 'lasso_sidebar_classes', '' );
114
+	$custom_classes = apply_filters('lasso_sidebar_classes', '');
115 115
 	?>
116
-	<div id="lasso--sidebar" class="<?php echo sanitize_html_class( $custom_classes );?>" >
116
+	<div id="lasso--sidebar" class="<?php echo sanitize_html_class($custom_classes); ?>" >
117 117
 		<div class="lasso--sidebar__inner">
118 118
 			<div id="lasso--component__settings"></div>
119 119
 		</div>
@@ -135,20 +135,20 @@  discard block
 block discarded – undo
135 135
 	$is_mobile = wp_is_mobile();
136 136
 
137 137
 	// check for lasso story engine and add a class doniting this
138
-	$ase_status = class_exists( 'Aesop_Core' ) || defined( 'LASSO_CUSTOM' ) ? 'ase-active' : 'ase-not-active';
138
+	$ase_status = class_exists('Aesop_Core') || defined('LASSO_CUSTOM') ? 'ase-active' : 'ase-not-active';
139 139
 
140 140
 	// let users add custom css classes
141
-	$custom_classes = apply_filters( 'lasso_toolbar_classes', '' );
141
+	$custom_classes = apply_filters('lasso_toolbar_classes', '');
142 142
 
143 143
 	// are toolbar headings enabled
144
-	$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
145
-	$toolbar_headings_h4      = lasso_editor_get_option( 'toolbar_headings_h4', 'lasso_editor' );
144
+	$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
145
+	$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
146 146
 
147
-	$toolbar_class  = $toolbar_headings ? 'toolbar-extended' : false;
147
+	$toolbar_class = $toolbar_headings ? 'toolbar-extended' : false;
148 148
 	
149 149
 	// mobile styles
150 150
     $mobile_class = $is_mobile ? 'lasso-mobile' : false;
151
-	$mobile_style =$is_mobile ? 'style="bottom:0px;"' : null;
151
+	$mobile_style = $is_mobile ? 'style="bottom:0px;"' : null;
152 152
 	
153 153
 	//show color
154 154
 	$show_color = lasso_editor_get_option('toolbar_show_color', 'lasso_editor');
@@ -156,109 +156,109 @@  discard block
 block discarded – undo
156 156
 	//show alignment
157 157
 	$show_align = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor');
158 158
 	
159
-	$status = get_post_status( get_the_ID() );
159
+	$status = get_post_status(get_the_ID());
160 160
 
161 161
 
162 162
 	?>
163
-	<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 ?>>
164
-		<ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"';}?>>
165
-			<?php do_action( 'lasso_toolbar_components_before' );?>
166
-		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e( 'Bold', 'lasso' );?>"></li>
167
-		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e( 'Underline', 'lasso' );?>"></li>
168
-		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e( 'Italicize', 'lasso' );?>"></li>
169
-		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e( 'Strikethrough', 'lasso' );?>"></li>
170
-			<li id="lasso-toolbar--components" title="<?php esc_attr_e( 'Insert Component', 'lasso' );?>" style="color:#ffffa0;">
163
+	<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 ?>>
164
+		<ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"'; }?>>
165
+			<?php do_action('lasso_toolbar_components_before'); ?>
166
+		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e('Bold', 'lasso'); ?>"></li>
167
+		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e('Underline', 'lasso'); ?>"></li>
168
+		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e('Italicize', 'lasso'); ?>"></li>
169
+		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e('Strikethrough', 'lasso'); ?>"></li>
170
+			<li id="lasso-toolbar--components" title="<?php esc_attr_e('Insert Component', 'lasso'); ?>" style="color:#ffffa0;">
171 171
 			    <ul id="lasso-toolbar--components__list" style="display:none;color:white;">
172
-			    	<?php if ( 'ase-active' == $ase_status ): ?>
173
-						<li data-type="image" title="<?php esc_attr_e( 'Image', 'lasso' );?>" class="lasso-toolbar--component__image"></li>
174
-						<li data-type="character" title="<?php esc_attr_e( 'Character', 'lasso' );?>" class="lasso-toolbar--component__character"></li>
175
-						<li data-type="quote" title="<?php esc_attr_e( 'Quote', 'lasso' );?>"  class="lasso-toolbar--component__quote"></li>
176
-						<li data-type="content" title="<?php esc_attr_e( 'Content', 'lasso' );?>"  class="lasso-toolbar--component__content"></li>
177
-						<li data-type="chapter" title="<?php esc_attr_e( 'Chapter', 'lasso' );?>"  class="lasso-toolbar--component__chapter"></li>
178
-						<li data-type="parallax" title="<?php esc_attr_e( 'Parallax', 'lasso' );?>"  class="lasso-toolbar--component__parallax"></li>
179
-						<li data-type="audio" title="<?php esc_attr_e( 'Audio', 'lasso' );?>"  class="lasso-toolbar--component__audio"></li>
180
-						<li data-type="video" title="<?php esc_attr_e( 'Video', 'lasso' );?>"  class="lasso-toolbar--component__video"></li>
181
-						<li data-type="map" title="<?php esc_attr_e( 'Map', 'lasso' );?>"  class="lasso-toolbar--component__map"></li>
182
-						<li data-type="timeline_stop" title="<?php esc_attr_e( 'Timeline', 'lasso' );?>"  class="lasso-toolbar--component__timeline"></li>
183
-						<li data-type="document" title="<?php esc_attr_e( 'Document', 'lasso' );?>"  class="lasso-toolbar--component__document"></li>
184
-						<li data-type="collection" title="<?php esc_attr_e( 'Collection', 'lasso' );?>"  class="lasso-toolbar--component__collection"></li>
185
-						<li data-type="gallery" title="<?php esc_attr_e( 'Gallery', 'lasso' );?>"  class="lasso-toolbar--component__gallery"></li>
186
-						<?php if ( class_exists ('Aesop_GalleryPop') ) { ?>
187
-						     <li data-type="gallery" title="<?php esc_attr_e( 'Gallery Pop', 'lasso' );?>"  class="lasso-toolbar--component__gallerypop"></li>
172
+			    	<?php if ('ase-active' == $ase_status): ?>
173
+						<li data-type="image" title="<?php esc_attr_e('Image', 'lasso'); ?>" class="lasso-toolbar--component__image"></li>
174
+						<li data-type="character" title="<?php esc_attr_e('Character', 'lasso'); ?>" class="lasso-toolbar--component__character"></li>
175
+						<li data-type="quote" title="<?php esc_attr_e('Quote', 'lasso'); ?>"  class="lasso-toolbar--component__quote"></li>
176
+						<li data-type="content" title="<?php esc_attr_e('Content', 'lasso'); ?>"  class="lasso-toolbar--component__content"></li>
177
+						<li data-type="chapter" title="<?php esc_attr_e('Chapter', 'lasso'); ?>"  class="lasso-toolbar--component__chapter"></li>
178
+						<li data-type="parallax" title="<?php esc_attr_e('Parallax', 'lasso'); ?>"  class="lasso-toolbar--component__parallax"></li>
179
+						<li data-type="audio" title="<?php esc_attr_e('Audio', 'lasso'); ?>"  class="lasso-toolbar--component__audio"></li>
180
+						<li data-type="video" title="<?php esc_attr_e('Video', 'lasso'); ?>"  class="lasso-toolbar--component__video"></li>
181
+						<li data-type="map" title="<?php esc_attr_e('Map', 'lasso'); ?>"  class="lasso-toolbar--component__map"></li>
182
+						<li data-type="timeline_stop" title="<?php esc_attr_e('Timeline', 'lasso'); ?>"  class="lasso-toolbar--component__timeline"></li>
183
+						<li data-type="document" title="<?php esc_attr_e('Document', 'lasso'); ?>"  class="lasso-toolbar--component__document"></li>
184
+						<li data-type="collection" title="<?php esc_attr_e('Collection', 'lasso'); ?>"  class="lasso-toolbar--component__collection"></li>
185
+						<li data-type="gallery" title="<?php esc_attr_e('Gallery', 'lasso'); ?>"  class="lasso-toolbar--component__gallery"></li>
186
+						<?php if (class_exists('Aesop_GalleryPop')) { ?>
187
+						     <li data-type="gallery" title="<?php esc_attr_e('Gallery Pop', 'lasso'); ?>"  class="lasso-toolbar--component__gallerypop"></li>
188 188
 						<?php }?>
189
-						<?php if ( class_exists ('Aesop_Events') ) { ?>
190
-						     <li data-type="events" title="<?php esc_attr_e( 'Event', 'lasso' );?>"  class="lasso-toolbar--component__event"></li>
189
+						<?php if (class_exists('Aesop_Events')) { ?>
190
+						     <li data-type="events" title="<?php esc_attr_e('Event', 'lasso'); ?>"  class="lasso-toolbar--component__event"></li>
191 191
 						<?php }?>
192 192
 					<?php else: ?>
193
-						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );?>" class="image lasso-toolbar--component__image"></li>
194
-						<li data-type="wpquote" title="<?php esc_attr_e( 'WordPress Quote', 'lasso' );?>" class="quote lasso-toolbar--component__quote"></li>
195
-						<!--li data-type="wpvideo" title="<?php esc_attr_e( 'WordPress Video', 'lasso' );?>" class="video lasso-toolbar--component__video"></li-->
193
+						<li data-type="wpimg" title="<?php esc_attr_e('WordPress Image', 'lasso'); ?>" class="image lasso-toolbar--component__image"></li>
194
+						<li data-type="wpquote" title="<?php esc_attr_e('WordPress Quote', 'lasso'); ?>" class="quote lasso-toolbar--component__quote"></li>
195
+						<!--li data-type="wpvideo" title="<?php esc_attr_e('WordPress Video', 'lasso'); ?>" class="video lasso-toolbar--component__video"></li-->
196 196
 					<?php endif; ?>
197
-					<?php do_action( 'lasso_toolbar_components' );?>
197
+					<?php do_action('lasso_toolbar_components'); ?>
198 198
 			    </ul>
199 199
 			</li>
200
-		    <?php if ( $toolbar_headings ): ?>
201
-		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>"></li>
202
-		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>"></li>
200
+		    <?php if ($toolbar_headings): ?>
201
+		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>"></li>
202
+		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>"></li>
203 203
 			<?php endif; ?>
204
-			<?php if ( $toolbar_headings_h4 ): ?>
205
-		    <li id="lasso-toolbar--h4" title="<?php esc_attr_e( 'H4 Heading', 'lasso' );?>"></li>
206
-		    <li id="lasso-toolbar--h5" title="<?php esc_attr_e( 'H5 Heading', 'lasso' );?>"></li>
207
-			<li id="lasso-toolbar--h6" title="<?php esc_attr_e( 'H6 Heading', 'lasso' );?>"></li>
204
+			<?php if ($toolbar_headings_h4): ?>
205
+		    <li id="lasso-toolbar--h4" title="<?php esc_attr_e('H4 Heading', 'lasso'); ?>"></li>
206
+		    <li id="lasso-toolbar--h5" title="<?php esc_attr_e('H5 Heading', 'lasso'); ?>"></li>
207
+			<li id="lasso-toolbar--h6" title="<?php esc_attr_e('H6 Heading', 'lasso'); ?>"></li>
208 208
 			<?php endif; ?>
209 209
 			
210
-			<?php if ( $show_color ): ?>
211
-		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e( 'Set Color for Selected Text', 'lasso' );?>"></li>
212
-		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e( 'Choose Color', 'lasso' );?>"></li>
210
+			<?php if ($show_color): ?>
211
+		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e('Set Color for Selected Text', 'lasso'); ?>"></li>
212
+		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e('Choose Color', 'lasso'); ?>"></li>
213 213
 			<?php endif; ?>
214 214
 					
215 215
 		    
216
-			<li id="lasso-toolbar--link" title="<?php esc_attr_e( 'Anchor Link', 'lasso' );?>">
216
+			<li id="lasso-toolbar--link" title="<?php esc_attr_e('Anchor Link', 'lasso'); ?>">
217 217
 		    	<div id="lasso-toolbar--link__wrap" <?php echo $mobile_style ?> >
218
-		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'http://url.com', 'lasso' );?>"></div>
219
-		    		<a href="#" title="<?php esc_attr_e( 'Create Link', 'lasso' );?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
218
+		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e('http://url.com', 'lasso'); ?>"></div>
219
+		    		<a href="#" title="<?php esc_attr_e('Create Link', 'lasso'); ?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
220 220
 					<input class="styled-checkbox" type="checkbox" id="aesop-toolbar--link_newtab" checked/>
221
-                    <label for="aesop-toolbar--link_newtab"><?php esc_attr_e( 'Open in a New Tab', 'lasso' );?></label>
221
+                    <label for="aesop-toolbar--link_newtab"><?php esc_attr_e('Open in a New Tab', 'lasso'); ?></label>
222 222
 		    	</div>
223 223
 		    </li>
224
-		    <?php do_action( 'lasso_toolbar_components_after' );?>
225
-		    <li id="lasso-toolbar--html" title="<?php esc_attr_e( 'Insert HTML or Code', 'lasso' );?>">
224
+		    <?php do_action('lasso_toolbar_components_after'); ?>
225
+		    <li id="lasso-toolbar--html" title="<?php esc_attr_e('Insert HTML or Code', 'lasso'); ?>">
226 226
 		    	<div id="lasso-toolbar--html__wrap" <?php echo $mobile_style ?>>
227
-		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?>"></div>
227
+		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?>"></div>
228 228
 		    		<div id="lasso-toolbar--html__footer">
229 229
 					<div id="lasso-toolbar--html__footer_desc" >
230
-					<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?><br>
231
-					<?php esc_attr_e( 'You can also use Shortcodes', 'lasso' );?><br>
232
-					<?php esc_attr_e( 'You can also enter a URL to embed, such as Youtube, Vimeo and Twitter URLs.', 'lasso' );?>
230
+					<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?><br>
231
+					<?php esc_attr_e('You can also use Shortcodes', 'lasso'); ?><br>
232
+					<?php esc_attr_e('You can also enter a URL to embed, such as Youtube, Vimeo and Twitter URLs.', 'lasso'); ?>
233 233
 					</div>
234 234
 		    			<ul class="lasso-toolbar--html-snips">
235 235
 						
236
-		    				<?php if ( !$toolbar_headings ): ?>
237
-		    				<li id="lasso-html--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>">
238
-		    				<li id="lasso-html--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>">
236
+		    				<?php if (!$toolbar_headings): ?>
237
+		    				<li id="lasso-html--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>">
238
+		    				<li id="lasso-html--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>">
239 239
 		    				<?php endif; ?>
240
-		    				<li id="lasso-html--ul" title="<?php esc_attr_e( 'Unordered List', 'lasso' );?>">
241
-		    				<li id="lasso-html--ol" title="<?php esc_attr_e( 'Ordered List', 'lasso' );?>">
240
+		    				<li id="lasso-html--ul" title="<?php esc_attr_e('Unordered List', 'lasso'); ?>">
241
+		    				<li id="lasso-html--ol" title="<?php esc_attr_e('Ordered List', 'lasso'); ?>">
242 242
 		    			</ul>
243
-		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e( 'Cancel', 'lasso' );?></a>
244
-		    			<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>
243
+		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e('Cancel', 'lasso'); ?></a>
244
+		    			<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>
245 245
 		    		</div>
246 246
 		    	</div>
247 247
 		    </li>
248
-			<?php if ( $show_align ): ?>
249
-		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e( 'Text Left Align', 'lasso' );?>"></li>
250
-		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e( 'Text Center Align', 'lasso' );?>"></li>
251
-			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e( 'Text Right Align', 'lasso' );?>"></li>
248
+			<?php if ($show_align): ?>
249
+		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e('Text Left Align', 'lasso'); ?>"></li>
250
+		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e('Text Center Align', 'lasso'); ?>"></li>
251
+			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e('Text Right Align', 'lasso'); ?>"></li>
252 252
 			<?php endif; ?>
253 253
 		</ul>
254
-		<?php if ( is_singular() && $is_mobile ) { ?>
254
+		<?php if (is_singular() && $is_mobile) { ?>
255 255
 
256
-				<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;">
256
+				<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;">
257 257
 
258
-					<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>
258
+					<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>
259 259
 
260
-					<?php if ( 'draft' == $status && ( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') )  ) { ?>
261
-						<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>
260
+					<?php if ('draft' == $status && (lasso_user_can('publish_posts') || lasso_user_can('publish_pages'))) { ?>
261
+						<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>
262 262
 					<?php } ?>
263 263
 
264 264
 				</div>
@@ -276,20 +276,20 @@  discard block
 block discarded – undo
276 276
  */
277 277
 function lasso_editor_settings_toolbar() {
278 278
 
279
-	$delete_nonce = wp_create_nonce( 'lasso-delete-nonce' );
279
+	$delete_nonce = wp_create_nonce('lasso-delete-nonce');
280 280
 
281 281
 	ob_start();
282 282
 
283 283
 
284 284
 	// let users add custom css classes
285
-	$custom_classes = apply_filters( 'lasso_component_classes', '' );
285
+	$custom_classes = apply_filters('lasso_component_classes', '');
286 286
 
287 287
 	?>
288
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
289
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
290
-		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
291
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
292
-		<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>
288
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
289
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
290
+		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
291
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
292
+		<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>
293 293
 	</ul>
294 294
 
295 295
 	<?php return ob_get_clean();
@@ -307,13 +307,13 @@  discard block
 block discarded – undo
307 307
 
308 308
 
309 309
 	// has post thumbnail
310
-	$has_thumbnail = has_post_thumbnail( get_the_ID() ) ? 'class="lasso--featImg--has-thumb"' : false;
310
+	$has_thumbnail = has_post_thumbnail(get_the_ID()) ? 'class="lasso--featImg--has-thumb"' : false;
311 311
 
312 312
 	?>
313
-	<ul id="lasso--featImgControls" <?php echo $has_thumbnail;?>>
314
-		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e( 'Replace Image', 'lasso' );?>" href="#"><i class="lasso-icon-image"></i></a></li>
315
-		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e( 'Delete Image', 'lasso' );?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
316
-		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e( 'save', 'lasso' );?></a></li>
313
+	<ul id="lasso--featImgControls" <?php echo $has_thumbnail; ?>>
314
+		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e('Replace Image', 'lasso'); ?>" href="#"><i class="lasso-icon-image"></i></a></li>
315
+		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e('Delete Image', 'lasso'); ?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
316
+		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e('save', 'lasso'); ?></a></li>
317 317
 	</ul>
318 318
 
319 319
 	<?php return ob_get_clean();
@@ -337,51 +337,51 @@  discard block
 block discarded – undo
337 337
 
338 338
 	$postid = get_the_ID();
339 339
 
340
-	$status = get_post_status( $postid );
341
-	$nonce = wp_create_nonce( 'lasso-update-post-settings' );
340
+	$status = get_post_status($postid);
341
+	$nonce = wp_create_nonce('lasso-update-post-settings');
342 342
 
343 343
 	// let users add custom css classes
344
-	$custom_classes = apply_filters( 'lasso_modal_settings_classes', '' );
344
+	$custom_classes = apply_filters('lasso_modal_settings_classes', '');
345 345
 
346 346
 	// objects categories
347
-	$categories 		= lasso_get_post_objects( $postid, 'category' );
348
-	$tags 				= lasso_get_post_objects( $postid, 'tag' );
347
+	$categories = lasso_get_post_objects($postid, 'category');
348
+	$tags = lasso_get_post_objects($postid, 'tag');
349 349
 
350 350
 	// modal tabs
351
-	$tabs  				= lasso_modal_addons('tab');
352
-	$content 			= lasso_modal_addons('content');
351
+	$tabs = lasso_modal_addons('tab');
352
+	$content = lasso_modal_addons('content');
353 353
 	
354 354
 	//editor options
355 355
 	$allow_change_date = lasso_editor_get_option('allow_change_date', 'lasso_editor');
356 356
 
357 357
 	// are we singular
358
-	$is_singular 		= is_singular();
358
+	$is_singular = is_singular();
359 359
 	$is_singular_class 	= $is_singular ? 'lasso--postsettings__2col' : 'lasso--postsettings__1col';
360 360
 	$has_thumb_class    = has_post_thumbnail() ? 'has-thumbnail' : 'no-thumbnail';
361 361
 	$theme_supports     = current_theme_supports('post-thumbnails');
362
-	$default_image 		= LASSO_URL.'/admin/assets/img/empty-img.png';
362
+	$default_image = LASSO_URL.'/admin/assets/img/empty-img.png';
363 363
 
364 364
 ?>
365
-	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>">
365
+	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>">
366 366
 		<div class="lasso--modal__inner">
367 367
 
368
-			<?php if( $tabs ) { echo $tabs; } ?>
368
+			<?php if ($tabs) { echo $tabs; } ?>
369 369
 
370 370
 			<div class="lasso--modal__content modal__content--core visible" data-addon-content="core">
371
-				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class;?>" >
371
+				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class; ?>" >
372 372
 
373
-					<?php if ( $is_singular && $theme_supports ) : ?>
373
+					<?php if ($is_singular && $theme_supports) : ?>
374 374
 					<div class="lasso--postsettings__left">
375
-						<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>
376
-						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url( $default_image );?>">
375
+						<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>
376
+						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url($default_image); ?>">
377 377
 
378 378
 							<div id="lasso--post-thumb__controls" class="lasso--post-thumb__controls">
379
-								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image','lasso');?>" class="dashicons dashicons-edit"></i>
380
-								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image','lasso');?>" class="dashicons dashicons-no-alt"></i>
379
+								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image', 'lasso'); ?>" class="dashicons dashicons-edit"></i>
380
+								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image', 'lasso'); ?>" class="dashicons dashicons-no-alt"></i>
381 381
 								<i id="lasso--save-status" class="lasso-icon lasso-icon-spinner6 not-visible"></i>
382 382
 							</div>
383 383
 
384
-							<?php echo has_post_thumbnail() ? get_the_post_thumbnail( $post->ID, 'medium' ) : '<img src="'.$default_image.'">'; ?>
384
+							<?php echo has_post_thumbnail() ? get_the_post_thumbnail($post->ID, 'medium') : '<img src="'.$default_image.'">'; ?>
385 385
 
386 386
 						</div>
387 387
 						<div id="lasso--featImgSave"><a href="#" class="not-visible">Save</a></div>
@@ -391,13 +391,13 @@  discard block
 block discarded – undo
391 391
 
392 392
 					<div class="lasso--postsettings__right">
393 393
 
394
-						<?php if( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') ): ?>
394
+						<?php if (lasso_user_can('publish_posts') || lasso_user_can('publish_pages')): ?>
395 395
 						<div class="lasso--postsettings__option story-status-option">
396
-							<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>
397
-							<ul class="story-status story-status-<?php echo sanitize_html_class( $status );?>">
398
-								<li id="lasso--status-draft"><?php _e( 'Draft', 'lasso' );?></li>
399
-								<li id="lasso--status-pending"><?php _e( 'Pending', 'lasso' );?></li>
400
-								<li id="lasso--status-publish"><?php _e( 'Publish', 'lasso' );?></li>
396
+							<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>
397
+							<ul class="story-status story-status-<?php echo sanitize_html_class($status); ?>">
398
+								<li id="lasso--status-draft"><?php _e('Draft', 'lasso'); ?></li>
399
+								<li id="lasso--status-pending"><?php _e('Pending', 'lasso'); ?></li>
400
+								<li id="lasso--status-publish"><?php _e('Publish', 'lasso'); ?></li>
401 401
 							</ul>
402 402
 							<div class="lasso--slider_wrap">
403 403
 								<div id="lasso--slider"></div>
@@ -405,10 +405,10 @@  discard block
 block discarded – undo
405 405
 						</div>
406 406
 						<?php endif; ?>
407 407
 
408
-						<?php if ( 'publish' == $status ): ?>
408
+						<?php if ('publish' == $status): ?>
409 409
 						<div class="lasso--postsettings__option story-slug-option">
410
-							<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>
411
-							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset( $post ) ? esc_attr( $post->post_name ) : false;?>">
410
+							<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>
411
+							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset($post) ? esc_attr($post->post_name) : false; ?>">
412 412
 						</div>
413 413
 						<?php endif; ?>
414 414
 
@@ -417,20 +417,20 @@  discard block
 block discarded – undo
417 417
 					<div class="lasso--postsettings__middle">
418 418
 
419 419
 						<div class="lasso--postsettings__option story-categories-option">
420
-							<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>
421
-							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories;?>">
420
+							<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>
421
+							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories; ?>">
422 422
 						</div>
423 423
 
424 424
 						<div class="lasso--postsettings__option story-tags-option">
425
-							<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>
426
-							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags;?>">
425
+							<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>
426
+							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags; ?>">
427 427
 						</div>
428 428
 						<?php 
429 429
 						if ($allow_change_date) { 
430
-						    $dateformat = get_option( 'date_format' ); 
430
+						    $dateformat = get_option('date_format'); 
431 431
 						?>
432
-						    <label><?php _e( 'Post Date', 'lasso' ); ?></label>
433
-							<input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid);?>"/>
432
+						    <label><?php _e('Post Date', 'lasso'); ?></label>
433
+							<input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid); ?>"/>
434 434
 						<?php
435 435
 						}?>
436 436
 
@@ -452,23 +452,23 @@  discard block
 block discarded – undo
452 452
 					?>
453 453
 					<!--/div-->
454 454
 
455
-					<?php do_action( 'lasso_modal_post_form' ); // action ?>
455
+					<?php do_action('lasso_modal_post_form'); // action ?>
456 456
 
457 457
 					<div class="lasso--postsettings__footer" >
458
-						<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
458
+						<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
459 459
 						<input type="hidden" name="status" value="">
460 460
 						<input type="hidden" name="categories" value="">
461
-						<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
461
+						<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
462 462
 						<input type="hidden" name="action" value="process_update-object_post">
463
-						<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
464
-						<?php do_action( 'lasso_modal_post_form_footer' ); // action ?>
465
-						<input type="submit" id="lasso--postsettings-submit" value="<?php esc_attr_e( 'Save', 'lasso' );?>">
463
+						<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
464
+						<?php do_action('lasso_modal_post_form_footer'); // action ?>
465
+						<input type="submit" id="lasso--postsettings-submit" value="<?php esc_attr_e('Save', 'lasso'); ?>">
466 466
 					</div>
467 467
 
468 468
 				</form>
469 469
 			</div>
470 470
 
471
-			<?php if( $tabs ) { echo $content; } ?>
471
+			<?php if ($tabs) { echo $content; } ?>
472 472
 
473 473
 		</div>
474 474
 
@@ -490,38 +490,38 @@  discard block
 block discarded – undo
490 490
 	ob_start();
491 491
 
492 492
 
493
-	$status = get_post_status( get_the_ID() );
493
+	$status = get_post_status(get_the_ID());
494 494
 
495
-	$nonce = wp_create_nonce( 'lasso-editor-new-post' );
495
+	$nonce = wp_create_nonce('lasso-editor-new-post');
496 496
 
497 497
 	// let users add custom css classes
498
-	$custom_classes = apply_filters( 'lasso_modal_post_classes', '' );
498
+	$custom_classes = apply_filters('lasso_modal_post_classes', '');
499 499
 
500 500
 	// return the post type
501
-	$type = get_post_type( get_the_ID() );
501
+	$type = get_post_type(get_the_ID());
502 502
 
503 503
 	$mobile_style = "";
504 504
 	if (wp_is_mobile()) {
505 505
 		$mobile_style = 'style="top:140px !important;"';
506 506
 	}
507 507
 	?>
508
-	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" <?php echo $mobile_style;?>">
508
+	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" <?php echo $mobile_style; ?>">
509 509
 		<div class="lasso--modal__inner lasso--hasnewform">
510 510
 
511 511
 			<form id="lasso--postnew__form" enctype="multipart/form-data" class="lasso--post-form">
512 512
 
513 513
 				<div class="lasso--postsettings__option story-slug-option lasso--last-option">
514
-					<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>
515
-					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e( 'Grump Wizards Make Toxic Brew', 'lasso' );?>">
514
+					<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>
515
+					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e('Grump Wizards Make Toxic Brew', 'lasso'); ?>">
516 516
 						<div class="lasso--select-wrap" style="width:90px">
517 517
 						<select id="lasso--select-type" name="story_type">
518 518
 
519 519
 							<?php
520 520
 								$types = lasso_post_types();
521
-								if ( !empty( $types ) ) {
522
-									foreach( $types as $type ) {					
523
-										$type = preg_replace( '/s\b/','', $type );
524
-										printf( '<option value="%s">%s</option>', lcfirst( esc_attr( $type ) ) , ucfirst( esc_attr( $type ) ) );
521
+								if (!empty($types)) {
522
+									foreach ($types as $type) {					
523
+										$type = preg_replace('/s\b/', '', $type);
524
+										printf('<option value="%s">%s</option>', lcfirst(esc_attr($type)), ucfirst(esc_attr($type)));
525 525
 									}
526 526
 
527 527
 								}
@@ -532,18 +532,18 @@  discard block
 block discarded – undo
532 532
 				</div>
533 533
 
534 534
 				<div class="lasso--postsettings__footer">
535
-					<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
535
+					<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
536 536
 					<input type="hidden" name="action" value="process_new-object_post">
537 537
 					<?php
538
-						if ( !empty( $types ) ) {
538
+						if (!empty($types)) {
539 539
 							// get the first element
540 540
 						    $type = reset($types);							
541
-							$type = preg_replace( '/s\b/','', $type );
542
-							printf( '<input type="hidden" name="object" value="%s">', lcfirst( esc_attr( $type ) ) );		
541
+							$type = preg_replace('/s\b/', '', $type);
542
+							printf('<input type="hidden" name="object" value="%s">', lcfirst(esc_attr($type)));		
543 543
 						}
544 544
 					?>
545
-					<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
546
-					<input type="submit" value="<?php esc_attr_e( 'Create', 'lasso' );?>">
545
+					<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
546
+					<input type="submit" value="<?php esc_attr_e('Create', 'lasso'); ?>">
547 547
 				</div>
548 548
 
549 549
 			</form>
@@ -571,18 +571,18 @@  discard block
 block discarded – undo
571 571
 	ob_start();
572 572
 
573 573
 	// post status
574
-	$status = get_post_status( get_the_ID() );
574
+	$status = get_post_status(get_the_ID());
575 575
 
576 576
 	// let users add custom css classes
577
-	$custom_classes = apply_filters( 'lasso_modal_all_post_classes', '' );
577
+	$custom_classes = apply_filters('lasso_modal_all_post_classes', '');
578 578
 
579 579
 	?>
580
-	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" style="max-height:100%">
580
+	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" style="max-height:100%">
581 581
 		<div class="lasso--modal__inner">
582 582
 
583 583
 			<div class="lasso--post-filtering not-visible">
584 584
 				<div class="lasso--search__results">
585
-					<span id="lasso--results-found"></span><?php _e('results found','lasso');?>
585
+					<span id="lasso--results-found"></span><?php _e('results found', 'lasso'); ?>
586 586
 				</div>
587 587
 				<div class="lasso--search">
588 588
 					<i id="lasso--search__toggle" class="dashicons dashicons-search"></i>
@@ -596,18 +596,18 @@  discard block
 block discarded – undo
596 596
 				$post_types = lasso_post_types_names();
597 597
 				$rest_bases = lasso_post_types_rest_base();
598 598
 
599
-				if ( ! empty( $post_types ) ) {
599
+				if (!empty($post_types)) {
600 600
 					$first = 'active';
601
-					foreach( $post_types as $name => $label ) {
601
+					foreach ($post_types as $name => $label) {
602 602
 						if (array_key_exists($name, $rest_bases)) {
603
-							printf( '<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr( $first), esc_attr( $rest_bases[$name] ), esc_attr( $label ) );
603
+							printf('<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr($first), esc_attr($rest_bases[$name]), esc_attr($label));
604 604
 						}
605 605
 						$first = '';
606 606
 					}
607 607
 
608 608
 				}
609 609
 
610
-				do_action('lasso_modal_post_objects');?>
610
+				do_action('lasso_modal_post_objects'); ?>
611 611
 
612 612
 			</ul>
613 613
 			<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
@@ -627,14 +627,14 @@  discard block
 block discarded – undo
627 627
 
628 628
 
629 629
 	// let users add custom css classes
630
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
630
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
631 631
 
632 632
 	?>
633
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
634
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
635
-		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
636
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
637
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
633
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
634
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
635
+		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
636
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
637
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
638 638
 	</ul>
639 639
 
640 640
 	<?php return ob_get_clean();
@@ -646,14 +646,14 @@  discard block
 block discarded – undo
646 646
 
647 647
 
648 648
 	// let users add custom css classes
649
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
649
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
650 650
 
651 651
 	?>
652
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
653
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
654
-		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
655
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
656
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
652
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
653
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
654
+		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
655
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
656
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
657 657
 	</ul>
658 658
 
659 659
 	<?php return ob_get_clean();
@@ -666,16 +666,16 @@  discard block
 block discarded – undo
666 666
  */
667 667
 function lasso_map_form_footer() {
668 668
 
669
-	$nonce = wp_create_nonce( 'lasso-process-map' );
669
+	$nonce = wp_create_nonce('lasso-process-map');
670 670
 
671 671
 	ob_start();
672 672
 
673 673
 	?>
674 674
 	<div class="lasso--map-form__footer">
675
-		<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
676
-		<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
675
+		<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
676
+		<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
677 677
 		<input type="hidden" name="action" value="process_map_save">
678
-		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e( 'Save Locations', 'lasso' );?>">
678
+		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e('Save Locations', 'lasso'); ?>">
679 679
 	</div>
680 680
 
681 681
 	<?php return ob_get_clean();
@@ -693,7 +693,7 @@  discard block
 block discarded – undo
693 693
 
694 694
 	?>
695 695
 	<div id="lasso--pagerefresh" class="visible">
696
-		<?php _e( 'Save this post and refesh the page to see these changes.', 'lasso' );?>
696
+		<?php _e('Save this post and refesh the page to see these changes.', 'lasso'); ?>
697 697
 	</div>
698 698
 
699 699
 	<?php return ob_get_clean();
@@ -707,43 +707,43 @@  discard block
 block discarded – undo
707 707
  */
708 708
 function lasso_editor_options_blob() {
709 709
 
710
-	$codes   = function_exists( 'aesop_shortcodes' ) ? aesop_shortcodes() : apply_filters( 'lasso_custom_options', '' );
711
-	$galleries  = function_exists( 'lasso_editor_galleries_exist' ) && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
710
+	$codes = function_exists('aesop_shortcodes') ? aesop_shortcodes() : apply_filters('lasso_custom_options', '');
711
+	$galleries = function_exists('lasso_editor_galleries_exist') && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
712 712
 
713
-	$nonce = wp_create_nonce( 'lasso_gallery' );
713
+	$nonce = wp_create_nonce('lasso_gallery');
714 714
 
715 715
 	$blob = array();
716 716
 
717
-	if ( empty( $codes ) )
717
+	if (empty($codes))
718 718
 		return;
719 719
 
720
-	foreach ( $codes as $slug => $shortcode ) {
720
+	foreach ($codes as $slug => $shortcode) {
721 721
 		$return = '';
722 722
 		// Shortcode has atts
723 723
 
724
-		if ( count( $shortcode['atts'] ) && $shortcode['atts'] ) {
724
+		if (count($shortcode['atts']) && $shortcode['atts']) {
725 725
 
726
-			foreach ( $shortcode['atts'] as $attr_name => $attr_info ) {
726
+			foreach ($shortcode['atts'] as $attr_name => $attr_info) {
727 727
 
728 728
 
729
-				$prefix = isset( $attr_info['prefix'] ) ? sprintf( '<span class="lasso-option-prefix">%s</span>', $attr_info['prefix'] ) : null;
729
+				$prefix = isset($attr_info['prefix']) ? sprintf('<span class="lasso-option-prefix">%s</span>', $attr_info['prefix']) : null;
730 730
 
731 731
 				$return .= '<form id="lasso--component-settings-form" class="'.$galleries.'" method="post">';
732 732
 				$return .= '<p data-option="'.$attr_name.'" class="lasso-option aesop-'.$slug.'-'.$attr_name.'">';
733
-				$return .= '<label for="aesop-generator-attr-' . $attr_name . '">' . $attr_info['desc'] . '</label>';
733
+				$return .= '<label for="aesop-generator-attr-'.$attr_name.'">'.$attr_info['desc'].'</label>';
734 734
 				$return .= '<small class="lasso-option-desc">'.$attr_info['tip'].'</small>';
735 735
 				// Select
736 736
 
737
-				if ( isset( $attr_info['values'] ) ) {
737
+				if (isset($attr_info['values'])) {
738 738
 
739
-					$return .= '<select name="' . $attr_name . '" id="aesop-generator-attr-' . $attr_name . '" class="lasso-generator-attr">';
739
+					$return .= '<select name="'.$attr_name.'" id="aesop-generator-attr-'.$attr_name.'" class="lasso-generator-attr">';
740 740
 
741
-					$i=0;
741
+					$i = 0;
742 742
 
743
-					foreach ( $attr_info['values'] as $attr_value ) {
743
+					foreach ($attr_info['values'] as $attr_value) {
744 744
 						$attr_value_selected = $attr_info['default'] == $attr_value ? ' selected="selected"' : '';
745 745
 
746
-						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" ' . $attr_value_selected . '>'.$attr_info['values'][$i]['name'].'</option>';
746
+						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" '.$attr_value_selected.'>'.$attr_info['values'][$i]['name'].'</option>';
747 747
 
748 748
 						$i++;
749 749
 					}
@@ -752,24 +752,24 @@  discard block
 block discarded – undo
752 752
 
753 753
 				} else {
754 754
 
755
-					$attr_field_type = isset( $attr_info['type'] ) ? $attr_info['type'] : 'text';
755
+					$attr_field_type = isset($attr_info['type']) ? $attr_info['type'] : 'text';
756 756
 
757 757
 					// image upload
758
-					if ( 'media_upload' == $attr_info['type'] ) {
758
+					if ('media_upload' == $attr_info['type']) {
759 759
 
760
-						$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.'" />';
760
+						$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.'" />';
761 761
 						$return .= '<a href="#" id="lasso-upload-img" class="lasso-option-button" /></a>';
762 762
 
763
-					} elseif ( 'color' == $attr_info['type'] ) {
763
+					} elseif ('color' == $attr_info['type']) {
764 764
 
765
-						$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.'" />';
765
+						$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.'" />';
766 766
 
767
-					} elseif ( 'text_area' == $attr_info['type'] ) {
767
+					} elseif ('text_area' == $attr_info['type']) {
768 768
 
769
-						$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.'';
769
+						$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.'';
770 770
 
771 771
 					} else {
772
-						$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.'';
772
+						$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.'';
773 773
 					}
774 774
 				}
775 775
 				$return .= '</p>';
@@ -780,9 +780,9 @@  discard block
 block discarded – undo
780 780
 		///////////////////////////
781 781
 		// START GALLERY AND MAP FRONT END STUFFS
782 782
 		///////////////////////////
783
-		if ( isset( $shortcode['front'] ) && true == $shortcode['front'] ) {
783
+		if (isset($shortcode['front']) && true == $shortcode['front']) {
784 784
 
785
-			if ( 'gallery' == $shortcode['front_type'] ) {
785
+			if ('gallery' == $shortcode['front_type']) {
786 786
 
787 787
 				$return .= lasso_gallery_editor_module();
788 788
 
@@ -793,13 +793,13 @@  discard block
 block discarded – undo
793 793
 		///////////////////////////
794 794
 
795 795
 		// Single shortcode (not closed)
796
-		if ( 'single' == $shortcode['type'] ) {
796
+		if ('single' == $shortcode['type']) {
797 797
 
798 798
 			$return .= '<input type="hidden" name="lasso-generator-content" id="lasso-generator-content" value="false" />';
799 799
 
800 800
 		} else {
801 801
 
802
-			$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>';
802
+			$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>';
803 803
 		}
804 804
 
805 805
 		$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>';
@@ -835,14 +835,14 @@  discard block
 block discarded – undo
835 835
 				<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
836 836
 				<div id="lasso--hide" style="display:none;" class="lasso--post-form">
837 837
 					<i class="lasso-icon lasso-icon-move"></i>
838
-					<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>
838
+					<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>
839 839
 					<div class="lasso--slider_wrap">
840 840
 						<div id="lasso--slider"></div>
841 841
 					</div>
842 842
 					<ul id="lasso--revision-list"></ul>
843 843
 					<div class="lasso--btn-group lasso--btn-group-small">
844
-						<a href="#" class="lasso--btn-secondary" id="lasso--close-modal"><?php _e( 'Cancel', 'lasso' );?></a>
845
-						<a href="#" class="lasso--btn-primary" id="lasso--select-revision"><?php _e( 'Select', 'lasso' );?></a>
844
+						<a href="#" class="lasso--btn-secondary" id="lasso--close-modal"><?php _e('Cancel', 'lasso'); ?></a>
845
+						<a href="#" class="lasso--btn-primary" id="lasso--select-revision"><?php _e('Select', 'lasso'); ?></a>
846 846
 					</div>
847 847
 				</div>
848 848
 
Please login to merge, or discard this patch.