Completed
Push — master ( 02b153...438217 )
by
unknown
03:05
created
lasso.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -18,27 +18,27 @@
 block discarded – undo
18 18
  */
19 19
 
20 20
 // If this file is called directly, abort.
21
-if ( ! defined( 'WPINC' ) ) {
21
+if (!defined('WPINC')) {
22 22
 	die;
23 23
 }
24 24
 
25 25
 // Set some constants
26
-define( 'LASSO_VERSION', '0.9.13.3' );
27
-define( 'LASSO_DIR', plugin_dir_path( __FILE__ ) );
28
-define( 'LASSO_URL', plugins_url( '', __FILE__ ) );
29
-define( 'LASSO_FILE', __FILE__ );
26
+define('LASSO_VERSION', '0.9.13.3');
27
+define('LASSO_DIR', plugin_dir_path(__FILE__));
28
+define('LASSO_URL', plugins_url('', __FILE__));
29
+define('LASSO_FILE', __FILE__);
30 30
 
31 31
 /**
32 32
  * Load plugin if PHP version is 5.4 or later.
33 33
  */
34
-if ( version_compare( PHP_VERSION, '5.4.0', '>=' ) ) {
34
+if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
35 35
 
36
-	include_once( LASSO_DIR . '/bootstrap.php' );
36
+	include_once(LASSO_DIR.'/bootstrap.php');
37 37
 
38 38
 } else {
39 39
 
40 40
 	add_action('admin_head', 'lasso_fail_notice');
41
-	function lasso_fail_notice(){
41
+	function lasso_fail_notice() {
42 42
 
43 43
 		printf('<div class="error"><p>Lasso requires PHP 5.4 or higher.</p></div>');
44 44
 
Please login to merge, or discard this patch.
public/includes/assets.php 1 patch
Spacing   +72 added lines, -72 removed lines patch added patch discarded remove patch
@@ -10,15 +10,15 @@  discard block
 block discarded – undo
10 10
 
11 11
 class assets {
12 12
 
13
-	public function __construct(){
13
+	public function __construct() {
14 14
 
15
-		add_action('wp_enqueue_scripts', array($this,'scripts'));
15
+		add_action('wp_enqueue_scripts', array($this, 'scripts'));
16 16
 	}
17 17
 
18
-	public function scripts(){
18
+	public function scripts() {
19 19
 
20 20
 	
21
-		if ( lasso_user_can('edit_posts')) {
21
+		if (lasso_user_can('edit_posts')) {
22 22
 
23 23
 			wp_enqueue_style('lasso-style', LASSO_URL.'/public/assets/css/lasso.css', LASSO_VERSION, true);
24 24
 
@@ -33,21 +33,21 @@  discard block
 block discarded – undo
33 33
 			// url for json api
34 34
 			$home_url = function_exists('json_get_url_prefix') ? json_get_url_prefix() : false;
35 35
 
36
-			$article_object 	= lasso_editor_get_option('article_class','lasso_editor');
36
+			$article_object 	= lasso_editor_get_option('article_class', 'lasso_editor');
37 37
 
38
-			$article_object 	= empty( $article_object ) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object;
38
+			$article_object 	= empty($article_object) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object;
39 39
 
40
-			$featImgClass 		= lasso_editor_get_option('featimg_class','lasso_editor');
41
-			if (empty( $featImgClass )) {
40
+			$featImgClass = lasso_editor_get_option('featimg_class', 'lasso_editor');
41
+			if (empty($featImgClass)) {
42 42
 				$featImgClass = lasso_get_supported_theme_featured_image_class();
43 43
 			}
44
-			$titleClass 		= lasso_editor_get_option('title_class','lasso_editor');
45
-			if (empty( $titleClass )) {
44
+			$titleClass = lasso_editor_get_option('title_class', 'lasso_editor');
45
+			if (empty($titleClass)) {
46 46
 				$titleClass = lasso_get_supported_theme_title_class();
47 47
 			}
48
-			$toolbar_headings  	= lasso_editor_get_option('toolbar_headings', 'lasso_editor');
49
-			$objectsNoSave  	= lasso_editor_get_option('dont_save', 'lasso_editor');
50
-			$objectsNonEditable  	= lasso_editor_get_option('non_editable', 'lasso_editor');
48
+			$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
49
+			$objectsNoSave = lasso_editor_get_option('dont_save', 'lasso_editor');
50
+			$objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor');
51 51
 
52 52
 			
53 53
 			//text alignement
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
 			
59 59
 			if ($show_color) {
60 60
 				//color picker
61
-				wp_enqueue_style( 'wp-color-picker' );
62
-				wp_enqueue_script( 'iris', admin_url( 'js/iris.min.js' ), array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), false, 1 );
61
+				wp_enqueue_style('wp-color-picker');
62
+				wp_enqueue_script('iris', admin_url('js/iris.min.js'), array('jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch'), false, 1);
63 63
 			}
64 64
 
65 65
 
@@ -71,55 +71,55 @@  discard block
 block discarded – undo
71 71
             $delta = time() - $post_date;
72 72
 
73 73
 			$strings = array(
74
-				'save' 				=> __('Save','lasso'),
75
-				'saving' 			=> __('Saving...','lasso'),
76
-				'saved'				=> __('Saved!','lasso'),
77
-				'adding' 			=> __('Adding...','lasso'),
78
-				'added'				=> __('Added!','lasso'),
79
-				'loading' 			=> __('Loading...','lasso'),
80
-				'loadMore'			=> __('Load More','lasso'),
81
-				'noPostsFound'		=> __('No more posts found','lasso'),
82
-				'fetchFail'	    	=> __('Fetching failed.','lasso'),
83
-				'galleryCreated' 	=> __('Gallery Created!','lasso'),
84
-				'galleryUpdated' 	=> __('Gallery Updated!','lasso'),
85
-				'justWrite'			=> __('Just write...','lasso'),
86
-				'chooseImage'		=> __('Choose an image','lasso'),
87
-				'updateImage'		=> __('Update Image','lasso'),
88
-				'insertImage'		=> __('Insert Image','lasso'),
89
-				'selectImage'		=> __('Select Image','lasso'),
90
-				'removeFeatImg'     => __('Remove featured image?','lasso'),
91
-				'updateSelectedImg' => __('Update Selected Image','lasso'),
92
-				'chooseImages'		=> __('Choose images','lasso'),
93
-				'editImage'			=> __('Edit Image','lasso'),
94
-				'addImages'			=> __('Add Images','lasso'),
95
-				'addNewGallery'		=> __('Add New Gallery','lasso'),
96
-				'selectGallery'		=> __('Select Lasso Gallery Image','lasso'),
97
-				'useSelectedImages' => __('Use Selected Images','lasso'),
98
-				'publishPost'		=> __('Publish Post?','lasso'),
99
-				'publishYes'		=> __('Yes, publish it!','lasso'),
100
-				'deletePost'		=> __('Trash Post?','lasso'),
101
-				'deleteYes'			=> __('Yes, trash it!','lasso'),
102
-				'warning'			=> __('Oh snap!','laso'),
103
-				'cancelText'		=> __('O.K. got it!','lasso'),
104
-				'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'),
74
+				'save' 				=> __('Save', 'lasso'),
75
+				'saving' 			=> __('Saving...', 'lasso'),
76
+				'saved'				=> __('Saved!', 'lasso'),
77
+				'adding' 			=> __('Adding...', 'lasso'),
78
+				'added'				=> __('Added!', 'lasso'),
79
+				'loading' 			=> __('Loading...', 'lasso'),
80
+				'loadMore'			=> __('Load More', 'lasso'),
81
+				'noPostsFound'		=> __('No more posts found', 'lasso'),
82
+				'fetchFail'	    	=> __('Fetching failed.', 'lasso'),
83
+				'galleryCreated' 	=> __('Gallery Created!', 'lasso'),
84
+				'galleryUpdated' 	=> __('Gallery Updated!', 'lasso'),
85
+				'justWrite'			=> __('Just write...', 'lasso'),
86
+				'chooseImage'		=> __('Choose an image', 'lasso'),
87
+				'updateImage'		=> __('Update Image', 'lasso'),
88
+				'insertImage'		=> __('Insert Image', 'lasso'),
89
+				'selectImage'		=> __('Select Image', 'lasso'),
90
+				'removeFeatImg'     => __('Remove featured image?', 'lasso'),
91
+				'updateSelectedImg' => __('Update Selected Image', 'lasso'),
92
+				'chooseImages'		=> __('Choose images', 'lasso'),
93
+				'editImage'			=> __('Edit Image', 'lasso'),
94
+				'addImages'			=> __('Add Images', 'lasso'),
95
+				'addNewGallery'		=> __('Add New Gallery', 'lasso'),
96
+				'selectGallery'		=> __('Select Lasso Gallery Image', 'lasso'),
97
+				'useSelectedImages' => __('Use Selected Images', 'lasso'),
98
+				'publishPost'		=> __('Publish Post?', 'lasso'),
99
+				'publishYes'		=> __('Yes, publish it!', 'lasso'),
100
+				'deletePost'		=> __('Trash Post?', 'lasso'),
101
+				'deleteYes'			=> __('Yes, trash it!', 'lasso'),
102
+				'warning'			=> __('Oh snap!', 'laso'),
103
+				'cancelText'		=> __('O.K. got it!', 'lasso'),
104
+				'missingClass'		=> __('It looks like we are either missing the Article CSS class, or it is configured incorrectly. Editus will not function correctly without this CSS class.', 'lasso'),
105 105
 				'missingConfirm'	=> __('Update Settings', 'lasso'),
106
-				'helperText'		=> __('one more letter','lasso'),
106
+				'helperText'		=> __('one more letter', 'lasso'),
107 107
 				'editingBackup'  	=> __('You are currently editing a backup copy of this post.'),
108 108
 			);
109 109
 
110
-			$api_url = trailingslashit( home_url() ) . 'lasso-internal-api';
110
+			$api_url = trailingslashit(home_url()).'lasso-internal-api';
111 111
 
112 112
 			$gallery_class = new gallery();
113 113
 			$gallery_nonce_action = $gallery_class->nonce_action;
114
-			$gallery_nonce = wp_create_nonce( $gallery_nonce_action );
114
+			$gallery_nonce = wp_create_nonce($gallery_nonce_action);
115 115
 			if (function_exists('rest_url')) {
116
-				$settings = array( 'root' => esc_url_raw( rest_url() ), 'nonce' => wp_create_nonce( 'wp_rest' ) );
116
+				$settings = array('root' => esc_url_raw(rest_url()), 'nonce' => wp_create_nonce('wp_rest'));
117 117
 				//wp_enqueue_script( 'wp-api' );
118
-				wp_enqueue_script( 'wp-api', '', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
119
-				wp_localize_script( 'wp-api', 'wpApiSettings', $settings );
120
-				wp_localize_script( 'wp-api', 'WP_API_Settings', $settings );
118
+				wp_enqueue_script('wp-api', '', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true);
119
+				wp_localize_script('wp-api', 'wpApiSettings', $settings);
120
+				wp_localize_script('wp-api', 'WP_API_Settings', $settings);
121 121
 				
122
-				if ( class_exists( 'WP_REST_Controller' )) {
122
+				if (class_exists('WP_REST_Controller')) {
123 123
 					// we are using REST API V2
124 124
 					$using_restapiv2 = true;
125 125
 				}
@@ -127,20 +127,20 @@  discard block
 block discarded – undo
127 127
 
128 128
 			// localized objects
129 129
 			$objects = array(
130
-				'ajaxurl' 			=> esc_url( $api_url ),
131
-				'ajaxurl2' 			=> esc_url( admin_url( 'admin-ajax.php' )),
130
+				'ajaxurl' 			=> esc_url($api_url),
131
+				'ajaxurl2' 			=> esc_url(admin_url('admin-ajax.php')),
132 132
 				'editor' 			=> 'lasso--content', // ID of editable content (without #) DONT CHANGE
133 133
 				'article_object'	=> $article_object,
134 134
 				'featImgClass'		=> $featImgClass,
135 135
 				'titleClass'		=> $titleClass,
136 136
 				'strings'			=> $strings,
137
-				'settingsLink'		=> function_exists('is_multisite') && is_multisite() ? network_admin_url( 'settings.php?page=lasso-editor' ) : admin_url( 'admin.php?page=lasso-editor-settings' ),
138
-				'post_status'		=> get_post_status( $postid ),
137
+				'settingsLink'		=> function_exists('is_multisite') && is_multisite() ? network_admin_url('settings.php?page=lasso-editor') : admin_url('admin.php?page=lasso-editor-settings'),
138
+				'post_status'		=> get_post_status($postid),
139 139
 				'postid'			=> $postid,
140 140
 				'permalink'			=> get_permalink(),
141 141
 				'edit_others_pages'	=> current_user_can('edit_others_pages') ? true : false,
142 142
 				'edit_others_posts'	=> current_user_can('edit_others_posts') ? true : false,
143
-				'userCanEdit'		=> current_user_can('edit_post', $postid ),
143
+				'userCanEdit'		=> current_user_can('edit_post', $postid),
144 144
 				'can_publish_posts'	=> current_user_can('publish_posts'),
145 145
 				'can_publish_pages'	=> current_user_can('publish_pages'),
146 146
 				'author'			=> is_user_logged_in() ? get_current_user_ID() : false,
@@ -174,18 +174,18 @@  discard block
 block discarded – undo
174 174
 				'postTags'    		=> lasso_get_objects('tag'),
175 175
 				'noResultsDiv'		=> lasso_editor_empty_results(),
176 176
 				'noRevisionsDiv'	=> lasso_editor_empty_results('revision'),
177
-				'mapTileProvider'   => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider( $postid ) : false,
178
-				'mapLocations'		=> get_post_meta( $postid, 'ase_map_component_locations' ),
179
-				'mapStart'			=> get_post_meta( $postid, 'ase_map_component_start_point', true ),
180
-				'mapZoom'			=> get_post_meta( $postid, 'ase_map_component_zoom', true ),
177
+				'mapTileProvider'   => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider($postid) : false,
178
+				'mapLocations'		=> get_post_meta($postid, 'ase_map_component_locations'),
179
+				'mapStart'			=> get_post_meta($postid, 'ase_map_component_start_point', true),
180
+				'mapZoom'			=> get_post_meta($postid, 'ase_map_component_zoom', true),
181 181
 				'revisionModal' 	=> lasso_editor_revision_modal(),
182 182
 				'isMobile'          => wp_is_mobile(),
183
-				'enableAutoSave'    => lasso_editor_get_option( 'enable_autosave', 'lasso_editor' ),
183
+				'enableAutoSave'    => lasso_editor_get_option('enable_autosave', 'lasso_editor'),
184 184
 				'showColor'         => $show_color,
185 185
 				'showAlignment'     => $show_align,
186 186
 				'showIgnoredItems'  => lasso_editor_get_option('show_ignored_items', 'lasso_editor'),
187 187
 				'restapi2'          => $using_restapiv2,
188
-				'skipToEdit'        =>( $delta < 30 ) // if it's a new post, skip to edit mode
188
+				'skipToEdit'        =>($delta < 30) // if it's a new post, skip to edit mode
189 189
 			);
190 190
 
191 191
 
@@ -194,18 +194,18 @@  discard block
 block discarded – undo
194 194
 			
195 195
 			if (!$using_restapiv2) {
196 196
                // enqueue REST API V1
197
-			   wp_enqueue_script( 'wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
198
-			   $settings = array( 'root' => home_url( $home_url ), 'nonce' => wp_create_nonce( 'wp_json' ) );
199
-			   wp_localize_script( 'wp-api-js', 'WP_API_Settings', $settings );
197
+			   wp_enqueue_script('wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true);
198
+			   $settings = array('root' => home_url($home_url), 'nonce' => wp_create_nonce('wp_json'));
199
+			   wp_localize_script('wp-api-js', 'WP_API_Settings', $settings);
200 200
 			}
201 201
 
202
-			$postfix = ( defined( 'SCRIPT_DEBUG' ) && true === SCRIPT_DEBUG ) ? '' : '.min';
202
+			$postfix = (defined('SCRIPT_DEBUG') && true === SCRIPT_DEBUG) ? '' : '.min';
203 203
 			if ($show_color) {
204
-				wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'iris'), LASSO_VERSION, true);
204
+				wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery', 'iris'), LASSO_VERSION, true);
205 205
 			} else {
206
-			    wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery'), LASSO_VERSION, true);
206
+			    wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery'), LASSO_VERSION, true);
207 207
 			}
208
-			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects ) );
208
+			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects));
209 209
 
210 210
 
211 211
 		}
Please login to merge, or discard this patch.
public/includes/editor-modules.php 1 patch
Spacing   +208 added lines, -208 removed lines patch added patch discarded remove patch
@@ -12,32 +12,32 @@  discard block
 block discarded – undo
12 12
  *
13 13
  * @since 1.0
14 14
  */
15
-add_action( 'wp_footer', 'lasso_editor_controls' );
15
+add_action('wp_footer', 'lasso_editor_controls');
16 16
 function lasso_editor_controls() {
17 17
 
18 18
 	global $post;
19 19
 
20
-	if ( lasso_user_can('edit_posts') ) {
20
+	if (lasso_user_can('edit_posts')) {
21 21
 
22
-		$status = get_post_status( get_the_ID() );
22
+		$status = get_post_status(get_the_ID());
23 23
 
24 24
 		// let users add custom css classes
25
-		$custom_classes = apply_filters( 'lasso_control_classes', '' );
25
+		$custom_classes = apply_filters('lasso_control_classes', '');
26 26
 
27 27
 		$post_access_class   = '';
28
-		$post_new_disabled   = lasso_editor_get_option( 'post_adding_disabled', 'lasso_editor' );
29
-		$post_settings_disabled = lasso_editor_get_option( 'post_settings_disabled', 'lasso_editor' );
30
-		$shortcodify_disabled = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
28
+		$post_new_disabled   = lasso_editor_get_option('post_adding_disabled', 'lasso_editor');
29
+		$post_settings_disabled = lasso_editor_get_option('post_settings_disabled', 'lasso_editor');
30
+		$shortcodify_disabled = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor');
31 31
 
32 32
 
33 33
 		// CSS class if adding new post objects is disabled
34
-		if ( 'on' == $post_new_disabled ) { $post_access_class = 'lasso--post-new-disabled'; }
34
+		if ('on' == $post_new_disabled) { $post_access_class = 'lasso--post-new-disabled'; }
35 35
 
36 36
 		// CSS class if adjust settings is disabled
37
-		if ( 'on' == $post_settings_disabled ) { $post_access_class = 'lasso--post-settings-disabled'; }
37
+		if ('on' == $post_settings_disabled) { $post_access_class = 'lasso--post-settings-disabled'; }
38 38
 
39 39
 		// CSS class if adding new post objects AND settings are disabled
40
-		if ( 'on' == $post_new_disabled && 'on' == $post_settings_disabled ) { $post_access_class = 'lasso--post-all-disabled'; }
40
+		if ('on' == $post_new_disabled && 'on' == $post_settings_disabled) { $post_access_class = 'lasso--post-all-disabled'; }
41 41
 
42 42
 		// CSS class if shortcodify or (Aesop Shortcode Conversion) is disabled
43 43
 		$sc_saving_class = 'on' == $shortcodify_disabled ? 'shortcodify-disabled' : 'shortcodify-enabled';
@@ -47,44 +47,44 @@  discard block
 block discarded – undo
47 47
 		
48 48
 		$mobile_style = wp_is_mobile() ? 'style="top:40px; width:100%;"' : null;
49 49
 
50
-		?><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();?>" >
50
+		?><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(); ?>" >
51 51
 
52
-			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class;?> "  <?php echo $mobile_style ?> >
52
+			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class; ?> "  <?php echo $mobile_style ?> >
53 53
 
54
-				<?php do_action( 'lasso_editor_controls_before' );
54
+				<?php do_action('lasso_editor_controls_before');
55 55
 
56
-				if ( $is_capable ) { ?>
56
+				if ($is_capable) { ?>
57 57
 
58
-					<li id="lasso--edit" title="<?php esc_attr_e( 'Edit Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
58
+					<li id="lasso--edit" title="<?php esc_attr_e('Edit Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
59 59
 
60
-					<?php if ( 'off' == $post_settings_disabled || empty( $post_settings_disabled ) ) { ?>
61
-						<li id="lasso--post-settings" title="<?php esc_attr_e( 'Post Settings', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
60
+					<?php if ('off' == $post_settings_disabled || empty($post_settings_disabled)) { ?>
61
+						<li id="lasso--post-settings" title="<?php esc_attr_e('Post Settings', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
62 62
 					<?php }
63 63
 
64 64
 				} ?>
65 65
 
66
-				<li id="lasso--post-all" title="<?php esc_attr_e( 'All Posts', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
66
+				<li id="lasso--post-all" title="<?php esc_attr_e('All Posts', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
67 67
 
68
-				<?php if ( $is_capable && wp_revisions_enabled( $post ) ) { ?>
69
-					<li id="lasso--post-revisions" title="<?php esc_attr_e( 'Revisions', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
68
+				<?php if ($is_capable && wp_revisions_enabled($post)) { ?>
69
+					<li id="lasso--post-revisions" title="<?php esc_attr_e('Revisions', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
70 70
 				<?php } ?>
71 71
 
72
-				<?php if ( ( 'off' == $post_new_disabled || empty( $post_new_disabled ) && lasso_user_can('publish_posts') ) ) { ?>
73
-					<li id="lasso--post-new" title="<?php esc_attr_e( 'Add Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
72
+				<?php if (('off' == $post_new_disabled || empty($post_new_disabled) && lasso_user_can('publish_posts'))) { ?>
73
+					<li id="lasso--post-new" title="<?php esc_attr_e('Add Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
74 74
 				<?php } ?>
75 75
 
76
-				<?php do_action( 'lasso_editor_controls_after' );?>
76
+				<?php do_action('lasso_editor_controls_after'); ?>
77 77
 
78 78
 			</ul>
79 79
 
80
-			<?php if ( is_singular() ) { ?>
80
+			<?php if (is_singular()) { ?>
81 81
 
82 82
 				<div class="lasso--controls__right">
83 83
 
84
-					<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>
84
+					<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>
85 85
 
86
-					<?php if ( 'draft' == $status && ( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') )  ) { ?>
87
-						<a href="#" title="<?php esc_attr_e( 'Publish Post', 'lasso' );?>" id="lasso--publish" class="lasso-publish-post lasso--button <?php echo $sc_saving_class;?>"></a>
86
+					<?php if ('draft' == $status && (lasso_user_can('publish_posts') || lasso_user_can('publish_pages'))) { ?>
87
+						<a href="#" title="<?php esc_attr_e('Publish Post', 'lasso'); ?>" id="lasso--publish" class="lasso-publish-post lasso--button <?php echo $sc_saving_class; ?>"></a>
88 88
 					<?php } ?>
89 89
 
90 90
 				</div>
@@ -107,13 +107,13 @@  discard block
 block discarded – undo
107 107
 
108 108
 	ob_start();
109 109
 
110
-	if ( !lasso_user_can() )
110
+	if (!lasso_user_can())
111 111
 		return;
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>
@@ -131,25 +131,25 @@  discard block
 block discarded – undo
131 131
 
132 132
 	ob_start();
133 133
 
134
-	if ( !lasso_user_can() )
134
+	if (!lasso_user_can())
135 135
 		return;
136 136
 	
137 137
 	$is_mobile = wp_is_mobile();
138 138
 
139 139
 	// check for lasso story engine and add a class doniting this
140
-	$ase_status = class_exists( 'Aesop_Core' ) || defined( 'LASSO_CUSTOM' ) ? 'ase-active' : 'ase-not-active';
140
+	$ase_status = class_exists('Aesop_Core') || defined('LASSO_CUSTOM') ? 'ase-active' : 'ase-not-active';
141 141
 
142 142
 	// let users add custom css classes
143
-	$custom_classes = apply_filters( 'lasso_toolbar_classes', '' );
143
+	$custom_classes = apply_filters('lasso_toolbar_classes', '');
144 144
 
145 145
 	// are toolbar headings enabled
146
-	$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
146
+	$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
147 147
 
148
-	$toolbar_class  = $toolbar_headings ? 'toolbar-extended' : false;
148
+	$toolbar_class = $toolbar_headings ? 'toolbar-extended' : false;
149 149
 	
150 150
 	// mobile styles
151 151
     $mobile_class = $is_mobile ? 'lasso-mobile' : false;
152
-	$mobile_style =$is_mobile ? 'style="top:40px;"' : null;
152
+	$mobile_style = $is_mobile ? 'style="top:40px;"' : null;
153 153
 	
154 154
 	//show color
155 155
 	$show_color = lasso_editor_get_option('toolbar_show_color', 'lasso_editor');
@@ -159,84 +159,84 @@  discard block
 block discarded – undo
159 159
 
160 160
 
161 161
 	?>
162
-	<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 ?>>
162
+	<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 ?>>
163 163
 		<ul class="lasso--toolbar__inner lasso-editor-controls">
164
-			<?php do_action( 'lasso_toolbar_components_before' );?>
165
-		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e( 'Bold', 'lasso' );?>"></li>
166
-		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e( 'Underline', 'lasso' );?>"></li>
167
-		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e( 'Italicize', 'lasso' );?>"></li>
168
-		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e( 'Strikethrough', 'lasso' );?>"></li>
169
-		    <?php if ( $toolbar_headings ): ?>
170
-		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>"></li>
171
-		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>"></li>
164
+			<?php do_action('lasso_toolbar_components_before'); ?>
165
+		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e('Bold', 'lasso'); ?>"></li>
166
+		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e('Underline', 'lasso'); ?>"></li>
167
+		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e('Italicize', 'lasso'); ?>"></li>
168
+		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e('Strikethrough', 'lasso'); ?>"></li>
169
+		    <?php if ($toolbar_headings): ?>
170
+		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>"></li>
171
+		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>"></li>
172 172
 			<?php endif; ?>
173 173
 			
174
-			<?php if ( $show_color ): ?>
175
-		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e( 'Set Text Color', 'lasso' );?>"></li>
176
-		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e( 'Choose Color', 'lasso' );?>"></li>
174
+			<?php if ($show_color): ?>
175
+		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e('Set Text Color', 'lasso'); ?>"></li>
176
+		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e('Choose Color', 'lasso'); ?>"></li>
177 177
 			<?php endif; ?>
178 178
 			
179 179
 		    
180 180
 			
181 181
 			
182 182
 			
183
-		    <li id="lasso-toolbar--components" title="<?php esc_attr_e( 'Insert Component', 'lasso' );?>">
183
+		    <li id="lasso-toolbar--components" title="<?php esc_attr_e('Insert Component', 'lasso'); ?>">
184 184
 			    <ul id="lasso-toolbar--components__list" style="display:none;">
185
-			    	<?php if ( 'ase-active' == $ase_status ): ?>
186
-						<li data-type="image" title="<?php esc_attr_e( 'Image', 'lasso' );?>" class="lasso-toolbar--component__image"></li>
187
-						<li data-type="character" title="<?php esc_attr_e( 'Character', 'lasso' );?>" class="lasso-toolbar--component__character"></li>
188
-						<li data-type="quote" title="<?php esc_attr_e( 'Quote', 'lasso' );?>"  class="lasso-toolbar--component__quote"></li>
189
-						<li data-type="content" title="<?php esc_attr_e( 'Content', 'lasso' );?>"  class="lasso-toolbar--component__content"></li>
190
-						<li data-type="chapter" title="<?php esc_attr_e( 'Chapter', 'lasso' );?>"  class="lasso-toolbar--component__chapter"></li>
191
-						<li data-type="parallax" title="<?php esc_attr_e( 'Parallax', 'lasso' );?>"  class="lasso-toolbar--component__parallax"></li>
192
-						<li data-type="audio" title="<?php esc_attr_e( 'Audio', 'lasso' );?>"  class="lasso-toolbar--component__audio"></li>
193
-						<li data-type="video" title="<?php esc_attr_e( 'Video', 'lasso' );?>"  class="lasso-toolbar--component__video"></li>
194
-						<li data-type="map" title="<?php esc_attr_e( 'Map', 'lasso' );?>"  class="lasso-toolbar--component__map"></li>
195
-						<li data-type="timeline_stop" title="<?php esc_attr_e( 'Timeline', 'lasso' );?>"  class="lasso-toolbar--component__timeline"></li>
196
-						<li data-type="document" title="<?php esc_attr_e( 'Document', 'lasso' );?>"  class="lasso-toolbar--component__document"></li>
197
-						<li data-type="collection" title="<?php esc_attr_e( 'Collection', 'lasso' );?>"  class="lasso-toolbar--component__collection"></li>
198
-						<li data-type="gallery" title="<?php esc_attr_e( 'Gallery', 'lasso' );?>"  class="lasso-toolbar--component__gallery"></li>
199
-						<?php if ( class_exists ('Aesop_GalleryPop') ) { ?>
200
-						     <li data-type="gallery" title="<?php esc_attr_e( 'Gallery Pop', 'lasso' );?>"  class="lasso-toolbar--component__gallerypop"></li>
185
+			    	<?php if ('ase-active' == $ase_status): ?>
186
+						<li data-type="image" title="<?php esc_attr_e('Image', 'lasso'); ?>" class="lasso-toolbar--component__image"></li>
187
+						<li data-type="character" title="<?php esc_attr_e('Character', 'lasso'); ?>" class="lasso-toolbar--component__character"></li>
188
+						<li data-type="quote" title="<?php esc_attr_e('Quote', 'lasso'); ?>"  class="lasso-toolbar--component__quote"></li>
189
+						<li data-type="content" title="<?php esc_attr_e('Content', 'lasso'); ?>"  class="lasso-toolbar--component__content"></li>
190
+						<li data-type="chapter" title="<?php esc_attr_e('Chapter', 'lasso'); ?>"  class="lasso-toolbar--component__chapter"></li>
191
+						<li data-type="parallax" title="<?php esc_attr_e('Parallax', 'lasso'); ?>"  class="lasso-toolbar--component__parallax"></li>
192
+						<li data-type="audio" title="<?php esc_attr_e('Audio', 'lasso'); ?>"  class="lasso-toolbar--component__audio"></li>
193
+						<li data-type="video" title="<?php esc_attr_e('Video', 'lasso'); ?>"  class="lasso-toolbar--component__video"></li>
194
+						<li data-type="map" title="<?php esc_attr_e('Map', 'lasso'); ?>"  class="lasso-toolbar--component__map"></li>
195
+						<li data-type="timeline_stop" title="<?php esc_attr_e('Timeline', 'lasso'); ?>"  class="lasso-toolbar--component__timeline"></li>
196
+						<li data-type="document" title="<?php esc_attr_e('Document', 'lasso'); ?>"  class="lasso-toolbar--component__document"></li>
197
+						<li data-type="collection" title="<?php esc_attr_e('Collection', 'lasso'); ?>"  class="lasso-toolbar--component__collection"></li>
198
+						<li data-type="gallery" title="<?php esc_attr_e('Gallery', 'lasso'); ?>"  class="lasso-toolbar--component__gallery"></li>
199
+						<?php if (class_exists('Aesop_GalleryPop')) { ?>
200
+						     <li data-type="gallery" title="<?php esc_attr_e('Gallery Pop', 'lasso'); ?>"  class="lasso-toolbar--component__gallerypop"></li>
201 201
 						<?php }?>
202 202
 					<?php else: ?>
203
-						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );?>" class="image lasso-toolbar--component__image"></li>
204
-						<li data-type="wpquote" title="<?php esc_attr_e( 'WordPress Quote', 'lasso' );?>" class="quote lasso-toolbar--component__quote"></li>
205
-						<!--li data-type="wpvideo" title="<?php esc_attr_e( 'WordPress Video', 'lasso' );?>" class="video lasso-toolbar--component__video"></li-->
203
+						<li data-type="wpimg" title="<?php esc_attr_e('WordPress Image', 'lasso'); ?>" class="image lasso-toolbar--component__image"></li>
204
+						<li data-type="wpquote" title="<?php esc_attr_e('WordPress Quote', 'lasso'); ?>" class="quote lasso-toolbar--component__quote"></li>
205
+						<!--li data-type="wpvideo" title="<?php esc_attr_e('WordPress Video', 'lasso'); ?>" class="video lasso-toolbar--component__video"></li-->
206 206
 					<?php endif; ?>
207
-					<?php do_action( 'lasso_toolbar_components' );?>
207
+					<?php do_action('lasso_toolbar_components'); ?>
208 208
 			    </ul>
209 209
 			</li>
210
-			<li id="lasso-toolbar--link" title="<?php esc_attr_e( 'Anchor Link', 'lasso' );?>">
210
+			<li id="lasso-toolbar--link" title="<?php esc_attr_e('Anchor Link', 'lasso'); ?>">
211 211
 		    	<div id="lasso-toolbar--link__wrap" <?php echo $mobile_style ?> >
212
-		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'http://url.com', 'lasso' );?>"></div>
213
-		    		<a href="#" title="<?php esc_attr_e( 'Create Link', 'lasso' );?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
212
+		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e('http://url.com', 'lasso'); ?>"></div>
213
+		    		<a href="#" title="<?php esc_attr_e('Create Link', 'lasso'); ?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
214 214
 					<input class="styled-checkbox" type="checkbox" id="aesop-toolbar--link_newtab" checked/>
215 215
                     <label for="aesop-toolbar--link_newtab">Open in Another Tab</label>
216 216
 		    	</div>
217 217
 		    </li>
218
-		    <?php do_action( 'lasso_toolbar_components_after' );?>
219
-		    <li id="lasso-toolbar--html" title="<?php esc_attr_e( 'Insert HTML', 'lasso' );?>">
218
+		    <?php do_action('lasso_toolbar_components_after'); ?>
219
+		    <li id="lasso-toolbar--html" title="<?php esc_attr_e('Insert HTML', 'lasso'); ?>">
220 220
 		    	<div id="lasso-toolbar--html__wrap" <?php echo $mobile_style ?>>
221
-		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?>"></div>
221
+		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?>"></div>
222 222
 		    		<div id="lasso-toolbar--html__footer">
223 223
 		    			<ul class="lasso-toolbar--html-snips">
224
-		    				<?php if ( !$toolbar_headings ): ?>
225
-		    				<li id="lasso-html--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>">
226
-		    				<li id="lasso-html--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>">
224
+		    				<?php if (!$toolbar_headings): ?>
225
+		    				<li id="lasso-html--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>">
226
+		    				<li id="lasso-html--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>">
227 227
 		    				<?php endif; ?>
228
-		    				<li id="lasso-html--ul" title="<?php esc_attr_e( 'Unordered List', 'lasso' );?>">
229
-		    				<li id="lasso-html--ol" title="<?php esc_attr_e( 'Ordered List', 'lasso' );?>">
228
+		    				<li id="lasso-html--ul" title="<?php esc_attr_e('Unordered List', 'lasso'); ?>">
229
+		    				<li id="lasso-html--ol" title="<?php esc_attr_e('Ordered List', 'lasso'); ?>">
230 230
 		    			</ul>
231
-		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e( 'Cancel', 'lasso' );?></a>
232
-		    			<a href="#" title="<?php esc_attr_e( 'Insert HTML', 'lasso' );?>" class="lasso-toolbar--html__control" id="lasso-toolbar--html__insert" ><?php _e( 'Insert', 'lasso' );?></a>
231
+		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e('Cancel', 'lasso'); ?></a>
232
+		    			<a href="#" title="<?php esc_attr_e('Insert HTML', 'lasso'); ?>" class="lasso-toolbar--html__control" id="lasso-toolbar--html__insert" ><?php _e('Insert', 'lasso'); ?></a>
233 233
 		    		</div>
234 234
 		    	</div>
235 235
 		    </li>
236
-			<?php if ( $show_align ): ?>
237
-		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e( 'Text Left Align', 'lasso' );?>"></li>
238
-		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e( 'Text Center Align', 'lasso' );?>"></li>
239
-			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e( 'Text Right Align', 'lasso' );?>"></li>
236
+			<?php if ($show_align): ?>
237
+		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e('Text Left Align', 'lasso'); ?>"></li>
238
+		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e('Text Center Align', 'lasso'); ?>"></li>
239
+			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e('Text Right Align', 'lasso'); ?>"></li>
240 240
 			<?php endif; ?>
241 241
 		</ul>
242 242
 	</div>
@@ -251,22 +251,22 @@  discard block
 block discarded – undo
251 251
  */
252 252
 function lasso_editor_settings_toolbar() {
253 253
 
254
-	$delete_nonce = wp_create_nonce( 'lasso-delete-nonce' );
254
+	$delete_nonce = wp_create_nonce('lasso-delete-nonce');
255 255
 
256 256
 	ob_start();
257 257
 
258
-	if ( !lasso_user_can() )
258
+	if (!lasso_user_can())
259 259
 		return;
260 260
 
261 261
 	// let users add custom css classes
262
-	$custom_classes = apply_filters( 'lasso_component_classes', '' );
262
+	$custom_classes = apply_filters('lasso_component_classes', '');
263 263
 
264 264
 	?>
265
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
266
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
267
-		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
268
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
269
-		<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>
265
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
266
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
267
+		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
268
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
269
+		<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>
270 270
 	</ul>
271 271
 
272 272
 	<?php return ob_get_clean();
@@ -282,17 +282,17 @@  discard block
 block discarded – undo
282 282
 
283 283
 	ob_start();
284 284
 
285
-	if ( !lasso_user_can() )
285
+	if (!lasso_user_can())
286 286
 		return;
287 287
 
288 288
 	// has post thumbnail
289
-	$has_thumbnail = has_post_thumbnail( get_the_ID() ) ? 'class="lasso--featImg--has-thumb"' : false;
289
+	$has_thumbnail = has_post_thumbnail(get_the_ID()) ? 'class="lasso--featImg--has-thumb"' : false;
290 290
 
291 291
 	?>
292
-	<ul id="lasso--featImgControls" <?php echo $has_thumbnail;?>>
293
-		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e( 'Replace Image', 'lasso' );?>" href="#"><i class="lasso-icon-image"></i></a></li>
294
-		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e( 'Delete Image', 'lasso' );?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
295
-		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e( 'save', 'lasso' );?></a></li>
292
+	<ul id="lasso--featImgControls" <?php echo $has_thumbnail; ?>>
293
+		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e('Replace Image', 'lasso'); ?>" href="#"><i class="lasso-icon-image"></i></a></li>
294
+		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e('Delete Image', 'lasso'); ?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
295
+		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e('save', 'lasso'); ?></a></li>
296 296
 	</ul>
297 297
 
298 298
 	<?php return ob_get_clean();
@@ -311,55 +311,55 @@  discard block
 block discarded – undo
311 311
 
312 312
 	ob_start();
313 313
 
314
-	if ( !lasso_user_can() )
314
+	if (!lasso_user_can())
315 315
 		return;
316 316
 
317 317
 	global $post;
318 318
 
319 319
 	$postid = get_the_ID();
320 320
 
321
-	$status = get_post_status( $postid );
322
-	$nonce = wp_create_nonce( 'lasso-update-post-settings' );
321
+	$status = get_post_status($postid);
322
+	$nonce = wp_create_nonce('lasso-update-post-settings');
323 323
 
324 324
 	// let users add custom css classes
325
-	$custom_classes = apply_filters( 'lasso_modal_settings_classes', '' );
325
+	$custom_classes = apply_filters('lasso_modal_settings_classes', '');
326 326
 
327 327
 	// objects categories
328
-	$categories 		= lasso_get_post_objects( $postid, 'category' );
329
-	$tags 				= lasso_get_post_objects( $postid, 'tag' );
328
+	$categories = lasso_get_post_objects($postid, 'category');
329
+	$tags = lasso_get_post_objects($postid, 'tag');
330 330
 
331 331
 	// modal tabs
332
-	$tabs  				= lasso_modal_addons('tab');
333
-	$content 			= lasso_modal_addons('content');
332
+	$tabs = lasso_modal_addons('tab');
333
+	$content = lasso_modal_addons('content');
334 334
 
335 335
 	// are we singular
336
-	$is_singular 		= is_singular();
336
+	$is_singular = is_singular();
337 337
 	$is_singular_class 	= $is_singular ? 'lasso--postsettings__2col' : 'lasso--postsettings__1col';
338 338
 	$has_thumb_class    = has_post_thumbnail() ? 'has-thumbnail' : 'no-thumbnail';
339 339
 	$theme_supports     = current_theme_supports('post-thumbnails');
340
-	$default_image 		= LASSO_URL.'/admin/assets/img/empty-img.png';
340
+	$default_image = LASSO_URL.'/admin/assets/img/empty-img.png';
341 341
 
342 342
 ?>
343
-	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>">
343
+	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>">
344 344
 		<div class="lasso--modal__inner">
345 345
 
346
-			<?php if( $tabs ) { echo $tabs; } ?>
346
+			<?php if ($tabs) { echo $tabs; } ?>
347 347
 
348 348
 			<div class="lasso--modal__content modal__content--core visible" data-addon-content="core">
349
-				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class;?>" >
349
+				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class; ?>" >
350 350
 
351
-					<?php if ( $is_singular && $theme_supports ) : ?>
351
+					<?php if ($is_singular && $theme_supports) : ?>
352 352
 					<div class="lasso--postsettings__left">
353
-						<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>
354
-						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url( $default_image );?>">
353
+						<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>
354
+						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url($default_image); ?>">
355 355
 
356 356
 							<div id="lasso--post-thumb__controls" class="lasso--post-thumb__controls">
357
-								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image','lasso');?>" class="dashicons dashicons-edit"></i>
358
-								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image','lasso');?>" class="dashicons dashicons-no-alt"></i>
357
+								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image', 'lasso'); ?>" class="dashicons dashicons-edit"></i>
358
+								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image', 'lasso'); ?>" class="dashicons dashicons-no-alt"></i>
359 359
 								<i id="lasso--save-status" class="lasso-icon lasso-icon-spinner6 not-visible"></i>
360 360
 							</div>
361 361
 
362
-							<?php echo has_post_thumbnail() ? get_the_post_thumbnail( $post->ID, 'medium' ) : '<img src="'.$default_image.'">'; ?>
362
+							<?php echo has_post_thumbnail() ? get_the_post_thumbnail($post->ID, 'medium') : '<img src="'.$default_image.'">'; ?>
363 363
 
364 364
 						</div>
365 365
 						<div id="lasso--featImgSave"><a href="#" class="not-visible">Save</a></div>
@@ -369,12 +369,12 @@  discard block
 block discarded – undo
369 369
 
370 370
 					<div class="lasso--postsettings__right">
371 371
 
372
-						<?php if( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') ): ?>
372
+						<?php if (lasso_user_can('publish_posts') || lasso_user_can('publish_pages')): ?>
373 373
 						<div class="lasso--postsettings__option story-status-option">
374
-							<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>
375
-							<ul class="story-status story-status-<?php echo sanitize_html_class( $status );?>">
376
-								<li id="lasso--status-draft"><?php _e( 'Draft', 'lasso' );?></li>
377
-								<li id="lasso--status-publish"><?php _e( 'Publish', 'lasso' );?></li>
374
+							<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>
375
+							<ul class="story-status story-status-<?php echo sanitize_html_class($status); ?>">
376
+								<li id="lasso--status-draft"><?php _e('Draft', 'lasso'); ?></li>
377
+								<li id="lasso--status-publish"><?php _e('Publish', 'lasso'); ?></li>
378 378
 							</ul>
379 379
 							<div class="lasso--slider_wrap">
380 380
 								<div id="lasso--slider"></div>
@@ -382,10 +382,10 @@  discard block
 block discarded – undo
382 382
 						</div>
383 383
 						<?php endif; ?>
384 384
 
385
-						<?php if ( 'publish' == $status ): ?>
385
+						<?php if ('publish' == $status): ?>
386 386
 						<div class="lasso--postsettings__option story-slug-option">
387
-							<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>
388
-							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset( $post ) ? esc_attr( $post->post_name ) : false;?>">
387
+							<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>
388
+							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset($post) ? esc_attr($post->post_name) : false; ?>">
389 389
 						</div>
390 390
 						<?php endif; ?>
391 391
 
@@ -394,34 +394,34 @@  discard block
 block discarded – undo
394 394
 					<div class="lasso--postsettings__middle">
395 395
 
396 396
 						<div class="lasso--postsettings__option story-categories-option">
397
-							<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>
398
-							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories;?>">
397
+							<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>
398
+							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories; ?>">
399 399
 						</div>
400 400
 
401 401
 						<div class="lasso--postsettings__option story-tags-option">
402
-							<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>
403
-							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags;?>">
402
+							<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>
403
+							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags; ?>">
404 404
 						</div>
405 405
 
406 406
 					</div>
407 407
 
408
-					<?php do_action( 'lasso_modal_post_form' ); // action ?>
408
+					<?php do_action('lasso_modal_post_form'); // action ?>
409 409
 
410 410
 					<div class="lasso--postsettings__footer" style="display:none;">
411
-						<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
411
+						<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
412 412
 						<input type="hidden" name="status" value="">
413 413
 						<input type="hidden" name="categories" value="">
414
-						<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
414
+						<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
415 415
 						<input type="hidden" name="action" value="process_update-object_post">
416
-						<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
417
-						<?php do_action( 'lasso_modal_post_form_footer' ); // action ?>
418
-						<input type="submit" value="<?php esc_attr_e( 'Save', 'lasso' );?>">
416
+						<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
417
+						<?php do_action('lasso_modal_post_form_footer'); // action ?>
418
+						<input type="submit" value="<?php esc_attr_e('Save', 'lasso'); ?>">
419 419
 					</div>
420 420
 
421 421
 				</form>
422 422
 			</div>
423 423
 
424
-			<?php if( $tabs ) { echo $content; } ?>
424
+			<?php if ($tabs) { echo $content; } ?>
425 425
 
426 426
 		</div>
427 427
 
@@ -442,44 +442,44 @@  discard block
 block discarded – undo
442 442
 
443 443
 	ob_start();
444 444
 
445
-	if ( !lasso_user_can('edit_posts') )
445
+	if (!lasso_user_can('edit_posts'))
446 446
 		return;
447 447
 
448
-	$status = get_post_status( get_the_ID() );
448
+	$status = get_post_status(get_the_ID());
449 449
 
450
-	$nonce = wp_create_nonce( 'lasso-editor-new-post' );
450
+	$nonce = wp_create_nonce('lasso-editor-new-post');
451 451
 
452 452
 	// let users add custom css classes
453
-	$custom_classes = apply_filters( 'lasso_modal_post_classes', '' );
453
+	$custom_classes = apply_filters('lasso_modal_post_classes', '');
454 454
 
455 455
 	// return the post type
456
-	$type = get_post_type( get_the_ID() );
456
+	$type = get_post_type(get_the_ID());
457 457
 
458 458
 	if (wp_is_mobile()) {
459 459
 		$mobile_style = 'style="top:140px !important;"';
460 460
 	}
461 461
 	?>
462
-	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" <?php echo $mobile_style;?>">
462
+	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" <?php echo $mobile_style; ?>">
463 463
 		<div class="lasso--modal__inner">
464 464
 
465 465
 			<form id="lasso--postnew__form" enctype="multipart/form-data" class="lasso--post-form">
466 466
 
467 467
 				<div class="lasso--postsettings__option story-slug-option lasso--last-option">
468
-					<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>
469
-					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e( 'Grump Wizards Make Toxic Brew', 'lasso' );?>">
468
+					<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>
469
+					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e('Grump Wizards Make Toxic Brew', 'lasso'); ?>">
470 470
 						<div class="lasso--select-wrap" style="width:90px">
471 471
 						<select id="lasso--select-type" name="story_type">
472 472
 
473 473
 							<?php
474 474
 								$types = lasso_post_types();
475 475
 
476
-								if ( !empty( $types ) ) {
476
+								if (!empty($types)) {
477 477
 
478
-									foreach( $types as $type ) {
478
+									foreach ($types as $type) {
479 479
 
480
-										$type = preg_replace( '/s\b/','', $type );
480
+										$type = preg_replace('/s\b/', '', $type);
481 481
 
482
-										printf( '<option value="%s">%s</option>', lcfirst( esc_attr( $type ) ) , ucfirst( esc_attr( $type ) ) );
482
+										printf('<option value="%s">%s</option>', lcfirst(esc_attr($type)), ucfirst(esc_attr($type)));
483 483
 									}
484 484
 
485 485
 								}
@@ -489,12 +489,12 @@  discard block
 block discarded – undo
489 489
 					</div>
490 490
 				</div>
491 491
 
492
-				<div class="lasso--postsettings__footer" style="<?php if (!wp_is_mobile()) {echo 'display:none;';} ?>">
493
-					<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
492
+				<div class="lasso--postsettings__footer" style="<?php if (!wp_is_mobile()) {echo 'display:none;'; } ?>">
493
+					<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
494 494
 					<input type="hidden" name="action" value="process_new-object_post">
495 495
 					<input type="hidden" name="object" value="post">
496
-					<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
497
-					<input type="submit" value="<?php esc_attr_e( 'Create', 'lasso' );?>">
496
+					<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
497
+					<input type="submit" value="<?php esc_attr_e('Create', 'lasso'); ?>">
498 498
 				</div>
499 499
 
500 500
 			</form>
@@ -522,18 +522,18 @@  discard block
 block discarded – undo
522 522
 	ob_start();
523 523
 
524 524
 	// post status
525
-	$status = get_post_status( get_the_ID() );
525
+	$status = get_post_status(get_the_ID());
526 526
 
527 527
 	// let users add custom css classes
528
-	$custom_classes = apply_filters( 'lasso_modal_all_post_classes', '' );
528
+	$custom_classes = apply_filters('lasso_modal_all_post_classes', '');
529 529
 
530 530
 	?>
531
-	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" style="max-height:100%">
531
+	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" style="max-height:100%">
532 532
 		<div class="lasso--modal__inner">
533 533
 
534 534
 			<div class="lasso--post-filtering not-visible">
535 535
 				<div class="lasso--search__results">
536
-					<span id="lasso--results-found"></span><?php _e('results found','lasso');?>
536
+					<span id="lasso--results-found"></span><?php _e('results found', 'lasso'); ?>
537 537
 				</div>
538 538
 				<div class="lasso--search">
539 539
 					<i id="lasso--search__toggle" class="dashicons dashicons-search"></i>
@@ -546,18 +546,18 @@  discard block
 block discarded – undo
546 546
 
547 547
 				$post_types = lasso_post_types_names();
548 548
 
549
-				if ( ! empty( $post_types ) ) {
549
+				if (!empty($post_types)) {
550 550
 					$first = 'active';
551
-					foreach( $post_types as $name => $label ) {
551
+					foreach ($post_types as $name => $label) {
552 552
 						//printf( '<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr( $first), esc_attr( $name ), esc_attr( $label ) );
553 553
 						//print_r($post_types);
554
-						printf( '<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr( $first), esc_attr( $name ), esc_attr( $label ) );
554
+						printf('<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr($first), esc_attr($name), esc_attr($label));
555 555
 						$first = '';
556 556
 					}
557 557
 
558 558
 				}
559 559
 
560
-				do_action('lasso_modal_post_objects');?>
560
+				do_action('lasso_modal_post_objects'); ?>
561 561
 
562 562
 			</ul>
563 563
 			<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
@@ -575,18 +575,18 @@  discard block
 block discarded – undo
575 575
 
576 576
 	ob_start();
577 577
 
578
-	if ( !lasso_user_can() )
578
+	if (!lasso_user_can())
579 579
 		return;
580 580
 
581 581
 	// let users add custom css classes
582
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
582
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
583 583
 
584 584
 	?>
585
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
586
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
587
-		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
588
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
589
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
585
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
586
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
587
+		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
588
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
589
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
590 590
 	</ul>
591 591
 
592 592
 	<?php return ob_get_clean();
@@ -596,18 +596,18 @@  discard block
 block discarded – undo
596 596
 
597 597
 	ob_start();
598 598
 
599
-	if ( !lasso_user_can() )
599
+	if (!lasso_user_can())
600 600
 		return;
601 601
 
602 602
 	// let users add custom css classes
603
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
603
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
604 604
 
605 605
 	?>
606
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
607
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
608
-		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
609
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
610
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
606
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
607
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
608
+		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
609
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
610
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
611 611
 	</ul>
612 612
 
613 613
 	<?php return ob_get_clean();
@@ -620,16 +620,16 @@  discard block
 block discarded – undo
620 620
  */
621 621
 function lasso_map_form_footer() {
622 622
 
623
-	$nonce = wp_create_nonce( 'lasso-process-map' );
623
+	$nonce = wp_create_nonce('lasso-process-map');
624 624
 
625 625
 	ob_start();
626 626
 
627 627
 	?>
628 628
 	<div class="lasso--map-form__footer">
629
-		<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
630
-		<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
629
+		<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
630
+		<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
631 631
 		<input type="hidden" name="action" value="process_map_save">
632
-		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e( 'Save Locations', 'lasso' );?>">
632
+		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e('Save Locations', 'lasso'); ?>">
633 633
 	</div>
634 634
 
635 635
 	<?php return ob_get_clean();
@@ -647,7 +647,7 @@  discard block
 block discarded – undo
647 647
 
648 648
 	?>
649 649
 	<div id="lasso--pagerefresh" class="visible">
650
-		<?php _e( 'Save this post and refesh the page to see these changes.', 'lasso' );?>
650
+		<?php _e('Save this post and refesh the page to see these changes.', 'lasso'); ?>
651 651
 	</div>
652 652
 
653 653
 	<?php return ob_get_clean();
@@ -661,43 +661,43 @@  discard block
 block discarded – undo
661 661
  */
662 662
 function lasso_editor_options_blob() {
663 663
 
664
-	$codes   = function_exists( 'aesop_shortcodes' ) ? aesop_shortcodes() : apply_filters( 'lasso_custom_options', '' );
665
-	$galleries  = function_exists( 'lasso_editor_galleries_exist' ) && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
664
+	$codes = function_exists('aesop_shortcodes') ? aesop_shortcodes() : apply_filters('lasso_custom_options', '');
665
+	$galleries = function_exists('lasso_editor_galleries_exist') && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
666 666
 
667
-	$nonce = wp_create_nonce( 'lasso_gallery' );
667
+	$nonce = wp_create_nonce('lasso_gallery');
668 668
 
669 669
 	$blob = array();
670 670
 
671
-	if ( empty( $codes ) )
671
+	if (empty($codes))
672 672
 		return;
673 673
 
674
-	foreach ( $codes as $slug => $shortcode ) {
674
+	foreach ($codes as $slug => $shortcode) {
675 675
 		$return = '';
676 676
 		// Shortcode has atts
677 677
 
678
-		if ( count( $shortcode['atts'] ) && $shortcode['atts'] ) {
678
+		if (count($shortcode['atts']) && $shortcode['atts']) {
679 679
 
680
-			foreach ( $shortcode['atts'] as $attr_name => $attr_info ) {
680
+			foreach ($shortcode['atts'] as $attr_name => $attr_info) {
681 681
 
682 682
 
683
-				$prefix = isset( $attr_info['prefix'] ) ? sprintf( '<span class="lasso-option-prefix">%s</span>', $attr_info['prefix'] ) : null;
683
+				$prefix = isset($attr_info['prefix']) ? sprintf('<span class="lasso-option-prefix">%s</span>', $attr_info['prefix']) : null;
684 684
 
685 685
 				$return .= '<form id="lasso--component-settings-form" class="'.$galleries.'" method="post">';
686 686
 				$return .= '<p data-option="'.$attr_name.'" class="lasso-option lasso-'.$slug.'-'.$attr_name.'">';
687
-				$return .= '<label for="lasso-generator-attr-' . $attr_name . '">' . $attr_info['desc'] . '</label>';
687
+				$return .= '<label for="lasso-generator-attr-'.$attr_name.'">'.$attr_info['desc'].'</label>';
688 688
 				$return .= '<small class="lasso-option-desc">'.$attr_info['tip'].'</small>';
689 689
 				// Select
690 690
 
691
-				if ( isset( $attr_info['values'] ) ) {
691
+				if (isset($attr_info['values'])) {
692 692
 
693
-					$return .= '<select name="' . $attr_name . '" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr">';
693
+					$return .= '<select name="'.$attr_name.'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr">';
694 694
 
695
-					$i=0;
695
+					$i = 0;
696 696
 
697
-					foreach ( $attr_info['values'] as $attr_value ) {
697
+					foreach ($attr_info['values'] as $attr_value) {
698 698
 						$attr_value_selected = $attr_info['default'] == $attr_value ? ' selected="selected"' : '';
699 699
 
700
-						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" ' . $attr_value_selected . '>'.$attr_info['values'][$i]['name'].'</option>';
700
+						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" '.$attr_value_selected.'>'.$attr_info['values'][$i]['name'].'</option>';
701 701
 
702 702
 						$i++;
703 703
 					}
@@ -706,24 +706,24 @@  discard block
 block discarded – undo
706 706
 
707 707
 				} else {
708 708
 
709
-					$attr_field_type = isset( $attr_info['type'] ) ? $attr_info['type'] : 'text';
709
+					$attr_field_type = isset($attr_info['type']) ? $attr_info['type'] : 'text';
710 710
 
711 711
 					// image upload
712
-					if ( 'media_upload' == $attr_info['type'] ) {
712
+					if ('media_upload' == $attr_info['type']) {
713 713
 
714
-						$return .= '<input type="' . $attr_field_type . '" name="' . $attr_name . '" value="'.$attr_info['default'].'" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />';
714
+						$return .= '<input type="'.$attr_field_type.'" name="'.$attr_name.'" value="'.$attr_info['default'].'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />';
715 715
 						$return .= '<a href="#" id="lasso-upload-img" class="lasso-option-button" /></a>';
716 716
 
717
-					} elseif ( 'color' == $attr_info['type'] ) {
717
+					} elseif ('color' == $attr_info['type']) {
718 718
 
719
-						$return .= '<input type="color" name="' . $attr_name . '" value="'.$attr_info['default'].'" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />';
719
+						$return .= '<input type="color" name="'.$attr_name.'" value="'.$attr_info['default'].'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />';
720 720
 
721
-					} elseif ( 'text_area' == $attr_info['type'] ) {
721
+					} elseif ('text_area' == $attr_info['type']) {
722 722
 
723
-						$return .= '<textarea name="' . $attr_name . '" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" placeholder="'.$attr_info['default'].'" /></textarea>'.$prefix.'';
723
+						$return .= '<textarea name="'.$attr_name.'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" placeholder="'.$attr_info['default'].'" /></textarea>'.$prefix.'';
724 724
 
725 725
 					} else {
726
-						$return .= '<input type="' . $attr_field_type . '" name="' . $attr_name . '" value="'.$attr_info['default'].'" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />'.$prefix.'';
726
+						$return .= '<input type="'.$attr_field_type.'" name="'.$attr_name.'" value="'.$attr_info['default'].'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />'.$prefix.'';
727 727
 					}
728 728
 				}
729 729
 				$return .= '</p>';
@@ -734,9 +734,9 @@  discard block
 block discarded – undo
734 734
 		///////////////////////////
735 735
 		// START GALLERY AND MAP FRONT END STUFFS
736 736
 		///////////////////////////
737
-		if ( isset( $shortcode['front'] ) && true == $shortcode['front'] ) {
737
+		if (isset($shortcode['front']) && true == $shortcode['front']) {
738 738
 
739
-			if ( 'gallery' == $shortcode['front_type'] ) {
739
+			if ('gallery' == $shortcode['front_type']) {
740 740
 
741 741
 				$return .= lasso_gallery_editor_module();
742 742
 
@@ -747,13 +747,13 @@  discard block
 block discarded – undo
747 747
 		///////////////////////////
748 748
 
749 749
 		// Single shortcode (not closed)
750
-		if ( 'single' == $shortcode['type'] ) {
750
+		if ('single' == $shortcode['type']) {
751 751
 
752 752
 			$return .= '<input type="hidden" name="lasso-generator-content" id="lasso-generator-content" value="false" />';
753 753
 
754 754
 		} else {
755 755
 
756
-			$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>';
756
+			$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>';
757 757
 		}
758 758
 
759 759
 		$return .= '<p class="lasso-buttoninsert-wrap"><a href="#" class="lasso-generator-cancel" id="lasso--sidebar__close">Cancel
@@ -786,7 +786,7 @@  discard block
 block discarded – undo
786 786
 				<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
787 787
 				<div id="lasso--hide" style="display:none;" class="lasso--post-form">
788 788
 					<i class="lasso-icon lasso-icon-move"></i>
789
-					<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>
789
+					<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>
790 790
 					<div class="lasso--slider_wrap">
791 791
 						<div id="lasso--slider"></div>
792 792
 					</div>
Please login to merge, or discard this patch.