Completed
Push — master ( ab8a0f...a274e4 )
by
unknown
02:16
created
includes/process/update_object.php 4 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -182,7 +182,7 @@
 block discarded – undo
182 182
      *  @param    string|bool     $value    The term slug, or a comma separated list of slugs. Or false to remove all terms set for post.
183 183
 	 *                                      The first item is the name of taxonomy
184 184
 	 *
185
-	 *  @return bool True if update was successful, false if not.
185
+	 *  @return boolean|null True if update was successful, false if not.
186 186
 	 */
187 187
 	public function set_custom_taxonomy( $postid, $value) {
188 188
 		
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 	 *  @since    0.9.3
135 135
 	 *
136 136
 	 *  @param    int    	$postid       	The current postid
137
-     *  @param    string|bool     $value    The term slug, or a comma separated list of slugs. Or false to remove all terms set for post.
137
+	 *  @param    string|bool     $value    The term slug, or a comma separated list of slugs. Or false to remove all terms set for post.
138 138
 	 *  @param    string     $taxonomy    	The name of the taxonomy to which the term belongs.
139 139
 	 *
140 140
 	 *  @return bool True if update was successful, false if not.
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 			}
148 148
 			
149 149
 			if ($taxonomy =='category') {
150
-                // convert from names to category ids
150
+				// convert from names to category ids
151 151
 				$cats = array();
152 152
 				if (is_array($value)) {
153 153
 					foreach ($value as $cat) {
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 	 *
180 180
 	 *
181 181
 	 *  @param    int    	$postid       	The current postid
182
-     *  @param    string|bool     $value    The term slug, or a comma separated list of slugs. Or false to remove all terms set for post.
182
+	 *  @param    string|bool     $value    The term slug, or a comma separated list of slugs. Or false to remove all terms set for post.
183 183
 	 *                                      The first item is the name of taxonomy
184 184
 	 *
185 185
 	 *  @return bool True if update was successful, false if not.
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 				$value = explode( ',', $value );
193 193
 			}
194 194
 						
195
-            // Deleting first array item
195
+			// Deleting first array item
196 196
 			$taxonomy = array_shift($value);
197 197
 			$cats = array();
198 198
 			foreach ($value as $cat) {
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 		
215 215
 		if( $value ) {
216 216
 			$time = current_time('mysql');
217
-            wp_update_post(
217
+			wp_update_post(
218 218
 				array (
219 219
 					'ID'            => $postid, // ID of the post to update
220 220
 					'post_date'     => date( 'Y-m-d H:i:s',  strtotime($value) ),
Please login to merge, or discard this patch.
Spacing   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
 use lasso\internal_api\api_action;
11 11
 
12
-class update_object implements api_action{
12
+class update_object implements api_action {
13 13
 
14 14
 	/**
15 15
 	 * The nonce action for this request.
@@ -29,11 +29,11 @@  discard block
 block discarded – undo
29 29
 	 *
30 30
 	 * @return bool Always returns true.
31 31
 	 */
32
-	public function post( $data ) {
32
+	public function post($data) {
33 33
 
34
-		$status = isset( $data['status'] ) ? $data['status'] : false;
35
-		$postid = isset( $data['postid'] ) ? $data['postid'] : false;
36
-		$slug   = isset( $data['story_slug'] ) ? $data['story_slug'] : false;
34
+		$status = isset($data['status']) ? $data['status'] : false;
35
+		$postid = isset($data['postid']) ? $data['postid'] : false;
36
+		$slug   = isset($data['story_slug']) ? $data['story_slug'] : false;
37 37
 
38 38
 
39 39
 
@@ -43,28 +43,28 @@  discard block
 block discarded – undo
43 43
 			'post_status' 	=> $status
44 44
 		);
45 45
 
46
-		wp_update_post( apply_filters( 'lasso_object_status_update_args', $args ) );
46
+		wp_update_post(apply_filters('lasso_object_status_update_args', $args));
47 47
 
48 48
 
49 49
 		// update categories
50
-		$cats  = isset( $data['story_cats'] ) ? $data['story_cats'] : false;
51
-		self::set_post_terms( $postid, $cats, 'category' );
50
+		$cats = isset($data['story_cats']) ? $data['story_cats'] : false;
51
+		self::set_post_terms($postid, $cats, 'category');
52 52
 
53 53
 
54 54
 		// update tags
55
-		$tags = isset( $data['story_tags'] ) ? $data['story_tags'] : false;
56
-		self::set_post_terms( $postid, $tags, 'post_tag' );
55
+		$tags = isset($data['story_tags']) ? $data['story_tags'] : false;
56
+		self::set_post_terms($postid, $tags, 'post_tag');
57 57
 		
58 58
 		// update custom taxonomy
59
-		$taxs  = isset( $data['story_custom_taxonomy'] ) ? $data['story_custom_taxonomy'] : false;
60
-		self::set_custom_taxonomy( $postid, $taxs );
59
+		$taxs = isset($data['story_custom_taxonomy']) ? $data['story_custom_taxonomy'] : false;
60
+		self::set_custom_taxonomy($postid, $taxs);
61 61
 		
62 62
 		//update date
63
-		$date  = isset( $data['post_date'] ) ? $data['post_date'] : false;
64
-		self::set_date( $postid, $date );
63
+		$date = isset($data['post_date']) ? $data['post_date'] : false;
64
+		self::set_date($postid, $date);
65 65
 
66 66
 
67
-		do_action( 'lasso_post_updated', $postid, $slug, $status, get_current_user_ID() );
67
+		do_action('lasso_post_updated', $postid, $slug, $status, get_current_user_ID());
68 68
 
69 69
 		return true;
70 70
 
@@ -78,8 +78,8 @@  discard block
 block discarded – undo
78 78
 	 *
79 79
 	 * @return array Array of keys to pull from $_POST per action and their sanitization callback
80 80
 	 */
81
-	public static function params(){
82
-		$params[ 'process_update_object_post' ] = array(
81
+	public static function params() {
82
+		$params['process_update_object_post'] = array(
83 83
 			'postid' => 'absint',
84 84
 			'status' => 'strip_tags',
85 85
 			'story_slug' => array(
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 	 * @return array Array of additional functions to use to authorize action.
118 118
 	 */
119 119
 	public static function auth_callbacks() {
120
-		$params[ 'process_update_object_post' ] = array(
120
+		$params['process_update_object_post'] = array(
121 121
 			'lasso_user_can'
122 122
 		);
123 123
 
@@ -139,14 +139,14 @@  discard block
 block discarded – undo
139 139
 	 *
140 140
 	 *  @return bool True if update was successful, false if not.
141 141
 	 */
142
-	public function set_post_terms( $postid, $value, $taxonomy ) {
143
-		if( $value ) {
142
+	public function set_post_terms($postid, $value, $taxonomy) {
143
+		if ($value) {
144 144
 			// first check if multiple, make array if so.
145
-			if ( self::has_multiple_objects( $value ) ) {	
146
-				$value = explode( ',', $value );
145
+			if (self::has_multiple_objects($value)) {	
146
+				$value = explode(',', $value);
147 147
 			}
148 148
 			
149
-			if ($taxonomy =='category') {
149
+			if ($taxonomy == 'category') {
150 150
                 // convert from names to category ids
151 151
 				$cats = array();
152 152
 				if (is_array($value)) {
@@ -159,17 +159,17 @@  discard block
 block discarded – undo
159 159
 				}
160 160
 			}
161 161
 	
162
-			$result = wp_set_object_terms( $postid, $value, $taxonomy );
162
+			$result = wp_set_object_terms($postid, $value, $taxonomy);
163 163
 		}
164
-		else  {
164
+		else {
165 165
 			//remove all terms from post
166
-			$result = wp_set_object_terms( $postid, null, $taxonomy );
166
+			$result = wp_set_object_terms($postid, null, $taxonomy);
167 167
 
168 168
 		}
169 169
 
170
-		if ( ! is_wp_error( $result ) ) {
170
+		if (!is_wp_error($result)) {
171 171
 			return true;
172
-		}else{
172
+		} else {
173 173
 			return false;
174 174
 		}
175 175
 	}
@@ -184,12 +184,12 @@  discard block
 block discarded – undo
184 184
 	 *
185 185
 	 *  @return bool True if update was successful, false if not.
186 186
 	 */
187
-	public function set_custom_taxonomy( $postid, $value) {
187
+	public function set_custom_taxonomy($postid, $value) {
188 188
 		
189
-		if( $value ) {
189
+		if ($value) {
190 190
 			// first check if multiple, make array if so.
191
-			if ( self::has_multiple_objects( $value ) ) {	
192
-				$value = explode( ',', $value );
191
+			if (self::has_multiple_objects($value)) {	
192
+				$value = explode(',', $value);
193 193
 			}
194 194
 						
195 195
             // Deleting first array item
@@ -201,24 +201,24 @@  discard block
 block discarded – undo
201 201
 			$value = $cats;
202 202
 			
203 203
 	
204
-			$result = wp_set_object_terms( $postid, $cats, $taxonomy );
205
-			if ( ! is_wp_error( $result ) ) {
204
+			$result = wp_set_object_terms($postid, $cats, $taxonomy);
205
+			if (!is_wp_error($result)) {
206 206
 				return true;
207
-			}else{
207
+			} else {
208 208
 				return false;
209 209
 			}
210 210
 		}
211 211
 	}
212 212
 	
213
-	public function set_date( $postid, $value) {
213
+	public function set_date($postid, $value) {
214 214
 		
215
-		if( $value ) {
215
+		if ($value) {
216 216
 			$time = current_time('mysql');
217 217
             wp_update_post(
218
-				array (
218
+				array(
219 219
 					'ID'            => $postid, // ID of the post to update
220
-					'post_date'     => date( 'Y-m-d H:i:s',  strtotime($value) ),
221
-					'post_date_gmt'     => gmdate( 'Y-m-d H:i:s',  strtotime($value) ),
220
+					'post_date'     => date('Y-m-d H:i:s', strtotime($value)),
221
+					'post_date_gmt'     => gmdate('Y-m-d H:i:s', strtotime($value)),
222 222
 				)
223 223
 			);
224 224
 		}
@@ -232,9 +232,9 @@  discard block
 block discarded – undo
232 232
 	 *  @return   bool               True if there are multiple terms; otherwise, false.
233 233
 	 *	@since   0.9.3
234 234
 	 */
235
-	public function has_multiple_objects( $value ) {
235
+	public function has_multiple_objects($value) {
236 236
 
237
-		return 0 < strpos( $value, ',' );
237
+		return 0 < strpos($value, ',');
238 238
 
239 239
 	}
240 240
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -160,8 +160,7 @@  discard block
 block discarded – undo
160 160
 			}
161 161
 	
162 162
 			$result = wp_set_object_terms( $postid, $value, $taxonomy );
163
-		}
164
-		else  {
163
+		} else  {
165 164
 			//remove all terms from post
166 165
 			$result = wp_set_object_terms( $postid, null, $taxonomy );
167 166
 
@@ -169,7 +168,7 @@  discard block
 block discarded – undo
169 168
 
170 169
 		if ( ! is_wp_error( $result ) ) {
171 170
 			return true;
172
-		}else{
171
+		} else{
173 172
 			return false;
174 173
 		}
175 174
 	}
@@ -204,7 +203,7 @@  discard block
 block discarded – undo
204 203
 			$result = wp_set_object_terms( $postid, $cats, $taxonomy );
205 204
 			if ( ! is_wp_error( $result ) ) {
206 205
 				return true;
207
-			}else{
206
+			} else{
208 207
 				return false;
209 208
 			}
210 209
 		}
Please login to merge, or discard this patch.
admin/includes/menus/settings.php 1 patch
Spacing   +113 added lines, -113 removed lines patch added patch discarded remove patch
@@ -9,9 +9,9 @@  discard block
 block discarded – undo
9 9
 
10 10
 	function __construct() {
11 11
 
12
-		add_action( 'admin_menu',     array( $this, 'menu' ) );
13
-		add_action( 'network_admin_menu',   array( $this, 'menu' ) );
14
-		add_action( 'wp_ajax_lasso-editor-settings', array( $this, 'process_settings' ) );
12
+		add_action('admin_menu', array($this, 'menu'));
13
+		add_action('network_admin_menu', array($this, 'menu'));
14
+		add_action('wp_ajax_lasso-editor-settings', array($this, 'process_settings'));
15 15
 
16 16
 	}
17 17
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	function menu() {
24 24
 
25 25
 		// CHANGED Removed condition.
26
-		add_submenu_page( 'lasso-editor', __( 'Settings', 'lasso' ), __( 'Settings', 'lasso' ), 'manage_options', 'lasso-editor-settings', array( $this, 'settings' ) );
26
+		add_submenu_page('lasso-editor', __('Settings', 'lasso'), __('Settings', 'lasso'), 'manage_options', 'lasso-editor-settings', array($this, 'settings'));
27 27
 
28 28
 	}
29 29
 
@@ -45,26 +45,26 @@  discard block
 block discarded – undo
45 45
 	function process_settings() {
46 46
 
47 47
 		// bail out if current user isn't and administrator and they are not logged in
48
-		if ( !current_user_can( 'manage_options' ) || !is_user_logged_in() )
48
+		if (!current_user_can('manage_options') || !is_user_logged_in())
49 49
 			return;
50 50
 
51
-		if ( isset( $_POST['action'] ) && 'lasso-editor-settings' == $_POST['action'] && check_admin_referer( 'nonce', 'lasso_editor_settings' ) ) {
51
+		if (isset($_POST['action']) && 'lasso-editor-settings' == $_POST['action'] && check_admin_referer('nonce', 'lasso_editor_settings')) {
52 52
 
53
-			$options = isset( $_POST['lasso_editor'] ) ? $_POST['lasso_editor'] : false;
53
+			$options = isset($_POST['lasso_editor']) ? $_POST['lasso_editor'] : false;
54 54
 			
55 55
 			$arr = $options['allowed_post_types'];
56
-			$options = array_map( 'sanitize_text_field', $options );
57
-			$options['allowed_post_types'] = array_keys( $arr);
56
+			$options = array_map('sanitize_text_field', $options);
57
+			$options['allowed_post_types'] = array_keys($arr);
58 58
 
59 59
 			
60 60
 
61
-			if ( function_exists( 'is_multisite' ) && is_multisite() ) {
61
+			if (function_exists('is_multisite') && is_multisite()) {
62 62
 
63
-				update_site_option( 'lasso_editor', $options );
63
+				update_site_option('lasso_editor', $options);
64 64
 
65 65
 			} else {
66 66
 
67
-				update_option( 'lasso_editor', $options );
67
+				update_option('lasso_editor', $options);
68 68
 			}
69 69
 
70 70
 			wp_send_json_success();
@@ -86,65 +86,65 @@  discard block
 block discarded – undo
86 86
 	 */
87 87
 	function lasso_editor_settings_form() {
88 88
 
89
-		if ( !is_user_logged_in() )
89
+		if (!is_user_logged_in())
90 90
 			return;
91 91
 
92
-		$article_object   = lasso_editor_get_option( 'article_class', 'lasso_editor' );
93
-		$featImgClass    = lasso_editor_get_option( 'featimg_class', 'lasso_editor' );
94
-		$titleClass    = lasso_editor_get_option( 'title_class', 'lasso_editor' );
95
-
96
-		$post_new_disabled   = lasso_editor_get_option( 'post_adding_disabled', 'lasso_editor' );
97
-		$save_to_post_disabled  = lasso_editor_get_option( 'post_save_disabled', 'lasso_editor' );
98
-		$post_settings_disabled = lasso_editor_get_option( 'post_settings_disabled', 'lasso_editor' );
99
-		$allow_change_date = lasso_editor_get_option( 'allow_change_date', 'lasso_editor' );
100
-		$shortcodify_disabled  = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
101
-		$enable_autosave  = lasso_editor_get_option( 'enable_autosave', 'lasso_editor' );
102
-
103
-		$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
104
-		$toolbar_headings_h4      = lasso_editor_get_option( 'toolbar_headings_h4', 'lasso_editor' );
105
-		$toolbar_show_color      = lasso_editor_get_option( 'toolbar_show_color', 'lasso_editor' );
106
-		$toolbar_show_alignment  = lasso_editor_get_option( 'toolbar_show_alignment', 'lasso_editor' );
92
+		$article_object = lasso_editor_get_option('article_class', 'lasso_editor');
93
+		$featImgClass = lasso_editor_get_option('featimg_class', 'lasso_editor');
94
+		$titleClass = lasso_editor_get_option('title_class', 'lasso_editor');
95
+
96
+		$post_new_disabled = lasso_editor_get_option('post_adding_disabled', 'lasso_editor');
97
+		$save_to_post_disabled  = lasso_editor_get_option('post_save_disabled', 'lasso_editor');
98
+		$post_settings_disabled = lasso_editor_get_option('post_settings_disabled', 'lasso_editor');
99
+		$allow_change_date = lasso_editor_get_option('allow_change_date', 'lasso_editor');
100
+		$shortcodify_disabled  = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor');
101
+		$enable_autosave = lasso_editor_get_option('enable_autosave', 'lasso_editor');
102
+
103
+		$toolbar_headings      = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
104
+		$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
105
+		$toolbar_show_color      = lasso_editor_get_option('toolbar_show_color', 'lasso_editor');
106
+		$toolbar_show_alignment  = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor');
107 107
 		
108
-		$objectsNoSave  	= lasso_editor_get_option('dont_save', 'lasso_editor');
109
-		$objectsNonEditable  	= lasso_editor_get_option('non_editable', 'lasso_editor');
108
+		$objectsNoSave = lasso_editor_get_option('dont_save', 'lasso_editor');
109
+		$objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor');
110 110
 		$disable_tour = lasso_editor_get_option('disable_tour', 'lasso_editor');
111 111
 		$show_ignored_items = lasso_editor_get_option('show_ignored_items', 'lasso_editor');
112 112
 		$save_using_rest_disabled = lasso_editor_get_option('save_using_rest_disabled', 'lasso_editor');
113 113
 		
114
-		$default_post_types = apply_filters( 'lasso_allowed_post_types', array( 'post', 'page'));
115
-		$allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor',  $default_post_types);
114
+		$default_post_types = apply_filters('lasso_allowed_post_types', array('post', 'page'));
115
+		$allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', $default_post_types);
116 116
 		
117
-		$bold_tag = lasso_editor_get_option( 'bold_tag', 'lasso_editor',  "b");
118
-		$i_tag = lasso_editor_get_option( 'i_tag', 'lasso_editor',  "i");
117
+		$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor', "b");
118
+		$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor', "i");
119 119
 
120 120
 ?>
121 121
 		<div class="wrap">
122 122
 
123
-	    	<h2><?php _e( 'Editus Settings', 'lasso' );?></h2>
123
+	    	<h2><?php _e('Editus Settings', 'lasso'); ?></h2>
124 124
 
125 125
 			<form id="lasso-editor-settings-form" class="lasso--form-settings" method="post" enctype="multipart/form-data">
126 126
 
127
-				<?php do_action('lasso_settings_before');?>
127
+				<?php do_action('lasso_settings_before'); ?>
128 128
 				
129 129
 				
130 130
 				
131
-				<h3><?php _e( 'Enable for:', 'lasso' );?></h3>
131
+				<h3><?php _e('Enable for:', 'lasso'); ?></h3>
132 132
 				<div class="lasso-editor-settings--option-wrap">
133 133
 					<div class="lasso-editor-settings--option-inner">
134 134
 						
135
-						<span class="lasso--setting-description"><?php _e( 'Enable Editus for the following post types.', 'lasso' );?></span>
135
+						<span class="lasso--setting-description"><?php _e('Enable Editus for the following post types.', 'lasso'); ?></span>
136 136
 						<?php
137 137
 						$args = array(
138 138
 							'public'   => true
139 139
 						);
140 140
 						 
141
-						$allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
142
-						$post_types = get_post_types( $args, 'objects' );
141
+						$allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
142
+						$post_types = get_post_types($args, 'objects');
143 143
 						 
144
-						foreach ( $post_types  as $post_type ) {
144
+						foreach ($post_types  as $post_type) {
145 145
 						   if ($post_type->name == 'attachment') continue;
146
-						   $checked ="";
147
-						   if (  in_array( $post_type->name, $allowed_post_types )  ) {
146
+						   $checked = "";
147
+						   if (in_array($post_type->name, $allowed_post_types)) {
148 148
 								$checked = 'checked="checked"';
149 149
 						   }
150 150
 						   echo '<label><input type="checkbox" '.$checked.' name="lasso_editor[allowed_post_types]['.$post_type->name.']" id="lasso_editor[allowed_post_types]['.$post_type->name.']" >'.$post_type->name.'</label>';
@@ -154,69 +154,69 @@  discard block
 block discarded – undo
154 154
 				</div>
155 155
 				
156 156
 
157
-				<h3><?php _e( 'Internal Settings', 'lasso' );?></h3>
157
+				<h3><?php _e('Internal Settings', 'lasso'); ?></h3>
158 158
 				<div class="lasso-editor-settings--option-wrap">
159 159
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
160
-						<label><?php _e( 'Article Class', 'lasso' );?></label>
161
-						<span class="lasso--setting-description"><?php _e( 'Provide the CSS class (including the preceding dot) of container that holds the post. This should be the first parent container class that holds the_content.', 'lasso' );?></span>
162
-						<input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr( $article_object );?>" placeholder=".entry-content">
160
+						<label><?php _e('Article Class', 'lasso'); ?></label>
161
+						<span class="lasso--setting-description"><?php _e('Provide the CSS class (including the preceding dot) of container that holds the post. This should be the first parent container class that holds the_content.', 'lasso'); ?></span>
162
+						<input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr($article_object); ?>" placeholder=".entry-content">
163 163
 					</div>
164 164
 				
165 165
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
166
-						<label><?php _e( 'Featured Image Class', 'lasso' );?></label>
167
-						<span class="lasso--setting-description"><?php _e( 'Provide the CSS class that uses a featured image as a background image. This currently only supports themes that have the featured image set as background image.', 'lasso' );?></span>
168
-						<input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr( $featImgClass );?>" placeholder=".entry-content">
166
+						<label><?php _e('Featured Image Class', 'lasso'); ?></label>
167
+						<span class="lasso--setting-description"><?php _e('Provide the CSS class that uses a featured image as a background image. This currently only supports themes that have the featured image set as background image.', 'lasso'); ?></span>
168
+						<input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr($featImgClass); ?>" placeholder=".entry-content">
169 169
 					</div>
170 170
 				
171 171
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
172
-						<label><?php _e( 'Article Title Class', 'lasso' );?></label>
173
-						<span class="lasso--setting-description"><?php _e( 'Provide the CSS class for the post title. This will enable you to update the title of the post by clicking and typing.', 'lasso' );?></span>
174
-						<input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr( $titleClass );?>" placeholder=".entry-content">
172
+						<label><?php _e('Article Title Class', 'lasso'); ?></label>
173
+						<span class="lasso--setting-description"><?php _e('Provide the CSS class for the post title. This will enable you to update the title of the post by clicking and typing.', 'lasso'); ?></span>
174
+						<input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr($titleClass); ?>" placeholder=".entry-content">
175 175
 					</div>
176 176
 				
177 177
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
178
-						<label><?php _e( 'Ignored Items to Save', 'lasso' );?></label>
179
-						<span class="lasso--setting-description"><?php _e( 'If your post container holds additional markup, list the css class names (comma separated, including the dot) of those items. When you enter the editor, Editus will remove (NOT delete) these items so that it does not save them as HTML.', 'lasso' );?></span>
180
-						<textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNoSave );?></textarea>
178
+						<label><?php _e('Ignored Items to Save', 'lasso'); ?></label>
179
+						<span class="lasso--setting-description"><?php _e('If your post container holds additional markup, list the css class names (comma separated, including the dot) of those items. When you enter the editor, Editus will remove (NOT delete) these items so that it does not save them as HTML.', 'lasso'); ?></span>
180
+						<textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNoSave); ?></textarea>
181 181
 					</div>
182 182
 				
183 183
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
184
-						<label><?php _e( 'Read Only Items', 'lasso' );?></label>
185
-						<span class="lasso--setting-description"><?php _e( 'If your post has items that should not be editable, list the css class names (comma separated, including the dot) of those items.', 'lasso' );?></span>
186
-						<textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNonEditable );?></textarea>
184
+						<label><?php _e('Read Only Items', 'lasso'); ?></label>
185
+						<span class="lasso--setting-description"><?php _e('If your post has items that should not be editable, list the css class names (comma separated, including the dot) of those items.', 'lasso'); ?></span>
186
+						<textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNonEditable); ?></textarea>
187 187
 					</div>
188 188
 				
189 189
 					<div class="lasso-editor-settings--option-inner" >
190
-						<input type="checkbox" class="checkbox" name="lasso_editor[show_ignored_items]" id="lasso_editor[show_ignored_items]" <?php echo checked( $show_ignored_items, 'on' );?> >
191
-						<label for="lasso_editor[show_ignored_items]"> <?php _e( 'Show Ignored Items', 'lasso' );?></label>
192
-						<span class="lasso--setting-description"><?php _e( 'By default the ignored items are hidden. Check this to show ignored items while keeping them uneditable.', 'lasso' );?></span>
190
+						<input type="checkbox" class="checkbox" name="lasso_editor[show_ignored_items]" id="lasso_editor[show_ignored_items]" <?php echo checked($show_ignored_items, 'on'); ?> >
191
+						<label for="lasso_editor[show_ignored_items]"> <?php _e('Show Ignored Items', 'lasso'); ?></label>
192
+						<span class="lasso--setting-description"><?php _e('By default the ignored items are hidden. Check this to show ignored items while keeping them uneditable.', 'lasso'); ?></span>
193 193
 					</div>
194 194
 				</div>
195 195
 
196
-				<h3><?php _e( 'Editor UI', 'lasso' );?></h3>
196
+				<h3><?php _e('Editor UI', 'lasso'); ?></h3>
197 197
 				<div class="lasso-editor-settings--option-wrap">
198 198
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
199
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked( $toolbar_headings, 'on' );?> >
200
-						<label for="lasso_editor[toolbar_headings]"><?php _e( 'Enable H2 and H3 Buttons', 'lasso' );?></label>
201
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set H2 and H3 settings.', 'lasso' );?></span>
199
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked($toolbar_headings, 'on'); ?> >
200
+						<label for="lasso_editor[toolbar_headings]"><?php _e('Enable H2 and H3 Buttons', 'lasso'); ?></label>
201
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set H2 and H3 settings.', 'lasso'); ?></span>
202 202
 
203 203
 					</div>
204 204
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
205
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings_h4]" id="lasso_editor[toolbar_headings_h4]" <?php echo checked( $toolbar_headings_h4, 'on' );?> >
206
-						<label for="lasso_editor[toolbar_headings_h4]"><?php _e( 'Enable H4/H5/H6 Buttons', 'lasso' );?></label>
207
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set H4/H5/H6 settings.', 'lasso' );?></span>
205
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings_h4]" id="lasso_editor[toolbar_headings_h4]" <?php echo checked($toolbar_headings_h4, 'on'); ?> >
206
+						<label for="lasso_editor[toolbar_headings_h4]"><?php _e('Enable H4/H5/H6 Buttons', 'lasso'); ?></label>
207
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set H4/H5/H6 settings.', 'lasso'); ?></span>
208 208
 
209 209
 					</div>
210 210
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
211
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked( $toolbar_show_color, 'on' );?> >
212
-						<label for="lasso_editor[toolbar_show_color]"><?php _e( 'Enable Text Color Buttons', 'lasso' );?></label>
213
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set text colors.', 'lasso' );?></span>
211
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked($toolbar_show_color, 'on'); ?> >
212
+						<label for="lasso_editor[toolbar_show_color]"><?php _e('Enable Text Color Buttons', 'lasso'); ?></label>
213
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set text colors.', 'lasso'); ?></span>
214 214
 
215 215
 					</div>
216 216
 					<div class="lasso-editor-settings--option-inner">
217
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked( $toolbar_show_alignment, 'on' );?> >
218
-						<label for="lasso_editor[toolbar_show_alignment]"><?php _e( 'Enable Text Align Buttons', 'lasso' );?></label>
219
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set text alignment.', 'lasso' );?></span>
217
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked($toolbar_show_alignment, 'on'); ?> >
218
+						<label for="lasso_editor[toolbar_show_alignment]"><?php _e('Enable Text Align Buttons', 'lasso'); ?></label>
219
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set text alignment.', 'lasso'); ?></span>
220 220
 
221 221
 					</div>
222 222
 				</div>
@@ -225,74 +225,74 @@  discard block
 block discarded – undo
225 225
 				
226 226
 				
227 227
 
228
-				<h3><?php _e( 'Post Settings UI', 'lasso' );?></h3>
228
+				<h3><?php _e('Post Settings UI', 'lasso'); ?></h3>
229 229
 				<div class="lasso-editor-settings--option-wrap"  >
230 230
 					<div class="lasso-editor-settings--option-inner" style="border:none">
231
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked( $post_settings_disabled, 'on' );?> >
232
-						<label for="lasso_editor[post_settings_disabled]"> <?php _e( 'Disable Post Settings', 'lasso' );?></label>
233
-						<span class="lasso--setting-description"><?php _e( 'Check this to disable users from being able to edit post settings from the front-end.', 'lasso' );?></span>
231
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked($post_settings_disabled, 'on'); ?> >
232
+						<label for="lasso_editor[post_settings_disabled]"> <?php _e('Disable Post Settings', 'lasso'); ?></label>
233
+						<span class="lasso--setting-description"><?php _e('Check this to disable users from being able to edit post settings from the front-end.', 'lasso'); ?></span>
234 234
 					</div>
235 235
 					
236 236
 					<div class="lasso-editor-settings--option-inner" style="border:none">
237
-						<input type="checkbox" class="checkbox" name="lasso_editor[allow_change_date]" id="lasso_editor[allow_change_date]" <?php echo checked( $allow_change_date, 'on' );?> >
238
-						<label for="lasso_editor[allow_change_date]"> <?php _e( 'Allow Changing Post Date', 'lasso' );?></label>
239
-						<span class="lasso--setting-description"><?php _e( 'Add the date selector to change the post\'s date to the Post Setting dialog', 'lasso' );?></span>
237
+						<input type="checkbox" class="checkbox" name="lasso_editor[allow_change_date]" id="lasso_editor[allow_change_date]" <?php echo checked($allow_change_date, 'on'); ?> >
238
+						<label for="lasso_editor[allow_change_date]"> <?php _e('Allow Changing Post Date', 'lasso'); ?></label>
239
+						<span class="lasso--setting-description"><?php _e('Add the date selector to change the post\'s date to the Post Setting dialog', 'lasso'); ?></span>
240 240
 					</div>
241 241
 				
242 242
 					<div class="lasso-editor-settings--option-inner" >
243
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked( $post_new_disabled, 'on' );?> >
244
-						<label for="lasso_editor[post_adding_disabled]"><?php _e( 'Disable Post Adding', 'lasso' );?></label>
245
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable users from being able to add new posts from the front-end.', 'lasso' );?></span>
243
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked($post_new_disabled, 'on'); ?> >
244
+						<label for="lasso_editor[post_adding_disabled]"><?php _e('Disable Post Adding', 'lasso'); ?></label>
245
+						<span class="lasso--setting-description"><?php _e('Check this box to disable users from being able to add new posts from the front-end.', 'lasso'); ?></span>
246 246
 					</div>
247 247
 				</div>
248 248
 				
249
-				<h3><?php _e( 'Misc', 'lasso' );?></h3>
249
+				<h3><?php _e('Misc', 'lasso'); ?></h3>
250 250
 				<div class="lasso-editor-settings--option-wrap">
251 251
 					<div class="lasso-editor-settings--option-inner" style="border:none">
252
-						<input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked( $disable_tour, 'on' );?> >
253
-						<label for="lasso_editor[disable_tour]"> <?php _e( 'Do Not Show Tour Dialog', 'lasso' );?></label>
254
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable the tour dialog box for all users.', 'lasso' );?></span>
252
+						<input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked($disable_tour, 'on'); ?> >
253
+						<label for="lasso_editor[disable_tour]"> <?php _e('Do Not Show Tour Dialog', 'lasso'); ?></label>
254
+						<span class="lasso--setting-description"><?php _e('Check this box to disable the tour dialog box for all users.', 'lasso'); ?></span>
255 255
 					</div>
256 256
 
257 257
 					<div class="lasso-editor-settings--option-inner" >
258
-					    <label for="lasso_editor[bold_tag]"> <?php _e( '"Bold" Tag', 'lasso' );?></label>
259
-						<span class="lasso--setting-description"><?php _e( 'Choose the HTML tag used for the "Bold" style.', 'lasso' );?></span>
260
-					    <input type="radio" name="lasso_editor[bold_tag]" value='b' <?php echo checked( $bold_tag, 'b' );?>> b
261
-						<input type="radio" name="lasso_editor[bold_tag]" value="strong" <?php echo checked( $bold_tag, 'strong' );?>> strong
258
+					    <label for="lasso_editor[bold_tag]"> <?php _e('"Bold" Tag', 'lasso'); ?></label>
259
+						<span class="lasso--setting-description"><?php _e('Choose the HTML tag used for the "Bold" style.', 'lasso'); ?></span>
260
+					    <input type="radio" name="lasso_editor[bold_tag]" value='b' <?php echo checked($bold_tag, 'b'); ?>> b
261
+						<input type="radio" name="lasso_editor[bold_tag]" value="strong" <?php echo checked($bold_tag, 'strong'); ?>> strong
262 262
 					</div>
263 263
 					<div class="lasso-editor-settings--option-inner" >
264
-					    <label for="lasso_editor[i_tag]"> <?php _e( '"Italic" Tag', 'lasso' );?></label>
265
-						<span class="lasso--setting-description"><?php _e( 'Choose the HTML tag used for the "Italic" style.', 'lasso' );?></span>
266
-					    <input type="radio" name="lasso_editor[i_tag]" value='i' <?php echo checked( $i_tag, 'i' );?>> i
267
-						<input type="radio" name="lasso_editor[i_tag]" value="em" <?php echo checked( $i_tag, 'em' );?>> em
264
+					    <label for="lasso_editor[i_tag]"> <?php _e('"Italic" Tag', 'lasso'); ?></label>
265
+						<span class="lasso--setting-description"><?php _e('Choose the HTML tag used for the "Italic" style.', 'lasso'); ?></span>
266
+					    <input type="radio" name="lasso_editor[i_tag]" value='i' <?php echo checked($i_tag, 'i'); ?>> i
267
+						<input type="radio" name="lasso_editor[i_tag]" value="em" <?php echo checked($i_tag, 'em'); ?>> em
268 268
 					</div>
269 269
 				</div>
270 270
 
271
-				<h3><?php _e( 'Advanced', 'lasso' );?></h3>
271
+				<h3><?php _e('Advanced', 'lasso'); ?></h3>
272 272
 				<div class="lasso-editor-settings--option-wrap ">
273 273
 					<div class="lasso-editor-settings--option-inner" style="border:none">
274
-						<input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked( $shortcodify_disabled, 'on' );?> >
275
-						<label for="lasso_editor[shortcodify_disabled]"><?php _e( 'Disable Aesop Component Conversion', 'lasso' );?></label>
276
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso' );?></span>
274
+						<input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked($shortcodify_disabled, 'on'); ?> >
275
+						<label for="lasso_editor[shortcodify_disabled]"><?php _e('Disable Aesop Component Conversion', 'lasso'); ?></label>
276
+						<span class="lasso--setting-description"><?php _e('Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso'); ?></span>
277 277
 					</div>
278 278
 				
279 279
 					<div class="lasso-editor-settings--option-inner" style="border:none">
280
-						<input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked( $enable_autosave, 'on' );?> >
281
-						<label for="lasso_editor[enable_autosave]"><?php _e( 'Enable Auto Save', 'lasso' );?></label>
282
-						<span class="lasso--setting-description"><?php _e( 'Check this box to enable auto save.', 'lasso' );?></span>
280
+						<input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked($enable_autosave, 'on'); ?> >
281
+						<label for="lasso_editor[enable_autosave]"><?php _e('Enable Auto Save', 'lasso'); ?></label>
282
+						<span class="lasso--setting-description"><?php _e('Check this box to enable auto save.', 'lasso'); ?></span>
283 283
 					</div>
284 284
 				
285 285
 					<div class="lasso-editor-settings--option-inner" style="border:none">
286
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_save_disabled]" id="lasso_editor[post_save_disabled]" <?php echo checked( $save_to_post_disabled, 'on' );?> >
287
-						<label for="lasso_editor[post_save_disabled]"><?php _e( 'Disable Post Saving', 'lasso' );?></label>
288
-						<span class="lasso--setting-description"><?php _e( 'By default the editor will update the database with the post or page it is being used on. Check this box to disable this. If you check this box, it is assumed that you will be using the provided filters to save your own content.', 'lasso' );?></span>
286
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_save_disabled]" id="lasso_editor[post_save_disabled]" <?php echo checked($save_to_post_disabled, 'on'); ?> >
287
+						<label for="lasso_editor[post_save_disabled]"><?php _e('Disable Post Saving', 'lasso'); ?></label>
288
+						<span class="lasso--setting-description"><?php _e('By default the editor will update the database with the post or page it is being used on. Check this box to disable this. If you check this box, it is assumed that you will be using the provided filters to save your own content.', 'lasso'); ?></span>
289 289
 
290 290
 					</div>
291 291
 				
292 292
 					<div class="lasso-editor-settings--option-inner">
293
-						<input type="checkbox" class="checkbox" name="lasso_editor[save_using_rest_disabled]" id="lasso_editor[save_using_rest_disabled]" <?php echo checked( $save_using_rest_disabled, 'on' );?> >
294
-						<label for="lasso_editor[save_using_rest_disabled]"><?php _e( "Don't Use REST API to Save", 'lasso' );?></label>
295
-						<span class="lasso--setting-description"><?php _e( 'By default the editor will use REST API to save posts. Check this box to use custom AJAX calls instead.', 'lasso' );?></span>
293
+						<input type="checkbox" class="checkbox" name="lasso_editor[save_using_rest_disabled]" id="lasso_editor[save_using_rest_disabled]" <?php echo checked($save_using_rest_disabled, 'on'); ?> >
294
+						<label for="lasso_editor[save_using_rest_disabled]"><?php _e("Don't Use REST API to Save", 'lasso'); ?></label>
295
+						<span class="lasso--setting-description"><?php _e('By default the editor will use REST API to save posts. Check this box to use custom AJAX calls instead.', 'lasso'); ?></span>
296 296
 
297 297
 					</div>
298 298
 				</div>
@@ -302,11 +302,11 @@  discard block
 block discarded – undo
302 302
 
303 303
 				<div class="lasso-editor-settings--submit">
304 304
 				    <input type="hidden" name="action" value="lasso-editor-settings" />
305
-				    <input type="submit" class="button-primary" value="<?php esc_attr_e( 'Save Settings', 'lasso' );?>" />
306
-					<?php wp_nonce_field( 'nonce', 'lasso_editor_settings' ); ?>
305
+				    <input type="submit" class="button-primary" value="<?php esc_attr_e('Save Settings', 'lasso'); ?>" />
306
+					<?php wp_nonce_field('nonce', 'lasso_editor_settings'); ?>
307 307
 				</div>
308 308
 				
309
-				<?php do_action('lasso_settings_after');?>
309
+				<?php do_action('lasso_settings_after'); ?>
310 310
 			</form>
311 311
 
312 312
 		</div><?php
Please login to merge, or discard this patch.
public/includes/assets.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 			$postid 			= get_the_ID();
82 82
 			
83 83
 			$post_date = get_the_time('U', $postid);
84
-            $delta = time() - $post_date;
84
+			$delta = time() - $post_date;
85 85
 
86 86
 			$strings = array(
87 87
 				'save' 				=> __('Save','lasso'),
@@ -127,11 +127,11 @@  discard block
 block discarded – undo
127 127
 			$gallery_nonce = wp_create_nonce( $gallery_nonce_action );
128 128
 			
129 129
 			
130
-            if ($allow_change_date) {
131
-			    $permalink = get_site_url().'/?p='.$postid;
132
-            } else {
133
-                $permalink = get_permalink($postid);
134
-            }
130
+			if ($allow_change_date) {
131
+				$permalink = get_site_url().'/?p='.$postid;
132
+			} else {
133
+				$permalink = get_permalink($postid);
134
+			}
135 135
 			
136 136
 			// rest api
137 137
 			$rest_nonce = '';
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 			
228 228
 			
229 229
 			if (!$using_restapiv2) {
230
-               // enqueue REST API V1
230
+			   // enqueue REST API V1
231 231
 			   wp_enqueue_script( 'wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
232 232
 			   $settings = array( 'root' => home_url( $home_url ), 'nonce' => wp_create_nonce( 'wp_json' ) );
233 233
 			   wp_localize_script( 'wp-api-js', 'WP_API_Settings', $settings );
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 			if ($show_color) {
244 244
 				wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api','iris'), LASSO_VERSION, true);
245 245
 			} else {
246
-			    wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
246
+				wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
247 247
 			}
248 248
 			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects ) );
249 249
 
Please login to merge, or discard this patch.
Spacing   +80 added lines, -80 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,27 +33,27 @@  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
-			$toolbar_headings_h4  	= lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
48
+			$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
49
+			$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
50 50
 			$objectsNoSave  	= lasso_editor_get_option('dont_save', 'lasso_editor');
51
-			$objectsNonEditable  	= lasso_editor_get_option('non_editable', 'lasso_editor');
51
+			$objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor');
52 52
 			$disableRESTSave = lasso_editor_get_option('save_using_rest_disabled', 'lasso_editor');
53
-			$save_to_post_disabled  = lasso_editor_get_option( 'post_save_disabled', 'lasso_editor' );
53
+			$save_to_post_disabled = lasso_editor_get_option('post_save_disabled', 'lasso_editor');
54 54
 			
55
-			$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor','b');
56
-			$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor','i');
55
+			$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor', 'b');
56
+			$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor', 'i');
57 57
 
58 58
 			
59 59
 			//text alignement
@@ -67,13 +67,13 @@  discard block
 block discarded – undo
67 67
 			
68 68
 			if ($show_color) {
69 69
 				//color picker
70
-				wp_enqueue_style( 'wp-color-picker' );
71
-				wp_enqueue_script( 'iris', admin_url( 'js/iris.min.js' ), array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), false, 1 );
70
+				wp_enqueue_style('wp-color-picker');
71
+				wp_enqueue_script('iris', admin_url('js/iris.min.js'), array('jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch'), false, 1);
72 72
 			}
73 73
 			
74 74
 			// custom fields
75 75
 			
76
-			$custom_fields = apply_filters( 'editus_custom_fields', null ); //array('testFieldName' => '#field1');
76
+			$custom_fields = apply_filters('editus_custom_fields', null); //array('testFieldName' => '#field1');
77 77
 
78 78
 
79 79
 
@@ -84,47 +84,47 @@  discard block
 block discarded – undo
84 84
             $delta = time() - $post_date;
85 85
 
86 86
 			$strings = array(
87
-				'save' 				=> __('Save','lasso'),
88
-				'saving' 			=> __('Saving...','lasso'),
89
-				'saved'				=> __('Saved!','lasso'),
90
-				'adding' 			=> __('Adding...','lasso'),
91
-				'added'				=> __('Added!','lasso'),
92
-				'loading' 			=> __('Loading...','lasso'),
93
-				'loadMore'			=> __('Load More','lasso'),
94
-				'noPostsFound'		=> __('No more posts found','lasso'),
95
-				'fetchFail'	    	=> __('Fetching failed.','lasso'),
96
-				'galleryCreated' 	=> __('Gallery Created!','lasso'),
97
-				'galleryUpdated' 	=> __('Gallery Updated!','lasso'),
98
-				'justWrite'			=> __('Just write...','lasso'),
99
-				'chooseImage'		=> __('Choose an image','lasso'),
100
-				'updateImage'		=> __('Update Image','lasso'),
101
-				'insertImage'		=> __('Insert Image','lasso'),
102
-				'selectImage'		=> __('Select Image','lasso'),
103
-				'removeFeatImg'     => __('Remove featured image?','lasso'),
104
-				'updateSelectedImg' => __('Update Selected Image','lasso'),
105
-				'chooseImages'		=> __('Choose images','lasso'),
106
-				'editImage'			=> __('Edit Image','lasso'),
107
-				'addImages'			=> __('Add Images','lasso'),
108
-				'addNewGallery'		=> __('Add New Gallery','lasso'),
109
-				'selectGallery'		=> __('Select Lasso Gallery Image','lasso'),
110
-				'useSelectedImages' => __('Use Selected Images','lasso'),
111
-				'publishPost'		=> __('Publish Post?','lasso'),
112
-				'publishYes'		=> __('Yes, publish it!','lasso'),
113
-				'deletePost'		=> __('Trash Post?','lasso'),
114
-				'deleteYes'			=> __('Yes, trash it!','lasso'),
115
-				'warning'			=> __('Oh snap!','laso'),
116
-				'cancelText'		=> __('O.K. got it!','lasso'),
117
-				'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'),
87
+				'save' 				=> __('Save', 'lasso'),
88
+				'saving' 			=> __('Saving...', 'lasso'),
89
+				'saved'				=> __('Saved!', 'lasso'),
90
+				'adding' 			=> __('Adding...', 'lasso'),
91
+				'added'				=> __('Added!', 'lasso'),
92
+				'loading' 			=> __('Loading...', 'lasso'),
93
+				'loadMore'			=> __('Load More', 'lasso'),
94
+				'noPostsFound'		=> __('No more posts found', 'lasso'),
95
+				'fetchFail'	    	=> __('Fetching failed.', 'lasso'),
96
+				'galleryCreated' 	=> __('Gallery Created!', 'lasso'),
97
+				'galleryUpdated' 	=> __('Gallery Updated!', 'lasso'),
98
+				'justWrite'			=> __('Just write...', 'lasso'),
99
+				'chooseImage'		=> __('Choose an image', 'lasso'),
100
+				'updateImage'		=> __('Update Image', 'lasso'),
101
+				'insertImage'		=> __('Insert Image', 'lasso'),
102
+				'selectImage'		=> __('Select Image', 'lasso'),
103
+				'removeFeatImg'     => __('Remove featured image?', 'lasso'),
104
+				'updateSelectedImg' => __('Update Selected Image', 'lasso'),
105
+				'chooseImages'		=> __('Choose images', 'lasso'),
106
+				'editImage'			=> __('Edit Image', 'lasso'),
107
+				'addImages'			=> __('Add Images', 'lasso'),
108
+				'addNewGallery'		=> __('Add New Gallery', 'lasso'),
109
+				'selectGallery'		=> __('Select Lasso Gallery Image', 'lasso'),
110
+				'useSelectedImages' => __('Use Selected Images', 'lasso'),
111
+				'publishPost'		=> __('Publish Post?', 'lasso'),
112
+				'publishYes'		=> __('Yes, publish it!', 'lasso'),
113
+				'deletePost'		=> __('Trash Post?', 'lasso'),
114
+				'deleteYes'			=> __('Yes, trash it!', 'lasso'),
115
+				'warning'			=> __('Oh snap!', 'laso'),
116
+				'cancelText'		=> __('O.K. got it!', 'lasso'),
117
+				'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'),
118 118
 				'missingConfirm'	=> __('Update Settings', 'lasso'),
119
-				'helperText'		=> __('one more letter','lasso'),
119
+				'helperText'		=> __('one more letter', 'lasso'),
120 120
 				'editingBackup'  	=> __('You are currently editing a backup copy of this post.'),
121 121
 			);
122 122
 
123
-			$api_url = trailingslashit( home_url() ) . 'lasso-internal-api';
123
+			$api_url = trailingslashit(home_url()).'lasso-internal-api';
124 124
 
125 125
 			$gallery_class = new gallery();
126 126
 			$gallery_nonce_action = $gallery_class->nonce_action;
127
-			$gallery_nonce = wp_create_nonce( $gallery_nonce_action );
127
+			$gallery_nonce = wp_create_nonce($gallery_nonce_action);
128 128
 			
129 129
 			
130 130
             if ($allow_change_date) {
@@ -135,16 +135,16 @@  discard block
 block discarded – undo
135 135
 			
136 136
 			// rest api
137 137
 			$rest_nonce = '';
138
-			$rest_root =''; 
138
+			$rest_root = ''; 
139 139
 			if (function_exists('rest_url')) {
140
-				$rest_root = esc_url_raw( rest_url());
141
-				$rest_nonce = wp_create_nonce( 'wp_rest' );
142
-				$settings = array( 'root' => $rest_root, 'nonce' => $rest_nonce );
143
-				wp_enqueue_script( 'wp-api', '', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
144
-				wp_localize_script( 'wp-api', 'wpApiSettings', $settings );
145
-				wp_localize_script( 'wp-api', 'WP_API_Settings', $settings );
140
+				$rest_root = esc_url_raw(rest_url());
141
+				$rest_nonce = wp_create_nonce('wp_rest');
142
+				$settings = array('root' => $rest_root, 'nonce' => $rest_nonce);
143
+				wp_enqueue_script('wp-api', '', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true);
144
+				wp_localize_script('wp-api', 'wpApiSettings', $settings);
145
+				wp_localize_script('wp-api', 'WP_API_Settings', $settings);
146 146
 				
147
-				if ( class_exists( 'WP_REST_Controller' )) {
147
+				if (class_exists('WP_REST_Controller')) {
148 148
 					// we are using REST API V2
149 149
 					$using_restapiv2 = true;
150 150
 				}
@@ -152,8 +152,8 @@  discard block
 block discarded – undo
152 152
 
153 153
 			// localized objects
154 154
 			$objects = array(
155
-				'ajaxurl' 			=> esc_url( $api_url ),
156
-				'ajaxurl2' 			=> esc_url( admin_url( 'admin-ajax.php' )),
155
+				'ajaxurl' 			=> esc_url($api_url),
156
+				'ajaxurl2' 			=> esc_url(admin_url('admin-ajax.php')),
157 157
 				'rest_root'         => $rest_root,
158 158
 				'rest_nonce'        => $rest_nonce,
159 159
 				'editor' 			=> 'lasso--content', // ID of editable content (without #) DONT CHANGE
@@ -161,13 +161,13 @@  discard block
 block discarded – undo
161 161
 				'featImgClass'		=> $featImgClass,
162 162
 				'titleClass'		=> $titleClass,
163 163
 				'strings'			=> $strings,
164
-				'settingsLink'		=> function_exists('is_multisite') && is_multisite() ? network_admin_url( 'settings.php?page=lasso-editor' ) : admin_url( 'admin.php?page=lasso-editor-settings' ),
165
-				'post_status'		=> get_post_status( $postid ),
164
+				'settingsLink'		=> function_exists('is_multisite') && is_multisite() ? network_admin_url('settings.php?page=lasso-editor') : admin_url('admin.php?page=lasso-editor-settings'),
165
+				'post_status'		=> get_post_status($postid),
166 166
 				'postid'			=> $postid,
167 167
 				'permalink'			=> $permalink,
168 168
 				'edit_others_pages'	=> current_user_can('edit_others_pages') ? true : false,
169 169
 				'edit_others_posts'	=> current_user_can('edit_others_posts') ? true : false,
170
-				'userCanEdit'		=> current_user_can('edit_post', $postid ),
170
+				'userCanEdit'		=> current_user_can('edit_post', $postid),
171 171
 				'can_publish_posts'	=> current_user_can('publish_posts'),
172 172
 				'can_publish_pages'	=> current_user_can('publish_pages'),
173 173
 				'author'			=> is_user_logged_in() ? get_current_user_ID() : false,
@@ -202,24 +202,24 @@  discard block
 block discarded – undo
202 202
 				'postTags'    		=> lasso_get_objects('tag'),
203 203
 				'noResultsDiv'		=> lasso_editor_empty_results(),
204 204
 				'noRevisionsDiv'	=> lasso_editor_empty_results('revision'),
205
-				'mapTileProvider'   => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider( $postid ) : false,
206
-				'mapLocations'		=> get_post_meta( $postid, 'ase_map_component_locations' ),
207
-				'mapStart'			=> get_post_meta( $postid, 'ase_map_component_start_point', true ),
208
-				'mapZoom'			=> get_post_meta( $postid, 'ase_map_component_zoom', true ),
205
+				'mapTileProvider'   => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider($postid) : false,
206
+				'mapLocations'		=> get_post_meta($postid, 'ase_map_component_locations'),
207
+				'mapStart'			=> get_post_meta($postid, 'ase_map_component_start_point', true),
208
+				'mapZoom'			=> get_post_meta($postid, 'ase_map_component_zoom', true),
209 209
 				'revisionModal' 	=> lasso_editor_revision_modal(),
210 210
 				'isMobile'          => wp_is_mobile(),
211
-				'enableAutoSave'    => lasso_editor_get_option( 'enable_autosave', 'lasso_editor' ),
211
+				'enableAutoSave'    => lasso_editor_get_option('enable_autosave', 'lasso_editor'),
212 212
 				'showColor'         => $show_color,
213 213
 				'showAlignment'     => $show_align,
214 214
 				'showIgnoredItems'  => lasso_editor_get_option('show_ignored_items', 'lasso_editor'),
215 215
 				'restapi2'          => $using_restapiv2,
216 216
 				'saveusingrest'     => $using_restapiv2 && !$disableRESTSave,
217
-				'newObjectContent'  => apply_filters( 'lasso_new_object_content', __( 'Once upon a time...','lasso') ),
217
+				'newObjectContent'  => apply_filters('lasso_new_object_content', __('Once upon a time...', 'lasso')),
218 218
 				'disableSavePost'   => $save_to_post_disabled,
219 219
 				'boldTag'           => $bold_tag,
220 220
 				'iTag'           	=> $i_tag,
221 221
 				'customFields'      => $custom_fields,
222
-				'skipToEdit'        =>( $delta < 30 ) // if it's a new post, skip to edit mode
222
+				'skipToEdit'        =>($delta < 30) // if it's a new post, skip to edit mode
223 223
 			);
224 224
 
225 225
 
@@ -228,9 +228,9 @@  discard block
 block discarded – undo
228 228
 			
229 229
 			if (!$using_restapiv2) {
230 230
                // enqueue REST API V1
231
-			   wp_enqueue_script( 'wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
232
-			   $settings = array( 'root' => home_url( $home_url ), 'nonce' => wp_create_nonce( 'wp_json' ) );
233
-			   wp_localize_script( 'wp-api-js', 'WP_API_Settings', $settings );
231
+			   wp_enqueue_script('wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true);
232
+			   $settings = array('root' => home_url($home_url), 'nonce' => wp_create_nonce('wp_json'));
233
+			   wp_localize_script('wp-api-js', 'WP_API_Settings', $settings);
234 234
 			}
235 235
 			
236 236
 			if ($allow_change_date) {
@@ -239,13 +239,13 @@  discard block
 block discarded – undo
239 239
 				wp_enqueue_style('jquery-ui');
240 240
 			}
241 241
 
242
-			$postfix = ( defined( 'SCRIPT_DEBUG' ) && true === SCRIPT_DEBUG ) ? '' : '.min';
242
+			$postfix = (defined('SCRIPT_DEBUG') && true === SCRIPT_DEBUG) ? '' : '.min';
243 243
 			if ($show_color) {
244
-				wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api','iris'), LASSO_VERSION, true);
244
+				wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api', 'iris'), LASSO_VERSION, true);
245 245
 			} else {
246
-			    wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
246
+			    wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
247 247
 			}
248
-			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects ) );
248
+			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects));
249 249
 
250 250
 
251 251
 		}
Please login to merge, or discard this patch.
public/includes/editor-modules.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 	$toolbar_class  = $toolbar_headings ? 'toolbar-extended' : false;
152 152
 	
153 153
 	// mobile styles
154
-    $mobile_class = $is_mobile ? 'lasso-mobile' : false;
154
+	$mobile_class = $is_mobile ? 'lasso-mobile' : false;
155 155
 	$mobile_style =$is_mobile ? 'style="bottom:0px;"' : null;
156 156
 	
157 157
 	//show color
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
 						</div>
431 431
 						<?php 
432 432
 						if ($allow_change_date) { 
433
-						    $dateformat = get_option( 'date_format' ); 
433
+							$dateformat = get_option( 'date_format' ); 
434 434
 						?>
435 435
 						    <label><?php _e( 'Post Date', 'lasso' ); ?></label>
436 436
 							<input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid);?>"/>
@@ -567,8 +567,8 @@  discard block
 block discarded – undo
567 567
 	global $post;
568 568
 	
569 569
 	global $wp_post_types;
570
-    $labels = &$wp_post_types['post']->labels;
571
-    $labels->name = 'Articles';
570
+	$labels = &$wp_post_types['post']->labels;
571
+	$labels->name = 'Articles';
572 572
 
573 573
 	ob_start();
574 574
 
Please login to merge, or discard this patch.
Spacing   +226 added lines, -226 removed lines patch added patch discarded remove patch
@@ -12,32 +12,32 @@  discard block
 block discarded – undo
12 12
  *
13 13
  * @since 1.0
14 14
  */
15
-add_action( 'wp_footer', 'lasso_editor_controls' );
15
+add_action('wp_footer', 'lasso_editor_controls');
16 16
 function lasso_editor_controls() {
17 17
 
18 18
 	global $post;
19 19
 
20
-	if ( lasso_user_can('edit_posts') ) {
20
+	if (lasso_user_can('edit_posts')) {
21 21
 
22
-		$status = get_post_status( get_the_ID() );
22
+		$status = get_post_status(get_the_ID());
23 23
 
24 24
 		// let users add custom css classes
25
-		$custom_classes = apply_filters( 'lasso_control_classes', '' );
25
+		$custom_classes = apply_filters('lasso_control_classes', '');
26 26
 
27 27
 		$post_access_class   = '';
28
-		$post_new_disabled   = lasso_editor_get_option( 'post_adding_disabled', 'lasso_editor' );
29
-		$post_settings_disabled = lasso_editor_get_option( 'post_settings_disabled', 'lasso_editor' );
30
-		$shortcodify_disabled = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
28
+		$post_new_disabled   = lasso_editor_get_option('post_adding_disabled', 'lasso_editor');
29
+		$post_settings_disabled = lasso_editor_get_option('post_settings_disabled', 'lasso_editor');
30
+		$shortcodify_disabled = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor');
31 31
 
32 32
 
33 33
 		// CSS class if adding new post objects is disabled
34
-		if ( 'on' == $post_new_disabled ) { $post_access_class = 'lasso--post-new-disabled'; }
34
+		if ('on' == $post_new_disabled) { $post_access_class = 'lasso--post-new-disabled'; }
35 35
 
36 36
 		// CSS class if adjust settings is disabled
37
-		if ( 'on' == $post_settings_disabled ) { $post_access_class = 'lasso--post-settings-disabled'; }
37
+		if ('on' == $post_settings_disabled) { $post_access_class = 'lasso--post-settings-disabled'; }
38 38
 
39 39
 		// CSS class if adding new post objects AND settings are disabled
40
-		if ( 'on' == $post_new_disabled && 'on' == $post_settings_disabled ) { $post_access_class = 'lasso--post-all-disabled'; }
40
+		if ('on' == $post_new_disabled && 'on' == $post_settings_disabled) { $post_access_class = 'lasso--post-all-disabled'; }
41 41
 
42 42
 		// CSS class if shortcodify or (Aesop Shortcode Conversion) is disabled
43 43
 		$sc_saving_class = 'on' == $shortcodify_disabled ? 'shortcodify-disabled' : 'shortcodify-enabled';
@@ -49,44 +49,44 @@  discard block
 block discarded – undo
49 49
 		$mobile_style = $is_mobile ? 'style="bottom:0px;"' : null;
50 50
 		
51 51
 
52
-		?><div id="lasso--controls" class="lasso-post-status--<?php echo sanitize_html_class( $status );?> <?php echo sanitize_html_class( $custom_classes );?>" data-post-id="<?php echo get_the_ID();?>" >
52
+		?><div id="lasso--controls" class="lasso-post-status--<?php echo sanitize_html_class($status); ?> <?php echo sanitize_html_class($custom_classes); ?>" data-post-id="<?php echo get_the_ID(); ?>" >
53 53
 
54
-			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class;?> "  <?php echo $mobile_style ?> >
54
+			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class; ?> "  <?php echo $mobile_style ?> >
55 55
 
56
-				<?php do_action( 'lasso_editor_controls_before' );
56
+				<?php do_action('lasso_editor_controls_before');
57 57
 
58
-				if ( $is_capable ) { ?>
58
+				if ($is_capable) { ?>
59 59
 
60
-					<li id="lasso--edit" title="<?php esc_attr_e( 'Edit Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
60
+					<li id="lasso--edit" title="<?php esc_attr_e('Edit Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
61 61
 
62
-					<?php if ( 'off' == $post_settings_disabled || empty( $post_settings_disabled ) ) { ?>
63
-						<li id="lasso--post-settings" title="<?php esc_attr_e( 'Post Settings', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
62
+					<?php if ('off' == $post_settings_disabled || empty($post_settings_disabled)) { ?>
63
+						<li id="lasso--post-settings" title="<?php esc_attr_e('Post Settings', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
64 64
 					<?php }
65 65
 
66 66
 				} ?>
67 67
 
68
-				<li id="lasso--post-all" title="<?php esc_attr_e( 'All Posts', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
68
+				<li id="lasso--post-all" title="<?php esc_attr_e('All Posts', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
69 69
 
70
-				<?php if ( $is_capable && wp_revisions_enabled( $post ) ) { ?>
71
-					<li id="lasso--post-revisions" title="<?php esc_attr_e( 'Revisions', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
70
+				<?php if ($is_capable && wp_revisions_enabled($post)) { ?>
71
+					<li id="lasso--post-revisions" title="<?php esc_attr_e('Revisions', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
72 72
 				<?php } ?>
73 73
 
74
-				<?php if ( ( 'off' == $post_new_disabled || empty( $post_new_disabled ) && lasso_user_can('publish_posts') ) ) { ?>
75
-					<li id="lasso--post-new" title="<?php esc_attr_e( 'Add Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
74
+				<?php if (('off' == $post_new_disabled || empty($post_new_disabled) && lasso_user_can('publish_posts'))) { ?>
75
+					<li id="lasso--post-new" title="<?php esc_attr_e('Add Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
76 76
 				<?php } ?>
77 77
 
78
-				<?php do_action( 'lasso_editor_controls_after' );?>
78
+				<?php do_action('lasso_editor_controls_after'); ?>
79 79
 
80 80
 			</ul>
81 81
 
82
-			<?php if ( is_singular() && !$is_mobile ) { ?>
82
+			<?php if (is_singular() && !$is_mobile) { ?>
83 83
 
84
-				<div class="lasso--controls__right" data-posttype="<?php echo get_post_type( get_the_ID() );?>" data-status="<?php echo $status;?>">
84
+				<div class="lasso--controls__right" data-posttype="<?php echo get_post_type(get_the_ID()); ?>" data-status="<?php echo $status; ?>">
85 85
 
86
-					<a href="#" title="<?php esc_attr_e( 'Save Post', 'lasso' );?>" id="lasso--save" class="lasso-save-post lasso--button <?php echo $sc_saving_class;?>"></a>
86
+					<a href="#" title="<?php esc_attr_e('Save Post', 'lasso'); ?>" id="lasso--save" class="lasso-save-post lasso--button <?php echo $sc_saving_class; ?>"></a>
87 87
 
88
-					<?php if ( 'draft' == $status && ( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') )  ) { ?>
89
-						<a href="#" title="<?php esc_attr_e( 'Publish Post', 'lasso' );?>" id="lasso--publish" class="lasso-publish-post lasso--button <?php echo $sc_saving_class;?>"></a>
88
+					<?php if ('draft' == $status && (lasso_user_can('publish_posts') || lasso_user_can('publish_pages'))) { ?>
89
+						<a href="#" title="<?php esc_attr_e('Publish Post', 'lasso'); ?>" id="lasso--publish" class="lasso-publish-post lasso--button <?php echo $sc_saving_class; ?>"></a>
90 90
 					<?php } ?>
91 91
 
92 92
 				</div>
@@ -109,13 +109,13 @@  discard block
 block discarded – undo
109 109
 
110 110
 	ob_start();
111 111
 
112
-	if ( !lasso_user_can() )
112
+	if (!lasso_user_can())
113 113
 		return;
114 114
 
115 115
 	// let users add custom css classes
116
-	$custom_classes = apply_filters( 'lasso_sidebar_classes', '' );
116
+	$custom_classes = apply_filters('lasso_sidebar_classes', '');
117 117
 	?>
118
-	<div id="lasso--sidebar" class="<?php echo sanitize_html_class( $custom_classes );?>" >
118
+	<div id="lasso--sidebar" class="<?php echo sanitize_html_class($custom_classes); ?>" >
119 119
 		<div class="lasso--sidebar__inner">
120 120
 			<div id="lasso--component__settings"></div>
121 121
 		</div>
@@ -133,26 +133,26 @@  discard block
 block discarded – undo
133 133
 
134 134
 	ob_start();
135 135
 
136
-	if ( !lasso_user_can() )
136
+	if (!lasso_user_can())
137 137
 		return;
138 138
 	
139 139
 	$is_mobile = wp_is_mobile();
140 140
 
141 141
 	// check for lasso story engine and add a class doniting this
142
-	$ase_status = class_exists( 'Aesop_Core' ) || defined( 'LASSO_CUSTOM' ) ? 'ase-active' : 'ase-not-active';
142
+	$ase_status = class_exists('Aesop_Core') || defined('LASSO_CUSTOM') ? 'ase-active' : 'ase-not-active';
143 143
 
144 144
 	// let users add custom css classes
145
-	$custom_classes = apply_filters( 'lasso_toolbar_classes', '' );
145
+	$custom_classes = apply_filters('lasso_toolbar_classes', '');
146 146
 
147 147
 	// are toolbar headings enabled
148
-	$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
149
-	$toolbar_headings_h4      = lasso_editor_get_option( 'toolbar_headings_h4', 'lasso_editor' );
148
+	$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
149
+	$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
150 150
 
151
-	$toolbar_class  = $toolbar_headings ? 'toolbar-extended' : false;
151
+	$toolbar_class = $toolbar_headings ? 'toolbar-extended' : false;
152 152
 	
153 153
 	// mobile styles
154 154
     $mobile_class = $is_mobile ? 'lasso-mobile' : false;
155
-	$mobile_style =$is_mobile ? 'style="bottom:0px;"' : null;
155
+	$mobile_style = $is_mobile ? 'style="bottom:0px;"' : null;
156 156
 	
157 157
 	//show color
158 158
 	$show_color = lasso_editor_get_option('toolbar_show_color', 'lasso_editor');
@@ -160,103 +160,103 @@  discard block
 block discarded – undo
160 160
 	//show alignment
161 161
 	$show_align = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor');
162 162
 	
163
-	$status = get_post_status( get_the_ID() );
163
+	$status = get_post_status(get_the_ID());
164 164
 
165 165
 
166 166
 	?>
167
-	<div class="lasso--toolbar_wrap lasso-editor-controls--wrap <?php echo $toolbar_class.' '.$mobile_class.' '.$ase_status.' '.sanitize_html_class( $custom_classes );?>" <?php echo $mobile_style ?>>
168
-		<ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"';}?>>
169
-			<?php do_action( 'lasso_toolbar_components_before' );?>
170
-		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e( 'Bold', 'lasso' );?>"></li>
171
-		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e( 'Underline', 'lasso' );?>"></li>
172
-		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e( 'Italicize', 'lasso' );?>"></li>
173
-		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e( 'Strikethrough', 'lasso' );?>"></li>
174
-			<li id="lasso-toolbar--components" title="<?php esc_attr_e( 'Insert Component', 'lasso' );?>" style="color:#ffffa0;">
167
+	<div class="lasso--toolbar_wrap lasso-editor-controls--wrap <?php echo $toolbar_class.' '.$mobile_class.' '.$ase_status.' '.sanitize_html_class($custom_classes); ?>" <?php echo $mobile_style ?>>
168
+		<ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"'; }?>>
169
+			<?php do_action('lasso_toolbar_components_before'); ?>
170
+		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e('Bold', 'lasso'); ?>"></li>
171
+		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e('Underline', 'lasso'); ?>"></li>
172
+		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e('Italicize', 'lasso'); ?>"></li>
173
+		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e('Strikethrough', 'lasso'); ?>"></li>
174
+			<li id="lasso-toolbar--components" title="<?php esc_attr_e('Insert Component', 'lasso'); ?>" style="color:#ffffa0;">
175 175
 			    <ul id="lasso-toolbar--components__list" style="display:none;color:white;">
176
-			    	<?php if ( 'ase-active' == $ase_status ): ?>
177
-						<li data-type="image" title="<?php esc_attr_e( 'Image', 'lasso' );?>" class="lasso-toolbar--component__image"></li>
178
-						<li data-type="character" title="<?php esc_attr_e( 'Character', 'lasso' );?>" class="lasso-toolbar--component__character"></li>
179
-						<li data-type="quote" title="<?php esc_attr_e( 'Quote', 'lasso' );?>"  class="lasso-toolbar--component__quote"></li>
180
-						<li data-type="content" title="<?php esc_attr_e( 'Content', 'lasso' );?>"  class="lasso-toolbar--component__content"></li>
181
-						<li data-type="chapter" title="<?php esc_attr_e( 'Chapter', 'lasso' );?>"  class="lasso-toolbar--component__chapter"></li>
182
-						<li data-type="parallax" title="<?php esc_attr_e( 'Parallax', 'lasso' );?>"  class="lasso-toolbar--component__parallax"></li>
183
-						<li data-type="audio" title="<?php esc_attr_e( 'Audio', 'lasso' );?>"  class="lasso-toolbar--component__audio"></li>
184
-						<li data-type="video" title="<?php esc_attr_e( 'Video', 'lasso' );?>"  class="lasso-toolbar--component__video"></li>
185
-						<li data-type="map" title="<?php esc_attr_e( 'Map', 'lasso' );?>"  class="lasso-toolbar--component__map"></li>
186
-						<li data-type="timeline_stop" title="<?php esc_attr_e( 'Timeline', 'lasso' );?>"  class="lasso-toolbar--component__timeline"></li>
187
-						<li data-type="document" title="<?php esc_attr_e( 'Document', 'lasso' );?>"  class="lasso-toolbar--component__document"></li>
188
-						<li data-type="collection" title="<?php esc_attr_e( 'Collection', 'lasso' );?>"  class="lasso-toolbar--component__collection"></li>
189
-						<li data-type="gallery" title="<?php esc_attr_e( 'Gallery', 'lasso' );?>"  class="lasso-toolbar--component__gallery"></li>
190
-						<?php if ( class_exists ('Aesop_GalleryPop') ) { ?>
191
-						     <li data-type="gallery" title="<?php esc_attr_e( 'Gallery Pop', 'lasso' );?>"  class="lasso-toolbar--component__gallerypop"></li>
176
+			    	<?php if ('ase-active' == $ase_status): ?>
177
+						<li data-type="image" title="<?php esc_attr_e('Image', 'lasso'); ?>" class="lasso-toolbar--component__image"></li>
178
+						<li data-type="character" title="<?php esc_attr_e('Character', 'lasso'); ?>" class="lasso-toolbar--component__character"></li>
179
+						<li data-type="quote" title="<?php esc_attr_e('Quote', 'lasso'); ?>"  class="lasso-toolbar--component__quote"></li>
180
+						<li data-type="content" title="<?php esc_attr_e('Content', 'lasso'); ?>"  class="lasso-toolbar--component__content"></li>
181
+						<li data-type="chapter" title="<?php esc_attr_e('Chapter', 'lasso'); ?>"  class="lasso-toolbar--component__chapter"></li>
182
+						<li data-type="parallax" title="<?php esc_attr_e('Parallax', 'lasso'); ?>"  class="lasso-toolbar--component__parallax"></li>
183
+						<li data-type="audio" title="<?php esc_attr_e('Audio', 'lasso'); ?>"  class="lasso-toolbar--component__audio"></li>
184
+						<li data-type="video" title="<?php esc_attr_e('Video', 'lasso'); ?>"  class="lasso-toolbar--component__video"></li>
185
+						<li data-type="map" title="<?php esc_attr_e('Map', 'lasso'); ?>"  class="lasso-toolbar--component__map"></li>
186
+						<li data-type="timeline_stop" title="<?php esc_attr_e('Timeline', 'lasso'); ?>"  class="lasso-toolbar--component__timeline"></li>
187
+						<li data-type="document" title="<?php esc_attr_e('Document', 'lasso'); ?>"  class="lasso-toolbar--component__document"></li>
188
+						<li data-type="collection" title="<?php esc_attr_e('Collection', 'lasso'); ?>"  class="lasso-toolbar--component__collection"></li>
189
+						<li data-type="gallery" title="<?php esc_attr_e('Gallery', 'lasso'); ?>"  class="lasso-toolbar--component__gallery"></li>
190
+						<?php if (class_exists('Aesop_GalleryPop')) { ?>
191
+						     <li data-type="gallery" title="<?php esc_attr_e('Gallery Pop', 'lasso'); ?>"  class="lasso-toolbar--component__gallerypop"></li>
192 192
 						<?php }?>
193
-						<?php if ( class_exists ('Aesop_Events') ) { ?>
194
-						     <li data-type="events" title="<?php esc_attr_e( 'Event', 'lasso' );?>"  class="lasso-toolbar--component__event"></li>
193
+						<?php if (class_exists('Aesop_Events')) { ?>
194
+						     <li data-type="events" title="<?php esc_attr_e('Event', 'lasso'); ?>"  class="lasso-toolbar--component__event"></li>
195 195
 						<?php }?>
196 196
 					<?php else: ?>
197
-						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );?>" class="image lasso-toolbar--component__image"></li>
198
-						<li data-type="wpquote" title="<?php esc_attr_e( 'WordPress Quote', 'lasso' );?>" class="quote lasso-toolbar--component__quote"></li>
199
-						<!--li data-type="wpvideo" title="<?php esc_attr_e( 'WordPress Video', 'lasso' );?>" class="video lasso-toolbar--component__video"></li-->
197
+						<li data-type="wpimg" title="<?php esc_attr_e('WordPress Image', 'lasso'); ?>" class="image lasso-toolbar--component__image"></li>
198
+						<li data-type="wpquote" title="<?php esc_attr_e('WordPress Quote', 'lasso'); ?>" class="quote lasso-toolbar--component__quote"></li>
199
+						<!--li data-type="wpvideo" title="<?php esc_attr_e('WordPress Video', 'lasso'); ?>" class="video lasso-toolbar--component__video"></li-->
200 200
 					<?php endif; ?>
201
-					<?php do_action( 'lasso_toolbar_components' );?>
201
+					<?php do_action('lasso_toolbar_components'); ?>
202 202
 			    </ul>
203 203
 			</li>
204
-		    <?php if ( $toolbar_headings ): ?>
205
-		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>"></li>
206
-		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>"></li>
204
+		    <?php if ($toolbar_headings): ?>
205
+		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>"></li>
206
+		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>"></li>
207 207
 			<?php endif; ?>
208
-			<?php if ( $toolbar_headings_h4 ): ?>
209
-		    <li id="lasso-toolbar--h4" title="<?php esc_attr_e( 'H4 Heading', 'lasso' );?>"></li>
210
-		    <li id="lasso-toolbar--h5" title="<?php esc_attr_e( 'H5 Heading', 'lasso' );?>"></li>
211
-			<li id="lasso-toolbar--h6" title="<?php esc_attr_e( 'H6 Heading', 'lasso' );?>"></li>
208
+			<?php if ($toolbar_headings_h4): ?>
209
+		    <li id="lasso-toolbar--h4" title="<?php esc_attr_e('H4 Heading', 'lasso'); ?>"></li>
210
+		    <li id="lasso-toolbar--h5" title="<?php esc_attr_e('H5 Heading', 'lasso'); ?>"></li>
211
+			<li id="lasso-toolbar--h6" title="<?php esc_attr_e('H6 Heading', 'lasso'); ?>"></li>
212 212
 			<?php endif; ?>
213 213
 			
214
-			<?php if ( $show_color ): ?>
215
-		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e( 'Set Text Color', 'lasso' );?>"></li>
216
-		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e( 'Choose Color', 'lasso' );?>"></li>
214
+			<?php if ($show_color): ?>
215
+		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e('Set Text Color', 'lasso'); ?>"></li>
216
+		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e('Choose Color', 'lasso'); ?>"></li>
217 217
 			<?php endif; ?>
218 218
 					
219 219
 		    
220
-			<li id="lasso-toolbar--link" title="<?php esc_attr_e( 'Anchor Link', 'lasso' );?>">
220
+			<li id="lasso-toolbar--link" title="<?php esc_attr_e('Anchor Link', 'lasso'); ?>">
221 221
 		    	<div id="lasso-toolbar--link__wrap" <?php echo $mobile_style ?> >
222
-		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'http://url.com', 'lasso' );?>"></div>
223
-		    		<a href="#" title="<?php esc_attr_e( 'Create Link', 'lasso' );?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
222
+		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e('http://url.com', 'lasso'); ?>"></div>
223
+		    		<a href="#" title="<?php esc_attr_e('Create Link', 'lasso'); ?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
224 224
 					<input class="styled-checkbox" type="checkbox" id="aesop-toolbar--link_newtab" checked/>
225 225
                     <label for="aesop-toolbar--link_newtab">Open in Another Tab</label>
226 226
 		    	</div>
227 227
 		    </li>
228
-		    <?php do_action( 'lasso_toolbar_components_after' );?>
229
-		    <li id="lasso-toolbar--html" title="<?php esc_attr_e( 'Insert HTML', 'lasso' );?>">
228
+		    <?php do_action('lasso_toolbar_components_after'); ?>
229
+		    <li id="lasso-toolbar--html" title="<?php esc_attr_e('Insert HTML', 'lasso'); ?>">
230 230
 		    	<div id="lasso-toolbar--html__wrap" <?php echo $mobile_style ?>>
231
-		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?>"></div>
231
+		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?>"></div>
232 232
 		    		<div id="lasso-toolbar--html__footer">
233 233
 		    			<ul class="lasso-toolbar--html-snips">
234
-		    				<?php if ( !$toolbar_headings ): ?>
235
-		    				<li id="lasso-html--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>">
236
-		    				<li id="lasso-html--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>">
234
+		    				<?php if (!$toolbar_headings): ?>
235
+		    				<li id="lasso-html--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>">
236
+		    				<li id="lasso-html--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>">
237 237
 		    				<?php endif; ?>
238
-		    				<li id="lasso-html--ul" title="<?php esc_attr_e( 'Unordered List', 'lasso' );?>">
239
-		    				<li id="lasso-html--ol" title="<?php esc_attr_e( 'Ordered List', 'lasso' );?>">
238
+		    				<li id="lasso-html--ul" title="<?php esc_attr_e('Unordered List', 'lasso'); ?>">
239
+		    				<li id="lasso-html--ol" title="<?php esc_attr_e('Ordered List', 'lasso'); ?>">
240 240
 		    			</ul>
241
-		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e( 'Cancel', 'lasso' );?></a>
242
-		    			<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>
241
+		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e('Cancel', 'lasso'); ?></a>
242
+		    			<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>
243 243
 		    		</div>
244 244
 		    	</div>
245 245
 		    </li>
246
-			<?php if ( $show_align ): ?>
247
-		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e( 'Text Left Align', 'lasso' );?>"></li>
248
-		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e( 'Text Center Align', 'lasso' );?>"></li>
249
-			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e( 'Text Right Align', 'lasso' );?>"></li>
246
+			<?php if ($show_align): ?>
247
+		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e('Text Left Align', 'lasso'); ?>"></li>
248
+		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e('Text Center Align', 'lasso'); ?>"></li>
249
+			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e('Text Right Align', 'lasso'); ?>"></li>
250 250
 			<?php endif; ?>
251 251
 		</ul>
252
-		<?php if ( is_singular() && $is_mobile ) { ?>
252
+		<?php if (is_singular() && $is_mobile) { ?>
253 253
 
254
-				<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;">
254
+				<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;">
255 255
 
256
-					<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>
256
+					<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>
257 257
 
258
-					<?php if ( 'draft' == $status && ( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') )  ) { ?>
259
-						<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>
258
+					<?php if ('draft' == $status && (lasso_user_can('publish_posts') || lasso_user_can('publish_pages'))) { ?>
259
+						<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 260
 					<?php } ?>
261 261
 
262 262
 				</div>
@@ -274,22 +274,22 @@  discard block
 block discarded – undo
274 274
  */
275 275
 function lasso_editor_settings_toolbar() {
276 276
 
277
-	$delete_nonce = wp_create_nonce( 'lasso-delete-nonce' );
277
+	$delete_nonce = wp_create_nonce('lasso-delete-nonce');
278 278
 
279 279
 	ob_start();
280 280
 
281
-	if ( !lasso_user_can() )
281
+	if (!lasso_user_can())
282 282
 		return;
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();
@@ -305,17 +305,17 @@  discard block
 block discarded – undo
305 305
 
306 306
 	ob_start();
307 307
 
308
-	if ( !lasso_user_can() )
308
+	if (!lasso_user_can())
309 309
 		return;
310 310
 
311 311
 	// has post thumbnail
312
-	$has_thumbnail = has_post_thumbnail( get_the_ID() ) ? 'class="lasso--featImg--has-thumb"' : false;
312
+	$has_thumbnail = has_post_thumbnail(get_the_ID()) ? 'class="lasso--featImg--has-thumb"' : false;
313 313
 
314 314
 	?>
315
-	<ul id="lasso--featImgControls" <?php echo $has_thumbnail;?>>
316
-		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e( 'Replace Image', 'lasso' );?>" href="#"><i class="lasso-icon-image"></i></a></li>
317
-		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e( 'Delete Image', 'lasso' );?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
318
-		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e( 'save', 'lasso' );?></a></li>
315
+	<ul id="lasso--featImgControls" <?php echo $has_thumbnail; ?>>
316
+		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e('Replace Image', 'lasso'); ?>" href="#"><i class="lasso-icon-image"></i></a></li>
317
+		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e('Delete Image', 'lasso'); ?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
318
+		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e('save', 'lasso'); ?></a></li>
319 319
 	</ul>
320 320
 
321 321
 	<?php return ob_get_clean();
@@ -334,58 +334,58 @@  discard block
 block discarded – undo
334 334
 
335 335
 	ob_start();
336 336
 
337
-	if ( !lasso_user_can() )
337
+	if (!lasso_user_can())
338 338
 		return;
339 339
 
340 340
 	global $post;
341 341
 
342 342
 	$postid = get_the_ID();
343 343
 
344
-	$status = get_post_status( $postid );
345
-	$nonce = wp_create_nonce( 'lasso-update-post-settings' );
344
+	$status = get_post_status($postid);
345
+	$nonce = wp_create_nonce('lasso-update-post-settings');
346 346
 
347 347
 	// let users add custom css classes
348
-	$custom_classes = apply_filters( 'lasso_modal_settings_classes', '' );
348
+	$custom_classes = apply_filters('lasso_modal_settings_classes', '');
349 349
 
350 350
 	// objects categories
351
-	$categories 		= lasso_get_post_objects( $postid, 'category' );
352
-	$tags 				= lasso_get_post_objects( $postid, 'tag' );
351
+	$categories = lasso_get_post_objects($postid, 'category');
352
+	$tags = lasso_get_post_objects($postid, 'tag');
353 353
 
354 354
 	// modal tabs
355
-	$tabs  				= lasso_modal_addons('tab');
356
-	$content 			= lasso_modal_addons('content');
355
+	$tabs = lasso_modal_addons('tab');
356
+	$content = lasso_modal_addons('content');
357 357
 	
358 358
 	//editor options
359 359
 	$allow_change_date = lasso_editor_get_option('allow_change_date', 'lasso_editor');
360 360
 
361 361
 	// are we singular
362
-	$is_singular 		= is_singular();
362
+	$is_singular = is_singular();
363 363
 	$is_singular_class 	= $is_singular ? 'lasso--postsettings__2col' : 'lasso--postsettings__1col';
364 364
 	$has_thumb_class    = has_post_thumbnail() ? 'has-thumbnail' : 'no-thumbnail';
365 365
 	$theme_supports     = current_theme_supports('post-thumbnails');
366
-	$default_image 		= LASSO_URL.'/admin/assets/img/empty-img.png';
366
+	$default_image = LASSO_URL.'/admin/assets/img/empty-img.png';
367 367
 
368 368
 ?>
369
-	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>">
369
+	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>">
370 370
 		<div class="lasso--modal__inner">
371 371
 
372
-			<?php if( $tabs ) { echo $tabs; } ?>
372
+			<?php if ($tabs) { echo $tabs; } ?>
373 373
 
374 374
 			<div class="lasso--modal__content modal__content--core visible" data-addon-content="core">
375
-				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class;?>" >
375
+				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class; ?>" >
376 376
 
377
-					<?php if ( $is_singular && $theme_supports ) : ?>
377
+					<?php if ($is_singular && $theme_supports) : ?>
378 378
 					<div class="lasso--postsettings__left">
379
-						<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>
380
-						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url( $default_image );?>">
379
+						<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>
380
+						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url($default_image); ?>">
381 381
 
382 382
 							<div id="lasso--post-thumb__controls" class="lasso--post-thumb__controls">
383
-								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image','lasso');?>" class="dashicons dashicons-edit"></i>
384
-								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image','lasso');?>" class="dashicons dashicons-no-alt"></i>
383
+								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image', 'lasso'); ?>" class="dashicons dashicons-edit"></i>
384
+								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image', 'lasso'); ?>" class="dashicons dashicons-no-alt"></i>
385 385
 								<i id="lasso--save-status" class="lasso-icon lasso-icon-spinner6 not-visible"></i>
386 386
 							</div>
387 387
 
388
-							<?php echo has_post_thumbnail() ? get_the_post_thumbnail( $post->ID, 'medium' ) : '<img src="'.$default_image.'">'; ?>
388
+							<?php echo has_post_thumbnail() ? get_the_post_thumbnail($post->ID, 'medium') : '<img src="'.$default_image.'">'; ?>
389 389
 
390 390
 						</div>
391 391
 						<div id="lasso--featImgSave"><a href="#" class="not-visible">Save</a></div>
@@ -395,12 +395,12 @@  discard block
 block discarded – undo
395 395
 
396 396
 					<div class="lasso--postsettings__right">
397 397
 
398
-						<?php if( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') ): ?>
398
+						<?php if (lasso_user_can('publish_posts') || lasso_user_can('publish_pages')): ?>
399 399
 						<div class="lasso--postsettings__option story-status-option">
400
-							<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>
401
-							<ul class="story-status story-status-<?php echo sanitize_html_class( $status );?>">
402
-								<li id="lasso--status-draft"><?php _e( 'Draft', 'lasso' );?></li>
403
-								<li id="lasso--status-publish"><?php _e( 'Publish', 'lasso' );?></li>
400
+							<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>
401
+							<ul class="story-status story-status-<?php echo sanitize_html_class($status); ?>">
402
+								<li id="lasso--status-draft"><?php _e('Draft', 'lasso'); ?></li>
403
+								<li id="lasso--status-publish"><?php _e('Publish', 'lasso'); ?></li>
404 404
 							</ul>
405 405
 							<div class="lasso--slider_wrap">
406 406
 								<div id="lasso--slider"></div>
@@ -408,10 +408,10 @@  discard block
 block discarded – undo
408 408
 						</div>
409 409
 						<?php endif; ?>
410 410
 
411
-						<?php if ( 'publish' == $status ): ?>
411
+						<?php if ('publish' == $status): ?>
412 412
 						<div class="lasso--postsettings__option story-slug-option">
413
-							<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>
414
-							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset( $post ) ? esc_attr( $post->post_name ) : false;?>">
413
+							<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>
414
+							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset($post) ? esc_attr($post->post_name) : false; ?>">
415 415
 						</div>
416 416
 						<?php endif; ?>
417 417
 
@@ -420,20 +420,20 @@  discard block
 block discarded – undo
420 420
 					<div class="lasso--postsettings__middle">
421 421
 
422 422
 						<div class="lasso--postsettings__option story-categories-option">
423
-							<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>
424
-							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories;?>">
423
+							<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>
424
+							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories; ?>">
425 425
 						</div>
426 426
 
427 427
 						<div class="lasso--postsettings__option story-tags-option">
428
-							<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>
429
-							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags;?>">
428
+							<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>
429
+							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags; ?>">
430 430
 						</div>
431 431
 						<?php 
432 432
 						if ($allow_change_date) { 
433
-						    $dateformat = get_option( 'date_format' ); 
433
+						    $dateformat = get_option('date_format'); 
434 434
 						?>
435
-						    <label><?php _e( 'Post Date', 'lasso' ); ?></label>
436
-							<input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid);?>"/>
435
+						    <label><?php _e('Post Date', 'lasso'); ?></label>
436
+							<input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid); ?>"/>
437 437
 						<?php
438 438
 						}?>
439 439
 
@@ -455,23 +455,23 @@  discard block
 block discarded – undo
455 455
 					?>
456 456
 					<!--/div-->
457 457
 
458
-					<?php do_action( 'lasso_modal_post_form' ); // action ?>
458
+					<?php do_action('lasso_modal_post_form'); // action ?>
459 459
 
460 460
 					<div class="lasso--postsettings__footer" >
461
-						<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
461
+						<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
462 462
 						<input type="hidden" name="status" value="">
463 463
 						<input type="hidden" name="categories" value="">
464
-						<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
464
+						<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
465 465
 						<input type="hidden" name="action" value="process_update-object_post">
466
-						<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
467
-						<?php do_action( 'lasso_modal_post_form_footer' ); // action ?>
468
-						<input type="submit" value="<?php esc_attr_e( 'Save', 'lasso' );?>">
466
+						<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
467
+						<?php do_action('lasso_modal_post_form_footer'); // action ?>
468
+						<input type="submit" value="<?php esc_attr_e('Save', 'lasso'); ?>">
469 469
 					</div>
470 470
 
471 471
 				</form>
472 472
 			</div>
473 473
 
474
-			<?php if( $tabs ) { echo $content; } ?>
474
+			<?php if ($tabs) { echo $content; } ?>
475 475
 
476 476
 		</div>
477 477
 
@@ -492,45 +492,45 @@  discard block
 block discarded – undo
492 492
 
493 493
 	ob_start();
494 494
 
495
-	if ( !lasso_user_can('edit_posts') )
495
+	if (!lasso_user_can('edit_posts'))
496 496
 		return;
497 497
 
498
-	$status = get_post_status( get_the_ID() );
498
+	$status = get_post_status(get_the_ID());
499 499
 
500
-	$nonce = wp_create_nonce( 'lasso-editor-new-post' );
500
+	$nonce = wp_create_nonce('lasso-editor-new-post');
501 501
 
502 502
 	// let users add custom css classes
503
-	$custom_classes = apply_filters( 'lasso_modal_post_classes', '' );
503
+	$custom_classes = apply_filters('lasso_modal_post_classes', '');
504 504
 
505 505
 	// return the post type
506
-	$type = get_post_type( get_the_ID() );
506
+	$type = get_post_type(get_the_ID());
507 507
 
508 508
 	$mobile_style = "";
509 509
 	if (wp_is_mobile()) {
510 510
 		$mobile_style = 'style="top:140px !important;"';
511 511
 	}
512 512
 	?>
513
-	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" <?php echo $mobile_style;?>">
513
+	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" <?php echo $mobile_style; ?>">
514 514
 		<div class="lasso--modal__inner lasso--hasnewform">
515 515
 
516 516
 			<form id="lasso--postnew__form" enctype="multipart/form-data" class="lasso--post-form">
517 517
 
518 518
 				<div class="lasso--postsettings__option story-slug-option lasso--last-option">
519
-					<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>
520
-					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e( 'Grump Wizards Make Toxic Brew', 'lasso' );?>">
519
+					<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>
520
+					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e('Grump Wizards Make Toxic Brew', 'lasso'); ?>">
521 521
 						<div class="lasso--select-wrap" style="width:90px">
522 522
 						<select id="lasso--select-type" name="story_type">
523 523
 
524 524
 							<?php
525 525
 								$types = lasso_post_types();
526 526
 
527
-								if ( !empty( $types ) ) {
527
+								if (!empty($types)) {
528 528
 
529
-									foreach( $types as $type ) {
529
+									foreach ($types as $type) {
530 530
 
531
-										$type = preg_replace( '/s\b/','', $type );
531
+										$type = preg_replace('/s\b/', '', $type);
532 532
 
533
-										printf( '<option value="%s">%s</option>', lcfirst( esc_attr( $type ) ) , ucfirst( esc_attr( $type ) ) );
533
+										printf('<option value="%s">%s</option>', lcfirst(esc_attr($type)), ucfirst(esc_attr($type)));
534 534
 									}
535 535
 
536 536
 								}
@@ -540,12 +540,12 @@  discard block
 block discarded – undo
540 540
 					</div>
541 541
 				</div>
542 542
 
543
-				<div class="lasso--postsettings__footer" style="<?php if (!wp_is_mobile()) {echo 'display:none;';} ?>">
544
-					<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
543
+				<div class="lasso--postsettings__footer" style="<?php if (!wp_is_mobile()) {echo 'display:none;'; } ?>">
544
+					<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
545 545
 					<input type="hidden" name="action" value="process_new-object_post">
546 546
 					<input type="hidden" name="object" value="post">
547
-					<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
548
-					<input type="submit" value="<?php esc_attr_e( 'Create', 'lasso' );?>">
547
+					<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
548
+					<input type="submit" value="<?php esc_attr_e('Create', 'lasso'); ?>">
549 549
 				</div>
550 550
 
551 551
 			</form>
@@ -573,18 +573,18 @@  discard block
 block discarded – undo
573 573
 	ob_start();
574 574
 
575 575
 	// post status
576
-	$status = get_post_status( get_the_ID() );
576
+	$status = get_post_status(get_the_ID());
577 577
 
578 578
 	// let users add custom css classes
579
-	$custom_classes = apply_filters( 'lasso_modal_all_post_classes', '' );
579
+	$custom_classes = apply_filters('lasso_modal_all_post_classes', '');
580 580
 
581 581
 	?>
582
-	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" style="max-height:100%">
582
+	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" style="max-height:100%">
583 583
 		<div class="lasso--modal__inner">
584 584
 
585 585
 			<div class="lasso--post-filtering not-visible">
586 586
 				<div class="lasso--search__results">
587
-					<span id="lasso--results-found"></span><?php _e('results found','lasso');?>
587
+					<span id="lasso--results-found"></span><?php _e('results found', 'lasso'); ?>
588 588
 				</div>
589 589
 				<div class="lasso--search">
590 590
 					<i id="lasso--search__toggle" class="dashicons dashicons-search"></i>
@@ -598,18 +598,18 @@  discard block
 block discarded – undo
598 598
 				$post_types = lasso_post_types_names();
599 599
 				$rest_bases = lasso_post_types_rest_base();
600 600
 
601
-				if ( ! empty( $post_types ) ) {
601
+				if (!empty($post_types)) {
602 602
 					$first = 'active';
603
-					foreach( $post_types as $name => $label ) {
603
+					foreach ($post_types as $name => $label) {
604 604
 						if (array_key_exists($name, $rest_bases)) {
605
-							printf( '<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr( $first), esc_attr( $rest_bases[$name] ), esc_attr( $label ) );
605
+							printf('<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr($first), esc_attr($rest_bases[$name]), esc_attr($label));
606 606
 						}
607 607
 						$first = '';
608 608
 					}
609 609
 
610 610
 				}
611 611
 
612
-				do_action('lasso_modal_post_objects');?>
612
+				do_action('lasso_modal_post_objects'); ?>
613 613
 
614 614
 			</ul>
615 615
 			<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
@@ -627,18 +627,18 @@  discard block
 block discarded – undo
627 627
 
628 628
 	ob_start();
629 629
 
630
-	if ( !lasso_user_can() )
630
+	if (!lasso_user_can())
631 631
 		return;
632 632
 
633 633
 	// let users add custom css classes
634
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
634
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
635 635
 
636 636
 	?>
637
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
638
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
639
-		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
640
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
641
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
637
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
638
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
639
+		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
640
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
641
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
642 642
 	</ul>
643 643
 
644 644
 	<?php return ob_get_clean();
@@ -648,18 +648,18 @@  discard block
 block discarded – undo
648 648
 
649 649
 	ob_start();
650 650
 
651
-	if ( !lasso_user_can() )
651
+	if (!lasso_user_can())
652 652
 		return;
653 653
 
654 654
 	// let users add custom css classes
655
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
655
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
656 656
 
657 657
 	?>
658
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
659
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
660
-		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
661
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
662
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
658
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
659
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
660
+		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
661
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
662
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
663 663
 	</ul>
664 664
 
665 665
 	<?php return ob_get_clean();
@@ -672,16 +672,16 @@  discard block
 block discarded – undo
672 672
  */
673 673
 function lasso_map_form_footer() {
674 674
 
675
-	$nonce = wp_create_nonce( 'lasso-process-map' );
675
+	$nonce = wp_create_nonce('lasso-process-map');
676 676
 
677 677
 	ob_start();
678 678
 
679 679
 	?>
680 680
 	<div class="lasso--map-form__footer">
681
-		<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
682
-		<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
681
+		<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
682
+		<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
683 683
 		<input type="hidden" name="action" value="process_map_save">
684
-		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e( 'Save Locations', 'lasso' );?>">
684
+		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e('Save Locations', 'lasso'); ?>">
685 685
 	</div>
686 686
 
687 687
 	<?php return ob_get_clean();
@@ -699,7 +699,7 @@  discard block
 block discarded – undo
699 699
 
700 700
 	?>
701 701
 	<div id="lasso--pagerefresh" class="visible">
702
-		<?php _e( 'Save this post and refesh the page to see these changes.', 'lasso' );?>
702
+		<?php _e('Save this post and refesh the page to see these changes.', 'lasso'); ?>
703 703
 	</div>
704 704
 
705 705
 	<?php return ob_get_clean();
@@ -713,43 +713,43 @@  discard block
 block discarded – undo
713 713
  */
714 714
 function lasso_editor_options_blob() {
715 715
 
716
-	$codes   = function_exists( 'aesop_shortcodes' ) ? aesop_shortcodes() : apply_filters( 'lasso_custom_options', '' );
717
-	$galleries  = function_exists( 'lasso_editor_galleries_exist' ) && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
716
+	$codes = function_exists('aesop_shortcodes') ? aesop_shortcodes() : apply_filters('lasso_custom_options', '');
717
+	$galleries = function_exists('lasso_editor_galleries_exist') && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
718 718
 
719
-	$nonce = wp_create_nonce( 'lasso_gallery' );
719
+	$nonce = wp_create_nonce('lasso_gallery');
720 720
 
721 721
 	$blob = array();
722 722
 
723
-	if ( empty( $codes ) )
723
+	if (empty($codes))
724 724
 		return;
725 725
 
726
-	foreach ( $codes as $slug => $shortcode ) {
726
+	foreach ($codes as $slug => $shortcode) {
727 727
 		$return = '';
728 728
 		// Shortcode has atts
729 729
 
730
-		if ( count( $shortcode['atts'] ) && $shortcode['atts'] ) {
730
+		if (count($shortcode['atts']) && $shortcode['atts']) {
731 731
 
732
-			foreach ( $shortcode['atts'] as $attr_name => $attr_info ) {
732
+			foreach ($shortcode['atts'] as $attr_name => $attr_info) {
733 733
 
734 734
 
735
-				$prefix = isset( $attr_info['prefix'] ) ? sprintf( '<span class="lasso-option-prefix">%s</span>', $attr_info['prefix'] ) : null;
735
+				$prefix = isset($attr_info['prefix']) ? sprintf('<span class="lasso-option-prefix">%s</span>', $attr_info['prefix']) : null;
736 736
 
737 737
 				$return .= '<form id="lasso--component-settings-form" class="'.$galleries.'" method="post">';
738 738
 				$return .= '<p data-option="'.$attr_name.'" class="lasso-option lasso-'.$slug.'-'.$attr_name.'">';
739
-				$return .= '<label for="lasso-generator-attr-' . $attr_name . '">' . $attr_info['desc'] . '</label>';
739
+				$return .= '<label for="lasso-generator-attr-'.$attr_name.'">'.$attr_info['desc'].'</label>';
740 740
 				$return .= '<small class="lasso-option-desc">'.$attr_info['tip'].'</small>';
741 741
 				// Select
742 742
 
743
-				if ( isset( $attr_info['values'] ) ) {
743
+				if (isset($attr_info['values'])) {
744 744
 
745
-					$return .= '<select name="' . $attr_name . '" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr">';
745
+					$return .= '<select name="'.$attr_name.'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr">';
746 746
 
747
-					$i=0;
747
+					$i = 0;
748 748
 
749
-					foreach ( $attr_info['values'] as $attr_value ) {
749
+					foreach ($attr_info['values'] as $attr_value) {
750 750
 						$attr_value_selected = $attr_info['default'] == $attr_value ? ' selected="selected"' : '';
751 751
 
752
-						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" ' . $attr_value_selected . '>'.$attr_info['values'][$i]['name'].'</option>';
752
+						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" '.$attr_value_selected.'>'.$attr_info['values'][$i]['name'].'</option>';
753 753
 
754 754
 						$i++;
755 755
 					}
@@ -758,24 +758,24 @@  discard block
 block discarded – undo
758 758
 
759 759
 				} else {
760 760
 
761
-					$attr_field_type = isset( $attr_info['type'] ) ? $attr_info['type'] : 'text';
761
+					$attr_field_type = isset($attr_info['type']) ? $attr_info['type'] : 'text';
762 762
 
763 763
 					// image upload
764
-					if ( 'media_upload' == $attr_info['type'] ) {
764
+					if ('media_upload' == $attr_info['type']) {
765 765
 
766
-						$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.'" />';
766
+						$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.'" />';
767 767
 						$return .= '<a href="#" id="lasso-upload-img" class="lasso-option-button" /></a>';
768 768
 
769
-					} elseif ( 'color' == $attr_info['type'] ) {
769
+					} elseif ('color' == $attr_info['type']) {
770 770
 
771
-						$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.'" />';
771
+						$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.'" />';
772 772
 
773
-					} elseif ( 'text_area' == $attr_info['type'] ) {
773
+					} elseif ('text_area' == $attr_info['type']) {
774 774
 
775
-						$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.'';
775
+						$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.'';
776 776
 
777 777
 					} else {
778
-						$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.'';
778
+						$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.'';
779 779
 					}
780 780
 				}
781 781
 				$return .= '</p>';
@@ -786,9 +786,9 @@  discard block
 block discarded – undo
786 786
 		///////////////////////////
787 787
 		// START GALLERY AND MAP FRONT END STUFFS
788 788
 		///////////////////////////
789
-		if ( isset( $shortcode['front'] ) && true == $shortcode['front'] ) {
789
+		if (isset($shortcode['front']) && true == $shortcode['front']) {
790 790
 
791
-			if ( 'gallery' == $shortcode['front_type'] ) {
791
+			if ('gallery' == $shortcode['front_type']) {
792 792
 
793 793
 				$return .= lasso_gallery_editor_module();
794 794
 
@@ -799,13 +799,13 @@  discard block
 block discarded – undo
799 799
 		///////////////////////////
800 800
 
801 801
 		// Single shortcode (not closed)
802
-		if ( 'single' == $shortcode['type'] ) {
802
+		if ('single' == $shortcode['type']) {
803 803
 
804 804
 			$return .= '<input type="hidden" name="lasso-generator-content" id="lasso-generator-content" value="false" />';
805 805
 
806 806
 		} else {
807 807
 
808
-			$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>';
808
+			$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>';
809 809
 		}
810 810
 
811 811
 		$return .= '<p class="lasso-buttoninsert-wrap"><a href="#" class="lasso-generator-cancel" id="lasso--sidebar__close">Cancel
@@ -838,7 +838,7 @@  discard block
 block discarded – undo
838 838
 				<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
839 839
 				<div id="lasso--hide" style="display:none;" class="lasso--post-form">
840 840
 					<i class="lasso-icon lasso-icon-move"></i>
841
-					<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>
841
+					<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>
842 842
 					<div class="lasso--slider_wrap">
843 843
 						<div id="lasso--slider"></div>
844 844
 					</div>
Please login to merge, or discard this patch.