Completed
Push — master ( 70d7ae...57f4e1 )
by
unknown
01:43
created
internal-api/route.php 1 patch
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -24,35 +24,35 @@  discard block
 block discarded – undo
24 24
 		global $wp_query;
25 25
 
26 26
 		//get action, and if set, possibly act
27
-		$action = $wp_query->get( 'action' );
28
-		if ( $action && strpos( $_SERVER['REQUEST_URI'], 'lasso-internal-api' ) ) {
27
+		$action = $wp_query->get('action');
28
+		if ($action && strpos($_SERVER['REQUEST_URI'], 'lasso-internal-api')) {
29 29
 
30
-			$response = __( 'Editus API Error.', 'lasso' );
30
+			$response = __('Editus API Error.', 'lasso');
31 31
 			$code = 400;
32 32
 
33 33
 			//see if have a nonce. Will verify it in auth class.
34
-			if ( isset( $_POST[ 'nonce' ] ) ) {
34
+			if (isset($_POST['nonce'])) {
35 35
 
36
-				$callback = self::find_callback( strip_tags( $action ) );
37
-				if ( is_int( $callback )  ) {
36
+				$callback = self::find_callback(strip_tags($action));
37
+				if (is_int($callback)) {
38 38
 					$code = $callback;
39
-				}elseif( ! class_exists( $callback['class'] ) ) {
39
+				}elseif (!class_exists($callback['class'])) {
40 40
 					$code = 415;
41
-				}else {
42
-					$action = str_replace( '-', '_', $action );
41
+				} else {
42
+					$action = str_replace('-', '_', $action);
43 43
 					$callback_instance = new $callback['class'];
44
-					$auth              = self::auth( $action, $callback_instance, $callback['method'] );
45
-					if ( 200 == $auth->status_code && is_array( $callback ) ) {
44
+					$auth              = self::auth($action, $callback_instance, $callback['method']);
45
+					if (200 == $auth->status_code && is_array($callback)) {
46 46
 						$code = 200;
47
-						$data = new find_data( $callback_instance, $action );
48
-						if ( is_array( $data->data ) && ! empty( $data->data ) ) {
49
-							$response = self::route( $action, $callback_instance, $callback['method'], $data->data );
47
+						$data = new find_data($callback_instance, $action);
48
+						if (is_array($data->data) && !empty($data->data)) {
49
+							$response = self::route($action, $callback_instance, $callback['method'], $data->data);
50 50
 						} else {
51 51
 							$code = 500;
52 52
 						}
53 53
 
54 54
 					} else {
55
-						if ( isset( $auth->error_message ) && is_string( $auth->error_message ) ) {
55
+						if (isset($auth->error_message) && is_string($auth->error_message)) {
56 56
 							$response = $auth->error_message;
57 57
 						}
58 58
 
@@ -61,12 +61,12 @@  discard block
 block discarded – undo
61 61
 
62 62
 				}
63 63
 
64
-			}else{
64
+			} else {
65 65
 				$code = 401;
66
-				$response = __( 'Nonce not set.', 'lasso' );
66
+				$response = __('Nonce not set.', 'lasso');
67 67
 			}
68 68
 
69
-			self::respond( $response, $code );
69
+			self::respond($response, $code);
70 70
 
71 71
 		}
72 72
 
@@ -85,8 +85,8 @@  discard block
 block discarded – undo
85 85
 	 *
86 86
 	 * @return \lasso\internal_api\auth
87 87
 	 */
88
-	protected static function auth( $action, $callback ) {
89
-		return new auth( $action, $callback );
88
+	protected static function auth($action, $callback) {
89
+		return new auth($action, $callback);
90 90
 
91 91
 	}
92 92
 
@@ -99,15 +99,15 @@  discard block
 block discarded – undo
99 99
 	 *
100 100
 	 * @return array
101 101
 	 */
102
-	protected static function find_callback( $action ) {
103
-		if ( $action ) {
104
-			$parts = explode( '_', $action );
102
+	protected static function find_callback($action) {
103
+		if ($action) {
104
+			$parts = explode('_', $action);
105 105
 
106
-			if ( isset( $parts[0] ) && isset( $parts[1] ) && isset( $parts[2] ) ) {
107
-				$class     = str_replace( '-', '_', $parts[1] );
106
+			if (isset($parts[0]) && isset($parts[1]) && isset($parts[2])) {
107
+				$class     = str_replace('-', '_', $parts[1]);
108 108
 
109 109
 				$class = "\\lasso\\{$parts[0]}\\{$class}";
110
-				$callback  = str_replace( '-', '_', $parts[2] );
110
+				$callback  = str_replace('-', '_', $parts[2]);
111 111
 
112 112
 				return array(
113 113
 					'class'  => $class,
@@ -136,9 +136,9 @@  discard block
 block discarded – undo
136 136
 	 *
137 137
 	 * @return mixed
138 138
 	 */
139
-	protected static function route( $action, $callback, $method, $data ) {
140
-		if (  method_exists( $callback, $method ) ) {
141
-			$response = call_user_func( array( $callback, $method ), $data  );
139
+	protected static function route($action, $callback, $method, $data) {
140
+		if (method_exists($callback, $method)) {
141
+			$response = call_user_func(array($callback, $method), $data);
142 142
 
143 143
 			return $response;
144 144
 
@@ -156,29 +156,29 @@  discard block
 block discarded – undo
156 156
 	 * @param array|string $response The response message to send.
157 157
 	 * @param bool|int $code Response code or bool. If is bool, response code will be 200 or 401
158 158
 	 */
159
-	protected static function respond( $response, $code ) {
160
-		if ( true === $code ) {
159
+	protected static function respond($response, $code) {
160
+		if (true === $code) {
161 161
 			$code = 200;
162 162
 		}
163 163
 
164
-		if ( false == $code ) {
164
+		if (false == $code) {
165 165
 			$code = 401;
166 166
 		}
167 167
 
168
-		if ( is_string( $response ) ) {
168
+		if (is_string($response)) {
169 169
 			$data[] = $response;
170
-		}elseif( is_array( $response ) ) {
170
+		}elseif (is_array($response)) {
171 171
 			$data = $response;
172
-		}else{
172
+		} else {
173 173
 			$data[] = $code;
174 174
 		}
175 175
 
176
-		status_header( $code );
176
+		status_header($code);
177 177
 		nocache_headers();
178
-		if ( 200 == $code ) {
179
-			wp_send_json_success( $data );
180
-		}else{
181
-			wp_send_json_error( $data );
178
+		if (200 == $code) {
179
+			wp_send_json_success($data);
180
+		} else {
181
+			wp_send_json_error($data);
182 182
 		}
183 183
 
184 184
 	}
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 	 */
201 201
 	public static function init() {
202 202
 
203
-		if ( ! self::$instance ) {
203
+		if (!self::$instance) {
204 204
 			self::$instance = new self;
205 205
 		}
206 206
 
Please login to merge, or discard this patch.
includes/process/meta.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -28,9 +28,9 @@  discard block
 block discarded – undo
28 28
 	 *
29 29
 	 * @return bool Always returns true.
30 30
 	 */
31
-	public function update( $data ) {
31
+	public function update($data) {
32 32
 
33
-		$post_id = isset( $data['post_id'] ) ? $data['post_id'] : false;
33
+		$post_id = isset($data['post_id']) ? $data['post_id'] : false;
34 34
 
35 35
 			
36 36
 		/**
@@ -40,13 +40,13 @@  discard block
 block discarded – undo
40 40
 		 *
41 41
 		 * @param array $allowed_fields The fields
42 42
 		 */
43
-		$allowed_fields = apply_filters( 'lasso_meta_fields', array() );
44
-		if ( ! empty( $allowed_fields ) ) {
45
-			foreach( $allowed_fields as $field ) {
46
-				if ( isset( $data[ $field ] ) ) {
43
+		$allowed_fields = apply_filters('lasso_meta_fields', array());
44
+		if (!empty($allowed_fields)) {
45
+			foreach ($allowed_fields as $field) {
46
+				if (isset($data[$field])) {
47 47
 					//this original line changed dash to underscore
48 48
 					//update_post_meta( $post_id, lasso_unclean_string( $field ), $data[ $field ]  );
49
-					update_post_meta( $post_id,  $field, $data[ $field ]  );
49
+					update_post_meta($post_id, $field, $data[$field]);
50 50
 				}
51 51
 			}
52 52
 		}
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
 	 *
65 65
 	 * @return array Array of keys to pull from $data per action and their sanitization callback
66 66
 	 */
67
-	public static function params(){
68
-		$params[ 'process_meta_update' ] = array(
67
+	public static function params() {
68
+		$params['process_meta_update'] = array(
69 69
 			'post_id' 	=> 'absint',
70 70
 			'tab_name'	=> 'trim'
71 71
 		);
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 	 * @return array Array of additional functions to use to authorize action.
83 83
 	 */
84 84
 	public static function auth_callbacks() {
85
-		$params[ 'process_meta_update' ] = array(
85
+		$params['process_meta_update'] = array(
86 86
 			'lasso_user_can'
87 87
 		);
88 88
 
Please login to merge, or discard this patch.
public/includes/option-engine.php 1 patch
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 *	Get an array of addon data for the settings modal
44 44
 *	@since 0.9.4
45 45
 */
46
-function lasso_get_modal_tabs(){
46
+function lasso_get_modal_tabs() {
47 47
 
48 48
 	$tabs = array();
49 49
 
@@ -60,34 +60,34 @@  discard block
 block discarded – undo
60 60
 *	@uses lasso_modal_addons_content()
61 61
 *	@since 0.9.4
62 62
 */
63
-function lasso_modal_addons( $type = 'tab' ){
63
+function lasso_modal_addons($type = 'tab') {
64 64
 
65 65
 	$tabs = lasso_get_modal_tabs();
66 66
 	$out = '';
67 67
 
68
-	if ( $tabs ):
68
+	if ($tabs):
69 69
 
70
-		if ( 'tab' == $type ) {
70
+		if ('tab' == $type) {
71 71
 
72 72
 			$out = '<ul class="lasso--modal__tabs">';
73 73
 
74 74
 				$out .= '<li class="active-tab" data-addon-name="core">Editus</li>';
75 75
 
76
-				foreach ( $tabs as $tab ) {
76
+				foreach ($tabs as $tab) {
77 77
 
78
-					if ( isset( $tab ) ) {
78
+					if (isset($tab)) {
79 79
 
80
-						$out .= lasso_modal_addons_content( $tab, $type );
80
+						$out .= lasso_modal_addons_content($tab, $type);
81 81
 					}
82 82
 				}
83 83
 
84 84
 			$out .= '</ul>';
85 85
 
86
-		} elseif ( 'content' == $type ) {
87
-			foreach ( $tabs as $tab ) {
86
+		} elseif ('content' == $type) {
87
+			foreach ($tabs as $tab) {
88 88
 
89
-				if ( isset( $tab ) ) {
90
-					$out .= lasso_modal_addons_content( $tab , $type );
89
+				if (isset($tab)) {
90
+					$out .= lasso_modal_addons_content($tab, $type);
91 91
 				}
92 92
 			}
93 93
 
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 
96 96
 	endif;
97 97
 
98
-	return !empty( $out ) ? $out : false;
98
+	return !empty($out) ? $out : false;
99 99
 }
100 100
 
101 101
 /**
@@ -115,26 +115,26 @@  discard block
 block discarded – undo
115 115
 *	@since 0.9.5
116 116
 *	@subpackage lasso_modal_addons_content
117 117
 */
118
-function lasso_option_form( $name = '', $options = array() ){
118
+function lasso_option_form($name = '', $options = array()) {
119 119
 
120 120
 	ob_start();
121 121
 
122
-	if ( empty( $name ) || empty( $options ) || !is_array( $options ) )
122
+	if (empty($name) || empty($options) || !is_array($options))
123 123
 		return;
124 124
 
125 125
 	$nonce = wp_create_nonce('lasso-process-post-meta');
126
-	$key   = sprintf('_lasso_%s_settings', $name );
126
+	$key   = sprintf('_lasso_%s_settings', $name);
127 127
 
128
-	$out = sprintf('<form id="lasso--post-form" class="lasso--post-form">' );
128
+	$out = sprintf('<form id="lasso--post-form" class="lasso--post-form">');
129 129
 
130
-		$out .= lasso_option_fields( $name, $options );
131
-		$out .='<div class="form--bottom">';
132
-			$out .='<input type="submit" value="'.__( 'Save', 'lasso' ).'">';
133
-			$out .='<input type="hidden" name="tab_name" value="'.$key.'">';
134
-			$out .='<input type="hidden" name="post_id" value="'.get_the_ID().'">';
135
-			$out .='<input type="hidden" name="nonce" value="'.$nonce.'">';
136
-			$out .='<input type="hidden" name="action" value="process_meta_update">';
137
-		$out .='</div>';
130
+		$out .= lasso_option_fields($name, $options);
131
+		$out .= '<div class="form--bottom">';
132
+			$out .= '<input type="submit" value="'.__('Save', 'lasso').'">';
133
+			$out .= '<input type="hidden" name="tab_name" value="'.$key.'">';
134
+			$out .= '<input type="hidden" name="post_id" value="'.get_the_ID().'">';
135
+			$out .= '<input type="hidden" name="nonce" value="'.$nonce.'">';
136
+			$out .= '<input type="hidden" name="action" value="process_meta_update">';
137
+		$out .= '</div>';
138 138
 
139 139
 	$out .= '</form>';
140 140
 	
@@ -192,31 +192,31 @@  discard block
 block discarded – undo
192 192
 *	@since 0.9.5
193 193
 *	@subpackage lasso_modal_addons_content
194 194
 */
195
-function lasso_option_fields( $name = '', $options = array() ){
195
+function lasso_option_fields($name = '', $options = array()) {
196 196
 
197
-	$out 	= '';
197
+	$out = '';
198 198
 	$before = '<div class="lasso--postsettings__option">';
199 199
 	$after 	= '</div>';
200 200
 
201
-	if ( empty( $name ) || empty( $options ) )
201
+	if (empty($name) || empty($options))
202 202
 		return;
203 203
 
204
-	foreach ( (array) $options as $option ) {
204
+	foreach ((array) $options as $option) {
205 205
 
206
-		$type = isset( $option['type'] ) ? $option['type'] : 'text';
206
+		$type = isset($option['type']) ? $option['type'] : 'text';
207 207
 
208
-		switch ( $type ) {
208
+		switch ($type) {
209 209
 			case 'text':
210
-				$out .= sprintf('%s%s%s', $before, lasso_option_engine_option( $name, $option,'text' ), $after );
210
+				$out .= sprintf('%s%s%s', $before, lasso_option_engine_option($name, $option, 'text'), $after);
211 211
 				break;
212 212
 			case 'textarea':
213
-				$out .= sprintf('%s%s%s', $before, lasso_option_engine_option( $name, $option,'textarea' ), $after );
213
+				$out .= sprintf('%s%s%s', $before, lasso_option_engine_option($name, $option, 'textarea'), $after);
214 214
 				break;
215 215
 			case 'imgurl':
216
-				$out .= sprintf('%s%s%s', $before, lasso_option_engine_option( $name, $option,'imgurl' ), $after );
216
+				$out .= sprintf('%s%s%s', $before, lasso_option_engine_option($name, $option, 'imgurl'), $after);
217 217
 				break;
218 218
 			case 'checkbox':
219
-				$out .= sprintf('%s%s%s', $before, lasso_option_engine_option( $name, $option,'checkbox' ), $after );
219
+				$out .= sprintf('%s%s%s', $before, lasso_option_engine_option($name, $option, 'checkbox'), $after);
220 220
 				break;
221 221
 		}
222 222
 
@@ -236,30 +236,30 @@  discard block
 block discarded – undo
236 236
 *	@param $type string text, textarea, checkbox, color
237 237
 *	@since 5.0
238 238
 */
239
-function lasso_option_engine_option( $name = '', $option = '', $type = '') {
239
+function lasso_option_engine_option($name = '', $option = '', $type = '') {
240 240
 
241
-	if ( empty( $type ) || empty( $option ) )
241
+	if (empty($type) || empty($option))
242 242
 		return;
243 243
 
244
-	$id = isset( $option['id'] ) ? $option['id'] : false;
245
-	$id = $id ? lasso_clean_string( $id ) : false;
244
+	$id = isset($option['id']) ? $option['id'] : false;
245
+	$id = $id ? lasso_clean_string($id) : false;
246 246
 
247
-	$desc = isset( $option['desc'] ) ? $option['desc'] : false;
247
+	$desc = isset($option['desc']) ? $option['desc'] : false;
248 248
 
249
-	$value = get_post_meta( get_the_id(), $option[ 'id' ], true );
249
+	$value = get_post_meta(get_the_id(), $option['id'], true);
250 250
 
251
-	switch ( $type ) {
251
+	switch ($type) {
252 252
 		case 'text':
253
-			$out = sprintf('<label for="lasso--post-option-%s">%s</label><input id="lasso--post-option-%s" class="editus-custom-field-text" name="%s" type="text" value="%s">',$id, esc_html( $desc ), $id, $id, $value );
253
+			$out = sprintf('<label for="lasso--post-option-%s">%s</label><input id="lasso--post-option-%s" class="editus-custom-field-text" name="%s" type="text" value="%s">', $id, esc_html($desc), $id, $id, $value);
254 254
 			break;
255 255
 		case 'textarea':
256
-			$out = sprintf('<label for="lasso--post-option-%s">%s</label><textarea id="lasso--post-option-%s" name="%s">%s</textarea>',$id, esc_html( $desc ), $id, $id, $value );
256
+			$out = sprintf('<label for="lasso--post-option-%s">%s</label><textarea id="lasso--post-option-%s" name="%s">%s</textarea>', $id, esc_html($desc), $id, $id, $value);
257 257
 			break;
258 258
 		case 'imgurl':
259
-			$out = sprintf('<label for="lasso--post-option-%s">%s</label><img src="%s" style="height:80px;"><input id="lasso--post-option-%s" class="editus-custom-field-text" name="%s" type="text" value="%s" style="display:none;"><div title="Replace Image"  class="editus-customtab-image-control" style="float:left;"><i class="lasso-icon-image" style="font-size:20px;padding:5px;"></i></div><div title="Remove Image"  class="editus-customtab-image-remove" style="float:left;"><i class="lasso-icon-bin2" style="font-size:20px;padding:5px;"></i></div>',$id, esc_html( $desc ), $value, $id, $id,  $value );
259
+			$out = sprintf('<label for="lasso--post-option-%s">%s</label><img src="%s" style="height:80px;"><input id="lasso--post-option-%s" class="editus-custom-field-text" name="%s" type="text" value="%s" style="display:none;"><div title="Replace Image"  class="editus-customtab-image-control" style="float:left;"><i class="lasso-icon-image" style="font-size:20px;padding:5px;"></i></div><div title="Remove Image"  class="editus-customtab-image-remove" style="float:left;"><i class="lasso-icon-bin2" style="font-size:20px;padding:5px;"></i></div>', $id, esc_html($desc), $value, $id, $id, $value);
260 260
 			break;
261 261
 		case 'checkbox':
262
-			$out = sprintf('<label for="lasso--post-option-%s" class="checkbox-control checkbox"><input id="lasso--post-option-%s" type="checkbox" name="%s" class="checkbox"><span class="control-indicator"></span>%s',$id, $id, $id ,esc_html( $desc ) );
262
+			$out = sprintf('<label for="lasso--post-option-%s" class="checkbox-control checkbox"><input id="lasso--post-option-%s" type="checkbox" name="%s" class="checkbox"><span class="control-indicator"></span>%s', $id, $id, $id, esc_html($desc));
263 263
 			break;
264 264
 	}
265 265
 
Please login to merge, or discard this patch.
lasso.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -18,27 +18,27 @@  discard block
 block discarded – undo
18 18
  */
19 19
 
20 20
 // If this file is called directly, abort.
21
-if ( ! defined( 'WPINC' ) ) {
21
+if (!defined('WPINC')) {
22 22
 	die;
23 23
 }
24 24
 
25 25
 // Set some constants
26
-define( 'LASSO_VERSION', '1.0.5' );
27
-define( 'LASSO_DIR', plugin_dir_path( __FILE__ ) );
28
-define( 'LASSO_URL', plugins_url( '', __FILE__ ) );
29
-define( 'LASSO_FILE', __FILE__ );
26
+define('LASSO_VERSION', '1.0.5');
27
+define('LASSO_DIR', plugin_dir_path(__FILE__));
28
+define('LASSO_URL', plugins_url('', __FILE__));
29
+define('LASSO_FILE', __FILE__);
30 30
 
31 31
 /**
32 32
  * Load plugin if PHP version is 5.4 or later.
33 33
  */
34
-if ( version_compare( PHP_VERSION, '5.4.0', '>=' ) ) {
34
+if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
35 35
 
36
-	include_once( LASSO_DIR . '/bootstrap.php' );
36
+	include_once(LASSO_DIR.'/bootstrap.php');
37 37
 
38 38
 } else {
39 39
 
40 40
 	add_action('admin_head', 'lasso_fail_notice');
41
-	function lasso_fail_notice(){
41
+	function lasso_fail_notice() {
42 42
 
43 43
 		printf('<div class="error"><p>Editus requires PHP 5.4 or higher.</p></div>');
44 44
 
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
 }
47 47
 
48 48
 add_filter('register_post_type_args', 'lasso_show_in_rest', 10, 2);
49
-function lasso_show_in_rest($args, $post_type){
49
+function lasso_show_in_rest($args, $post_type) {
50 50
  
51
-    $allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor', array( ) );
52
-	$allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
53
-	if (in_array( $post_type,$allowed_post_types)) {
51
+    $allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', array( ));
52
+	$allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
53
+	if (in_array($post_type, $allowed_post_types)) {
54 54
 		$args['show_in_rest'] = true;
55 55
 		if ($post_type != 'post' && $post_type != 'page') {
56 56
 			$args['rest_base'] = $post_type;
@@ -61,21 +61,21 @@  discard block
 block discarded – undo
61 61
 }
62 62
 
63 63
 
64
-function lasso_editor_get_option( $option, $section, $default = '' ) {
64
+function lasso_editor_get_option($option, $section, $default = '') {
65 65
 
66
-	if ( empty( $option ) )
66
+	if (empty($option))
67 67
 		return;
68 68
 
69
-	if ( function_exists( 'is_multisite' ) && is_multisite() ) {
69
+	if (function_exists('is_multisite') && is_multisite()) {
70 70
 
71
-		$options = get_site_option( $section );
71
+		$options = get_site_option($section);
72 72
 
73 73
 	} else {
74 74
 
75
-		$options = get_option( $section );
75
+		$options = get_option($section);
76 76
 	}
77 77
 
78
-	if ( isset( $options[$option] ) ) {
78
+	if (isset($options[$option])) {
79 79
 		return $options[$option];
80 80
 	}
81 81
 
@@ -88,16 +88,16 @@  discard block
 block discarded – undo
88 88
 ));
89 89
 
90 90
 // Gutenberg
91
-if( function_exists( 'is_gutenberg_page' ) ) {
92
-	function add_raw_to_post( $response, $post, $request ) {
91
+if (function_exists('is_gutenberg_page')) {
92
+	function add_raw_to_post($response, $post, $request) {
93 93
 		$response_data = $response->get_data();
94
-		if ( is_array( $response_data['content'] )) {
95
-			$response_data['content']['raw'] =  $post->post_content ;
96
-			$response->set_data( $response_data );
94
+		if (is_array($response_data['content'])) {
95
+			$response_data['content']['raw'] = $post->post_content;
96
+			$response->set_data($response_data);
97 97
 		}
98 98
 
99 99
 		return $response;
100 100
 	}
101
-	add_filter( "rest_prepare_post", 'add_raw_to_post', 10, 3 );
101
+	add_filter("rest_prepare_post", 'add_raw_to_post', 10, 3);
102 102
 }
103 103
 
Please login to merge, or discard this patch.
public/includes/lasso.php 1 patch
Spacing   +86 added lines, -86 removed lines patch added patch discarded remove patch
@@ -52,17 +52,17 @@  discard block
 block discarded – undo
52 52
 		require_once LASSO_DIR.'/public/includes/wrap-shortcodes.php';
53 53
 
54 54
 		// Activate plugin when new blog is added
55
-		add_action( 'wpmu_new_blog', array( $this, 'activate_new_site' ) );
55
+		add_action('wpmu_new_blog', array($this, 'activate_new_site'));
56 56
 
57 57
 		// Load plugin text domain
58
-		add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
58
+		add_action('init', array($this, 'load_plugin_textdomain'));
59 59
 		
60
-		add_action( 'wp_ajax_get_aesop_component',     array( $this, 'get_aesop_component' ) );
61
-		add_action( 'wp_ajax_editus_do_shortcode',     array( $this, 'editus_do_shortcode' ) );
62
-		add_action( 'wp_ajax_editus_lock_post',     array( $this, 'editus_lock_post' ) );
63
-		add_action( 'wp_ajax_editus_hide_tour',     array( $this, 'editus_hide_tour' ) );
64
-		add_action( 'wp_ajax_editus_set_post_setting',     array( $this, 'editus_set_post_setting' ) );
65
-		add_action( 'wp_ajax_editus_get_ase_options',     array( $this, 'get_ase_options' ) );
60
+		add_action('wp_ajax_get_aesop_component', array($this, 'get_aesop_component'));
61
+		add_action('wp_ajax_editus_do_shortcode', array($this, 'editus_do_shortcode'));
62
+		add_action('wp_ajax_editus_lock_post', array($this, 'editus_lock_post'));
63
+		add_action('wp_ajax_editus_hide_tour', array($this, 'editus_hide_tour'));
64
+		add_action('wp_ajax_editus_set_post_setting', array($this, 'editus_set_post_setting'));
65
+		add_action('wp_ajax_editus_get_ase_options', array($this, 'get_ase_options'));
66 66
 
67 67
 		// enable saving custom fields through REST API
68 68
 		self::enable_metasave('post');
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 	public static function get_instance() {
94 94
 
95 95
 		// If the single instance hasn't been set, set it now.
96
-		if ( null == self::$instance ) {
96
+		if (null == self::$instance) {
97 97
 			self::$instance = new self;
98 98
 		}
99 99
 
@@ -110,18 +110,18 @@  discard block
 block discarded – undo
110 110
 	 *                                       WPMU is disabled or plugin is
111 111
 	 *                                       activated on an individual blog.
112 112
 	 */
113
-	public static function activate( $network_wide ) {
113
+	public static function activate($network_wide) {
114 114
 
115
-		if ( function_exists( 'is_multisite' ) && is_multisite() ) {
115
+		if (function_exists('is_multisite') && is_multisite()) {
116 116
 
117
-			if ( $network_wide  ) {
117
+			if ($network_wide) {
118 118
 
119 119
 				// Get all blog ids
120 120
 				$blog_ids = self::get_blog_ids();
121 121
 
122
-				foreach ( $blog_ids as $blog_id ) {
122
+				foreach ($blog_ids as $blog_id) {
123 123
 
124
-					switch_to_blog( $blog_id );
124
+					switch_to_blog($blog_id);
125 125
 					self::single_activate();
126 126
 				}
127 127
 
@@ -147,18 +147,18 @@  discard block
 block discarded – undo
147 147
 	 *                                       WPMU is disabled or plugin is
148 148
 	 *                                       deactivated on an individual blog.
149 149
 	 */
150
-	public static function deactivate( $network_wide ) {
150
+	public static function deactivate($network_wide) {
151 151
 
152
-		if ( function_exists( 'is_multisite' ) && is_multisite() ) {
152
+		if (function_exists('is_multisite') && is_multisite()) {
153 153
 
154
-			if ( $network_wide ) {
154
+			if ($network_wide) {
155 155
 
156 156
 				// Get all blog ids
157 157
 				$blog_ids = self::get_blog_ids();
158 158
 
159
-				foreach ( $blog_ids as $blog_id ) {
159
+				foreach ($blog_ids as $blog_id) {
160 160
 
161
-					switch_to_blog( $blog_id );
161
+					switch_to_blog($blog_id);
162 162
 					self::single_deactivate();
163 163
 
164 164
 				}
@@ -182,13 +182,13 @@  discard block
 block discarded – undo
182 182
 	 *
183 183
 	 * @param int     $blog_id ID of the new blog.
184 184
 	 */
185
-	public function activate_new_site( $blog_id ) {
185
+	public function activate_new_site($blog_id) {
186 186
 
187
-		if ( 1 !== did_action( 'wpmu_new_blog' ) ) {
187
+		if (1 !== did_action('wpmu_new_blog')) {
188 188
 			return;
189 189
 		}
190 190
 
191
-		switch_to_blog( $blog_id );
191
+		switch_to_blog($blog_id);
192 192
 		self::single_activate();
193 193
 		restore_current_blog();
194 194
 
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 			WHERE archived = '0' AND spam = '0'
214 214
 			AND deleted = '0'";
215 215
 
216
-		return $wpdb->get_col( $sql );
216
+		return $wpdb->get_col($sql);
217 217
 
218 218
 	}
219 219
 
@@ -224,18 +224,18 @@  discard block
 block discarded – undo
224 224
 	 */
225 225
 	private static function single_activate() {
226 226
 
227
-		$curr_version = get_option( 'lasso_version' );
227
+		$curr_version = get_option('lasso_version');
228 228
 
229 229
 		// update upgraded from
230
-		if ( $curr_version ) {
231
-			update_option( 'lasso_updated_from', $curr_version );
230
+		if ($curr_version) {
231
+			update_option('lasso_updated_from', $curr_version);
232 232
 		}
233 233
 
234 234
 		// update lasso version option
235
-		update_option( 'lasso_version', LASSO_VERSION );
235
+		update_option('lasso_version', LASSO_VERSION);
236 236
 
237 237
 		// set transietn for activation welcome
238
-		set_transient( '_lasso_welcome_redirect', true, 30 );
238
+		set_transient('_lasso_welcome_redirect', true, 30);
239 239
 
240 240
 
241 241
 	}
@@ -257,15 +257,15 @@  discard block
 block discarded – undo
257 257
 	public function load_plugin_textdomain() {
258 258
 
259 259
 		$domain = $this->plugin_slug;
260
-		$locale = apply_filters( 'plugin_locale', get_locale(), $domain );
260
+		$locale = apply_filters('plugin_locale', get_locale(), $domain);
261 261
 
262
-		$out = load_textdomain( $domain, trailingslashit( LASSO_DIR ). 'languages/' . $domain . '-' . $locale . '.mo' );
262
+		$out = load_textdomain($domain, trailingslashit(LASSO_DIR).'languages/'.$domain.'-'.$locale.'.mo');
263 263
 	}
264 264
 	
265 265
     // new ajax function to lock post for editing
266 266
 	public function editus_lock_post()
267 267
 	{
268
-		$post_id= $_POST["postid"];
268
+		$post_id = $_POST["postid"];
269 269
 		$locked = wp_check_post_lock($post_id);
270 270
 		
271 271
 		if (!$locked) {
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
 			echo "true";
274 274
 		} else {
275 275
 			$user_info = get_userdata($locked);
276
-			echo "Post opened by ".$user_info->first_name .  " " . $user_info->last_name;
276
+			echo "Post opened by ".$user_info->first_name." ".$user_info->last_name;
277 277
 		}
278 278
 		exit;
279 279
 	}
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 	{
284 284
 		$user_id = get_current_user_ID();
285 285
 				
286
-		update_user_meta( $user_id, 'lasso_hide_tour', true );
286
+		update_user_meta($user_id, 'lasso_hide_tour', true);
287 287
 		exit;
288 288
 	}
289 289
 	
@@ -294,14 +294,14 @@  discard block
 block discarded – undo
294 294
 		$data = array();
295 295
 		parse_str($_POST['data'], $data);
296 296
 		
297
-		if (!wp_verify_nonce( $data[ 'nonce' ], 'lasso-update-post-settings' )) {
297
+		if (!wp_verify_nonce($data['nonce'], 'lasso-update-post-settings')) {
298 298
 			wp_send_json_error();
299 299
 			exit;
300 300
 		}
301 301
 		
302
-		$status = isset( $data['status'] ) ? $data['status'] : false;
303
-		$postid = isset( $data['postid'] ) ? $data['postid'] : false;
304
-		$slug   = isset( $data['story_slug'] ) ? $data['story_slug'] : false;
302
+		$status = isset($data['status']) ? $data['status'] : false;
303
+		$postid = isset($data['postid']) ? $data['postid'] : false;
304
+		$slug   = isset($data['story_slug']) ? $data['story_slug'] : false;
305 305
 	
306 306
 
307 307
 		$args = array(
@@ -312,24 +312,24 @@  discard block
 block discarded – undo
312 312
 		
313 313
 		
314 314
 
315
-		wp_update_post( apply_filters( 'lasso_object_status_update_args', $args ) );
315
+		wp_update_post(apply_filters('lasso_object_status_update_args', $args));
316 316
 		
317 317
 		// update categories
318
-		$cats  = isset( $data['story_cats'] ) ? $data['story_cats'] : false;
318
+		$cats = isset($data['story_cats']) ? $data['story_cats'] : false;
319 319
 		
320
-		self::set_post_terms( $postid, $cats, 'category' );
320
+		self::set_post_terms($postid, $cats, 'category');
321 321
 		
322 322
 		// update tags
323
-		$tags = isset( $data['story_tags'] ) ? $data['story_tags'] : false;
324
-		self::set_post_terms( $postid, $tags, 'post_tag' );
323
+		$tags = isset($data['story_tags']) ? $data['story_tags'] : false;
324
+		self::set_post_terms($postid, $tags, 'post_tag');
325 325
 		
326 326
 		//update date
327
-		$date  = isset( $data['post_date'] ) ? $data['post_date'] : false;
328
-		self::set_date( $postid, $date );
327
+		$date = isset($data['post_date']) ? $data['post_date'] : false;
328
+		self::set_date($postid, $date);
329 329
 		
330
-		do_action( 'lasso_post_updated', $postid, $slug, $status, get_current_user_ID() );
331
-		$response= array(
332
-			'link'   => get_permalink($postid). (($status=='publish') ? '' : '&preview=true')
330
+		do_action('lasso_post_updated', $postid, $slug, $status, get_current_user_ID());
331
+		$response = array(
332
+			'link'   => get_permalink($postid).(($status == 'publish') ? '' : '&preview=true')
333 333
 		);
334 334
 		wp_send_json_success($response);
335 335
 		exit;
@@ -337,11 +337,11 @@  discard block
 block discarded – undo
337 337
 	
338 338
 	public static function enable_metasave($type)
339 339
 	{
340
-		register_rest_field( $type, 'metadata', array(
341
-			'get_callback' => function ( $data ) {
342
-				return get_post_meta( $data['id']);//, '', '' );
340
+		register_rest_field($type, 'metadata', array(
341
+			'get_callback' => function($data) {
342
+				return get_post_meta($data['id']); //, '', '' );
343 343
 			}, 
344
-			'update_callback' => function( $data, $post ) {
344
+			'update_callback' => function($data, $post) {
345 345
 				foreach ($data as $key => $value) {
346 346
 					update_post_meta($post->ID, $key, $value);
347 347
 				}
@@ -353,13 +353,13 @@  discard block
 block discarded – undo
353 353
 	public function editus_do_shortcode()
354 354
 	{
355 355
 		
356
-		$code= $_POST["code"];
356
+		$code = $_POST["code"];
357 357
 		$code = str_replace('\"', '"', $code);
358 358
 		
359
-		$code_wrapped = lasso_wrap_shortcodes( $code);
360
-		$out =  do_shortcode($code);
359
+		$code_wrapped = lasso_wrap_shortcodes($code);
360
+		$out = do_shortcode($code);
361 361
 		if ($out != '') {
362
-			$out =  do_shortcode($code_wrapped);
362
+			$out = do_shortcode($code_wrapped);
363 363
 			echo $out;
364 364
 			exit;
365 365
 		}
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
 		/** @var \WP_Embed $wp_embed */
370 370
 		global $wp_embed;
371 371
 		$wp_embed->post_ID = $_POST["ID"];
372
-		$out =$wp_embed->run_shortcode( $code_wrapped );
372
+		$out = $wp_embed->run_shortcode($code_wrapped);
373 373
 		
374 374
 		echo $out;
375 375
 		exit;
@@ -379,53 +379,53 @@  discard block
 block discarded – undo
379 379
 	{
380 380
 		
381 381
 		
382
-		$code= $_POST["code"];
382
+		$code = $_POST["code"];
383 383
 		$atts = array(
384 384
 		 );
385 385
 		foreach ($_POST as $key => $value) {
386
-			if ($key !="code" && $key !="action") {
386
+			if ($key != "code" && $key != "action") {
387 387
 			    //$shortcode = $shortcode.$key.'="'.$value.'" ';
388 388
 				$atts[$key] = $value;
389 389
 			}
390 390
 		}
391 391
 		if ($code == "aesop_video") {
392
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-video.php');
392
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-video.php');
393 393
 		    echo aesop_video_shortcode($atts);
394 394
 		}
395 395
 		else if ($code == "aesop_image") {
396
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php');
396
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php');
397 397
 		    echo aesop_image_shortcode($atts);
398 398
 		}
399 399
 		else if ($code == "aesop_quote") {
400
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php');
400
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php');
401 401
 		    echo aesop_quote_shortcode($atts);
402 402
 		}
403 403
 		else if ($code == "aesop_parallax") {
404
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php');
404
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php');
405 405
 		    echo aesop_parallax_shortcode($atts);
406 406
 		}
407 407
 		else if ($code == "aesop_character") {
408
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php');
408
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php');
409 409
 		    echo aesop_character_shortcode($atts);
410 410
 		}
411 411
 		else if ($code == "aesop_collection") {
412
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php');
412
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php');
413 413
 		    echo aesop_collection_shortcode($atts);
414 414
 		}
415 415
 		else if ($code == "aesop_chapter") {
416
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php');
416
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php');
417 417
 		    echo aesop_chapter_shortcode($atts);
418 418
 		}
419 419
 		else if ($code == "aesop_content") {
420
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php');
420
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php');
421 421
 		    echo aesop_content_shortcode($atts, $atts['content_data']);
422 422
 		}
423 423
 		else if ($code == "aesop_gallery") {
424
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
425
-		    echo do_shortcode( '[aesop_gallery id="'.$atts["id"].'"]');
424
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
425
+		    echo do_shortcode('[aesop_gallery id="'.$atts["id"].'"]');
426 426
 		}
427 427
 		else if ($code == "aesop_audio") {
428
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-audio.php');
428
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-audio.php');
429 429
 		    echo aesop_audio_shortcode($atts);
430 430
 		}
431 431
 		else {
@@ -446,22 +446,22 @@  discard block
 block discarded – undo
446 446
 	public function get_ase_options()
447 447
 	{
448 448
 		$blob = lasso_editor_options_blob();
449
-		$code= $_POST["component"];
449
+		$code = $_POST["component"];
450 450
 		echo $blob[$code];
451 451
 		exit; 
452 452
 	}
453 453
 	
454
-	public function set_post_terms( $postid, $value, $taxonomy ) {
455
-		if( $value ) {
456
-			$value = explode( ',', $value );
457
-			$allow_new_category = lasso_editor_get_option( 'allow_new_category', 'lasso_editor' );
454
+	public function set_post_terms($postid, $value, $taxonomy) {
455
+		if ($value) {
456
+			$value = explode(',', $value);
457
+			$allow_new_category = lasso_editor_get_option('allow_new_category', 'lasso_editor');
458 458
 			
459
-			if ($taxonomy =='category') {
459
+			if ($taxonomy == 'category') {
460 460
                 // convert from names to category ids
461 461
 				$cats = array();
462 462
 				foreach ($value as $cat) {
463 463
 					$cat_id = get_cat_ID($cat);
464
-					if ($cat_id !=0) {
464
+					if ($cat_id != 0) {
465 465
 						$cats [] = $cat_id;
466 466
 					} else if ($allow_new_category) {
467 467
 					    $cats [] = wp_create_category($cat);
@@ -470,27 +470,27 @@  discard block
 block discarded – undo
470 470
 				$value = $cats;
471 471
 			}
472 472
 	
473
-			$result = wp_set_object_terms( $postid, $value, $taxonomy );
473
+			$result = wp_set_object_terms($postid, $value, $taxonomy);
474 474
 		}
475
-		else  {
475
+		else {
476 476
 			//remove all terms from post
477
-			$result = wp_set_object_terms( $postid, null, $taxonomy );
477
+			$result = wp_set_object_terms($postid, null, $taxonomy);
478 478
 		}
479 479
 
480
-		if ( ! is_wp_error( $result ) ) {
480
+		if (!is_wp_error($result)) {
481 481
 			return true;
482
-		}else{
482
+		} else {
483 483
 			return false;
484 484
 		}
485 485
 	}
486 486
 	
487
-	public function set_date( $postid, $value) {
488
-		if( $value ) {
487
+	public function set_date($postid, $value) {
488
+		if ($value) {
489 489
             wp_update_post(
490
-				array (
490
+				array(
491 491
 					'ID'            => $postid, // ID of the post to update
492
-					'post_date'     => date( 'Y-m-d H:i:s',  strtotime($value) ),
493
-					'post_date_gmt'     => gmdate( 'Y-m-d H:i:s',  strtotime($value) ),
492
+					'post_date'     => date('Y-m-d H:i:s', strtotime($value)),
493
+					'post_date_gmt'     => gmdate('Y-m-d H:i:s', strtotime($value)),
494 494
 				)
495 495
 			);
496 496
 		}
Please login to merge, or discard this patch.
admin/includes/menus/settings.php 1 patch
Spacing   +145 added lines, -145 removed lines patch added patch discarded remove patch
@@ -9,9 +9,9 @@  discard block
 block discarded – undo
9 9
 
10 10
 	function __construct() {
11 11
 
12
-		add_action( 'admin_menu',     array( $this, 'menu' ) );
13
-		add_action( 'network_admin_menu',   array( $this, 'menu' ) );
14
-		add_action( 'wp_ajax_lasso-editor-settings', array( $this, 'process_settings' ) );
12
+		add_action('admin_menu', array($this, 'menu'));
13
+		add_action('network_admin_menu', array($this, 'menu'));
14
+		add_action('wp_ajax_lasso-editor-settings', array($this, 'process_settings'));
15 15
 
16 16
 	}
17 17
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	function menu() {
24 24
 
25 25
 		// CHANGED Removed condition.
26
-		add_submenu_page( 'lasso-editor', __( 'Settings', 'lasso' ), __( 'Settings', 'lasso' ), 'manage_options', 'lasso-editor-settings', array( $this, 'settings' ) );
26
+		add_submenu_page('lasso-editor', __('Settings', 'lasso'), __('Settings', 'lasso'), 'manage_options', 'lasso-editor-settings', array($this, 'settings'));
27 27
 
28 28
 	}
29 29
 
@@ -45,26 +45,26 @@  discard block
 block discarded – undo
45 45
 	function process_settings() {
46 46
 
47 47
 		// bail out if current user isn't and administrator and they are not logged in
48
-		if ( !current_user_can( 'manage_options' ) || !is_user_logged_in() )
48
+		if (!current_user_can('manage_options') || !is_user_logged_in())
49 49
 			return;
50 50
 
51
-		if ( isset( $_POST['action'] ) && 'lasso-editor-settings' == $_POST['action'] && check_admin_referer( 'nonce', 'lasso_editor_settings' ) ) {
51
+		if (isset($_POST['action']) && 'lasso-editor-settings' == $_POST['action'] && check_admin_referer('nonce', 'lasso_editor_settings')) {
52 52
 
53
-			$options = isset( $_POST['lasso_editor'] ) ? $_POST['lasso_editor'] : false;
53
+			$options = isset($_POST['lasso_editor']) ? $_POST['lasso_editor'] : false;
54 54
 			
55 55
 			$arr = $options['allowed_post_types'];
56
-			$options = array_map( 'sanitize_text_field', $options );
57
-			$options['allowed_post_types'] = array_keys( $arr);
56
+			$options = array_map('sanitize_text_field', $options);
57
+			$options['allowed_post_types'] = array_keys($arr);
58 58
 
59 59
 			
60 60
 
61
-			if ( function_exists( 'is_multisite' ) && is_multisite() ) {
61
+			if (function_exists('is_multisite') && is_multisite()) {
62 62
 
63
-				update_site_option( 'lasso_editor', $options );
63
+				update_site_option('lasso_editor', $options);
64 64
 
65 65
 			} else {
66 66
 
67
-				update_option( 'lasso_editor', $options );
67
+				update_option('lasso_editor', $options);
68 68
 			}
69 69
 
70 70
 			wp_send_json_success();
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	}
81 81
 	
82 82
 	function create_section_for_color_picker($id, $title, $defvalue) { 
83
-		$color_value = lasso_editor_get_option( $id, 'lasso_editor',$defvalue );
83
+		$color_value = lasso_editor_get_option($id, 'lasso_editor', $defvalue);
84 84
 	 
85 85
 		echo '<div lass="lasso-editor-settings--option-inner">'."\n";
86 86
 		echo '<label>'.$title.'</label>';
@@ -95,40 +95,40 @@  discard block
 block discarded – undo
95 95
 	 */
96 96
 	function lasso_editor_settings_form() {
97 97
 
98
-		if ( !is_user_logged_in() )
98
+		if (!is_user_logged_in())
99 99
 			return;
100 100
 
101
-		$article_object   = lasso_editor_get_option( 'article_class', 'lasso_editor' );
102
-		$featImgClass    = lasso_editor_get_option( 'featimg_class', 'lasso_editor' );
103
-		$titleClass    = lasso_editor_get_option( 'title_class', 'lasso_editor' );
104
-
105
-		$post_new_disabled   = lasso_editor_get_option( 'post_adding_disabled', 'lasso_editor' );
106
-		$save_to_post_disabled  = lasso_editor_get_option( 'post_save_disabled', 'lasso_editor' );
107
-		$edit_post_disabled  = lasso_editor_get_option( 'post_edit_disabled', 'lasso_editor' );
108
-		$post_settings_disabled = lasso_editor_get_option( 'post_settings_disabled', 'lasso_editor' );
109
-		$allow_change_date = lasso_editor_get_option( 'allow_change_date', 'lasso_editor' );
110
-		$allow_new_category = lasso_editor_get_option( 'allow_new_category', 'lasso_editor' );
111
-		$shortcodify_disabled  = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
112
-		$enable_autosave  = lasso_editor_get_option( 'enable_autosave', 'lasso_editor' );
113
-
114
-		$use_old_ui      = lasso_editor_get_option( 'use_old_ui', 'lasso_editor' );
115
-		$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
116
-		$toolbar_headings_h4      = lasso_editor_get_option( 'toolbar_headings_h4', 'lasso_editor' );
117
-		$toolbar_show_color      = lasso_editor_get_option( 'toolbar_show_color', 'lasso_editor' );
118
-		$toolbar_show_alignment  = lasso_editor_get_option( 'toolbar_show_alignment', 'lasso_editor' );
101
+		$article_object = lasso_editor_get_option('article_class', 'lasso_editor');
102
+		$featImgClass = lasso_editor_get_option('featimg_class', 'lasso_editor');
103
+		$titleClass = lasso_editor_get_option('title_class', 'lasso_editor');
104
+
105
+		$post_new_disabled   = lasso_editor_get_option('post_adding_disabled', 'lasso_editor');
106
+		$save_to_post_disabled  = lasso_editor_get_option('post_save_disabled', 'lasso_editor');
107
+		$edit_post_disabled  = lasso_editor_get_option('post_edit_disabled', 'lasso_editor');
108
+		$post_settings_disabled = lasso_editor_get_option('post_settings_disabled', 'lasso_editor');
109
+		$allow_change_date = lasso_editor_get_option('allow_change_date', 'lasso_editor');
110
+		$allow_new_category = lasso_editor_get_option('allow_new_category', 'lasso_editor');
111
+		$shortcodify_disabled = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor');
112
+		$enable_autosave = lasso_editor_get_option('enable_autosave', 'lasso_editor');
113
+
114
+		$use_old_ui = lasso_editor_get_option('use_old_ui', 'lasso_editor');
115
+		$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
116
+		$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
117
+		$toolbar_show_color      = lasso_editor_get_option('toolbar_show_color', 'lasso_editor');
118
+		$toolbar_show_alignment  = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor');
119 119
 		
120
-		$objectsNoSave  	= lasso_editor_get_option('dont_save', 'lasso_editor');
121
-		$objectsNonEditable  	= lasso_editor_get_option('non_editable', 'lasso_editor');
120
+		$objectsNoSave = lasso_editor_get_option('dont_save', 'lasso_editor');
121
+		$objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor');
122 122
 		$disable_tour = lasso_editor_get_option('disable_tour', 'lasso_editor');
123 123
 		$show_ignored_items = lasso_editor_get_option('show_ignored_items', 'lasso_editor');
124 124
 		$save_using_rest_disabled = lasso_editor_get_option('save_using_rest_disabled', 'lasso_editor');
125 125
 		
126
-		$default_post_types = apply_filters( 'lasso_allowed_post_types', array( 'post', 'page'));
127
-		$allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor',  $default_post_types);
126
+		$default_post_types = apply_filters('lasso_allowed_post_types', array('post', 'page'));
127
+		$allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', $default_post_types);
128 128
 		
129 129
 		$links_editable = lasso_editor_get_option('links_editable', 'lasso_editor', false);
130
-		$bold_tag = lasso_editor_get_option( 'bold_tag', 'lasso_editor',  "b");
131
-		$i_tag = lasso_editor_get_option( 'i_tag', 'lasso_editor',  "i");
130
+		$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor', "b");
131
+		$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor', "i");
132 132
 		
133 133
 		// do we support pending status
134 134
 		$no_pending_status = lasso_editor_get_option('no_pending_status', 'lasso_editor');
@@ -143,31 +143,31 @@  discard block
 block discarded – undo
143 143
 ?>
144 144
 		<div class="wrap">
145 145
 
146
-	    	<h2><?php _e( 'Editus Settings', 'lasso' );?></h2>
146
+	    	<h2><?php _e('Editus Settings', 'lasso'); ?></h2>
147 147
 
148 148
 			<form id="lasso-editor-settings-form" class="lasso--form-settings" method="post" enctype="multipart/form-data">
149 149
 
150
-				<?php do_action('lasso_settings_before');?>
150
+				<?php do_action('lasso_settings_before'); ?>
151 151
 				
152 152
 				
153 153
 				
154
-				<h3><?php _e( 'Enable for:', 'lasso' );?></h3>
154
+				<h3><?php _e('Enable for:', 'lasso'); ?></h3>
155 155
 				<div class="lasso-editor-settings--option-wrap">
156 156
 					<div class="lasso-editor-settings--option-inner">
157 157
 						
158
-						<span class="lasso--setting-description"><?php _e( 'Enable Editus for the following post types.', 'lasso' );?></span>
158
+						<span class="lasso--setting-description"><?php _e('Enable Editus for the following post types.', 'lasso'); ?></span>
159 159
 						<?php
160 160
 						$args = array(
161 161
 							'public'   => true
162 162
 						);
163 163
 						 
164
-						$allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
165
-						$post_types = get_post_types( $args, 'objects' );
164
+						$allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
165
+						$post_types = get_post_types($args, 'objects');
166 166
 						 
167
-						foreach ( $post_types  as $post_type ) {
167
+						foreach ($post_types  as $post_type) {
168 168
 						   if ($post_type->name == 'attachment') continue;
169
-						   $checked ="";
170
-						   if (  in_array( $post_type->name, $allowed_post_types )  ) {
169
+						   $checked = "";
170
+						   if (in_array($post_type->name, $allowed_post_types)) {
171 171
 								$checked = 'checked="checked"';
172 172
 						   }
173 173
 						   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>';
@@ -177,104 +177,104 @@  discard block
 block discarded – undo
177 177
 				</div>
178 178
 				
179 179
 
180
-				<h3><?php _e( 'Internal Settings', 'lasso' );?></h3>
180
+				<h3><?php _e('Internal Settings', 'lasso'); ?></h3>
181 181
 				<div class="lasso-editor-settings--option-wrap">
182 182
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
183
-						<label><?php _e( 'Article Class', 'lasso' );?></label>
184
-						<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>
185
-						<input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr( $article_object );?>" placeholder=".entry-content">
183
+						<label><?php _e('Article Class', 'lasso'); ?></label>
184
+						<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>
185
+						<input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr($article_object); ?>" placeholder=".entry-content">
186 186
 					</div>
187 187
 				
188 188
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
189
-						<label><?php _e( 'Featured Image Class', 'lasso' );?></label>
190
-						<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>
191
-						<input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr( $featImgClass );?>" placeholder=".entry-content">
189
+						<label><?php _e('Featured Image Class', 'lasso'); ?></label>
190
+						<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>
191
+						<input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr($featImgClass); ?>" placeholder=".entry-content">
192 192
 					</div>
193 193
 				
194 194
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
195
-						<label><?php _e( 'Article Title Class', 'lasso' );?></label>
196
-						<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>
197
-						<input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr( $titleClass );?>" placeholder=".entry-content">
195
+						<label><?php _e('Article Title Class', 'lasso'); ?></label>
196
+						<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>
197
+						<input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr($titleClass); ?>" placeholder=".entry-content">
198 198
 					</div>
199 199
 				
200 200
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
201
-						<label><?php _e( 'Ignored Items to Save', 'lasso' );?></label>
202
-						<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>
203
-						<textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNoSave );?></textarea>
201
+						<label><?php _e('Ignored Items to Save', 'lasso'); ?></label>
202
+						<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>
203
+						<textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNoSave); ?></textarea>
204 204
 					</div>
205 205
 				
206 206
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
207
-						<label><?php _e( 'Read Only Items', 'lasso' );?></label>
208
-						<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>
209
-						<textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNonEditable );?></textarea>
207
+						<label><?php _e('Read Only Items', 'lasso'); ?></label>
208
+						<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>
209
+						<textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNonEditable); ?></textarea>
210 210
 					</div>
211 211
 				
212 212
 					<div class="lasso-editor-settings--option-inner" >
213
-						<input type="checkbox" class="checkbox" name="lasso_editor[show_ignored_items]" id="lasso_editor[show_ignored_items]" <?php echo checked( $show_ignored_items, 'on' );?> >
214
-						<label for="lasso_editor[show_ignored_items]"> <?php _e( 'Show Ignored Items', 'lasso' );?></label>
215
-						<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>
213
+						<input type="checkbox" class="checkbox" name="lasso_editor[show_ignored_items]" id="lasso_editor[show_ignored_items]" <?php echo checked($show_ignored_items, 'on'); ?> >
214
+						<label for="lasso_editor[show_ignored_items]"> <?php _e('Show Ignored Items', 'lasso'); ?></label>
215
+						<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>
216 216
 					</div>
217 217
 				</div>
218 218
 
219
-				<h3><?php _e( 'Editor UI', 'lasso' );?></h3>
219
+				<h3><?php _e('Editor UI', 'lasso'); ?></h3>
220 220
 				<div class="lasso-editor-settings--option-wrap">
221 221
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
222
-						<input type="checkbox" class="checkbox" name="lasso_editor[use_old_ui]" id="lasso_editor_use_old_ui" <?php echo checked( $use_old_ui, 'on' );?> >
223
-						<label for="lasso_editor[use_old_ui]"><?php _e( 'Use the Old Toolbar', 'lasso' );?></label>
224
-						<span class="lasso--setting-description"><?php _e( 'Use this option to disable the new color options and use the pre-1.0 toolbar.', 'lasso' );?></span>
222
+						<input type="checkbox" class="checkbox" name="lasso_editor[use_old_ui]" id="lasso_editor_use_old_ui" <?php echo checked($use_old_ui, 'on'); ?> >
223
+						<label for="lasso_editor[use_old_ui]"><?php _e('Use the Old Toolbar', 'lasso'); ?></label>
224
+						<span class="lasso--setting-description"><?php _e('Use this option to disable the new color options and use the pre-1.0 toolbar.', 'lasso'); ?></span>
225 225
 					</div>
226 226
 				    <div id="lasso-editor-settings--colors">
227 227
 					<?php
228
-					self::create_section_for_color_picker('button-color1', _e( 'Editor Bar Color Top', 'lasso' ), '#0000ff');
229
-					self::create_section_for_color_picker('button-color2', _e( 'Editor Bar Color Bottom', 'lasso' ), '#000030');
230
-					self::create_section_for_color_picker('dialog-color', _e( 'Dialog Color', 'lasso' ), '#000055');
231
-					self::create_section_for_color_picker('text-color', _e( 'Icon/Text Color', 'lasso' ), '#ffffff');
228
+					self::create_section_for_color_picker('button-color1', _e('Editor Bar Color Top', 'lasso'), '#0000ff');
229
+					self::create_section_for_color_picker('button-color2', _e('Editor Bar Color Bottom', 'lasso'), '#000030');
230
+					self::create_section_for_color_picker('dialog-color', _e('Dialog Color', 'lasso'), '#000055');
231
+					self::create_section_for_color_picker('text-color', _e('Icon/Text Color', 'lasso'), '#ffffff');
232 232
 					?>
233
-					<button type="button" id="lasso-editor-settings--default-colors" ><?php _e( 'Default Colors', 'lasso' );?></button>
233
+					<button type="button" id="lasso-editor-settings--default-colors" ><?php _e('Default Colors', 'lasso'); ?></button>
234 234
 				    <div style="height:50px;"></div>
235 235
 					</div>
236 236
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
237
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked( $toolbar_headings, 'on' );?> >
238
-						<label for="lasso_editor[toolbar_headings]"><?php _e( 'Enable H2 and H3 Buttons', 'lasso' );?></label>
239
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set H2 and H3 settings.', 'lasso' );?></span>
237
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked($toolbar_headings, 'on'); ?> >
238
+						<label for="lasso_editor[toolbar_headings]"><?php _e('Enable H2 and H3 Buttons', 'lasso'); ?></label>
239
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set H2 and H3 settings.', 'lasso'); ?></span>
240 240
 
241 241
 					</div>
242 242
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
243
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings_h4]" id="lasso_editor[toolbar_headings_h4]" <?php echo checked( $toolbar_headings_h4, 'on' );?> >
244
-						<label for="lasso_editor[toolbar_headings_h4]"><?php _e( 'Enable H4/H5/H6 Buttons', 'lasso' );?></label>
245
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set H4/H5/H6 settings.', 'lasso' );?></span>
243
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings_h4]" id="lasso_editor[toolbar_headings_h4]" <?php echo checked($toolbar_headings_h4, 'on'); ?> >
244
+						<label for="lasso_editor[toolbar_headings_h4]"><?php _e('Enable H4/H5/H6 Buttons', 'lasso'); ?></label>
245
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set H4/H5/H6 settings.', 'lasso'); ?></span>
246 246
 
247 247
 					</div>
248 248
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
249
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked( $toolbar_show_color, 'on' );?> >
250
-						<label for="lasso_editor[toolbar_show_color]"><?php _e( 'Enable Text Color Buttons', 'lasso' );?></label>
251
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set text colors.', 'lasso' );?></span>
249
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked($toolbar_show_color, 'on'); ?> >
250
+						<label for="lasso_editor[toolbar_show_color]"><?php _e('Enable Text Color Buttons', 'lasso'); ?></label>
251
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set text colors.', 'lasso'); ?></span>
252 252
 
253 253
 					</div>
254 254
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
255
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked( $toolbar_show_alignment, 'on' );?> >
256
-						<label for="lasso_editor[toolbar_show_alignment]"><?php _e( 'Enable Text Align Buttons', 'lasso' );?></label>
257
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set text alignment.', 'lasso' );?></span>
255
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked($toolbar_show_alignment, 'on'); ?> >
256
+						<label for="lasso_editor[toolbar_show_alignment]"><?php _e('Enable Text Align Buttons', 'lasso'); ?></label>
257
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set text alignment.', 'lasso'); ?></span>
258 258
 
259 259
 					</div>
260 260
 					
261 261
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
262
-						<input type="checkbox" class="checkbox" name="lasso_editor[links_editable]" id="lasso_editor[links_editable]" <?php echo checked( $links_editable, 'on' );?> >
263
-						<label for="lasso_editor[links_editable]"><?php _e( 'Make links editable under the Editing Mode', 'lasso' );?></label>
264
-						<span class="lasso--setting-description"><?php _e( 'Make links editable under the Editing Mode. Turning this on will make the links non-clickable while editing.', 'lasso' );?></span>
262
+						<input type="checkbox" class="checkbox" name="lasso_editor[links_editable]" id="lasso_editor[links_editable]" <?php echo checked($links_editable, 'on'); ?> >
263
+						<label for="lasso_editor[links_editable]"><?php _e('Make links editable under the Editing Mode', 'lasso'); ?></label>
264
+						<span class="lasso--setting-description"><?php _e('Make links editable under the Editing Mode. Turning this on will make the links non-clickable while editing.', 'lasso'); ?></span>
265 265
 
266 266
 					</div>
267 267
 					<div class="lasso-editor-settings--option-inner">
268
-					    <label for="lasso_editor[insert_comp_ui]"> <?php _e( 'Insert Component UI', 'lasso' );?></label>
269
-						<span class="lasso--setting-description"><?php _e( 'UI mechanism to insert components', 'lasso' );?></span>
268
+					    <label for="lasso_editor[insert_comp_ui]"> <?php _e('Insert Component UI', 'lasso'); ?></label>
269
+						<span class="lasso--setting-description"><?php _e('UI mechanism to insert components', 'lasso'); ?></span>
270 270
 						<div class="lasso-editor-settings--option-inner" style="border:none;">
271
-					       <input type="radio" name="lasso_editor[insert_comp_ui]" value='drag' <?php echo checked( $insert_comp_ui, 'drag' );?>> <?php _e( 'Drag and Drop', 'lasso' );?>
271
+					       <input type="radio" name="lasso_editor[insert_comp_ui]" value='drag' <?php echo checked($insert_comp_ui, 'drag'); ?>> <?php _e('Drag and Drop', 'lasso'); ?>
272 272
 						</div>
273 273
 						<div class="lasso-editor-settings--option-inner" style="border:none;">
274
-						<input type="radio" name="lasso_editor[insert_comp_ui]" value="click" <?php echo checked( $insert_comp_ui, 'click' );?>> <?php _e( 'Click', 'lasso' );?>
274
+						<input type="radio" name="lasso_editor[insert_comp_ui]" value="click" <?php echo checked($insert_comp_ui, 'click'); ?>> <?php _e('Click', 'lasso'); ?>
275 275
 						</div>
276 276
 						<div class="lasso-editor-settings--option-inner" style="border:none;">
277
-						<input type="radio" name="lasso_editor[insert_comp_ui]" value="mediumcom" <?php echo checked( $insert_comp_ui, 'mediumcom' );?>> <?php _e( 'Auto Button on Empty Paragraph. medium.com-like UI.', 'lasso' );?>
277
+						<input type="radio" name="lasso_editor[insert_comp_ui]" value="mediumcom" <?php echo checked($insert_comp_ui, 'mediumcom'); ?>> <?php _e('Auto Button on Empty Paragraph. medium.com-like UI.', 'lasso'); ?>
278 278
 						</div>
279 279
 					</div>
280 280
 				</div>
@@ -283,101 +283,101 @@  discard block
 block discarded – undo
283 283
 				
284 284
 				
285 285
 
286
-				<h3><?php _e( 'Post Settings UI', 'lasso' );?></h3>
286
+				<h3><?php _e('Post Settings UI', 'lasso'); ?></h3>
287 287
 				<div class="lasso-editor-settings--option-wrap"  >
288 288
 					<div class="lasso-editor-settings--option-inner" style="border:none">
289
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked( $post_settings_disabled, 'on' );?> >
290
-						<label for="lasso_editor[post_settings_disabled]"> <?php _e( 'Disable Post Settings', 'lasso' );?></label>
291
-						<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>
289
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked($post_settings_disabled, 'on'); ?> >
290
+						<label for="lasso_editor[post_settings_disabled]"> <?php _e('Disable Post Settings', 'lasso'); ?></label>
291
+						<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>
292 292
 					</div>
293 293
 					
294 294
 					<div class="lasso-editor-settings--option-inner" style="border:none">
295
-						<input type="checkbox" class="checkbox" name="lasso_editor[allow_change_date]" id="lasso_editor[allow_change_date]" <?php echo checked( $allow_change_date, 'on' );?> >
296
-						<label for="lasso_editor[allow_change_date]"> <?php _e( 'Allow Changing Post Date', 'lasso' );?></label>
297
-						<span class="lasso--setting-description"><?php _e( 'Add the date selector to change the post\'s date to the Post Setting dialog', 'lasso' );?></span>
295
+						<input type="checkbox" class="checkbox" name="lasso_editor[allow_change_date]" id="lasso_editor[allow_change_date]" <?php echo checked($allow_change_date, 'on'); ?> >
296
+						<label for="lasso_editor[allow_change_date]"> <?php _e('Allow Changing Post Date', 'lasso'); ?></label>
297
+						<span class="lasso--setting-description"><?php _e('Add the date selector to change the post\'s date to the Post Setting dialog', 'lasso'); ?></span>
298 298
 					</div>
299 299
 					
300 300
 					<div class="lasso-editor-settings--option-inner" style="border:none">
301
-						<input type="checkbox" class="checkbox" name="lasso_editor[allow_new_category]" id="lasso_editor[allow_new_category]" <?php echo checked( $allow_new_category, 'on' );?> >
302
-						<label for="lasso_editor[allow_new_category]"> <?php _e( 'Allow Adding New Category', 'lasso' );?></label>
303
-						<span class="lasso--setting-description"><?php _e( 'Add the user to create new, previously non-existing categories for posts.', 'lasso' );?></span>
301
+						<input type="checkbox" class="checkbox" name="lasso_editor[allow_new_category]" id="lasso_editor[allow_new_category]" <?php echo checked($allow_new_category, 'on'); ?> >
302
+						<label for="lasso_editor[allow_new_category]"> <?php _e('Allow Adding New Category', 'lasso'); ?></label>
303
+						<span class="lasso--setting-description"><?php _e('Add the user to create new, previously non-existing categories for posts.', 'lasso'); ?></span>
304 304
 					</div>
305 305
 					
306 306
 					<div class="lasso-editor-settings--option-inner" style="border:none">
307
-						<input type="checkbox" class="checkbox" name="lasso_editor[no_pending_status]" id="lasso_editor[no_pending_status]" <?php echo checked( $no_pending_status, 'on' );?> >
308
-						<label for="lasso_editor[no_pending_status]"> <?php _e( 'Do Not Allow "Pending" Status', 'lasso' );?></label>
309
-						<span class="lasso--setting-description"><?php _e( 'Remove the Option to Set the Status to Pending.', 'lasso' );?></span>
307
+						<input type="checkbox" class="checkbox" name="lasso_editor[no_pending_status]" id="lasso_editor[no_pending_status]" <?php echo checked($no_pending_status, 'on'); ?> >
308
+						<label for="lasso_editor[no_pending_status]"> <?php _e('Do Not Allow "Pending" Status', 'lasso'); ?></label>
309
+						<span class="lasso--setting-description"><?php _e('Remove the Option to Set the Status to Pending.', 'lasso'); ?></span>
310 310
 					</div>
311 311
 					
312 312
 					<div class="lasso-editor-settings--option-inner" style="border:none">
313
-						<input type="checkbox" class="checkbox" name="lasso_editor[no_url_setting]" id="lasso_editor[no_slug_setting]" <?php echo checked( $no_url_setting, 'on' );?> >
314
-						<label for="lasso_editor[no_url_setting]"> <?php _e( 'Remove POST URL Option', 'lasso' );?></label>
315
-						<span class="lasso--setting-description"><?php _e( 'Remove the Option to Set the URL for the Post.', 'lasso' );?></span>
313
+						<input type="checkbox" class="checkbox" name="lasso_editor[no_url_setting]" id="lasso_editor[no_slug_setting]" <?php echo checked($no_url_setting, 'on'); ?> >
314
+						<label for="lasso_editor[no_url_setting]"> <?php _e('Remove POST URL Option', 'lasso'); ?></label>
315
+						<span class="lasso--setting-description"><?php _e('Remove the Option to Set the URL for the Post.', 'lasso'); ?></span>
316 316
 					</div>
317 317
 				
318 318
 					<div class="lasso-editor-settings--option-inner" >
319
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked( $post_new_disabled, 'on' );?> >
320
-						<label for="lasso_editor[post_adding_disabled]"><?php _e( 'Disable Post Adding', 'lasso' );?></label>
321
-						<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>
319
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked($post_new_disabled, 'on'); ?> >
320
+						<label for="lasso_editor[post_adding_disabled]"><?php _e('Disable Post Adding', 'lasso'); ?></label>
321
+						<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>
322 322
 					</div>
323 323
 					
324 324
 
325 325
 				</div>
326 326
 				
327
-				<h3><?php _e( 'Misc', 'lasso' );?></h3>
327
+				<h3><?php _e('Misc', 'lasso'); ?></h3>
328 328
 				<div class="lasso-editor-settings--option-wrap">
329 329
 					<div class="lasso-editor-settings--option-inner" style="border:none">
330
-						<input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked( $disable_tour, 'on' );?> >
331
-						<label for="lasso_editor[disable_tour]"> <?php _e( 'Do Not Show Tour Dialog', 'lasso' );?></label>
332
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable the tour dialog box for all users.', 'lasso' );?></span>
330
+						<input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked($disable_tour, 'on'); ?> >
331
+						<label for="lasso_editor[disable_tour]"> <?php _e('Do Not Show Tour Dialog', 'lasso'); ?></label>
332
+						<span class="lasso--setting-description"><?php _e('Check this box to disable the tour dialog box for all users.', 'lasso'); ?></span>
333 333
 					</div>
334 334
 
335 335
 					<div class="lasso-editor-settings--option-inner" style="border:none">
336
-					    <label for="lasso_editor[bold_tag]"> <?php _e( '"Bold" Tag', 'lasso' );?></label>
337
-						<span class="lasso--setting-description"><?php _e( 'Choose the HTML tag used for the "Bold" style.', 'lasso' );?></span>
338
-					    <input type="radio" name="lasso_editor[bold_tag]" value='b' <?php echo checked( $bold_tag, 'b' );?>> b
339
-						<input type="radio" name="lasso_editor[bold_tag]" value="strong" <?php echo checked( $bold_tag, 'strong' );?>> strong
336
+					    <label for="lasso_editor[bold_tag]"> <?php _e('"Bold" Tag', 'lasso'); ?></label>
337
+						<span class="lasso--setting-description"><?php _e('Choose the HTML tag used for the "Bold" style.', 'lasso'); ?></span>
338
+					    <input type="radio" name="lasso_editor[bold_tag]" value='b' <?php echo checked($bold_tag, 'b'); ?>> b
339
+						<input type="radio" name="lasso_editor[bold_tag]" value="strong" <?php echo checked($bold_tag, 'strong'); ?>> strong
340 340
 					</div>
341 341
 					<div class="lasso-editor-settings--option-inner" >
342
-					    <label for="lasso_editor[i_tag]"> <?php _e( '"Italic" Tag', 'lasso' );?></label>
343
-						<span class="lasso--setting-description"><?php _e( 'Choose the HTML tag used for the "Italic" style.', 'lasso' );?></span>
344
-					    <input type="radio" name="lasso_editor[i_tag]" value='i' <?php echo checked( $i_tag, 'i' );?>> i
345
-						<input type="radio" name="lasso_editor[i_tag]" value="em" <?php echo checked( $i_tag, 'em' );?>> em
342
+					    <label for="lasso_editor[i_tag]"> <?php _e('"Italic" Tag', 'lasso'); ?></label>
343
+						<span class="lasso--setting-description"><?php _e('Choose the HTML tag used for the "Italic" style.', 'lasso'); ?></span>
344
+					    <input type="radio" name="lasso_editor[i_tag]" value='i' <?php echo checked($i_tag, 'i'); ?>> i
345
+						<input type="radio" name="lasso_editor[i_tag]" value="em" <?php echo checked($i_tag, 'em'); ?>> em
346 346
 					</div>
347 347
 				</div>
348 348
 
349
-				<h3><?php _e( 'Advanced', 'lasso' );?></h3>
349
+				<h3><?php _e('Advanced', 'lasso'); ?></h3>
350 350
 				<div class="lasso-editor-settings--option-wrap ">
351 351
 					<div class="lasso-editor-settings--option-inner" style="border:none">
352
-						<input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked( $shortcodify_disabled, 'on' );?> >
353
-						<label for="lasso_editor[shortcodify_disabled]"><?php _e( 'Disable Aesop Component Conversion', 'lasso' );?></label>
354
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso' );?></span>
352
+						<input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked($shortcodify_disabled, 'on'); ?> >
353
+						<label for="lasso_editor[shortcodify_disabled]"><?php _e('Disable Aesop Component Conversion', 'lasso'); ?></label>
354
+						<span class="lasso--setting-description"><?php _e('Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso'); ?></span>
355 355
 					</div>
356 356
 				
357 357
 					<div class="lasso-editor-settings--option-inner" style="border:none">
358
-						<input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked( $enable_autosave, 'on' );?> >
359
-						<label for="lasso_editor[enable_autosave]"><?php _e( 'Enable Auto Save', 'lasso' );?></label>
360
-						<span class="lasso--setting-description"><?php _e( 'Check this box to enable auto save.', 'lasso' );?></span>
358
+						<input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked($enable_autosave, 'on'); ?> >
359
+						<label for="lasso_editor[enable_autosave]"><?php _e('Enable Auto Save', 'lasso'); ?></label>
360
+						<span class="lasso--setting-description"><?php _e('Check this box to enable auto save.', 'lasso'); ?></span>
361 361
 					</div>
362 362
 				
363 363
 					<div class="lasso-editor-settings--option-inner" style="border:none">
364
-						<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' );?> >
365
-						<label for="lasso_editor[post_save_disabled]"><?php _e( 'Disable Post Saving', 'lasso' );?></label>
366
-						<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>
364
+						<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'); ?> >
365
+						<label for="lasso_editor[post_save_disabled]"><?php _e('Disable Post Saving', 'lasso'); ?></label>
366
+						<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>
367 367
 
368 368
 					</div>
369 369
 					
370 370
 					<div class="lasso-editor-settings--option-inner" style="border:none">
371
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_edit_disabled]" id="lasso_editor[post_edit_disabled]" <?php echo checked( $edit_post_disabled, 'on' );?> >
372
-						<label for="lasso_editor[post_edit_disabled]"><?php _e( 'Disable Post Editing', 'lasso' );?></label>
373
-						<span class="lasso--setting-description"><?php _e( 'You may use this option if you only want to edit custom fields. Refer <a href="https://edituswp.com/editing-and-updating-custom-fields-from-frontend/">here</a> for more information. The custom fields you specify will be still editable under the editing mode.', 'lasso' );?></span>
371
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_edit_disabled]" id="lasso_editor[post_edit_disabled]" <?php echo checked($edit_post_disabled, 'on'); ?> >
372
+						<label for="lasso_editor[post_edit_disabled]"><?php _e('Disable Post Editing', 'lasso'); ?></label>
373
+						<span class="lasso--setting-description"><?php _e('You may use this option if you only want to edit custom fields. Refer <a href="https://edituswp.com/editing-and-updating-custom-fields-from-frontend/">here</a> for more information. The custom fields you specify will be still editable under the editing mode.', 'lasso'); ?></span>
374 374
 
375 375
 					</div>
376 376
 				
377 377
 					<div class="lasso-editor-settings--option-inner">
378
-						<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' );?> >
379
-						<label for="lasso_editor[save_using_rest_disabled]"><?php _e( "Don't Use REST API to Save", 'lasso' );?></label>
380
-						<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>
378
+						<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'); ?> >
379
+						<label for="lasso_editor[save_using_rest_disabled]"><?php _e("Don't Use REST API to Save", 'lasso'); ?></label>
380
+						<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>
381 381
 
382 382
 					</div>
383 383
 				</div>
@@ -387,11 +387,11 @@  discard block
 block discarded – undo
387 387
 
388 388
 				<div class="lasso-editor-settings--submit">
389 389
 				    <input type="hidden" name="action" value="lasso-editor-settings" />
390
-				    <input type="submit" class="button-primary" value="<?php esc_attr_e( 'Save Settings', 'lasso' );?>" />
391
-					<?php wp_nonce_field( 'nonce', 'lasso_editor_settings' ); ?>
390
+				    <input type="submit" class="button-primary" value="<?php esc_attr_e('Save Settings', 'lasso'); ?>" />
391
+					<?php wp_nonce_field('nonce', 'lasso_editor_settings'); ?>
392 392
 				</div>
393 393
 				
394
-				<?php do_action('lasso_settings_after');?>
394
+				<?php do_action('lasso_settings_after'); ?>
395 395
 			</form>
396 396
 
397 397
 		</div><?php
Please login to merge, or discard this patch.
public/includes/editor-modules.php 1 patch
Spacing   +250 added lines, -250 removed lines patch added patch discarded remove patch
@@ -11,39 +11,39 @@  discard block
 block discarded – undo
11 11
  *
12 12
  * @since 1.0
13 13
  */
14
-add_action( 'wp_footer', 'lasso_editor_controls' );
14
+add_action('wp_footer', 'lasso_editor_controls');
15 15
 function lasso_editor_controls() {
16 16
 
17 17
 	global $post;
18 18
 
19
-	if ( lasso_user_can('edit_posts') ) {
19
+	if (lasso_user_can('edit_posts')) {
20 20
 
21
-		$status = get_post_status( get_the_ID() );
22
-		$use_old_ui   = lasso_editor_get_option( 'use_old_ui', 'lasso_editor' );
23
-		$button_color1 = lasso_editor_get_option('button-color1', 'lasso_editor','#0000ff');
24
-		$button_color2 = lasso_editor_get_option('button-color2', 'lasso_editor','#000000');
25
-		$dialog_color = lasso_editor_get_option('dialog-color', 'lasso_editor','#000055');
26
-		$text_color = lasso_editor_get_option('text-color', 'lasso_editor','#ffffff');
21
+		$status = get_post_status(get_the_ID());
22
+		$use_old_ui   = lasso_editor_get_option('use_old_ui', 'lasso_editor');
23
+		$button_color1 = lasso_editor_get_option('button-color1', 'lasso_editor', '#0000ff');
24
+		$button_color2 = lasso_editor_get_option('button-color2', 'lasso_editor', '#000000');
25
+		$dialog_color = lasso_editor_get_option('dialog-color', 'lasso_editor', '#000055');
26
+		$text_color = lasso_editor_get_option('text-color', 'lasso_editor', '#ffffff');
27 27
 		$hover_color1 = lasso_editor_adjustBrightness($button_color1, 50);
28 28
 		$hover_color2 = lasso_editor_adjustBrightness($button_color2, 50);
29 29
 
30 30
 		// let users add custom css classes
31
-		$custom_classes = apply_filters( 'lasso_control_classes', '' );
31
+		$custom_classes = apply_filters('lasso_control_classes', '');
32 32
 
33 33
 		$post_access_class   = '';
34
-		$post_new_disabled   = lasso_editor_get_option( 'post_adding_disabled', 'lasso_editor' );
35
-		$post_settings_disabled = lasso_editor_get_option( 'post_settings_disabled', 'lasso_editor' );
36
-		$shortcodify_disabled = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
34
+		$post_new_disabled   = lasso_editor_get_option('post_adding_disabled', 'lasso_editor');
35
+		$post_settings_disabled = lasso_editor_get_option('post_settings_disabled', 'lasso_editor');
36
+		$shortcodify_disabled = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor');
37 37
 
38 38
 
39 39
 		// CSS class if adding new post objects is disabled
40
-		if ( 'on' == $post_new_disabled ) { $post_access_class = 'lasso--post-new-disabled'; }
40
+		if ('on' == $post_new_disabled) { $post_access_class = 'lasso--post-new-disabled'; }
41 41
 
42 42
 		// CSS class if adjust settings is disabled
43
-		if ( 'on' == $post_settings_disabled ) { $post_access_class = 'lasso--post-settings-disabled'; }
43
+		if ('on' == $post_settings_disabled) { $post_access_class = 'lasso--post-settings-disabled'; }
44 44
 
45 45
 		// CSS class if adding new post objects AND settings are disabled
46
-		if ( 'on' == $post_new_disabled && 'on' == $post_settings_disabled ) { $post_access_class = 'lasso--post-all-disabled'; }
46
+		if ('on' == $post_new_disabled && 'on' == $post_settings_disabled) { $post_access_class = 'lasso--post-all-disabled'; }
47 47
 
48 48
 		// CSS class if shortcodify or (Aesop Shortcode Conversion) is disabled
49 49
 		$sc_saving_class = 'on' == $shortcodify_disabled ? 'shortcodify-disabled' : 'shortcodify-enabled';
@@ -60,29 +60,29 @@  discard block
 block discarded – undo
60 60
 		?>
61 61
 		<style>
62 62
 		.lasso-editor-controls--wrap, #lasso--post-settings2,#lasso--save,#lasso--post-delete,#lasso--exit,#lasso--publish {
63
-			background-image: -webkit-linear-gradient(top,<?php echo $button_color1;?> 0,<?php echo $button_color2;?> 100%);
64
-			background-image: -o-linear-gradient(top,<?php echo $button_color1;?> 0,<?php echo $button_color2;?> 100%);
65
-			background-image: linear-gradient(to bottom,<?php echo $button_color1;?> 0,<?php echo $button_color2;?> 100%);
66
-			color: <?php echo $text_color;?>;
63
+			background-image: -webkit-linear-gradient(top,<?php echo $button_color1; ?> 0,<?php echo $button_color2; ?> 100%);
64
+			background-image: -o-linear-gradient(top,<?php echo $button_color1; ?> 0,<?php echo $button_color2; ?> 100%);
65
+			background-image: linear-gradient(to bottom,<?php echo $button_color1; ?> 0,<?php echo $button_color2; ?> 100%);
66
+			color: <?php echo $text_color; ?>;
67 67
 		}
68 68
 		
69 69
 		.lasso--controls__right a:before, #lasso-toolbar--html__footer_desc {
70
-			color: <?php echo $text_color;?> !important;
70
+			color: <?php echo $text_color; ?> !important;
71 71
 		}
72 72
 		
73 73
 		ul.lasso-editor-controls li:hover, #lasso--exit:hover,#lasso--post-settings2:hover,#lasso--post-delete:hover,#lasso--publish:hover,#lasso--save:hover {
74
-			background-image: -webkit-linear-gradient(top,<?php echo $hover_color1;?> 0,<?php echo $hover_color2;?> 100%);
75
-			background-image: -o-linear-gradient(top,<?php echo $hover_color1;?> 0,<?php echo $hover_color2;?> 100%);
76
-			background-image: linear-gradient(to bottom,<?php echo $hover_color1;?> 0,<?php echo $hover_color2;?> 100%);
74
+			background-image: -webkit-linear-gradient(top,<?php echo $hover_color1; ?> 0,<?php echo $hover_color2; ?> 100%);
75
+			background-image: -o-linear-gradient(top,<?php echo $hover_color1; ?> 0,<?php echo $hover_color2; ?> 100%);
76
+			background-image: linear-gradient(to bottom,<?php echo $hover_color1; ?> 0,<?php echo $hover_color2; ?> 100%);
77 77
 		}
78 78
 		
79 79
 		.lasso--modal__inner,.sweet-alert,#lasso-toolbar--components.toolbar--drop-up ul,#lasso-toolbar--components__list,#lasso-toolbar--html.html--drop-up #lasso-toolbar--html__wrap,
80 80
 		#lasso-toolbar--link.link--drop-up #lasso-toolbar--link__wrap		{
81
-			background: <?php echo $dialog_color;?>;
82
-			color: <?php echo $text_color;?>;
81
+			background: <?php echo $dialog_color; ?>;
82
+			color: <?php echo $text_color; ?>;
83 83
 		}
84 84
 		.sweet-alert p,.lasso--modal__inner label,.lasso--toolbar__inner label {
85
-			color: <?php echo $text_color;?> !important;
85
+			color: <?php echo $text_color; ?> !important;
86 86
 		}
87 87
 		
88 88
 		<?php if (!$is_mobile) { ?>
@@ -112,48 +112,48 @@  discard block
 block discarded – undo
112 112
 		<?php
113 113
 		} 
114 114
 		?>
115
-		<div id="lasso--controls" class="lasso-post-status--<?php echo sanitize_html_class( $status );?> <?php echo sanitize_html_class( $custom_classes );?>" data-post-id="<?php echo get_the_ID();?>" >
115
+		<div id="lasso--controls" class="lasso-post-status--<?php echo sanitize_html_class($status); ?> <?php echo sanitize_html_class($custom_classes); ?>" data-post-id="<?php echo get_the_ID(); ?>" >
116 116
 
117
-			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class;?> "  <?php echo $mobile_style ?> >
117
+			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class; ?> "  <?php echo $mobile_style ?> >
118 118
 
119
-				<?php do_action( 'lasso_editor_controls_before' );
119
+				<?php do_action('lasso_editor_controls_before');
120 120
 
121
-				if ( $is_capable ) { ?>
121
+				if ($is_capable) { ?>
122 122
 
123
-					<li id="lasso--edit" title="<?php esc_attr_e( 'Edit Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
123
+					<li id="lasso--edit" title="<?php esc_attr_e('Edit Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
124 124
 
125
-					<?php if ( 'off' == $post_settings_disabled || empty( $post_settings_disabled ) ) { ?>
126
-						<li id="lasso--post-settings" title="<?php esc_attr_e( 'Post Settings', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
125
+					<?php if ('off' == $post_settings_disabled || empty($post_settings_disabled)) { ?>
126
+						<li id="lasso--post-settings" title="<?php esc_attr_e('Post Settings', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
127 127
 					<?php }
128 128
 
129 129
 				} ?>
130 130
 
131
-				<li id="lasso--post-all" title="<?php esc_attr_e( 'All Posts', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
131
+				<li id="lasso--post-all" title="<?php esc_attr_e('All Posts', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
132 132
 
133
-				<?php if ( $is_capable && wp_revisions_enabled( $post ) ) { ?>
134
-					<li id="lasso--post-revisions" title="<?php esc_attr_e( 'Revisions', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
133
+				<?php if ($is_capable && wp_revisions_enabled($post)) { ?>
134
+					<li id="lasso--post-revisions" title="<?php esc_attr_e('Revisions', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
135 135
 				<?php } ?>
136 136
 
137
-				<?php if ( ( 'off' == $post_new_disabled || empty( $post_new_disabled ) && lasso_user_can('edit_posts') ) ) { ?>
138
-					<li id="lasso--post-new" title="<?php esc_attr_e( 'Add Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
137
+				<?php if (('off' == $post_new_disabled || empty($post_new_disabled) && lasso_user_can('edit_posts'))) { ?>
138
+					<li id="lasso--post-new" title="<?php esc_attr_e('Add Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
139 139
 				<?php } ?>
140 140
 
141
-				<?php do_action( 'lasso_editor_controls_after' );?>
141
+				<?php do_action('lasso_editor_controls_after'); ?>
142 142
 
143 143
 			</ul>
144 144
 
145
-			<?php if ( is_singular() && !$is_mobile ) { ?>
145
+			<?php if (is_singular() && !$is_mobile) { ?>
146 146
 
147
-				<div class="lasso--controls__right" data-posttype="<?php echo get_post_type( get_the_ID() );?>" data-status="<?php echo $status;?>">
147
+				<div class="lasso--controls__right" data-posttype="<?php echo get_post_type(get_the_ID()); ?>" data-status="<?php echo $status; ?>">
148 148
 				
149
-					<a href="#" title="<?php esc_attr_e( 'Delete Post', 'lasso' );?>" id="lasso--post-delete" class="lasso-save-post lasso--button <?php echo $sc_saving_class;?>"></a>
150
-					<a href="#" title="<?php esc_attr_e( 'Post Settings', 'lasso' );?>" id="lasso--post-settings2" class="lasso-save-post lasso--button <?php echo $sc_saving_class;?>"></a>
149
+					<a href="#" title="<?php esc_attr_e('Delete Post', 'lasso'); ?>" id="lasso--post-delete" class="lasso-save-post lasso--button <?php echo $sc_saving_class; ?>"></a>
150
+					<a href="#" title="<?php esc_attr_e('Post Settings', 'lasso'); ?>" id="lasso--post-settings2" class="lasso-save-post lasso--button <?php echo $sc_saving_class; ?>"></a>
151 151
 
152 152
 
153
-					<a href="#" title="<?php esc_attr_e( 'Save Post', 'lasso' );?>" id="lasso--save" class="lasso-save-post lasso--button <?php echo $sc_saving_class;?>"></a>
153
+					<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>
154 154
 
155
-					<?php if ( ('draft' == $status ) || ('pending' == $status && $can_publish) ) { ?>
156
-						<a href="#" title="<?php $can_publish ? esc_attr_e( 'Publish Post', 'lasso' ) : esc_attr_e( 'Submit For Review', 'lasso' );?>" id="lasso--publish" class="lasso-publish-post lasso--button <?php echo $sc_saving_class;?>"></a>
155
+					<?php if (('draft' == $status) || ('pending' == $status && $can_publish)) { ?>
156
+						<a href="#" title="<?php $can_publish ? esc_attr_e('Publish Post', 'lasso') : esc_attr_e('Submit For Review', 'lasso'); ?>" id="lasso--publish" class="lasso-publish-post lasso--button <?php echo $sc_saving_class; ?>"></a>
157 157
 					<?php } ?>
158 158
 					
159 159
 
@@ -179,9 +179,9 @@  discard block
 block discarded – undo
179 179
 
180 180
 
181 181
 	// let users add custom css classes
182
-	$custom_classes = apply_filters( 'lasso_sidebar_classes', '' );
182
+	$custom_classes = apply_filters('lasso_sidebar_classes', '');
183 183
 	?>
184
-	<div id="lasso--sidebar" class="<?php echo sanitize_html_class( $custom_classes );?>" >
184
+	<div id="lasso--sidebar" class="<?php echo sanitize_html_class($custom_classes); ?>" >
185 185
 		<div class="lasso--sidebar__inner">
186 186
 			<div id="lasso--component__settings"></div>
187 187
 		</div>
@@ -203,20 +203,20 @@  discard block
 block discarded – undo
203 203
 	$is_mobile = wp_is_mobile();
204 204
 
205 205
 	// check for lasso story engine and add a class doniting this
206
-	$ase_status = class_exists( 'Aesop_Core' ) || defined( 'LASSO_CUSTOM' ) ? 'ase-active' : 'ase-not-active';
206
+	$ase_status = class_exists('Aesop_Core') || defined('LASSO_CUSTOM') ? 'ase-active' : 'ase-not-active';
207 207
 
208 208
 	// let users add custom css classes
209
-	$custom_classes = apply_filters( 'lasso_toolbar_classes', '' );
209
+	$custom_classes = apply_filters('lasso_toolbar_classes', '');
210 210
 
211 211
 	// are toolbar headings enabled
212
-	$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
213
-	$toolbar_headings_h4      = lasso_editor_get_option( 'toolbar_headings_h4', 'lasso_editor' );
212
+	$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
213
+	$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
214 214
 
215
-	$toolbar_class  = $toolbar_headings ? 'toolbar-extended' : false;
215
+	$toolbar_class = $toolbar_headings ? 'toolbar-extended' : false;
216 216
 	
217 217
 	// mobile styles
218 218
     $mobile_class = $is_mobile ? 'lasso-mobile' : false;
219
-	$mobile_style =$is_mobile ? 'style="bottom:0px;"' : null;
219
+	$mobile_style = $is_mobile ? 'style="bottom:0px;"' : null;
220 220
 	
221 221
 	//show color
222 222
 	$show_color = lasso_editor_get_option('toolbar_show_color', 'lasso_editor');
@@ -224,113 +224,113 @@  discard block
 block discarded – undo
224 224
 	//show alignment
225 225
 	$show_align = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor');
226 226
 	
227
-	$status = get_post_status( get_the_ID() );
227
+	$status = get_post_status(get_the_ID());
228 228
 	
229
-	$shortcodify_disabled = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
229
+	$shortcodify_disabled = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor');
230 230
 	
231 231
 	$sc_saving_class = 'on' == $shortcodify_disabled ? 'shortcodify-disabled' : 'shortcodify-enabled';
232 232
 
233 233
 
234 234
 	?>
235
-	<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 ?>>
236
-		<ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"';}?>>
237
-			<?php do_action( 'lasso_toolbar_components_before' );?>
238
-		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e( 'Bold', 'lasso' );?>"></li>
239
-		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e( 'Underline', 'lasso' );?>"></li>
240
-		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e( 'Italicize', 'lasso' );?>"></li>
241
-		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e( 'Strikethrough', 'lasso' );?>"></li>
242
-			<li id="lasso-toolbar--components" title="<?php esc_attr_e( 'Insert Component', 'lasso' );?>" style="color:#ffffa0;">
235
+	<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 ?>>
236
+		<ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"'; }?>>
237
+			<?php do_action('lasso_toolbar_components_before'); ?>
238
+		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e('Bold', 'lasso'); ?>"></li>
239
+		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e('Underline', 'lasso'); ?>"></li>
240
+		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e('Italicize', 'lasso'); ?>"></li>
241
+		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e('Strikethrough', 'lasso'); ?>"></li>
242
+			<li id="lasso-toolbar--components" title="<?php esc_attr_e('Insert Component', 'lasso'); ?>" style="color:#ffffa0;">
243 243
 			    <ul id="lasso-toolbar--components__list" style="display:none;color:white;">
244
-			    	<?php if ( 'ase-active' == $ase_status ): ?>
245
-						<li data-type="image" title="<?php esc_attr_e( 'Image', 'lasso' );?>" class="lasso-toolbar--component__image"></li>
246
-						<li data-type="character" title="<?php esc_attr_e( 'Character', 'lasso' );?>" class="lasso-toolbar--component__character"></li>
247
-						<li data-type="quote" title="<?php esc_attr_e( 'Quote', 'lasso' );?>"  class="lasso-toolbar--component__quote"></li>
248
-						<li data-type="content" title="<?php esc_attr_e( 'Content', 'lasso' );?>"  class="lasso-toolbar--component__content"></li>
249
-						<li data-type="chapter" title="<?php esc_attr_e( 'Chapter', 'lasso' );?>"  class="lasso-toolbar--component__chapter"></li>
250
-						<li data-type="parallax" title="<?php esc_attr_e( 'Parallax', 'lasso' );?>"  class="lasso-toolbar--component__parallax"></li>
251
-						<li data-type="audio" title="<?php esc_attr_e( 'Audio', 'lasso' );?>"  class="lasso-toolbar--component__audio"></li>
252
-						<li data-type="video" title="<?php esc_attr_e( 'Video', 'lasso' );?>"  class="lasso-toolbar--component__video"></li>
253
-						<li data-type="map" title="<?php esc_attr_e( 'Map', 'lasso' );?>"  class="lasso-toolbar--component__map"></li>
254
-						<li data-type="timeline_stop" title="<?php esc_attr_e( 'Timeline', 'lasso' );?>"  class="lasso-toolbar--component__timeline"></li>
255
-						<li data-type="document" title="<?php esc_attr_e( 'Document', 'lasso' );?>"  class="lasso-toolbar--component__document"></li>
256
-						<li data-type="collection" title="<?php esc_attr_e( 'Collection', 'lasso' );?>"  class="lasso-toolbar--component__collection"></li>
257
-						<li data-type="gallery" title="<?php esc_attr_e( 'Gallery', 'lasso' );?>"  class="lasso-toolbar--component__gallery"></li>
258
-						<?php if ( class_exists ('Aesop_GalleryPop') ) { ?>
259
-						     <li data-type="gallery" title="<?php esc_attr_e( 'Gallery Pop', 'lasso' );?>"  class="lasso-toolbar--component__gallerypop"></li>
244
+			    	<?php if ('ase-active' == $ase_status): ?>
245
+						<li data-type="image" title="<?php esc_attr_e('Image', 'lasso'); ?>" class="lasso-toolbar--component__image"></li>
246
+						<li data-type="character" title="<?php esc_attr_e('Character', 'lasso'); ?>" class="lasso-toolbar--component__character"></li>
247
+						<li data-type="quote" title="<?php esc_attr_e('Quote', 'lasso'); ?>"  class="lasso-toolbar--component__quote"></li>
248
+						<li data-type="content" title="<?php esc_attr_e('Content', 'lasso'); ?>"  class="lasso-toolbar--component__content"></li>
249
+						<li data-type="chapter" title="<?php esc_attr_e('Chapter', 'lasso'); ?>"  class="lasso-toolbar--component__chapter"></li>
250
+						<li data-type="parallax" title="<?php esc_attr_e('Parallax', 'lasso'); ?>"  class="lasso-toolbar--component__parallax"></li>
251
+						<li data-type="audio" title="<?php esc_attr_e('Audio', 'lasso'); ?>"  class="lasso-toolbar--component__audio"></li>
252
+						<li data-type="video" title="<?php esc_attr_e('Video', 'lasso'); ?>"  class="lasso-toolbar--component__video"></li>
253
+						<li data-type="map" title="<?php esc_attr_e('Map', 'lasso'); ?>"  class="lasso-toolbar--component__map"></li>
254
+						<li data-type="timeline_stop" title="<?php esc_attr_e('Timeline', 'lasso'); ?>"  class="lasso-toolbar--component__timeline"></li>
255
+						<li data-type="document" title="<?php esc_attr_e('Document', 'lasso'); ?>"  class="lasso-toolbar--component__document"></li>
256
+						<li data-type="collection" title="<?php esc_attr_e('Collection', 'lasso'); ?>"  class="lasso-toolbar--component__collection"></li>
257
+						<li data-type="gallery" title="<?php esc_attr_e('Gallery', 'lasso'); ?>"  class="lasso-toolbar--component__gallery"></li>
258
+						<?php if (class_exists('Aesop_GalleryPop')) { ?>
259
+						     <li data-type="gallery" title="<?php esc_attr_e('Gallery Pop', 'lasso'); ?>"  class="lasso-toolbar--component__gallerypop"></li>
260 260
 						<?php }?>
261
-						<?php if ( class_exists ('Aesop_Events') ) { ?>
262
-						     <li data-type="events" title="<?php esc_attr_e( 'Event', 'lasso' );?>"  class="lasso-toolbar--component__event"></li>
261
+						<?php if (class_exists('Aesop_Events')) { ?>
262
+						     <li data-type="events" title="<?php esc_attr_e('Event', 'lasso'); ?>"  class="lasso-toolbar--component__event"></li>
263 263
 						<?php }?>
264 264
 					<?php else: ?>
265
-						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );?>" class="image lasso-toolbar--component__image"></li>
266
-						<li data-type="wpquote" title="<?php esc_attr_e( 'WordPress Quote', 'lasso' );?>" class="quote lasso-toolbar--component__quote"></li>
267
-						<!--li data-type="wpvideo" title="<?php esc_attr_e( 'WordPress Video', 'lasso' );?>" class="video lasso-toolbar--component__video"></li-->
265
+						<li data-type="wpimg" title="<?php esc_attr_e('WordPress Image', 'lasso'); ?>" class="image lasso-toolbar--component__image"></li>
266
+						<li data-type="wpquote" title="<?php esc_attr_e('WordPress Quote', 'lasso'); ?>" class="quote lasso-toolbar--component__quote"></li>
267
+						<!--li data-type="wpvideo" title="<?php esc_attr_e('WordPress Video', 'lasso'); ?>" class="video lasso-toolbar--component__video"></li-->
268 268
 					<?php endif; ?>
269
-					<?php do_action( 'lasso_toolbar_components' );?>
269
+					<?php do_action('lasso_toolbar_components'); ?>
270 270
 			    </ul>
271 271
 			</li>
272
-		    <?php if ( $toolbar_headings ): ?>
273
-		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>"></li>
274
-		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>"></li>
272
+		    <?php if ($toolbar_headings): ?>
273
+		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>"></li>
274
+		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>"></li>
275 275
 			<?php endif; ?>
276
-			<?php if ( $toolbar_headings_h4 ): ?>
277
-		    <li id="lasso-toolbar--h4" title="<?php esc_attr_e( 'H4 Heading', 'lasso' );?>"></li>
278
-		    <li id="lasso-toolbar--h5" title="<?php esc_attr_e( 'H5 Heading', 'lasso' );?>"></li>
279
-			<li id="lasso-toolbar--h6" title="<?php esc_attr_e( 'H6 Heading', 'lasso' );?>"></li>
276
+			<?php if ($toolbar_headings_h4): ?>
277
+		    <li id="lasso-toolbar--h4" title="<?php esc_attr_e('H4 Heading', 'lasso'); ?>"></li>
278
+		    <li id="lasso-toolbar--h5" title="<?php esc_attr_e('H5 Heading', 'lasso'); ?>"></li>
279
+			<li id="lasso-toolbar--h6" title="<?php esc_attr_e('H6 Heading', 'lasso'); ?>"></li>
280 280
 			<?php endif; ?>
281 281
 			
282
-			<?php if ( $show_color ): ?>
283
-		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e( 'Set Color for Selected Text', 'lasso' );?>"></li>
284
-		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e( 'Choose Color', 'lasso' );?>"></li>
282
+			<?php if ($show_color): ?>
283
+		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e('Set Color for Selected Text', 'lasso'); ?>"></li>
284
+		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e('Choose Color', 'lasso'); ?>"></li>
285 285
 			<?php endif; ?>
286 286
 					
287 287
 		    
288
-			<li id="lasso-toolbar--link" title="<?php esc_attr_e( 'Anchor Link', 'lasso' );?>">
288
+			<li id="lasso-toolbar--link" title="<?php esc_attr_e('Anchor Link', 'lasso'); ?>">
289 289
 		    	<div id="lasso-toolbar--link__wrap" <?php echo $mobile_style ?> >
290
-		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'http://url.com', 'lasso' );?>"></div>
291
-		    		<a href="#" title="<?php esc_attr_e( 'Create Link', 'lasso' );?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
290
+		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e('http://url.com', 'lasso'); ?>"></div>
291
+		    		<a href="#" title="<?php esc_attr_e('Create Link', 'lasso'); ?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
292 292
 					<input class="styled-checkbox" type="checkbox" id="aesop-toolbar--link_newtab" checked/>
293
-                    <label for="aesop-toolbar--link_newtab"><?php esc_attr_e( 'Open in a New Tab', 'lasso' );?></label>
293
+                    <label for="aesop-toolbar--link_newtab"><?php esc_attr_e('Open in a New Tab', 'lasso'); ?></label>
294 294
 		    	</div>
295 295
 		    </li>
296
-		    <?php do_action( 'lasso_toolbar_components_after' );?>
297
-		    <li id="lasso-toolbar--html" title="<?php esc_attr_e( 'Insert HTML or Code', 'lasso' );?>">
296
+		    <?php do_action('lasso_toolbar_components_after'); ?>
297
+		    <li id="lasso-toolbar--html" title="<?php esc_attr_e('Insert HTML or Code', 'lasso'); ?>">
298 298
 		    	<div id="lasso-toolbar--html__wrap" <?php echo $mobile_style ?>>
299
-		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?>"></div>
299
+		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?>"></div>
300 300
 		    		<div id="lasso-toolbar--html__footer">
301 301
 					<div id="lasso-toolbar--html__footer_desc" >
302
-					<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?><br>
303
-					<?php esc_attr_e( 'You can also use Shortcodes', 'lasso' );?><br>
304
-					<?php esc_attr_e( 'You can also enter a URL to embed, such as Youtube, Vimeo and Twitter URLs.', 'lasso' );?>
302
+					<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?><br>
303
+					<?php esc_attr_e('You can also use Shortcodes', 'lasso'); ?><br>
304
+					<?php esc_attr_e('You can also enter a URL to embed, such as Youtube, Vimeo and Twitter URLs.', 'lasso'); ?>
305 305
 					</div>
306 306
 		    			<ul class="lasso-toolbar--html-snips">
307 307
 						
308
-		    				<?php if ( !$toolbar_headings ): ?>
309
-		    				<li id="lasso-html--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>">
310
-		    				<li id="lasso-html--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>">
308
+		    				<?php if (!$toolbar_headings): ?>
309
+		    				<li id="lasso-html--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>">
310
+		    				<li id="lasso-html--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>">
311 311
 		    				<?php endif; ?>
312
-		    				<li id="lasso-html--ul" title="<?php esc_attr_e( 'Unordered List', 'lasso' );?>">
313
-		    				<li id="lasso-html--ol" title="<?php esc_attr_e( 'Ordered List', 'lasso' );?>">
312
+		    				<li id="lasso-html--ul" title="<?php esc_attr_e('Unordered List', 'lasso'); ?>">
313
+		    				<li id="lasso-html--ol" title="<?php esc_attr_e('Ordered List', 'lasso'); ?>">
314 314
 		    			</ul>
315
-		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e( 'Cancel', 'lasso' );?></a>
316
-		    			<a href="#" title="<?php esc_attr_e( 'Insert HTML or Code', 'lasso' );?>" class="lasso-toolbar--html__control" id="lasso-toolbar--html__insert" ><?php _e( 'Insert', 'lasso' );?></a>
315
+		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e('Cancel', 'lasso'); ?></a>
316
+		    			<a href="#" title="<?php esc_attr_e('Insert HTML or Code', 'lasso'); ?>" class="lasso-toolbar--html__control" id="lasso-toolbar--html__insert" ><?php _e('Insert', 'lasso'); ?></a>
317 317
 		    		</div>
318 318
 		    	</div>
319 319
 		    </li>
320
-			<?php if ( $show_align ): ?>
321
-		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e( 'Text Left Align', 'lasso' );?>"></li>
322
-		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e( 'Text Center Align', 'lasso' );?>"></li>
323
-			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e( 'Text Right Align', 'lasso' );?>"></li>
320
+			<?php if ($show_align): ?>
321
+		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e('Text Left Align', 'lasso'); ?>"></li>
322
+		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e('Text Center Align', 'lasso'); ?>"></li>
323
+			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e('Text Right Align', 'lasso'); ?>"></li>
324 324
 			<?php endif; ?>
325 325
 		</ul>
326
-		<?php if ( is_singular() && $is_mobile ) { ?>
326
+		<?php if (is_singular() && $is_mobile) { ?>
327 327
 
328
-				<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;">
328
+				<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;">
329 329
 
330
-					<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>
330
+					<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>
331 331
 
332
-					<?php if ( 'draft' == $status && ( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') )  ) { ?>
333
-						<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>
332
+					<?php if ('draft' == $status && (lasso_user_can('publish_posts') || lasso_user_can('publish_pages'))) { ?>
333
+						<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>
334 334
 					<?php } ?>
335 335
 
336 336
 				</div>
@@ -348,20 +348,20 @@  discard block
 block discarded – undo
348 348
  */
349 349
 function lasso_editor_settings_toolbar() {
350 350
 
351
-	$delete_nonce = wp_create_nonce( 'lasso-delete-nonce' );
351
+	$delete_nonce = wp_create_nonce('lasso-delete-nonce');
352 352
 
353 353
 	ob_start();
354 354
 
355 355
 
356 356
 	// let users add custom css classes
357
-	$custom_classes = apply_filters( 'lasso_component_classes', '' );
357
+	$custom_classes = apply_filters('lasso_component_classes', '');
358 358
 
359 359
 	?>
360
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
361
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
362
-		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
363
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
364
-		<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>
360
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
361
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
362
+		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
363
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
364
+		<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>
365 365
 	</ul>
366 366
 
367 367
 	<?php return ob_get_clean();
@@ -379,13 +379,13 @@  discard block
 block discarded – undo
379 379
 
380 380
 
381 381
 	// has post thumbnail
382
-	$has_thumbnail = has_post_thumbnail( get_the_ID() ) ? 'class="lasso--featImg--has-thumb"' : false;
382
+	$has_thumbnail = has_post_thumbnail(get_the_ID()) ? 'class="lasso--featImg--has-thumb"' : false;
383 383
 
384 384
 	?>
385
-	<ul id="lasso--featImgControls" <?php echo $has_thumbnail;?>>
386
-		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e( 'Replace Image', 'lasso' );?>" href="#"><i class="lasso-icon-image"></i></a></li>
387
-		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e( 'Delete Image', 'lasso' );?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
388
-		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e( 'save', 'lasso' );?></a></li>
385
+	<ul id="lasso--featImgControls" <?php echo $has_thumbnail; ?>>
386
+		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e('Replace Image', 'lasso'); ?>" href="#"><i class="lasso-icon-image"></i></a></li>
387
+		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e('Delete Image', 'lasso'); ?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
388
+		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e('save', 'lasso'); ?></a></li>
389 389
 	</ul>
390 390
 
391 391
 	<?php return ob_get_clean();
@@ -409,55 +409,55 @@  discard block
 block discarded – undo
409 409
 
410 410
 	$postid = get_the_ID();
411 411
 
412
-	$status = get_post_status( $postid );
413
-	$nonce = wp_create_nonce( 'lasso-update-post-settings' );
412
+	$status = get_post_status($postid);
413
+	$nonce = wp_create_nonce('lasso-update-post-settings');
414 414
 
415 415
 	// let users add custom css classes
416
-	$custom_classes = apply_filters( 'lasso_modal_settings_classes', '' );
416
+	$custom_classes = apply_filters('lasso_modal_settings_classes', '');
417 417
 
418 418
 	// objects categories
419
-	$categories 		= lasso_get_post_objects( $postid, 'category' );
420
-	$tags 				= lasso_get_post_objects( $postid, 'tag' );
419
+	$categories = lasso_get_post_objects($postid, 'category');
420
+	$tags = lasso_get_post_objects($postid, 'tag');
421 421
 
422 422
 	// modal tabs
423
-	$tabs  				= lasso_modal_addons('tab');
424
-	$content 			= lasso_modal_addons('content');
423
+	$tabs = lasso_modal_addons('tab');
424
+	$content = lasso_modal_addons('content');
425 425
 	
426 426
 	//editor options
427 427
 	$allow_change_date = lasso_editor_get_option('allow_change_date', 'lasso_editor');
428 428
 	$no_url_setting = lasso_editor_get_option('no_url_setting', 'lasso_editor');
429 429
 
430 430
 	// are we singular
431
-	$is_singular 		= is_singular();
431
+	$is_singular = is_singular();
432 432
 	$is_singular_class 	= $is_singular ? 'lasso--postsettings__2col' : 'lasso--postsettings__1col';
433 433
 	$has_thumb_class    = has_post_thumbnail() ? 'has-thumbnail' : 'no-thumbnail';
434 434
 	$theme_supports     = current_theme_supports('post-thumbnails');
435
-	$default_image 		= LASSO_URL.'/admin/assets/img/empty-img.png';
435
+	$default_image = LASSO_URL.'/admin/assets/img/empty-img.png';
436 436
 	
437 437
 	// do we support pending status
438 438
 	$no_pending_status = lasso_editor_get_option('no_pending_status', 'lasso_editor');
439 439
 
440 440
 ?>
441
-	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>">
441
+	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>">
442 442
 		<div class="lasso--modal__inner">
443 443
 
444
-			<?php if( $tabs ) { echo $tabs; } ?>
444
+			<?php if ($tabs) { echo $tabs; } ?>
445 445
 
446 446
 			<div class="lasso--modal__content modal__content--core visible" data-addon-content="core">
447
-				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class;?>" >
447
+				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class; ?>" >
448 448
 
449
-					<?php if ( $is_singular && $theme_supports ) : ?>
449
+					<?php if ($is_singular && $theme_supports) : ?>
450 450
 					<div class="lasso--postsettings__left">
451
-						<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>
452
-						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url( $default_image );?>">
451
+						<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>
452
+						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url($default_image); ?>">
453 453
 
454 454
 							<div id="lasso--post-thumb__controls" class="lasso--post-thumb__controls">
455
-								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image','lasso');?>" class="dashicons dashicons-edit"></i>
456
-								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image','lasso');?>" class="dashicons dashicons-no-alt"></i>
455
+								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image', 'lasso'); ?>" class="dashicons dashicons-edit"></i>
456
+								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image', 'lasso'); ?>" class="dashicons dashicons-no-alt"></i>
457 457
 								<i id="lasso--save-status" class="lasso-icon lasso-icon-spinner6 not-visible"></i>
458 458
 							</div>
459 459
 
460
-							<?php echo has_post_thumbnail() ? get_the_post_thumbnail( $post->ID, 'medium' ) : '<img src="'.$default_image.'">'; ?>
460
+							<?php echo has_post_thumbnail() ? get_the_post_thumbnail($post->ID, 'medium') : '<img src="'.$default_image.'">'; ?>
461 461
 
462 462
 						</div>
463 463
 						<div id="lasso--featImgSave"><a href="#" class="not-visible">Save</a></div>
@@ -467,15 +467,15 @@  discard block
 block discarded – undo
467 467
 
468 468
 					<div class="lasso--postsettings__right">
469 469
 
470
-						<?php if( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') ): ?>
470
+						<?php if (lasso_user_can('publish_posts') || lasso_user_can('publish_pages')): ?>
471 471
 						<div class="lasso--postsettings__option story-status-option">
472
-							<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>
473
-							<ul class="story-status story-status-<?php echo sanitize_html_class( $status );?>">
474
-								<li id="lasso--status-draft"><?php _e( 'Draft', 'lasso' );?></li>
475
-								<?php if( !$no_pending_status ): ?>								
476
-								<li id="lasso--status-pending"><?php _e( 'Pending', 'lasso' );?></li>
472
+							<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>
473
+							<ul class="story-status story-status-<?php echo sanitize_html_class($status); ?>">
474
+								<li id="lasso--status-draft"><?php _e('Draft', 'lasso'); ?></li>
475
+								<?php if (!$no_pending_status): ?>								
476
+								<li id="lasso--status-pending"><?php _e('Pending', 'lasso'); ?></li>
477 477
 								<?php endif; ?>
478
-								<li id="lasso--status-publish"><?php _e( 'Publish', 'lasso' );?></li>
478
+								<li id="lasso--status-publish"><?php _e('Publish', 'lasso'); ?></li>
479 479
 							</ul>
480 480
 							<div class="lasso--slider_wrap">
481 481
 								<div id="lasso--slider"></div>
@@ -483,10 +483,10 @@  discard block
 block discarded – undo
483 483
 						</div>
484 484
 						<?php endif; ?>
485 485
 
486
-						<?php if ( 'publish' == $status  && !$no_url_setting): ?>
486
+						<?php if ('publish' == $status && !$no_url_setting): ?>
487 487
 						<div class="lasso--postsettings__option story-slug-option">
488
-							<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>
489
-							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset( $post ) ? esc_attr( $post->post_name ) : false;?>">
488
+							<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>
489
+							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset($post) ? esc_attr($post->post_name) : false; ?>">
490 490
 						</div>
491 491
 						<?php endif; ?>
492 492
 
@@ -495,20 +495,20 @@  discard block
 block discarded – undo
495 495
 					<div class="lasso--postsettings__middle">
496 496
 
497 497
 						<div class="lasso--postsettings__option story-categories-option">
498
-							<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>
499
-							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories;?>">
498
+							<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>
499
+							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories; ?>">
500 500
 						</div>
501 501
 
502 502
 						<div class="lasso--postsettings__option story-tags-option">
503
-							<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>
504
-							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags;?>">
503
+							<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>
504
+							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags; ?>">
505 505
 						</div>
506 506
 						<?php 
507 507
 						if ($allow_change_date) { 
508
-						    $dateformat = get_option( 'date_format' ); 
508
+						    $dateformat = get_option('date_format'); 
509 509
 						?>
510
-						    <label><?php _e( 'Post Date', 'lasso' ); ?></label>
511
-							<input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid);?>"/>
510
+						    <label><?php _e('Post Date', 'lasso'); ?></label>
511
+							<input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid); ?>"/>
512 512
 						<?php
513 513
 						}?>
514 514
 
@@ -530,23 +530,23 @@  discard block
 block discarded – undo
530 530
 					?>
531 531
 					<!--/div-->
532 532
 
533
-					<?php do_action( 'lasso_modal_post_form' ); // action ?>
533
+					<?php do_action('lasso_modal_post_form'); // action ?>
534 534
 
535 535
 					<div class="lasso--postsettings__footer" >
536
-						<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
536
+						<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
537 537
 						<input type="hidden" name="status" value="">
538 538
 						<input type="hidden" name="categories" value="">
539
-						<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
539
+						<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
540 540
 						<input type="hidden" name="action" value="process_update-object_post">
541
-						<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
542
-						<?php do_action( 'lasso_modal_post_form_footer' ); // action ?>
543
-						<input type="submit" id="lasso--postsettings-submit" value="<?php esc_attr_e( 'Save', 'lasso' );?>">
541
+						<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
542
+						<?php do_action('lasso_modal_post_form_footer'); // action ?>
543
+						<input type="submit" id="lasso--postsettings-submit" value="<?php esc_attr_e('Save', 'lasso'); ?>">
544 544
 					</div>
545 545
 
546 546
 				</form>
547 547
 			</div>
548 548
 
549
-			<?php if( $tabs ) { echo $content; } ?>
549
+			<?php if ($tabs) { echo $content; } ?>
550 550
 
551 551
 		</div>
552 552
 
@@ -568,41 +568,41 @@  discard block
 block discarded – undo
568 568
 	ob_start();
569 569
 
570 570
 
571
-	$status = get_post_status( get_the_ID() );
571
+	$status = get_post_status(get_the_ID());
572 572
 
573
-	$nonce = wp_create_nonce( 'lasso-editor-new-post' );
573
+	$nonce = wp_create_nonce('lasso-editor-new-post');
574 574
 
575 575
 	// let users add custom css classes
576
-	$custom_classes = apply_filters( 'lasso_modal_post_classes', '' );
576
+	$custom_classes = apply_filters('lasso_modal_post_classes', '');
577 577
 
578 578
 	// return the post type
579
-	$type = get_post_type( get_the_ID() );
579
+	$type = get_post_type(get_the_ID());
580 580
 
581 581
 	$mobile_style = "";
582 582
 	if (wp_is_mobile()) {
583 583
 		$mobile_style = 'style="top:140px !important;"';
584 584
 	}
585 585
 	?>
586
-	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" <?php echo $mobile_style;?>">
586
+	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" <?php echo $mobile_style; ?>">
587 587
 		<div class="lasso--modal__inner lasso--hasnewform">
588 588
 
589 589
 			<form id="lasso--postnew__form" enctype="multipart/form-data" class="lasso--post-form">
590 590
 
591 591
 				<div class="lasso--postsettings__option story-slug-option lasso--last-option">
592
-					<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>
593
-					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e( 'Type Your Title Here', 'lasso' );?>">
592
+					<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>
593
+					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e('Type Your Title Here', 'lasso'); ?>">
594 594
 						<div class="lasso--select-wrap" style="width:90px">
595 595
 						<select id="lasso--select-type" name="story_type">
596 596
 
597 597
 							<?php
598 598
 								$types = lasso_post_types_names();
599
-								if ( !empty( $types ) ) {
600
-									foreach( $types as $name => $label ) {										
601
-										$type = preg_replace( '/s\b/','', $name );
599
+								if (!empty($types)) {
600
+									foreach ($types as $name => $label) {										
601
+										$type = preg_replace('/s\b/', '', $name);
602 602
 										if ($type == 'page' && !current_user_can('edit_pages')) {
603 603
 											continue;
604 604
 										}
605
-										printf( '<option value="%s">%s</option>', lcfirst( esc_attr( $type ) ) , ucfirst( esc_attr( $label ) ) );
605
+										printf('<option value="%s">%s</option>', lcfirst(esc_attr($type)), ucfirst(esc_attr($label)));
606 606
 									}
607 607
 
608 608
 								}
@@ -613,19 +613,19 @@  discard block
 block discarded – undo
613 613
 				</div>
614 614
 
615 615
 				<div class="lasso--postsettings__footer">
616
-					<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
616
+					<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
617 617
 					<input type="hidden" name="action" value="process_new-object_post">
618 618
 					<?php
619
-						if ( !empty( $types ) ) {
619
+						if (!empty($types)) {
620 620
 							// get the first element
621 621
 							$keys = array_keys($types);
622
-						    $type =$keys[0];						
623
-							$type = preg_replace( '/s\b/','', $type );
624
-							printf( '<input type="hidden" name="object" value="%s">', lcfirst( esc_attr( $type ) ) );		
622
+						    $type = $keys[0];						
623
+							$type = preg_replace('/s\b/', '', $type);
624
+							printf('<input type="hidden" name="object" value="%s">', lcfirst(esc_attr($type)));		
625 625
 						}
626 626
 					?>
627
-					<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
628
-					<input type="submit" value="<?php esc_attr_e( 'Create', 'lasso' );?>">
627
+					<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
628
+					<input type="submit" value="<?php esc_attr_e('Create', 'lasso'); ?>">
629 629
 				</div>
630 630
 
631 631
 			</form>
@@ -653,18 +653,18 @@  discard block
 block discarded – undo
653 653
 	ob_start();
654 654
 
655 655
 	// post status
656
-	$status = get_post_status( get_the_ID() );
656
+	$status = get_post_status(get_the_ID());
657 657
 
658 658
 	// let users add custom css classes
659
-	$custom_classes = apply_filters( 'lasso_modal_all_post_classes', '' );
659
+	$custom_classes = apply_filters('lasso_modal_all_post_classes', '');
660 660
 
661 661
 	?>
662
-	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" style="max-height:100%">
662
+	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" style="max-height:100%">
663 663
 		<div class="lasso--modal__inner">
664 664
 
665 665
 			<div class="lasso--post-filtering not-visible">
666 666
 				<div class="lasso--search__results">
667
-					<span id="lasso--results-found"></span><?php _e('results found','lasso');?>
667
+					<span id="lasso--results-found"></span><?php _e('results found', 'lasso'); ?>
668 668
 				</div>
669 669
 				<div class="lasso--search">
670 670
 					<i id="lasso--search__toggle" class="dashicons dashicons-search"></i>
@@ -678,18 +678,18 @@  discard block
 block discarded – undo
678 678
 				$post_types = lasso_post_types_names();
679 679
 				$rest_bases = lasso_post_types_rest_base();
680 680
 
681
-				if ( ! empty( $post_types ) ) {
681
+				if (!empty($post_types)) {
682 682
 					$first = 'active';
683
-					foreach( $post_types as $name => $label ) {
683
+					foreach ($post_types as $name => $label) {
684 684
 						if (array_key_exists($name, $rest_bases)) {
685
-							printf( '<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr( $first), esc_attr( $rest_bases[$name] ), esc_attr( $label ) );
685
+							printf('<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr($first), esc_attr($rest_bases[$name]), esc_attr($label));
686 686
 						}
687 687
 						$first = '';
688 688
 					}
689 689
 
690 690
 				}
691 691
 
692
-				do_action('lasso_modal_post_objects');?>
692
+				do_action('lasso_modal_post_objects'); ?>
693 693
 
694 694
 			</ul>
695 695
 			<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
@@ -709,14 +709,14 @@  discard block
 block discarded – undo
709 709
 
710 710
 
711 711
 	// let users add custom css classes
712
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
712
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
713 713
 
714 714
 	?>
715
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
716
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
717
-		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
718
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
719
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
715
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
716
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
717
+		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
718
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
719
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
720 720
 	</ul>
721 721
 
722 722
 	<?php return ob_get_clean();
@@ -728,14 +728,14 @@  discard block
 block discarded – undo
728 728
 
729 729
 
730 730
 	// let users add custom css classes
731
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
731
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
732 732
 
733 733
 	?>
734
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
735
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
736
-		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
737
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
738
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
734
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
735
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
736
+		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
737
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
738
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
739 739
 	</ul>
740 740
 
741 741
 	<?php return ob_get_clean();
@@ -748,16 +748,16 @@  discard block
 block discarded – undo
748 748
  */
749 749
 function lasso_map_form_footer() {
750 750
 
751
-	$nonce = wp_create_nonce( 'lasso-process-map' );
751
+	$nonce = wp_create_nonce('lasso-process-map');
752 752
 
753 753
 	ob_start();
754 754
 
755 755
 	?>
756 756
 	<div class="lasso--map-form__footer">
757
-		<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
758
-		<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
757
+		<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
758
+		<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
759 759
 		<input type="hidden" name="action" value="process_map_save">
760
-		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e( 'Save Locations', 'lasso' );?>">
760
+		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e('Save Locations', 'lasso'); ?>">
761 761
 	</div>
762 762
 
763 763
 	<?php return ob_get_clean();
@@ -775,7 +775,7 @@  discard block
 block discarded – undo
775 775
 
776 776
 	?>
777 777
 	<div id="lasso--pagerefresh" class="visible">
778
-		<?php _e( 'Save this post and refesh the page to see these changes.', 'lasso' );?>
778
+		<?php _e('Save this post and refesh the page to see these changes.', 'lasso'); ?>
779 779
 	</div>
780 780
 
781 781
 	<?php return ob_get_clean();
@@ -789,43 +789,43 @@  discard block
 block discarded – undo
789 789
  */
790 790
 function lasso_editor_options_blob() {
791 791
 
792
-	$codes   = function_exists( 'aesop_shortcodes' ) ? aesop_shortcodes() : apply_filters( 'lasso_custom_options', '' );
793
-	$galleries  = function_exists( 'lasso_editor_galleries_exist' ) && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
792
+	$codes = function_exists('aesop_shortcodes') ? aesop_shortcodes() : apply_filters('lasso_custom_options', '');
793
+	$galleries = function_exists('lasso_editor_galleries_exist') && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
794 794
 
795
-	$nonce = wp_create_nonce( 'lasso_gallery' );
795
+	$nonce = wp_create_nonce('lasso_gallery');
796 796
 
797 797
 	$blob = array();
798 798
 
799
-	if ( empty( $codes ) )
799
+	if (empty($codes))
800 800
 		return;
801 801
 
802
-	foreach ( $codes as $slug => $shortcode ) {
802
+	foreach ($codes as $slug => $shortcode) {
803 803
 		$return = '';
804 804
 		// Shortcode has atts
805 805
 
806
-		if ( count( $shortcode['atts'] ) && $shortcode['atts'] ) {
806
+		if (count($shortcode['atts']) && $shortcode['atts']) {
807 807
 
808
-			foreach ( $shortcode['atts'] as $attr_name => $attr_info ) {
808
+			foreach ($shortcode['atts'] as $attr_name => $attr_info) {
809 809
 
810 810
 
811
-				$prefix = isset( $attr_info['prefix'] ) ? sprintf( '<span class="lasso-option-prefix">%s</span>', $attr_info['prefix'] ) : null;
811
+				$prefix = isset($attr_info['prefix']) ? sprintf('<span class="lasso-option-prefix">%s</span>', $attr_info['prefix']) : null;
812 812
 
813 813
 				$return .= '<form id="lasso--component-settings-form" class="'.$galleries.'" method="post">';
814 814
 				$return .= '<p data-option="'.$attr_name.'" class="lasso-option aesop-'.$slug.'-'.$attr_name.'">';
815
-				$return .= '<label for="aesop-generator-attr-' . $attr_name . '">' . $attr_info['desc'] . '</label>';
815
+				$return .= '<label for="aesop-generator-attr-'.$attr_name.'">'.$attr_info['desc'].'</label>';
816 816
 				$return .= '<small class="lasso-option-desc">'.$attr_info['tip'].'</small>';
817 817
 				// Select
818 818
 
819
-				if ( isset( $attr_info['values'] ) ) {
819
+				if (isset($attr_info['values'])) {
820 820
 
821
-					$return .= '<select name="' . $attr_name . '" id="aesop-generator-attr-' . $attr_name . '" class="lasso-generator-attr">';
821
+					$return .= '<select name="'.$attr_name.'" id="aesop-generator-attr-'.$attr_name.'" class="lasso-generator-attr">';
822 822
 
823
-					$i=0;
823
+					$i = 0;
824 824
 
825
-					foreach ( $attr_info['values'] as $attr_value ) {
825
+					foreach ($attr_info['values'] as $attr_value) {
826 826
 						$attr_value_selected = $attr_info['default'] == $attr_value ? ' selected="selected"' : '';
827 827
 
828
-						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" ' . $attr_value_selected . '>'.$attr_info['values'][$i]['name'].'</option>';
828
+						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" '.$attr_value_selected.'>'.$attr_info['values'][$i]['name'].'</option>';
829 829
 
830 830
 						$i++;
831 831
 					}
@@ -834,24 +834,24 @@  discard block
 block discarded – undo
834 834
 
835 835
 				} else {
836 836
 
837
-					$attr_field_type = isset( $attr_info['type'] ) ? $attr_info['type'] : 'text';
837
+					$attr_field_type = isset($attr_info['type']) ? $attr_info['type'] : 'text';
838 838
 
839 839
 					// image upload
840
-					if ( 'media_upload' == $attr_info['type'] ) {
840
+					if ('media_upload' == $attr_info['type']) {
841 841
 
842
-						$return .= '<input type="' . $attr_field_type . '" name="' . $attr_name . '" value="'.$attr_info['default'].'" id="aesop-generator-attr-' . $attr_name . '" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" />';
842
+						$return .= '<input type="'.$attr_field_type.'" name="'.$attr_name.'" value="'.$attr_info['default'].'" id="aesop-generator-attr-'.$attr_name.'" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" />';
843 843
 						$return .= '<a href="#" id="lasso-upload-img" class="lasso-option-button" /></a>';
844 844
 
845
-					} elseif ( 'color' == $attr_info['type'] ) {
845
+					} elseif ('color' == $attr_info['type']) {
846 846
 
847
-						$return .= '<input type="color" name="' . $attr_name . '" value="'.$attr_info['default'].'" id="aesop-generator-attr-' . $attr_name . '" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" />';
847
+						$return .= '<input type="color" name="'.$attr_name.'" value="'.$attr_info['default'].'" id="aesop-generator-attr-'.$attr_name.'" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" />';
848 848
 
849
-					} elseif ( 'text_area' == $attr_info['type'] ) {
849
+					} elseif ('text_area' == $attr_info['type']) {
850 850
 
851
-						$return .= '<textarea name="' . $attr_name . '" id="aesop-generator-attr-' . $attr_name . '" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" placeholder="'.$attr_info['default'].'" /></textarea>'.$prefix.'';
851
+						$return .= '<textarea name="'.$attr_name.'" id="aesop-generator-attr-'.$attr_name.'" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" placeholder="'.$attr_info['default'].'" /></textarea>'.$prefix.'';
852 852
 
853 853
 					} else {
854
-						$return .= '<input type="' . $attr_field_type . '" name="' . $attr_name . '" value="'.$attr_info['default'].'" id="aesop-generator-attr-' . $attr_name . '" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" />'.$prefix.'';
854
+						$return .= '<input type="'.$attr_field_type.'" name="'.$attr_name.'" value="'.$attr_info['default'].'" id="aesop-generator-attr-'.$attr_name.'" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" />'.$prefix.'';
855 855
 					}
856 856
 				}
857 857
 				$return .= '</p>';
@@ -862,9 +862,9 @@  discard block
 block discarded – undo
862 862
 		///////////////////////////
863 863
 		// START GALLERY AND MAP FRONT END STUFFS
864 864
 		///////////////////////////
865
-		if ( isset( $shortcode['front'] ) && true == $shortcode['front'] ) {
865
+		if (isset($shortcode['front']) && true == $shortcode['front']) {
866 866
 
867
-			if ( 'gallery' == $shortcode['front_type'] ) {
867
+			if ('gallery' == $shortcode['front_type']) {
868 868
 
869 869
 				$return .= lasso_gallery_editor_module();
870 870
 
@@ -875,13 +875,13 @@  discard block
 block discarded – undo
875 875
 		///////////////////////////
876 876
 
877 877
 		// Single shortcode (not closed)
878
-		if ( 'single' == $shortcode['type'] ) {
878
+		if ('single' == $shortcode['type']) {
879 879
 
880 880
 			$return .= '<input type="hidden" name="lasso-generator-content" id="lasso-generator-content" value="false" />';
881 881
 
882 882
 		} else {
883 883
 
884
-			$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>';
884
+			$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>';
885 885
 		}
886 886
 
887 887
 		$return .= '<p class="lasso-buttoninsert-wrap"><a href="#" class="lasso-generator-cancel" id="lasso--sidebar__close">Cancel</a><input type="submit" id="lasso-generator-insert" value="Save Settings"></p>';
@@ -917,14 +917,14 @@  discard block
 block discarded – undo
917 917
 				<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
918 918
 				<div id="lasso--hide" style="display:none;" class="lasso--post-form">
919 919
 					<i class="lasso-icon lasso-icon-move"></i>
920
-					<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>
920
+					<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>
921 921
 					<div class="lasso--slider_wrap">
922 922
 						<div id="lasso--slider"></div>
923 923
 					</div>
924 924
 					<ul id="lasso--revision-list"></ul>
925 925
 					<div class="lasso--btn-group lasso--btn-group-small">
926
-						<a href="#" class="lasso--btn-secondary" id="lasso--close-modal"><?php _e( 'Cancel', 'lasso' );?></a>
927
-						<a href="#" class="lasso--btn-primary" id="lasso--select-revision"><?php _e( 'Select', 'lasso' );?></a>
926
+						<a href="#" class="lasso--btn-secondary" id="lasso--close-modal"><?php _e('Cancel', 'lasso'); ?></a>
927
+						<a href="#" class="lasso--btn-primary" id="lasso--select-revision"><?php _e('Select', 'lasso'); ?></a>
928 928
 					</div>
929 929
 				</div>
930 930
 
@@ -947,7 +947,7 @@  discard block
 block discarded – undo
947 947
     // Normalize into a six character long hex string
948 948
     $hex = str_replace('#', '', $hex);
949 949
     if (strlen($hex) == 3) {
950
-        $hex = str_repeat(substr($hex,0,1), 2).str_repeat(substr($hex,1,1), 2).str_repeat(substr($hex,2,1), 2);
950
+        $hex = str_repeat(substr($hex, 0, 1), 2).str_repeat(substr($hex, 1, 1), 2).str_repeat(substr($hex, 2, 1), 2);
951 951
     }
952 952
 
953 953
     // Split into three parts: R, G and B
@@ -956,7 +956,7 @@  discard block
 block discarded – undo
956 956
 
957 957
     foreach ($color_parts as $color) {
958 958
         $color   = hexdec($color); // Convert to decimal
959
-        $color   = max(0,min(255,$color + $steps)); // Adjust color
959
+        $color   = max(0, min(255, $color + $steps)); // Adjust color
960 960
         $return .= str_pad(dechex($color), 2, '0', STR_PAD_LEFT); // Make two char hex code
961 961
     }
962 962
 
Please login to merge, or discard this patch.
public/includes/assets.php 1 patch
Spacing   +92 added lines, -92 removed lines patch added patch discarded remove patch
@@ -10,24 +10,24 @@  discard block
 block discarded – undo
10 10
 
11 11
 class assets {
12 12
 
13
-	public function __construct(){
13
+	public function __construct() {
14 14
 
15
-		add_action('wp_enqueue_scripts', array($this,'scripts'));
15
+		add_action('wp_enqueue_scripts', array($this, 'scripts'));
16 16
 	}
17 17
 
18
-	public function scripts(){
18
+	public function scripts() {
19 19
 
20 20
 	
21 21
 		global $post;
22
-		if ( lasso_user_can('edit_posts') && 
23
-		     !( function_exists( 'is_gutenberg_page' ) && has_blocks( $post->post_content) )) {// bail if the post has Gutenberg bloc
22
+		if (lasso_user_can('edit_posts') && 
23
+		     !(function_exists('is_gutenberg_page') && has_blocks($post->post_content))) {// bail if the post has Gutenberg bloc
24 24
 			
25 25
 			/**    Returns the time offset from UTC
26 26
 			*/
27 27
 			function get_UTC_offset() {
28
-				$timezone_string = get_option( 'timezone_string' );
29
-				if (empty( $timezone_string ) ) {
30
-					return get_option('gmt_offset')*3600;
28
+				$timezone_string = get_option('timezone_string');
29
+				if (empty($timezone_string)) {
30
+					return get_option('gmt_offset') * 3600;
31 31
 				}
32 32
 				
33 33
 				$origin_dtz = new \DateTimeZone($timezone_string);				
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
 			wp_enqueue_style('lasso-style', LASSO_URL.'/public/assets/css/lasso.css', LASSO_VERSION, true);
40 40
 
41 41
             //don't load autocomplete if it's a stockholm theme
42
-			$themename  	= wp_get_theme()->get('Name');
43
-			if ($themename !='Stockholm' ) {
42
+			$themename = wp_get_theme()->get('Name');
43
+			if ($themename != 'Stockholm') {
44 44
 				wp_enqueue_script('jquery-ui-autocomplete');
45 45
 			}
46 46
 			wp_enqueue_script('jquery-ui-draggable');
@@ -53,28 +53,28 @@  discard block
 block discarded – undo
53 53
 			// url for json api
54 54
 			$home_url = function_exists('json_get_url_prefix') ? json_get_url_prefix() : false;
55 55
 
56
-			$article_object 	= lasso_editor_get_option('article_class','lasso_editor');
56
+			$article_object 	= lasso_editor_get_option('article_class', 'lasso_editor');
57 57
 
58
-			$article_object 	= empty( $article_object ) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object;
58
+			$article_object 	= empty($article_object) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object;
59 59
 
60
-			$featImgClass 		= lasso_editor_get_option('featimg_class','lasso_editor');
61
-			if (empty( $featImgClass )) {
60
+			$featImgClass = lasso_editor_get_option('featimg_class', 'lasso_editor');
61
+			if (empty($featImgClass)) {
62 62
 				$featImgClass = lasso_get_supported_theme_featured_image_class();
63 63
 			}
64
-			$titleClass 		= lasso_editor_get_option('title_class','lasso_editor');
65
-			if (empty( $titleClass )) {
64
+			$titleClass = lasso_editor_get_option('title_class', 'lasso_editor');
65
+			if (empty($titleClass)) {
66 66
 				$titleClass = lasso_get_supported_theme_title_class();
67 67
 			}
68
-			$toolbar_headings  	= lasso_editor_get_option('toolbar_headings', 'lasso_editor');
69
-			$toolbar_headings_h4  	= lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
68
+			$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
69
+			$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
70 70
 			$objectsNoSave  	= lasso_editor_get_option('dont_save', 'lasso_editor');
71
-			$objectsNonEditable  	= lasso_editor_get_option('non_editable', 'lasso_editor');
71
+			$objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor');
72 72
 			$disableRESTSave = lasso_editor_get_option('save_using_rest_disabled', 'lasso_editor');
73
-			$save_to_post_disabled  = lasso_editor_get_option( 'post_save_disabled', 'lasso_editor' );
74
-			$edit_post_disabled  = lasso_editor_get_option( 'post_edit_disabled', 'lasso_editor' );
73
+			$save_to_post_disabled = lasso_editor_get_option('post_save_disabled', 'lasso_editor');
74
+			$edit_post_disabled = lasso_editor_get_option('post_edit_disabled', 'lasso_editor');
75 75
 			
76
-			$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor','b');
77
-			$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor','i');
76
+			$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor', 'b');
77
+			$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor', 'i');
78 78
 
79 79
 			
80 80
 			//text alignement
@@ -91,8 +91,8 @@  discard block
 block discarded – undo
91 91
 			
92 92
 			if ($show_color) {
93 93
 				//color picker
94
-				wp_enqueue_style( 'wp-color-picker' );
95
-				wp_enqueue_script( 'iris', admin_url( 'js/iris.min.js' ), array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), false, 1 );
94
+				wp_enqueue_style('wp-color-picker');
95
+				wp_enqueue_script('iris', admin_url('js/iris.min.js'), array('jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch'), false, 1);
96 96
 			}
97 97
 			
98 98
 			// click to insert components, not drag and drop
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 			
105 105
 			// custom fields
106 106
 			
107
-			$custom_fields = apply_filters( 'editus_custom_fields', null ); //array('testFieldName' => '#field1');
107
+			$custom_fields = apply_filters('editus_custom_fields', null); //array('testFieldName' => '#field1');
108 108
 
109 109
 
110 110
 
@@ -112,57 +112,57 @@  discard block
 block discarded – undo
112 112
 			$postid 			= get_the_ID();
113 113
 			$tz_offset = get_UTC_offset();
114 114
 			$post_date = get_the_time('U', $postid);
115
-			$time = (time()+$tz_offset);
115
+			$time = (time() + $tz_offset);
116 116
             $delta = $time - $post_date;
117 117
 
118 118
 			$strings = array(
119
-				'save' 				=> __('Save','lasso'),
120
-				'selectText'	  	=> __('Please Select Text First.','lasso'),
121
-				'cancel' 			=> __('Cancel','lasso'),
122
-				'exiteditor' 		=> __('Exit Editor','lasso'),
123
-				'saving' 			=> __('Saving...','lasso'),
124
-				'saved'				=> __('Saved!','lasso'),
125
-				'adding' 			=> __('Adding...','lasso'),
126
-				'added'				=> __('Added!','lasso'),
127
-				'loading' 			=> __('Loading...','lasso'),
128
-				'loadMore'			=> __('Load More','lasso'),
129
-				'close'			=> __('Close','lasso'),
130
-				'noPostsFound'		=> __('No more posts found','lasso'),
131
-				'fetchFail'	    	=> __('Fetching failed.','lasso'),
132
-				'galleryCreated' 	=> __('Gallery Created!','lasso'),
133
-				'galleryUpdated' 	=> __('Gallery Updated!','lasso'),
134
-				'justWrite'			=> __('Just write...','lasso'),
135
-				'chooseImage'		=> __('Choose an image','lasso'),
136
-				'updateImage'		=> __('Update Image','lasso'),
137
-				'insertImage'		=> __('Insert Image','lasso'),
138
-				'selectImage'		=> __('Select Image','lasso'),
139
-				'removeFeatImg'     => __('Remove featured image?','lasso'),
140
-				'updateSelectedImg' => __('Update Selected Image','lasso'),
141
-				'chooseImages'		=> __('Choose images','lasso'),
142
-				'editImage'			=> __('Edit Image','lasso'),
143
-				'addImages'			=> __('Add Images','lasso'),
144
-				'addNewGallery'		=> __('Add New Gallery','lasso'),
145
-				'selectGallery'		=> __('Select Editus Gallery Image','lasso'),
146
-				'useSelectedImages' => __('Use Selected Images','lasso'),
147
-				'publishPost'		=> __('Publish Post?','lasso'),
148
-				'publishYes'		=> __('Yes, publish it!','lasso'),
149
-				'deletePost'		=> __('Trash Post?','lasso'),
150
-				'deleteYes'			=> __('Yes, trash it!','lasso'),
151
-				'warning'			=> __('Oh snap!','laso'),
152
-				'cancelText'		=> __('O.K. got it!','lasso'),
153
-				'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'),
119
+				'save' 				=> __('Save', 'lasso'),
120
+				'selectText'	  	=> __('Please Select Text First.', 'lasso'),
121
+				'cancel' 			=> __('Cancel', 'lasso'),
122
+				'exiteditor' 		=> __('Exit Editor', 'lasso'),
123
+				'saving' 			=> __('Saving...', 'lasso'),
124
+				'saved'				=> __('Saved!', 'lasso'),
125
+				'adding' 			=> __('Adding...', 'lasso'),
126
+				'added'				=> __('Added!', 'lasso'),
127
+				'loading' 			=> __('Loading...', 'lasso'),
128
+				'loadMore'			=> __('Load More', 'lasso'),
129
+				'close'			=> __('Close', 'lasso'),
130
+				'noPostsFound'		=> __('No more posts found', 'lasso'),
131
+				'fetchFail'	    	=> __('Fetching failed.', 'lasso'),
132
+				'galleryCreated' 	=> __('Gallery Created!', 'lasso'),
133
+				'galleryUpdated' 	=> __('Gallery Updated!', 'lasso'),
134
+				'justWrite'			=> __('Just write...', 'lasso'),
135
+				'chooseImage'		=> __('Choose an image', 'lasso'),
136
+				'updateImage'		=> __('Update Image', 'lasso'),
137
+				'insertImage'		=> __('Insert Image', 'lasso'),
138
+				'selectImage'		=> __('Select Image', 'lasso'),
139
+				'removeFeatImg'     => __('Remove featured image?', 'lasso'),
140
+				'updateSelectedImg' => __('Update Selected Image', 'lasso'),
141
+				'chooseImages'		=> __('Choose images', 'lasso'),
142
+				'editImage'			=> __('Edit Image', 'lasso'),
143
+				'addImages'			=> __('Add Images', 'lasso'),
144
+				'addNewGallery'		=> __('Add New Gallery', 'lasso'),
145
+				'selectGallery'		=> __('Select Editus Gallery Image', 'lasso'),
146
+				'useSelectedImages' => __('Use Selected Images', 'lasso'),
147
+				'publishPost'		=> __('Publish Post?', 'lasso'),
148
+				'publishYes'		=> __('Yes, publish it!', 'lasso'),
149
+				'deletePost'		=> __('Trash Post?', 'lasso'),
150
+				'deleteYes'			=> __('Yes, trash it!', 'lasso'),
151
+				'warning'			=> __('Oh snap!', 'laso'),
152
+				'cancelText'		=> __('O.K. got it!', 'lasso'),
153
+				'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'),
154 154
 				'missingConfirm'	=> __('Update Settings', 'lasso'),
155
-				'helperText'		=> __('one more letter','lasso'),
155
+				'helperText'		=> __('one more letter', 'lasso'),
156 156
 				'editingBackup'  	=> __('You are currently editing a backup copy of this post.'),
157 157
 				
158 158
 				
159 159
 			);
160 160
 
161
-			$api_url = trailingslashit( home_url() ) . 'lasso-internal-api';
161
+			$api_url = trailingslashit(home_url()).'lasso-internal-api';
162 162
 
163 163
 			$gallery_class = new gallery();
164 164
 			$gallery_nonce_action = $gallery_class->nonce_action;
165
-			$gallery_nonce = wp_create_nonce( $gallery_nonce_action );
165
+			$gallery_nonce = wp_create_nonce($gallery_nonce_action);
166 166
 			
167 167
 			
168 168
             if ($allow_change_date) {
@@ -177,13 +177,13 @@  discard block
 block discarded – undo
177 177
 			  
178 178
 			if (function_exists('rest_url')) {
179 179
 				//$rest_root = esc_url_raw( rest_url());
180
-				$rest_nonce = wp_create_nonce( 'wp_rest' );
181
-				$settings = array( 'root' => $rest_root, 'nonce' => $rest_nonce );
182
-				wp_enqueue_script( 'wp-api', '', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
183
-				wp_localize_script( 'wp-api', 'wpApiSettings', $settings );
184
-				wp_localize_script( 'wp-api', 'WP_API_Settings', $settings );
180
+				$rest_nonce = wp_create_nonce('wp_rest');
181
+				$settings = array('root' => $rest_root, 'nonce' => $rest_nonce);
182
+				wp_enqueue_script('wp-api', '', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true);
183
+				wp_localize_script('wp-api', 'wpApiSettings', $settings);
184
+				wp_localize_script('wp-api', 'WP_API_Settings', $settings);
185 185
 				
186
-				if ( class_exists( 'WP_REST_Controller' )) {
186
+				if (class_exists('WP_REST_Controller')) {
187 187
 					// we are using REST API V2
188 188
 					$using_restapiv2 = true;
189 189
 				}
@@ -191,8 +191,8 @@  discard block
 block discarded – undo
191 191
 
192 192
 			// localized objects
193 193
 			$objects = array(
194
-				'ajaxurl' 			=> esc_url( $api_url ),
195
-				'ajaxurl2' 			=> esc_url( admin_url( 'admin-ajax.php' )),
194
+				'ajaxurl' 			=> esc_url($api_url),
195
+				'ajaxurl2' 			=> esc_url(admin_url('admin-ajax.php')),
196 196
 				'siteUrl'           => site_url(),
197 197
 				'rest_root'         => $rest_root,
198 198
 				'rest_nonce'        => $rest_nonce,
@@ -201,13 +201,13 @@  discard block
 block discarded – undo
201 201
 				'featImgClass'		=> $featImgClass,
202 202
 				'titleClass'		=> $titleClass,
203 203
 				'strings'			=> $strings,
204
-				'settingsLink'		=> function_exists('is_multisite') && is_multisite() ? network_admin_url( 'settings.php?page=lasso-editor' ) : admin_url( 'admin.php?page=lasso-editor-settings' ),
205
-				'post_status'		=> get_post_status( $postid ),
204
+				'settingsLink'		=> function_exists('is_multisite') && is_multisite() ? network_admin_url('settings.php?page=lasso-editor') : admin_url('admin.php?page=lasso-editor-settings'),
205
+				'post_status'		=> get_post_status($postid),
206 206
 				'postid'			=> $postid,
207 207
 				'permalink'			=> $permalink,
208 208
 				'edit_others_pages'	=> current_user_can('edit_others_pages') ? true : false,
209 209
 				'edit_others_posts'	=> current_user_can('edit_others_posts') ? true : false,
210
-				'userCanEdit'		=> current_user_can('edit_post', $postid ),
210
+				'userCanEdit'		=> current_user_can('edit_post', $postid),
211 211
 				'can_publish'		=> is_page() ? current_user_can('publish_pages') : current_user_can('publish_posts'),
212 212
 				//'can_publish_posts'	=> current_user_can('publish_posts'),
213 213
 				//'can_publish_pages'	=> current_user_can('publish_pages'),
@@ -243,28 +243,28 @@  discard block
 block discarded – undo
243 243
 				'postTags'    		=> lasso_get_objects('tag'),
244 244
 				'noResultsDiv'		=> lasso_editor_empty_results(),
245 245
 				'noRevisionsDiv'	=> lasso_editor_empty_results('revision'),
246
-				'mapTileProvider'   => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider( $postid ) : false,
247
-				'mapLocations'		=> get_post_meta( $postid, 'ase_map_component_locations' ),
248
-				'mapStart'			=> get_post_meta( $postid, 'ase_map_component_start_point', true ),
249
-				'mapZoom'			=> get_post_meta( $postid, 'ase_map_component_zoom', true ),
246
+				'mapTileProvider'   => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider($postid) : false,
247
+				'mapLocations'		=> get_post_meta($postid, 'ase_map_component_locations'),
248
+				'mapStart'			=> get_post_meta($postid, 'ase_map_component_start_point', true),
249
+				'mapZoom'			=> get_post_meta($postid, 'ase_map_component_zoom', true),
250 250
 				'revisionModal' 	=> lasso_editor_revision_modal(),
251 251
 				'isMobile'          => wp_is_mobile(),
252
-				'enableAutoSave'    => lasso_editor_get_option( 'enable_autosave', 'lasso_editor' ),
252
+				'enableAutoSave'    => lasso_editor_get_option('enable_autosave', 'lasso_editor'),
253 253
 				'showColor'         => $show_color,
254 254
 				'showAlignment'     => $show_align,
255 255
 				'showIgnoredItems'  => lasso_editor_get_option('show_ignored_items', 'lasso_editor'),
256 256
 				'restapi2'          => $using_restapiv2,
257 257
 				'saveusingrest'     => $using_restapiv2 && !$disableRESTSave,
258
-				'newObjectContent'  => '<p>'.apply_filters( 'lasso_new_object_content', __( 'Once upon a time...','lasso') ).'</p>',
258
+				'newObjectContent'  => '<p>'.apply_filters('lasso_new_object_content', __('Once upon a time...', 'lasso')).'</p>',
259 259
 				'disableSavePost'   => $save_to_post_disabled,
260 260
 				'disableEditPost'   => $edit_post_disabled,
261 261
 				'boldTag'           => $bold_tag,
262 262
 				'iTag'           	=> $i_tag,
263 263
 				'customFields'      => $custom_fields,
264
-				'clickToInsert'     => ($insert_comp_ui =='click'),
265
-				'buttonOnEmptyP'     => ($insert_comp_ui =='mediumcom'),      // auto show a button to insert components on an empty paragraph      
264
+				'clickToInsert'     => ($insert_comp_ui == 'click'),
265
+				'buttonOnEmptyP'     => ($insert_comp_ui == 'mediumcom'), // auto show a button to insert components on an empty paragraph      
266 266
                 'rtl'               => is_rtl(),				
267
-				'skipToEdit'        =>( $delta < 10 && $delta >=0 ), // if it's a new post, skip to edit mode
267
+				'skipToEdit'        =>($delta < 10 && $delta >= 0), // if it's a new post, skip to edit mode
268 268
 				'linksEditable'    => $links_editable,
269 269
 				'supportPendingStatus' => !$no_pending_status
270 270
 			);
@@ -275,9 +275,9 @@  discard block
 block discarded – undo
275 275
 			
276 276
 			if (!$using_restapiv2) {
277 277
                // enqueue REST API V1
278
-			   wp_enqueue_script( 'wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
279
-			   $settings = array( 'root' => home_url( $home_url ), 'nonce' => wp_create_nonce( 'wp_json' ) );
280
-			   wp_localize_script( 'wp-api-js', 'WP_API_Settings', $settings );
278
+			   wp_enqueue_script('wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true);
279
+			   $settings = array('root' => home_url($home_url), 'nonce' => wp_create_nonce('wp_json'));
280
+			   wp_localize_script('wp-api-js', 'WP_API_Settings', $settings);
281 281
 			}
282 282
 			
283 283
 			if ($allow_change_date) {
@@ -286,13 +286,13 @@  discard block
 block discarded – undo
286 286
 				wp_enqueue_style('jquery-ui');
287 287
 			}
288 288
 
289
-			$postfix = ( defined( 'SCRIPT_DEBUG' ) && true === SCRIPT_DEBUG ) ? '' : '.min';
289
+			$postfix = (defined('SCRIPT_DEBUG') && true === SCRIPT_DEBUG) ? '' : '.min';
290 290
 			if ($show_color) {
291
-				wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api','iris'), LASSO_VERSION, true);
291
+				wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api', 'iris'), LASSO_VERSION, true);
292 292
 			} else {
293
-			    wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
293
+			    wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
294 294
 			}
295
-			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects ) );
295
+			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects));
296 296
 
297 297
 
298 298
 		}
Please login to merge, or discard this patch.