Completed
Push — master ( 99c38a...8d9355 )
by
unknown
01:40
created
admin/includes/menus/welcome.php 1 patch
Spacing   +79 added lines, -79 removed lines patch added patch discarded remove patch
@@ -10,30 +10,30 @@  discard block
 block discarded – undo
10 10
 
11 11
 	function __construct() {
12 12
 
13
-		add_action( 'admin_init',   array( $this, 'redirect' ) );
14
-		add_action( 'admin_menu',   array( $this, 'lasso_welcome' ) );
15
-		add_action( 'network_admin_menu',   array( $this, 'lasso_welcome' ) );  // CHANGED Added hook.
13
+		add_action('admin_init', array($this, 'redirect'));
14
+		add_action('admin_menu', array($this, 'lasso_welcome'));
15
+		add_action('network_admin_menu', array($this, 'lasso_welcome')); // CHANGED Added hook.
16 16
 
17
-		add_action( 'tgmpa_register',  array( $this,'required_plugins' ));
17
+		add_action('tgmpa_register', array($this, 'required_plugins'));
18 18
 
19 19
 	}
20 20
 
21 21
 	function redirect() {
22 22
 
23 23
 		// Bail if no activation redirect
24
-		if ( !get_transient( '_lasso_welcome_redirect' ) ) {
24
+		if (!get_transient('_lasso_welcome_redirect')) {
25 25
 			return;
26 26
 		}
27 27
 
28 28
 		// Delete the redirect transient
29
-		delete_transient( '_lasso_welcome_redirect' );
29
+		delete_transient('_lasso_welcome_redirect');
30 30
 
31 31
 		// Bail if activating from network, or bulk
32
-		if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) {
32
+		if (is_network_admin() || isset($_GET['activate-multi'])) {
33 33
 			return;
34 34
 		}
35 35
 
36
-		wp_safe_redirect( esc_url_raw( add_query_arg( array( 'page' => 'lasso-editor' ), admin_url( 'admin.php' ) ) ) );
36
+		wp_safe_redirect(esc_url_raw(add_query_arg(array('page' => 'lasso-editor'), admin_url('admin.php'))));
37 37
 
38 38
 	}
39 39
 
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
 	function lasso_welcome() {
46 46
 
47 47
 		// CHANGED Removed condition.
48
-		add_menu_page( __( 'Editus', 'lasso' ), __( 'Editus', 'lasso' ), 'manage_options', 'lasso-editor', '', LASSO_URL.'/admin/assets/img/menu-icon.png' );
49
-		add_submenu_page( 'lasso-editor', __( 'Welcome', 'lasso' ), __( 'Status', 'lasso' ), 'manage_options', 'lasso-editor', array( $this, 'welcome' ) );
48
+		add_menu_page(__('Editus', 'lasso'), __('Editus', 'lasso'), 'manage_options', 'lasso-editor', '', LASSO_URL.'/admin/assets/img/menu-icon.png');
49
+		add_submenu_page('lasso-editor', __('Welcome', 'lasso'), __('Status', 'lasso'), 'manage_options', 'lasso-editor', array($this, 'welcome'));
50 50
 
51 51
 	}
52 52
 
@@ -60,24 +60,24 @@  discard block
 block discarded – undo
60 60
 		?>
61 61
 		  <div class="wrap lasso--welcome">
62 62
 
63
-		  		<?php self::header();?>
63
+		  		<?php self::header(); ?>
64 64
 
65 65
 		  		<ul class="lasso--welcome__steps">
66 66
 
67 67
 		  		<?php // CHANGED Added the is_network_admin condition. ?>
68
-			  		<?php if ( is_network_admin() ) : ?>
68
+			  		<?php if (is_network_admin()) : ?>
69 69
 
70 70
 			  			<li>
71
-			  				<p><?php _e( 'We will check the current theme on every site in your network and give you a quick status feedback here. You can see the status by visiting the Editus menu on each site.', 'lasso' );?></p>
71
+			  				<p><?php _e('We will check the current theme on every site in your network and give you a quick status feedback here. You can see the status by visiting the Editus menu on each site.', 'lasso'); ?></p>
72 72
 			  			</li>
73 73
 
74 74
 			  		<?php else :
75 75
 
76 76
 					$checks = self::lasso_preflight_check();
77 77
 
78
-					if ( $checks && !defined( 'LASSO_AGENCY_MODE' ) ):
78
+					if ($checks && !defined('LASSO_AGENCY_MODE')):
79 79
 
80
-						foreach ( (array) $checks as $key => $check ) {
80
+						foreach ((array) $checks as $key => $check) {
81 81
 
82 82
 							echo $check;
83 83
 						}
@@ -87,11 +87,11 @@  discard block
 block discarded – undo
87 87
 							// pre-flight is go for flight
88 88
 						?>
89 89
 						<li class="success">
90
-							<h3><?php _e( 'You\'re Ready to Rock!', 'lasso' );?></h3>
91
-							<?php if ( lasso_get_supported_theme_class() ) { ?>
92
-							<p><?php _e( 'Your theme is automatically supported. No additional setup is needed.', 'lasso' );?></p>
90
+							<h3><?php _e('You\'re Ready to Rock!', 'lasso'); ?></h3>
91
+							<?php if (lasso_get_supported_theme_class()) { ?>
92
+							<p><?php _e('Your theme is automatically supported. No additional setup is needed.', 'lasso'); ?></p>
93 93
 							<?php } ?>
94
-			  				<p><?php _e( 'Editus will place a small menu on the bottom of your site. While on a single post or page, click the "pen" icon to go into edit mode. Press escape to get out of edit mode.', 'lasso' );?></p>
94
+			  				<p><?php _e('Editus will place a small menu on the bottom of your site. While on a single post or page, click the "pen" icon to go into edit mode. Press escape to get out of edit mode.', 'lasso'); ?></p>
95 95
 			  			</li>
96 96
 			  			<?php
97 97
 			  			endif;
@@ -113,16 +113,16 @@  discard block
 block discarded – undo
113 113
 
114 114
 	  		<div class="lasso--welcome__top">
115 115
 
116
-	  			<img style="width:125px;" src="<?php echo LASSO_URL.'/admin/assets/img/logo.png';?>">
117
-	    		<h1><?php _e( 'Welcome to Editus', 'lasso' );?></h1>
118
-	    		<p><?php _e( 'Version', 'lasso' );echo '<span> '.LASSO_VERSION.'</span>';?></p>
116
+	  			<img style="width:125px;" src="<?php echo LASSO_URL.'/admin/assets/img/logo.png'; ?>">
117
+	    		<h1><?php _e('Welcome to Editus', 'lasso'); ?></h1>
118
+	    		<p><?php _e('Version', 'lasso'); echo '<span> '.LASSO_VERSION.'</span>'; ?></p>
119 119
 
120
-	    		<?php if ( !defined( 'LASSO_AGENCY_MODE' ) ): ?>
120
+	    		<?php if (!defined('LASSO_AGENCY_MODE')): ?>
121 121
 
122 122
 			    	<ul class="lasso--welcome__social">
123
-			    		<li><a href="https://edituswp.com/help" target="_blank"><i class="dashicons dashicons-sos"></i> <?php _e( 'Help', 'lasso' );?></a></li>
124
-			    		<li><a href="http://twitter.com/aesopinteractiv" target="_blank"><i class="dashicons dashicons-twitter"></i> <?php _e( 'Twitter', 'lasso' );?></a></li>
125
-			    		<li><a href="http://facebook.com/aesopinteractive" target="_blank"><i class="dashicons dashicons-facebook"></i> <?php _e( 'Facebook', 'lasso' );?></a></li>
123
+			    		<li><a href="https://edituswp.com/help" target="_blank"><i class="dashicons dashicons-sos"></i> <?php _e('Help', 'lasso'); ?></a></li>
124
+			    		<li><a href="http://twitter.com/aesopinteractiv" target="_blank"><i class="dashicons dashicons-twitter"></i> <?php _e('Twitter', 'lasso'); ?></a></li>
125
+			    		<li><a href="http://facebook.com/aesopinteractive" target="_blank"><i class="dashicons dashicons-facebook"></i> <?php _e('Facebook', 'lasso'); ?></a></li>
126 126
 			    	</ul>
127 127
 
128 128
 			    <?php endif; ?>
@@ -139,62 +139,62 @@  discard block
 block discarded – undo
139 139
 	 */
140 140
 	function lasso_preflight_check() {
141 141
 
142
-		$notices 		= array();
142
+		$notices = array();
143 143
 
144
-		$article_object = lasso_editor_get_option( 'article_class', 'lasso_editor' );
144
+		$article_object = lasso_editor_get_option('article_class', 'lasso_editor');
145 145
 
146
-		$theme_name  	= wp_get_theme()->get('Name');
147
-		$theme_class  	= lasso_get_supported_theme_class();
146
+		$theme_name = wp_get_theme()->get('Name');
147
+		$theme_class = lasso_get_supported_theme_class();
148 148
 
149
-		$license   		= get_option( 'lasso_license_key' );
150
-		$status   		= get_option( 'lasso_license_status' );
149
+		$license = get_option('lasso_license_key');
150
+		$status = get_option('lasso_license_status');
151 151
 		
152 152
 
153 153
 		// if the required CSS class has not been saved
154
-		if ( empty( $article_object ) && false == $theme_class ) {
154
+		if (empty($article_object) && false == $theme_class) {
155 155
 
156 156
 			// we dont automatically support this theme so show them otherwise
157 157
 			$notices[] = sprintf('<li class="error">
158
-							<h3>'.__( 'Article CSS Class Needed!', 'lasso' ).'</h3>
159
-							<p>'.__( 'Before using Editus,', 'lasso' ).' <a href="%s">'.__( 'enter and save', 'lasso' ).'</a> '.__( 'the CSS class of the container that holds your post and page content. You can <a href="https://dl.dropboxusercontent.com/u/5594632/lasso-media/doc-movies/using-inspector-lasso.gif" target="_blank">use a tool like inspector</a> in Chrome or Firefox to find this CSS class, or ', 'lasso' ).' <a href="mailto:[email protected]">'.__( 'email us.', 'lasso' ).'</a> '.__( 'with a link to a public URL with the theme and we\'ll find it for you.', 'lasso' ).'</p>
160
-							</li>', admin_url( 'admin.php?page=lasso-editor-settings' ) );
158
+							<h3>'.__('Article CSS Class Needed!', 'lasso').'</h3>
159
+							<p>'.__('Before using Editus,', 'lasso').' <a href="%s">'.__('enter and save', 'lasso').'</a> '.__('the CSS class of the container that holds your post and page content. You can <a href="https://dl.dropboxusercontent.com/u/5594632/lasso-media/doc-movies/using-inspector-lasso.gif" target="_blank">use a tool like inspector</a> in Chrome or Firefox to find this CSS class, or ', 'lasso').' <a href="mailto:[email protected]">'.__('email us.', 'lasso').'</a> '.__('with a link to a public URL with the theme and we\'ll find it for you.', 'lasso').'</p>
160
+							</li>', admin_url('admin.php?page=lasso-editor-settings'));
161 161
 		}
162 162
 
163 163
 		// WP REST API not active
164
-		if ( !function_exists( 'json_get_url_prefix' ) &&  !function_exists( 'rest_url' )) {
164
+		if (!function_exists('json_get_url_prefix') && !function_exists('rest_url')) {
165 165
 			$notices[] = '<li class="info"><h3>WP REST API not Activated!</h3>
166
-							<p>'.__( 'Just a heads up that the WP REST API isn\'t activated. This is required to list the posts and pages on the front-end.', 'lasso' ).'</p>
166
+							<p>'.__('Just a heads up that the WP REST API isn\'t activated. This is required to list the posts and pages on the front-end.', 'lasso').'</p>
167 167
 							</li>';
168 168
 		}
169 169
 
170 170
 		// aesop story engine isnt active
171
-		if ( !class_exists( 'Aesop_Core' ) ) {
172
-			$notices[] = sprintf( '<li class="info"><h3>Aesop Story Engine not Activated!</h3>
173
-							<p>'.__( 'Just a heads up that ', 'lasso' ).'<a href="%s" target="_blank
174
-							">'.__( 'Aesop Story Engine', 'lasso' ).'</a> '.__( 'isn\'t activated. It\'s not required to use Editus, but you won\'t get the cool drag and drop components without it activated. It\'s free!', 'lasso' ).'</p>
175
-							</li>', admin_url('plugin-install.php?tab=search&s=aesop+story+engine') );
171
+		if (!class_exists('Aesop_Core')) {
172
+			$notices[] = sprintf('<li class="info"><h3>Aesop Story Engine not Activated!</h3>
173
+							<p>'.__('Just a heads up that ', 'lasso').'<a href="%s" target="_blank
174
+							">'.__('Aesop Story Engine', 'lasso').'</a> '.__('isn\'t activated. It\'s not required to use Editus, but you won\'t get the cool drag and drop components without it activated. It\'s free!', 'lasso').'</p>
175
+							</li>', admin_url('plugin-install.php?tab=search&s=aesop+story+engine'));
176 176
 		}
177 177
 
178 178
 		// we dont really get along with wp side comments because of the section ids that get applied dynamically. since we save our html, it'll get saved along with the post as HTML
179
-		if ( class_exists( 'WP_Side_Comments' ) ) {
180
-			$notices[] = '<li class="error"><h3>'.__( 'WP Side Comments Compatibility Warning!', 'lasso' ).'</h3>
181
-							<p>'.__( 'Since Editus saves the HTML of a post, this may cause undesired issues. We\'re working to resolve incompatibilities faster than a jack rabbit in a hot greasy griddle in the middle of August.', 'lasso' ).'</p>
179
+		if (class_exists('WP_Side_Comments')) {
180
+			$notices[] = '<li class="error"><h3>'.__('WP Side Comments Compatibility Warning!', 'lasso').'</h3>
181
+							<p>'.__('Since Editus saves the HTML of a post, this may cause undesired issues. We\'re working to resolve incompatibilities faster than a jack rabbit in a hot greasy griddle in the middle of August.', 'lasso').'</p>
182 182
 							</li>';
183 183
 		}
184 184
 
185 185
 		// if the license key isnt activated
186
-		if ( empty( $license ) ) {
187
-			$notices[] = '<li class="info"><h3>'.__( 'License Key Not Activated', 'lasso' ).'</h3>
188
-							<p>'.__( 'Just a heads up, your license key isn\'t activated. Enter your license key into the License tab on the left in order to receive plugin update notifications.', 'lasso' ).'</p>
186
+		if (empty($license)) {
187
+			$notices[] = '<li class="info"><h3>'.__('License Key Not Activated', 'lasso').'</h3>
188
+							<p>'.__('Just a heads up, your license key isn\'t activated. Enter your license key into the License tab on the left in order to receive plugin update notifications.', 'lasso').'</p>
189 189
 							</li>';
190 190
 		}
191
-		if ( !empty( $license ) && 'invalid' == $status ) {
192
-			$notices[] = '<li class="error"><h3>'.__( 'License Key Invalid', 'lasso' ).'</h3>
193
-							<p>'.__( 'The license key that you entered is ', 'lasso' ).'<strong>'.__( 'invalid', 'lasso' ).'</strong>'.__( '. It may have been entered incorreclty, or may have expired.', 'lasso' ).'</p>
191
+		if (!empty($license) && 'invalid' == $status) {
192
+			$notices[] = '<li class="error"><h3>'.__('License Key Invalid', 'lasso').'</h3>
193
+							<p>'.__('The license key that you entered is ', 'lasso').'<strong>'.__('invalid', 'lasso').'</strong>'.__('. It may have been entered incorreclty, or may have expired.', 'lasso').'</p>
194 194
 							</li>';
195 195
 		}
196 196
 
197
-		return apply_filters( 'lasso_preflight_notices', $notices );
197
+		return apply_filters('lasso_preflight_notices', $notices);
198 198
 
199 199
 	}
200 200
 
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 	    $plugins = array(
209 209
 
210 210
 	        array(
211
-	            'name'      => __('Aesop Story Engine','lasso'),
211
+	            'name'      => __('Aesop Story Engine', 'lasso'),
212 212
 	            'slug'      => 'aesop-story-engine',
213 213
 	            'required'  => false,
214 214
 	        ),
@@ -216,38 +216,38 @@  discard block
 block discarded – undo
216 216
 	    );
217 217
 
218 218
 	    $config = array(
219
-	        'default_path' => '',                      // Default absolute path to pre-packaged plugins.
219
+	        'default_path' => '', // Default absolute path to pre-packaged plugins.
220 220
 	        'menu'         => 'lasso-install-plugins', // Menu slug.
221
-	        'has_notices'  => true,                    // Show admin notices or not.
222
-	        'dismissable'  => true,                    // If false, a user cannot dismiss the nag message.
223
-	        'dismiss_msg'  => '',                      // If 'dismissable' is false, this message will be output at top of nag.
224
-	        'is_automatic' => false,                   // Automatically activate plugins after installation or not.
225
-	        'message'      => '',                      // Message to output right before the plugins table.
221
+	        'has_notices'  => true, // Show admin notices or not.
222
+	        'dismissable'  => true, // If false, a user cannot dismiss the nag message.
223
+	        'dismiss_msg'  => '', // If 'dismissable' is false, this message will be output at top of nag.
224
+	        'is_automatic' => false, // Automatically activate plugins after installation or not.
225
+	        'message'      => '', // Message to output right before the plugins table.
226 226
 	        'strings'      => array(
227
-	            'page_title'                      => __( 'Install Required Plugins', 'lasso' ),
228
-	            'menu_title'                      => __( 'Install Plugins', 'lasso' ),
229
-	            'installing'                      => __( 'Installing Plugin: %s', 'lasso' ), // %s = plugin name.
230
-	            'oops'                            => __( 'Something went wrong with the plugin API.', 'lasso' ),
231
-	            'notice_can_install_required'     => _n_noop( 'This plugin requires the following plugin: %1$s.', 'This plugin requires the following plugins: %1$s.' ), // %1$s = plugin name(s).
232
-	            'notice_can_install_recommended'  => _n_noop( 'This plugin recommends the following plugin: %1$s.', 'This plugin recommends the following plugins: %1$s.' ), // %1$s = plugin name(s).
233
-	            'notice_cannot_install'           => _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.' ), // %1$s = plugin name(s).
234
-	            'notice_can_activate_required'    => _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s).
235
-	            'notice_can_activate_recommended' => _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s).
236
-	            'notice_cannot_activate'          => _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.' ), // %1$s = plugin name(s).
237
-	            'notice_ask_to_update'            => _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this plugin: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this plugin: %1$s.' ), // %1$s = plugin name(s).
238
-	            'notice_cannot_update'            => _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.' ), // %1$s = plugin name(s).
239
-	            'install_link'                    => _n_noop( 'Begin installing plugin', 'Begin installing plugins' ),
240
-	            'activate_link'                   => _n_noop( 'Begin activating plugin', 'Begin activating plugins' ),
241
-	            'return'                          => __( 'Return to Required Plugins Installer', 'lasso' ),
242
-	            'plugin_activated'                => __( 'Plugin activated successfully.', 'lasso' ),
243
-	            'complete'                        => __( 'All plugins installed and activated successfully. %s', 'lasso' ), // %s = dashboard link.
227
+	            'page_title'                      => __('Install Required Plugins', 'lasso'),
228
+	            'menu_title'                      => __('Install Plugins', 'lasso'),
229
+	            'installing'                      => __('Installing Plugin: %s', 'lasso'), // %s = plugin name.
230
+	            'oops'                            => __('Something went wrong with the plugin API.', 'lasso'),
231
+	            'notice_can_install_required'     => _n_noop('This plugin requires the following plugin: %1$s.', 'This plugin requires the following plugins: %1$s.'), // %1$s = plugin name(s).
232
+	            'notice_can_install_recommended'  => _n_noop('This plugin recommends the following plugin: %1$s.', 'This plugin recommends the following plugins: %1$s.'), // %1$s = plugin name(s).
233
+	            'notice_cannot_install'           => _n_noop('Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.'), // %1$s = plugin name(s).
234
+	            'notice_can_activate_required'    => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), // %1$s = plugin name(s).
235
+	            'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), // %1$s = plugin name(s).
236
+	            'notice_cannot_activate'          => _n_noop('Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.'), // %1$s = plugin name(s).
237
+	            'notice_ask_to_update'            => _n_noop('The following plugin needs to be updated to its latest version to ensure maximum compatibility with this plugin: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this plugin: %1$s.'), // %1$s = plugin name(s).
238
+	            'notice_cannot_update'            => _n_noop('Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.'), // %1$s = plugin name(s).
239
+	            'install_link'                    => _n_noop('Begin installing plugin', 'Begin installing plugins'),
240
+	            'activate_link'                   => _n_noop('Begin activating plugin', 'Begin activating plugins'),
241
+	            'return'                          => __('Return to Required Plugins Installer', 'lasso'),
242
+	            'plugin_activated'                => __('Plugin activated successfully.', 'lasso'),
243
+	            'complete'                        => __('All plugins installed and activated successfully. %s', 'lasso'), // %s = dashboard link.
244 244
 	            'nag_type'                        => 'updated' // Determines admin notice type - can only be 'updated', 'update-nag' or 'error'.
245 245
 	        )
246 246
 	    );
247 247
 		
248
-		$plugins = apply_filters( 'lasso_required_plugins', $plugins );
248
+		$plugins = apply_filters('lasso_required_plugins', $plugins);
249 249
 
250
-	    tgmpa( $plugins, $config );
250
+	    tgmpa($plugins, $config);
251 251
 
252 252
 	}
253 253
 }
Please login to merge, or discard this patch.
public/includes/editor-modules--gallery.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -11,12 +11,12 @@  discard block
 block discarded – undo
11 11
 
12 12
 	ob_start();
13 13
 
14
-	if ( $galleries ) { ?>
14
+	if ($galleries) { ?>
15 15
 	
16
-		<?php if ( lasso_user_can( 'publish_posts' ) ): ?>
16
+		<?php if (lasso_user_can('publish_posts')): ?>
17 17
 			<div class="ase-gallery-opts ase-gallery-opts--create-gallery" style="display:inline !important; postion:relative !important;left:12px !important">
18 18
 				<div class="ase-gallery-opts--single lasso-option">
19
-				<a href="#" class="editor-btn-secondary" id="lasso--gallery__create"><?php _e( 'Create gallery', 'lasso' );?></a>
19
+				<a href="#" class="editor-btn-secondary" id="lasso--gallery__create"><?php _e('Create gallery', 'lasso'); ?></a>
20 20
 				</div>
21 21
 			</div>
22 22
 		<?php endif; ?>
@@ -24,11 +24,11 @@  discard block
 block discarded – undo
24 24
 		<div class="ase-gallery-opts ase-gallery-opts--edit-gallery" >
25 25
 			<div class="ase-gallery-opts--single lasso-option">
26 26
 
27
-				<label><?php _e( 'Manage Images', 'lasso' );?>
28
-					<a href="#" id="ase-gallery-add-image" class="lasso-editor-tiny-btn" title="<?php esc_attr_e( 'Add Images', 'lasso' );?>"><i class="lasso-icon-pencil"></i></a>
27
+				<label><?php _e('Manage Images', 'lasso'); ?>
28
+					<a href="#" id="ase-gallery-add-image" class="lasso-editor-tiny-btn" title="<?php esc_attr_e('Add Images', 'lasso'); ?>"><i class="lasso-icon-pencil"></i></a>
29 29
 
30 30
 				</label>
31
-				<small class="lasso-option-desc"><?php _e( 'Rearrange or edit the images in this gallery.', 'lasso' );?></small>
31
+				<small class="lasso-option-desc"><?php _e('Rearrange or edit the images in this gallery.', 'lasso'); ?></small>
32 32
 
33 33
 				<div id="lasso--gallery__images"><span class="lasso-icon-spinner6"></span></div>
34 34
 
@@ -38,22 +38,22 @@  discard block
 block discarded – undo
38 38
 
39 39
 	<?php }
40 40
 
41
-	if ( lasso_user_can( 'publish_posts' ) ): ?>
41
+	if (lasso_user_can('publish_posts')): ?>
42 42
 
43 43
 		<div class="ase-gallery-opts ase-gallery-opts--create-gallery2" style="display:none;">
44 44
 
45 45
 			<div class="ase-gallery-opts--single lasso-option">
46 46
 
47
-				<label><?php _e( 'Create a Gallery', 'lasso' );?></label>
47
+				<label><?php _e('Create a Gallery', 'lasso'); ?></label>
48 48
 				<small class="lasso-option-desc">Gallery Name:</small>
49 49
                 <input type="text" id="lasso--gallery__galleryname" value="New Gallery"><br>
50 50
 				
51
-				<small class="lasso-option-desc"><?php _e( 'Select images to create a gallery.', 'lasso' );?></small>
52
-				<a href="#" class="editor-btn-secondary" id="lasso--gallery__selectImages"><?php _e( 'Select Images', 'lasso' );?></a>
51
+				<small class="lasso-option-desc"><?php _e('Select images to create a gallery.', 'lasso'); ?></small>
52
+				<a href="#" class="editor-btn-secondary" id="lasso--gallery__selectImages"><?php _e('Select Images', 'lasso'); ?></a>
53 53
 
54 54
 				<div id="ase-gallery-images"></div>
55 55
 
56
-				<a style="display:none;" class="editor-btn-secondary" data-post-title="<?php echo esc_attr( strtolower( the_title_attribute() ) );?>" id="lasso--gallery__save" href="#"><?php _e( 'Create Gallery', 'lasso' );?></a>
56
+				<a style="display:none;" class="editor-btn-secondary" data-post-title="<?php echo esc_attr(strtolower(the_title_attribute())); ?>" id="lasso--gallery__save" href="#"><?php _e('Create Gallery', 'lasso'); ?></a>
57 57
 
58 58
 			</div>
59 59
 
@@ -64,14 +64,14 @@  discard block
 block discarded – undo
64 64
 	<!-- Gallery Layout/Type Chooser -->
65 65
 	<div class="ase-gallery-opts ase-gallery-opts--type" >
66 66
 		<div data-option="gallery-type" class="ase-gallery-opts--single lasso-option">
67
-			<label><?php _e( 'Gallery Type', 'lasso' );?></label>
68
-			<small class="lasso-option-desc"><?php _e( 'Select the type of gallery.', 'lasso' );?></small>
67
+			<label><?php _e('Gallery Type', 'lasso'); ?></label>
68
+			<small class="lasso-option-desc"><?php _e('Select the type of gallery.', 'lasso'); ?></small>
69 69
 			<fieldset>
70
-	      		<label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="grid"><?php _e( 'Grid', 'lasso' );?></label>
71
-	        	<label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="thumbnail"><?php _e( 'Thumbnail', 'lasso' );?></label>
70
+	      		<label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="grid"><?php _e('Grid', 'lasso'); ?></label>
71
+	        	<label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="thumbnail"><?php _e('Thumbnail', 'lasso'); ?></label>
72 72
 				<label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="sequence">Sequence</label>
73
-				<label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="photoset"><?php _e( 'Photoset', 'lasso' );?></label>
74
-				<label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="stacked"><?php _e( 'Parallax', 'lasso' );?></label>
73
+				<label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="photoset"><?php _e('Photoset', 'lasso'); ?></label>
74
+				<label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="stacked"><?php _e('Parallax', 'lasso'); ?></label>
75 75
 				<label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="hero">Hero</label>
76 76
 			</fieldset>
77 77
 		</div>
@@ -81,8 +81,8 @@  discard block
 block discarded – undo
81 81
 	<div class="ase-gallery-opts ase-gallery-opts--grid" style="display:none;">
82 82
 
83 83
 		<div data-option="itemwidth" class="ase-gallery-opts--single lasso-option">
84
-			<label for="lasso_grid_gallery_width"><?php _e( 'Grid Item Width', 'lasso' );?></label>
85
-			<small class="lasso-option-desc"><?php _e( 'Adjust the width of the individual grid items, only if using Grid gallery style. Default is 400.', 'lasso' );?></small>
84
+			<label for="lasso_grid_gallery_width"><?php _e('Grid Item Width', 'lasso'); ?></label>
85
+			<small class="lasso-option-desc"><?php _e('Adjust the width of the individual grid items, only if using Grid gallery style. Default is 400.', 'lasso'); ?></small>
86 86
 			<input type="text_small" class="lasso-generator-attr" name="lasso_grid_gallery_width" value="">
87 87
 		</div>
88 88
 
@@ -92,24 +92,24 @@  discard block
 block discarded – undo
92 92
 	<div class="ase-gallery-opts ase-gallery-opts--thumb" style="display:none;">
93 93
 
94 94
 		<div data-option="transition" class="ase-gallery-opts--single lasso-option">
95
-			<label for="lasso_thumb_gallery_transition"><?php _e( 'Gallery Transition', 'lasso' );?></label>
96
-			<small class="lasso-option-desc"><?php _e( 'Adjust the transition effect for the Thumbnail gallery. Default is slide.', 'lasso' );?></small>
95
+			<label for="lasso_thumb_gallery_transition"><?php _e('Gallery Transition', 'lasso'); ?></label>
96
+			<small class="lasso-option-desc"><?php _e('Adjust the transition effect for the Thumbnail gallery. Default is slide.', 'lasso'); ?></small>
97 97
 		   	<select name="lasso_thumb_gallery_transition" class="lasso-generator-attr">
98
-		      <option value="crossfade"><?php _e( 'Fade', 'lasso' );?></option>
99
-		      <option value="slide"><?php _e( 'Slide', 'lasso' );?></option>
100
-		      <option value="dissolve"><?php _e( 'Dissolve', 'lasso' );?></option>
98
+		      <option value="crossfade"><?php _e('Fade', 'lasso'); ?></option>
99
+		      <option value="slide"><?php _e('Slide', 'lasso'); ?></option>
100
+		      <option value="dissolve"><?php _e('Dissolve', 'lasso'); ?></option>
101 101
 		    </select>
102 102
 		</div>
103 103
 
104 104
 		<div data-option="speed" class="ase-gallery-opts--single lasso-option">
105
-			<label for="lasso_thumb_gallery_transition_speed"><?php _e( 'Gallery Transition Speed', 'lasso' );?></label>
106
-			<small class="lasso-option-desc"><?php _e( 'Activate slideshow by setting a speed for the transition.5000 = 5 seconds.', 'lasso' );?></small>
105
+			<label for="lasso_thumb_gallery_transition_speed"><?php _e('Gallery Transition Speed', 'lasso'); ?></label>
106
+			<small class="lasso-option-desc"><?php _e('Activate slideshow by setting a speed for the transition.5000 = 5 seconds.', 'lasso'); ?></small>
107 107
 			<input type="text" class="lasso-generator-attr" name="lasso_thumb_gallery_transition_speed" value="">
108 108
 		</div>
109 109
 
110 110
 		<div data-option="hide-thumbs" class="ase-gallery-opts--single lasso-option">
111 111
 			<input class="lasso-generator-attr" type="checkbox" name="lasso_thumb_gallery_hide_thumbs">
112
-			<label for="lasso_thumb_gallery_hide_thumbs"><?php _e( 'Hide Gallery Thumbnails', 'lasso' );?></label>
112
+			<label for="lasso_thumb_gallery_hide_thumbs"><?php _e('Hide Gallery Thumbnails', 'lasso'); ?></label>
113 113
 		</div>
114 114
 
115 115
 	</div>
@@ -118,8 +118,8 @@  discard block
 block discarded – undo
118 118
 	<div class="ase-gallery-opts ase-gallery-opts--photoset" style="display:none;">
119 119
 
120 120
 		<div data-option="pslayout" class="ase-gallery-opts--single lasso-option">
121
-			<label for="lasso-photoset-gallery-layout"><?php _e( 'Gallery Layout', 'lasso' );?></label>
122
-			<small class="lasso-option-desc"><?php _e( 'Let\'s say you have 4 images in this gallery. If you enter 121 you will have one image on the top row, two images on the second row, and one image on the third row.', 'lasso' );?></small>
121
+			<label for="lasso-photoset-gallery-layout"><?php _e('Gallery Layout', 'lasso'); ?></label>
122
+			<small class="lasso-option-desc"><?php _e('Let\'s say you have 4 images in this gallery. If you enter 121 you will have one image on the top row, two images on the second row, and one image on the third row.', 'lasso'); ?></small>
123 123
 			<input type="text" class="lasso-generator-attr" name="lasso_photoset_gallery_layout" value="">
124 124
 		</div>
125 125
 
@@ -134,8 +134,8 @@  discard block
 block discarded – undo
134 134
 	<div class="ase-gallery-opts ase-gallery-opts--hero" style="display:none;">
135 135
 
136 136
 		<div data-option="height" class="ase-gallery-opts--single lasso-option">
137
-			<label for="lasso_gallery_height"><?php _e( 'Main Gallery Height', 'lasso' );?></label>
138
-			<small class="lasso-option-desc"><?php _e( 'Adjust the overall height of the gallery. Acceptable values include 500px or 50% etc.', 'lasso' );?></small>
137
+			<label for="lasso_gallery_height"><?php _e('Main Gallery Height', 'lasso'); ?></label>
138
+			<small class="lasso-option-desc"><?php _e('Adjust the overall height of the gallery. Acceptable values include 500px or 50% etc.', 'lasso'); ?></small>
139 139
 			<input type="text_small" class="lasso-generator-attr" name="lasso_gallery_height" value="">
140 140
 		</div>
141 141
 
@@ -145,13 +145,13 @@  discard block
 block discarded – undo
145 145
 	<div class="ase-gallery-opts ase-gallery-opts--global">
146 146
 
147 147
 		<div data-option="width" class="ase-gallery-opts--single lasso-option">
148
-			<label for="lasso_gallery_width"><?php _e( 'Main Gallery Width', 'lasso' );?></label>
149
-			<small class="lasso-option-desc"><?php _e( 'Adjust the overall width of the gallery. Acceptable values include 500px or 50% etc.', 'lasso' );?></small>
148
+			<label for="lasso_gallery_width"><?php _e('Main Gallery Width', 'lasso'); ?></label>
149
+			<small class="lasso-option-desc"><?php _e('Adjust the overall width of the gallery. Acceptable values include 500px or 50% etc.', 'lasso'); ?></small>
150 150
 			<input type="text_small" class="lasso-generator-attr" name="lasso_gallery_width" value="">
151 151
 		</div>
152 152
 		<div data-option="caption" class="ase-gallery-opts--single lasso-option">
153
-			<label for="lasso_gallery_caption"><?php _e( 'Gallery Caption', 'lasso' );?></label>
154
-			<small class="lasso-option-desc"><?php _e( 'Add an optional caption for the gallery.', 'lasso' );?></small>
153
+			<label for="lasso_gallery_caption"><?php _e('Gallery Caption', 'lasso'); ?></label>
154
+			<small class="lasso-option-desc"><?php _e('Add an optional caption for the gallery.', 'lasso'); ?></small>
155 155
 			<textarea name="lasso_gallery_caption" class="lasso-generator-attr"></textarea>
156 156
 		</div>
157 157
 
Please login to merge, or discard this patch.
public/includes/lasso.php 1 patch
Spacing   +183 added lines, -183 removed lines patch added patch discarded remove patch
@@ -52,27 +52,27 @@  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_do_block',     array( $this, 'editus_do_block' ) );
63
-		add_action( 'wp_ajax_editus_lock_post',     array( $this, 'editus_lock_post' ) );
64
-		add_action( 'wp_ajax_editus_unlock_post',     array( $this, 'editus_unlock_post' ) );
65
-		add_action( 'wp_ajax_editus_hide_tour',     array( $this, 'editus_hide_tour' ) );
66
-		add_action( 'wp_ajax_editus_set_post_setting',     array( $this, 'editus_set_post_setting' ) );
67
-		add_action( 'wp_ajax_editus_get_ase_options',     array( $this, 'get_ase_options' ) );
68
-		add_action( 'wp_ajax_editus_delete_post',     array( $this, 'delete_post' ) );
69
-		add_action( 'wp_ajax_editus_featured_img',     array( $this, 'set_featured_img' ) );
70
-		add_action( 'wp_ajax_editus_del_featured_img',     array( $this, 'del_featured_img' ) );
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_do_block', array($this, 'editus_do_block'));
63
+		add_action('wp_ajax_editus_lock_post', array($this, 'editus_lock_post'));
64
+		add_action('wp_ajax_editus_unlock_post', array($this, 'editus_unlock_post'));
65
+		add_action('wp_ajax_editus_hide_tour', array($this, 'editus_hide_tour'));
66
+		add_action('wp_ajax_editus_set_post_setting', array($this, 'editus_set_post_setting'));
67
+		add_action('wp_ajax_editus_get_ase_options', array($this, 'get_ase_options'));
68
+		add_action('wp_ajax_editus_delete_post', array($this, 'delete_post'));
69
+		add_action('wp_ajax_editus_featured_img', array($this, 'set_featured_img'));
70
+		add_action('wp_ajax_editus_del_featured_img', array($this, 'del_featured_img'));
71 71
         
72
-        add_action( 'wp_ajax_editus_publish_post',     array( $this, 'on_publish_post' ) );
72
+        add_action('wp_ajax_editus_publish_post', array($this, 'on_publish_post'));
73 73
         
74
-        add_action( 'wp_ajax_editus_create_gallery',     array( $this, 'create_gallery' ) );
75
-        add_action( 'wp_ajax_editus_update_gallery',     array( $this, 'update_gallery' ) );
74
+        add_action('wp_ajax_editus_create_gallery', array($this, 'create_gallery'));
75
+        add_action('wp_ajax_editus_update_gallery', array($this, 'update_gallery'));
76 76
 
77 77
 		// enable saving custom fields through REST API
78 78
 		self::enable_metasave('post');
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	public static function get_instance() {
104 104
 
105 105
 		// If the single instance hasn't been set, set it now.
106
-		if ( null == self::$instance ) {
106
+		if (null == self::$instance) {
107 107
 			self::$instance = new self;
108 108
 		}
109 109
 
@@ -120,18 +120,18 @@  discard block
 block discarded – undo
120 120
 	 *                                       WPMU is disabled or plugin is
121 121
 	 *                                       activated on an individual blog.
122 122
 	 */
123
-	public static function activate( $network_wide ) {
123
+	public static function activate($network_wide) {
124 124
 
125
-		if ( function_exists( 'is_multisite' ) && is_multisite() ) {
125
+		if (function_exists('is_multisite') && is_multisite()) {
126 126
 
127
-			if ( $network_wide  ) {
127
+			if ($network_wide) {
128 128
 
129 129
 				// Get all blog ids
130 130
 				$blog_ids = self::get_blog_ids();
131 131
 
132
-				foreach ( $blog_ids as $blog_id ) {
132
+				foreach ($blog_ids as $blog_id) {
133 133
 
134
-					switch_to_blog( $blog_id );
134
+					switch_to_blog($blog_id);
135 135
 					self::single_activate();
136 136
 				}
137 137
 
@@ -157,18 +157,18 @@  discard block
 block discarded – undo
157 157
 	 *                                       WPMU is disabled or plugin is
158 158
 	 *                                       deactivated on an individual blog.
159 159
 	 */
160
-	public static function deactivate( $network_wide ) {
160
+	public static function deactivate($network_wide) {
161 161
 
162
-		if ( function_exists( 'is_multisite' ) && is_multisite() ) {
162
+		if (function_exists('is_multisite') && is_multisite()) {
163 163
 
164
-			if ( $network_wide ) {
164
+			if ($network_wide) {
165 165
 
166 166
 				// Get all blog ids
167 167
 				$blog_ids = self::get_blog_ids();
168 168
 
169
-				foreach ( $blog_ids as $blog_id ) {
169
+				foreach ($blog_ids as $blog_id) {
170 170
 
171
-					switch_to_blog( $blog_id );
171
+					switch_to_blog($blog_id);
172 172
 					self::single_deactivate();
173 173
 
174 174
 				}
@@ -192,13 +192,13 @@  discard block
 block discarded – undo
192 192
 	 *
193 193
 	 * @param int     $blog_id ID of the new blog.
194 194
 	 */
195
-	public function activate_new_site( $blog_id ) {
195
+	public function activate_new_site($blog_id) {
196 196
 
197
-		if ( 1 !== did_action( 'wpmu_new_blog' ) ) {
197
+		if (1 !== did_action('wpmu_new_blog')) {
198 198
 			return;
199 199
 		}
200 200
 
201
-		switch_to_blog( $blog_id );
201
+		switch_to_blog($blog_id);
202 202
 		self::single_activate();
203 203
 		restore_current_blog();
204 204
 
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 			WHERE archived = '0' AND spam = '0'
224 224
 			AND deleted = '0'";
225 225
 
226
-		return $wpdb->get_col( $sql );
226
+		return $wpdb->get_col($sql);
227 227
 
228 228
 	}
229 229
 
@@ -234,18 +234,18 @@  discard block
 block discarded – undo
234 234
 	 */
235 235
 	private static function single_activate() {
236 236
 
237
-		$curr_version = get_option( 'lasso_version' );
237
+		$curr_version = get_option('lasso_version');
238 238
 
239 239
 		// update upgraded from
240
-		if ( $curr_version ) {
241
-			update_option( 'lasso_updated_from', $curr_version );
240
+		if ($curr_version) {
241
+			update_option('lasso_updated_from', $curr_version);
242 242
 		}
243 243
 
244 244
 		// update lasso version option
245
-		update_option( 'lasso_version', LASSO_VERSION );
245
+		update_option('lasso_version', LASSO_VERSION);
246 246
 
247 247
 		// set transietn for activation welcome
248
-		set_transient( '_lasso_welcome_redirect', true, 30 );
248
+		set_transient('_lasso_welcome_redirect', true, 30);
249 249
 
250 250
 
251 251
 	}
@@ -267,15 +267,15 @@  discard block
 block discarded – undo
267 267
 	public function load_plugin_textdomain() {
268 268
 
269 269
 		$domain = $this->plugin_slug;
270
-		$locale = apply_filters( 'plugin_locale', get_locale(), $domain );
270
+		$locale = apply_filters('plugin_locale', get_locale(), $domain);
271 271
 
272
-		$out = load_textdomain( $domain, trailingslashit( LASSO_DIR ). 'languages/' . $domain . '-' . $locale . '.mo' );
272
+		$out = load_textdomain($domain, trailingslashit(LASSO_DIR).'languages/'.$domain.'-'.$locale.'.mo');
273 273
 	}
274 274
 	
275 275
     // new ajax function to lock post for editing
276 276
 	public function editus_lock_post()
277 277
 	{
278
-		$post_id= $_POST["postid"];
278
+		$post_id = $_POST["postid"];
279 279
 		$locked = wp_check_post_lock($post_id);
280 280
 		
281 281
 		if (!$locked) {
@@ -283,17 +283,17 @@  discard block
 block discarded – undo
283 283
 			echo "true";
284 284
 		} else {
285 285
 			$user_info = get_userdata($locked);
286
-			echo _e( 'Post being edited by ', 'lasso' ).$user_info->first_name .  " " . $user_info->last_name;
286
+			echo _e('Post being edited by ', 'lasso').$user_info->first_name." ".$user_info->last_name;
287 287
 		}
288 288
 		exit;
289 289
 	}
290 290
 	
291 291
 	public function editus_unlock_post()
292 292
 	{
293
-		$post_id= $_POST["postid"];
293
+		$post_id = $_POST["postid"];
294 294
 		$locked = wp_check_post_lock($post_id);
295 295
         if (!$locked) {
296
-            delete_post_meta( $post_id, '_edit_lock');
296
+            delete_post_meta($post_id, '_edit_lock');
297 297
         }
298 298
 		echo "true";
299 299
 		
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
 	{
306 306
 		$user_id = get_current_user_ID();
307 307
 				
308
-		update_user_meta( $user_id, 'lasso_hide_tour', true );
308
+		update_user_meta($user_id, 'lasso_hide_tour', true);
309 309
 		exit;
310 310
 	}
311 311
 	
@@ -316,15 +316,15 @@  discard block
 block discarded – undo
316 316
 		$data = array();
317 317
 		parse_str($_POST['data'], $data);
318 318
 		
319
-		if (!wp_verify_nonce( $data[ 'nonce' ], 'lasso-update-post-settings' )) {
319
+		if (!wp_verify_nonce($data['nonce'], 'lasso-update-post-settings')) {
320 320
 			wp_send_json_error();
321 321
 			exit;
322 322
 		}
323 323
 		
324
-		$status = isset( $data['status'] ) ? $data['status'] : false;
325
-		$postid = isset( $data['postid'] ) ? $data['postid'] : false;
326
-		$slug   = isset( $data['story_slug'] ) ? $data['story_slug'] : false;
327
-        $excerpt   = isset( $data['excerpt'] ) ? $data['excerpt'] : false;
324
+		$status = isset($data['status']) ? $data['status'] : false;
325
+		$postid = isset($data['postid']) ? $data['postid'] : false;
326
+		$slug   = isset($data['story_slug']) ? $data['story_slug'] : false;
327
+        $excerpt = isset($data['excerpt']) ? $data['excerpt'] : false;
328 328
 	
329 329
 
330 330
 		$args = array(
@@ -336,24 +336,24 @@  discard block
 block discarded – undo
336 336
 		
337 337
 		
338 338
 
339
-		wp_update_post( apply_filters( 'lasso_object_status_update_args', $args ) );
339
+		wp_update_post(apply_filters('lasso_object_status_update_args', $args));
340 340
 		
341 341
 		// update categories
342
-		$cats  = isset( $data['story_cats'] ) ? $data['story_cats'] : false;
342
+		$cats = isset($data['story_cats']) ? $data['story_cats'] : false;
343 343
 		
344
-		self::set_post_terms( $postid, $cats, 'category' );
344
+		self::set_post_terms($postid, $cats, 'category');
345 345
 		
346 346
 		// update tags
347
-		$tags = isset( $data['story_tags'] ) ? $data['story_tags'] : false;
348
-		self::set_post_terms( $postid, $tags, 'post_tag' );
347
+		$tags = isset($data['story_tags']) ? $data['story_tags'] : false;
348
+		self::set_post_terms($postid, $tags, 'post_tag');
349 349
 		
350 350
 		//update date
351
-		$date  = isset( $data['post_date'] ) ? $data['post_date'] : false;
352
-		self::set_date( $postid, $date );
351
+		$date = isset($data['post_date']) ? $data['post_date'] : false;
352
+		self::set_date($postid, $date);
353 353
 		
354
-		do_action( 'lasso_post_updated', $postid, $slug, $status, get_current_user_ID() );
355
-		$response= array(
356
-			'link'   => get_permalink($postid). (($status=='publish') ? '' : '&preview=true')
354
+		do_action('lasso_post_updated', $postid, $slug, $status, get_current_user_ID());
355
+		$response = array(
356
+			'link'   => get_permalink($postid).(($status == 'publish') ? '' : '&preview=true')
357 357
 		);
358 358
 		wp_send_json_success($response);
359 359
 		exit;
@@ -361,11 +361,11 @@  discard block
 block discarded – undo
361 361
 	
362 362
 	public static function enable_metasave($type)
363 363
 	{
364
-		register_rest_field( $type, 'metadata', array(
365
-			'get_callback' => function ( $data ) {
366
-				return get_post_meta( $data['id']);//, '', '' );
364
+		register_rest_field($type, 'metadata', array(
365
+			'get_callback' => function($data) {
366
+				return get_post_meta($data['id']); //, '', '' );
367 367
 			}, 
368
-			'update_callback' => function( $data, $post ) {
368
+			'update_callback' => function($data, $post) {
369 369
 				foreach ($data as $key => $value) {
370 370
 					update_post_meta($post->ID, $key, $value);
371 371
 				}
@@ -377,13 +377,13 @@  discard block
 block discarded – undo
377 377
 	public function editus_do_shortcode()
378 378
 	{
379 379
 		
380
-		$code= $_POST["code"];
380
+		$code = $_POST["code"];
381 381
 		$code = str_replace('\"', '"', $code);
382 382
 		
383
-		$code_wrapped = lasso_wrap_shortcodes( $code);
384
-		$out =  do_shortcode($code);
383
+		$code_wrapped = lasso_wrap_shortcodes($code);
384
+		$out = do_shortcode($code);
385 385
 		if ($out != '') {
386
-			$out =  do_shortcode($code_wrapped);
386
+			$out = do_shortcode($code_wrapped);
387 387
 			echo $out;
388 388
 			exit;
389 389
 		}
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
 		/** @var \WP_Embed $wp_embed */
394 394
 		global $wp_embed;
395 395
 		$wp_embed->post_ID = $_POST["ID"];
396
-		$out =$wp_embed->run_shortcode( $code_wrapped );
396
+		$out = $wp_embed->run_shortcode($code_wrapped);
397 397
 		
398 398
 		echo $out;
399 399
 		exit;
@@ -402,9 +402,9 @@  discard block
 block discarded – undo
402 402
     public function editus_do_block()
403 403
 	{
404 404
 		
405
-		$code= $_POST["code"];
405
+		$code = $_POST["code"];
406 406
 
407
-        $out = do_blocks( $code );
407
+        $out = do_blocks($code);
408 408
 		
409 409
 		echo $out;
410 410
 		exit;
@@ -414,56 +414,56 @@  discard block
 block discarded – undo
414 414
 	{
415 415
 		
416 416
 		
417
-		$code= $_POST["code"];
417
+		$code = $_POST["code"];
418 418
 		$atts = array(
419 419
 		 );
420 420
 		foreach ($_POST as $key => $value) {
421
-			if ($key !="code" && $key !="action") {
421
+			if ($key != "code" && $key != "action") {
422 422
 				$atts[$key] = $value;
423 423
 			}
424 424
 		}
425 425
 		if ($code == "aesop_video") {
426
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-video.php');
426
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-video.php');
427 427
 		    echo aesop_video_shortcode($atts);
428 428
 		}
429 429
 		else if ($code == "aesop_image") {
430
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php');
430
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php');
431 431
 		    echo aesop_image_shortcode($atts);
432 432
 		}
433 433
 		else if ($code == "aesop_quote") {
434
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php');
434
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php');
435 435
 		    echo aesop_quote_shortcode($atts);
436 436
 		}
437 437
 		else if ($code == "aesop_parallax") {
438
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php');
438
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php');
439 439
 		    echo aesop_parallax_shortcode($atts);
440 440
 		}
441 441
 		else if ($code == "aesop_character") {
442
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php');
442
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php');
443 443
 		    echo aesop_character_shortcode($atts);
444 444
 		}
445 445
 		else if ($code == "aesop_collection") {
446
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php');
446
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php');
447 447
 		    echo aesop_collection_shortcode($atts);
448 448
 		}
449 449
 		else if ($code == "aesop_chapter") {
450
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php');
450
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php');
451 451
 		    echo aesop_chapter_shortcode($atts);
452 452
 		}
453 453
 		else if ($code == "aesop_content") {
454
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php');
454
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php');
455 455
 		    echo aesop_content_shortcode($atts, $atts['content_data']);
456 456
 		}
457 457
 		else if ($code == "aesop_gallery") {
458
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
459
-		    echo do_shortcode( '[aesop_gallery id="'.$atts["id"].'"]');
458
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
459
+		    echo do_shortcode('[aesop_gallery id="'.$atts["id"].'"]');
460 460
 		}
461 461
 		else if ($code == "aesop_audio") {
462
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-audio.php');
462
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-audio.php');
463 463
 		    echo aesop_audio_shortcode($atts);
464 464
 		}
465 465
 		else if ($code == "aesop_document") {
466
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-document.php');
466
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-document.php');
467 467
 		    echo aesop_document_shortcode($atts);
468 468
 		}
469 469
         /*else if ($code == "aesop_content") {
@@ -492,24 +492,24 @@  discard block
 block discarded – undo
492 492
         $extra = "";
493 493
         
494 494
         // try to use srcset and sizes on new WP installs
495
-		if ( function_exists('wp_get_attachment_image_srcset') && $attachment_id = attachment_url_to_postid( $atts['img'] ) ) {
496
-			$srcset = wp_get_attachment_image_srcset( $attachment_id, 'full' );
497
-			$sizes = wp_get_attachment_image_sizes( $attachment_id, 'full' );
495
+		if (function_exists('wp_get_attachment_image_srcset') && $attachment_id = attachment_url_to_postid($atts['img'])) {
496
+			$srcset = wp_get_attachment_image_srcset($attachment_id, 'full');
497
+			$sizes = wp_get_attachment_image_sizes($attachment_id, 'full');
498 498
             $extra = "srcset='$srcset' sizes='$sizes' ";
499 499
         }
500
-        if ($atts['align']=="left") {
500
+        if ($atts['align'] == "left") {
501 501
             $extra .= 'class="alignleft';
502
-        } else if ($atts['align']=="right") {
502
+        } else if ($atts['align'] == "right") {
503 503
             $extra .= 'class="alignright';
504 504
         } else {
505 505
             $extra .= 'class="aligncenter';
506 506
         }
507 507
         if ($atts['imgwidth'] || $atts['imgheight']) {
508 508
             if ($atts['imgwidth']) {
509
-                $extra .= 'width:'. $atts['imgwidth'].';';
509
+                $extra .= 'width:'.$atts['imgwidth'].';';
510 510
             }
511 511
             if ($atts['imgheight']) {
512
-                $extra .= 'height:'. $atts['imgheight'].';';
512
+                $extra .= 'height:'.$atts['imgheight'].';';
513 513
             }
514 514
             
515 515
         }
@@ -521,15 +521,15 @@  discard block
 block discarded – undo
521 521
         //echo ' class="wp-image- lasso--wpimg__wrap lasso-component">';
522 522
         echo ' class="wp-caption lasso-component">';
523 523
         $hrefset = false;
524
-        if ($atts['link'] != '' && (!isset($atts['linkoption']) || $atts['linkoption']=="url" ))
524
+        if ($atts['link'] != '' && (!isset($atts['linkoption']) || $atts['linkoption'] == "url"))
525 525
         {
526
-            echo '<a href="' . $atts['link'] . '">';
526
+            echo '<a href="'.$atts['link'].'">';
527 527
             $hrefset = true;
528
-        } else if (isset($atts['linkoption']) && $atts['linkoption'] == 'img' ) {
529
-            echo '<a href="' . $atts['img'] . '">';
528
+        } else if (isset($atts['linkoption']) && $atts['linkoption'] == 'img') {
529
+            echo '<a href="'.$atts['img'].'">';
530 530
             $hrefset = true;
531 531
         }
532
-        echo '<img src="' . $atts['img'] . '" alt="'. $atts['alt']  .  '" '. $extra. '>';
532
+        echo '<img src="'.$atts['img'].'" alt="'.$atts['alt'].'" '.$extra.'>';
533 533
         if ($hrefset)
534 534
         {
535 535
             echo '</a>';
@@ -547,20 +547,20 @@  discard block
 block discarded – undo
547 547
 	public function get_ase_options()
548 548
 	{
549 549
 		$blob = lasso_editor_options_blob();
550
-		$code= $_POST["component"];
550
+		$code = $_POST["component"];
551 551
 		echo $blob[$code];
552 552
 		exit; 
553 553
 	}
554 554
 	
555 555
 	public function delete_post( ) {
556 556
 
557
-		$postid = isset( $_POST['postid'] ) ? $_POST['postid'] : false;
557
+		$postid = isset($_POST['postid']) ? $_POST['postid'] : false;
558 558
 
559 559
 		// bail out if the current user can't publish posts
560
-		if ( !lasso_user_can( 'delete_post', $postid ) )
560
+		if (!lasso_user_can('delete_post', $postid))
561 561
 			return;
562 562
 		
563
-		if (!wp_verify_nonce( $_POST[ 'nonce' ], 'lasso_delete_post' )) {
563
+		if (!wp_verify_nonce($_POST['nonce'], 'lasso_delete_post')) {
564 564
 			wp_send_json_error();
565 565
 			exit;
566 566
 		}
@@ -570,9 +570,9 @@  discard block
 block discarded – undo
570 570
 			'post_status' 	=> 'trash'
571 571
 		);
572 572
 
573
-		wp_update_post( apply_filters( 'lasso_object_deleted_args', $args ) );
573
+		wp_update_post(apply_filters('lasso_object_deleted_args', $args));
574 574
 
575
-		do_action( 'lasso_object_deleted', $postid, get_current_user_ID() );
575
+		do_action('lasso_object_deleted', $postid, get_current_user_ID());
576 576
 
577 577
 		exit;
578 578
 	}
@@ -580,40 +580,40 @@  discard block
 block discarded – undo
580 580
     /* This function doesn't actually publish post, but should be called when a post is published */
581 581
     public function on_publish_post( ) {
582 582
 
583
-		$post_id = isset( $_POST['postid'] ) ? $_POST['postid'] : false;
583
+		$post_id = isset($_POST['postid']) ? $_POST['postid'] : false;
584 584
         
585
-        do_action( 'transition_post_status', 'publish', 'draft', get_post( $post_id ) );
585
+        do_action('transition_post_status', 'publish', 'draft', get_post($post_id));
586 586
 
587 587
 		exit;
588 588
 	}
589 589
 	
590 590
 	public function set_featured_img( ) {
591 591
 
592
-		$postid  	= isset( $_POST['postid'] ) ? $_POST['postid'] : false;
593
-		$image_id  	= isset( $_POST['image_id'] ) ? absint( $_POST['image_id'] ) : false;
594
-		if (!wp_verify_nonce( $_POST[ 'nonce' ], 'lasso_gallery' )) {
592
+		$postid = isset($_POST['postid']) ? $_POST['postid'] : false;
593
+		$image_id = isset($_POST['image_id']) ? absint($_POST['image_id']) : false;
594
+		if (!wp_verify_nonce($_POST['nonce'], 'lasso_gallery')) {
595 595
 			wp_send_json_error();
596 596
 			exit;
597 597
 		}	
598 598
 
599
-		set_post_thumbnail( $postid, $image_id );
599
+		set_post_thumbnail($postid, $image_id);
600 600
 
601
-		do_action( 'lasso_featured_image_set', $postid, $image_id, get_current_user_ID() );
601
+		do_action('lasso_featured_image_set', $postid, $image_id, get_current_user_ID());
602 602
 
603 603
 		exit;
604 604
 	}
605 605
 	
606 606
 	public function del_featured_img( ) {
607 607
 
608
-		$postid  = isset( $_POST['postid'] ) ? $_POST['postid'] : false;
609
-		if (!wp_verify_nonce( $_POST[ 'nonce' ], 'lasso_gallery' )) {
608
+		$postid = isset($_POST['postid']) ? $_POST['postid'] : false;
609
+		if (!wp_verify_nonce($_POST['nonce'], 'lasso_gallery')) {
610 610
 			wp_send_json_error();
611 611
 			exit;
612 612
 		}	
613 613
 
614
-		delete_post_thumbnail( $postid );
614
+		delete_post_thumbnail($postid);
615 615
 
616
-		do_action( 'lasso_featured_image_deleted', $postid, get_current_user_ID() );
616
+		do_action('lasso_featured_image_deleted', $postid, get_current_user_ID());
617 617
 
618 618
 		exit;
619 619
 	}
@@ -634,17 +634,17 @@  discard block
 block discarded – undo
634 634
 		return self::$revisions;
635 635
 	}*/
636 636
 	
637
-	public function set_post_terms( $postid, $value, $taxonomy ) {
638
-		if( $value ) {
639
-			$value = explode( ',', $value );
640
-			$allow_new_category = lasso_editor_get_option( 'allow_new_category', 'lasso_editor' );
637
+	public function set_post_terms($postid, $value, $taxonomy) {
638
+		if ($value) {
639
+			$value = explode(',', $value);
640
+			$allow_new_category = lasso_editor_get_option('allow_new_category', 'lasso_editor');
641 641
 			
642
-			if ($taxonomy =='category') {
642
+			if ($taxonomy == 'category') {
643 643
                 // convert from names to category ids
644 644
 				$cats = array();
645 645
 				foreach ($value as $cat) {
646 646
 					$cat_id = get_cat_ID($cat);
647
-					if ($cat_id !=0) {
647
+					if ($cat_id != 0) {
648 648
 						$cats [] = $cat_id;
649 649
 					} else if ($allow_new_category) {
650 650
 					    $cats [] = wp_create_category($cat);
@@ -653,71 +653,71 @@  discard block
 block discarded – undo
653 653
 				$value = $cats;
654 654
 			}
655 655
 	
656
-			$result = wp_set_object_terms( $postid, $value, $taxonomy );
656
+			$result = wp_set_object_terms($postid, $value, $taxonomy);
657 657
 		}
658
-		else  {
658
+		else {
659 659
 			//remove all terms from post
660
-			$result = wp_set_object_terms( $postid, null, $taxonomy );
660
+			$result = wp_set_object_terms($postid, null, $taxonomy);
661 661
 		}
662 662
 
663
-		if ( ! is_wp_error( $result ) ) {
663
+		if (!is_wp_error($result)) {
664 664
 			return true;
665
-		}else{
665
+		} else {
666 666
 			return false;
667 667
 		}
668 668
 	}
669 669
     
670 670
     public function create_gallery( ) {
671 671
 
672
-		$postid  	= isset( $_POST['postid'] ) ? $_POST['postid'] : false;
672
+		$postid = isset($_POST['postid']) ? $_POST['postid'] : false;
673 673
         
674
-		if (!wp_verify_nonce( $_POST[ 'nonce' ], 'lasso_gallery' )) {
674
+		if (!wp_verify_nonce($_POST['nonce'], 'lasso_gallery')) {
675 675
 			wp_send_json_error();
676 676
 			exit;
677 677
 		}	
678 678
 
679
-		if (  ! lasso_user_can( 'publish_posts' ) ) {
679
+		if (!lasso_user_can('publish_posts')) {
680 680
 			return false;
681 681
 
682 682
 		}
683 683
 
684
-		$gallery_ids = isset( $_POST['gallery_ids'] ) ? $_POST['gallery_ids'] : false;
684
+		$gallery_ids = isset($_POST['gallery_ids']) ? $_POST['gallery_ids'] : false;
685 685
 
686 686
 		// bail if no gallery ids
687
-		if ( empty( $gallery_ids ) ) {
687
+		if (empty($gallery_ids)) {
688 688
 			return false;
689 689
 		}
690 690
 
691
-		$type   		 = isset( $_POST['gallery_type'] ) ? $_POST['gallery_type'] : false;
692
-		$edgallerytitle	 = isset( $_POST['edgallerytitle'] ) ? $_POST['edgallerytitle'] : $postid.'-'.rand();
691
+		$type = isset($_POST['gallery_type']) ? $_POST['gallery_type'] : false;
692
+		$edgallerytitle = isset($_POST['edgallerytitle']) ? $_POST['edgallerytitle'] : $postid.'-'.rand();
693 693
 
694 694
 		// insert a new gallery
695 695
 		$args = array(
696
-			'post_title'    => $edgallerytitle ,
696
+			'post_title'    => $edgallerytitle,
697 697
 			'post_status'   => 'publish',
698 698
 			'post_type'     => 'ai_galleries'
699 699
 		);
700 700
 
701
-		$postid = wp_insert_post( apply_filters( 'lasso_insert_gallery_args', $args ) );
701
+		$postid = wp_insert_post(apply_filters('lasso_insert_gallery_args', $args));
702 702
 
703 703
 		// update gallery ids
704
-		if ( $gallery_ids ) {
704
+		if ($gallery_ids) {
705 705
 
706
-			update_post_meta( $postid, '_ase_gallery_images', $gallery_ids );
706
+			update_post_meta($postid, '_ase_gallery_images', $gallery_ids);
707 707
 
708 708
 		}
709 709
 
710 710
 		// update the gallery type
711
-		if ( !empty( $type ) ) {
711
+		if (!empty($type)) {
712 712
 
713
-			update_post_meta( $postid, 'aesop_gallery_type', $type );
713
+			update_post_meta($postid, 'aesop_gallery_type', $type);
714 714
 
715 715
 		}
716 716
 
717
-		do_action( 'lasso_gallery_published', $postid, $gallery_ids, get_current_user_ID() );
717
+		do_action('lasso_gallery_published', $postid, $gallery_ids, get_current_user_ID());
718 718
 
719 719
 
720
-		echo json_encode( array(
720
+		echo json_encode(array(
721 721
 			'message' => 'gallery-created',
722 722
 			'id' => $postid)
723 723
 		);
@@ -726,114 +726,114 @@  discard block
 block discarded – undo
726 726
     
727 727
     public function update_gallery( ) {
728 728
         
729
-		$options      = isset( $_POST['fields'] ) ? $_POST['fields'] : false;
729
+		$options      = isset($_POST['fields']) ? $_POST['fields'] : false;
730 730
         
731
-		$postid   	  = !empty( $options ) ? (int) $options['id'] : false;
732
-		$gallery_ids  = isset( $_POST['gallery_ids'] ) ? $_POST['gallery_ids'] : false;
733
-		if ( $_POST[ 'gallery_type' ] ) {
734
-			$type = $_POST[ 'gallery_type' ];
735
-		}elseif ( ! empty( $options ) && $options[ 'galleryType' ] ) {
736
-			$type = $options[ 'galleryType' ];
737
-		}else{
731
+		$postid = !empty($options) ? (int) $options['id'] : false;
732
+		$gallery_ids  = isset($_POST['gallery_ids']) ? $_POST['gallery_ids'] : false;
733
+		if ($_POST['gallery_type']) {
734
+			$type = $_POST['gallery_type'];
735
+		}elseif (!empty($options) && $options['galleryType']) {
736
+			$type = $options['galleryType'];
737
+		} else {
738 738
 			$type = false;
739 739
 		}
740 740
 
741
-		self::save_gallery_options( $postid, $gallery_ids, $options, $type );
741
+		self::save_gallery_options($postid, $gallery_ids, $options, $type);
742 742
 
743
-        echo json_encode( array('message' => 'gallery-updated') );
743
+        echo json_encode(array('message' => 'gallery-updated'));
744 744
 
745 745
         exit;
746 746
 	}
747 747
     
748
-    public function save_gallery_options( $postid, $gallery_ids, $options, $type = false ) {
748
+    public function save_gallery_options($postid, $gallery_ids, $options, $type = false) {
749 749
 
750 750
 		// gallery width
751
-		$gallery_width = isset( $options['width'] ) ? $options['width'] : false;
751
+		$gallery_width = isset($options['width']) ? $options['width'] : false;
752 752
 
753 753
 		// gallery grid item width
754
-		$item_width = isset( $options['itemwidth'] ) ? $options['itemwidth'] : false;
754
+		$item_width = isset($options['itemwidth']) ? $options['itemwidth'] : false;
755 755
 
756 756
 		// caption
757
-		$caption = isset( $options['caption'] ) ? $options['caption'] : false;
757
+		$caption = isset($options['caption']) ? $options['caption'] : false;
758 758
 
759 759
 		// gallery transition
760
-		$transition = isset( $options['transition'] ) ? $options['transition'] : false;
760
+		$transition = isset($options['transition']) ? $options['transition'] : false;
761 761
 
762 762
 		// gallery transition speed
763
-		$transitionSpeed = isset( $options['speed'] ) ? $options['speed'] : false;
763
+		$transitionSpeed = isset($options['speed']) ? $options['speed'] : false;
764 764
 
765 765
 		// gallery hide thumbs
766
-		$hideThumbs = isset( $options['hideThumbs'] ) ? $options['hideThumbs'] : false;
766
+		$hideThumbs = isset($options['hideThumbs']) ? $options['hideThumbs'] : false;
767 767
 
768 768
 		// photoset layout hardwired to on for now
769
-		$psLayout = isset( $options['pslayout'] ) ? $options['pslayout'] : false;
769
+		$psLayout = isset($options['pslayout']) ? $options['pslayout'] : false;
770 770
 
771 771
 		// photoset layout
772
-		$psLightbox = 'on';//isset( $options['pslightbox'] ) ? $options['pslightbox'] : false;
772
+		$psLightbox = 'on'; //isset( $options['pslightbox'] ) ? $options['pslightbox'] : false;
773 773
 		
774 774
 		// hero gallery height
775
-		$gallery_height = isset( $options['height'] ) ? $options['height'] : false;
775
+		$gallery_height = isset($options['height']) ? $options['height'] : false;
776 776
 
777 777
 		// update gallery ids
778
-		if ( !empty( $gallery_ids ) ) {
778
+		if (!empty($gallery_ids)) {
779 779
 
780
-			update_post_meta( $postid, '_ase_gallery_images', $gallery_ids );
780
+			update_post_meta($postid, '_ase_gallery_images', $gallery_ids);
781 781
 
782 782
 		}
783 783
 
784
-		update_post_meta( $postid, 'aesop_gallery_type', sanitize_text_field( trim( $type ) ) );
784
+		update_post_meta($postid, 'aesop_gallery_type', sanitize_text_field(trim($type)));
785 785
 
786
-		update_post_meta( $postid, 'aesop_gallery_width', sanitize_text_field( trim( $gallery_width ) ) );
786
+		update_post_meta($postid, 'aesop_gallery_width', sanitize_text_field(trim($gallery_width)));
787 787
 
788
-		update_post_meta( $postid, 'aesop_grid_gallery_width', sanitize_text_field( trim( $item_width ) ) );
788
+		update_post_meta($postid, 'aesop_grid_gallery_width', sanitize_text_field(trim($item_width)));
789 789
 
790
-		update_post_meta( $postid, 'aesop_gallery_caption', sanitize_text_field( trim( $caption ) ) );
790
+		update_post_meta($postid, 'aesop_gallery_caption', sanitize_text_field(trim($caption)));
791 791
 
792
-		update_post_meta( $postid, 'aesop_thumb_gallery_transition', sanitize_text_field( trim( $transition ) ) );
792
+		update_post_meta($postid, 'aesop_thumb_gallery_transition', sanitize_text_field(trim($transition)));
793 793
 
794
-		update_post_meta( $postid, 'aesop_thumb_gallery_transition_speed', absint( trim( $transitionSpeed ) ) );
794
+		update_post_meta($postid, 'aesop_thumb_gallery_transition_speed', absint(trim($transitionSpeed)));
795 795
 
796
-		update_post_meta( $postid, 'aesop_thumb_gallery_hide_thumbs', sanitize_text_field( trim( $hideThumbs ) ) );
796
+		update_post_meta($postid, 'aesop_thumb_gallery_hide_thumbs', sanitize_text_field(trim($hideThumbs)));
797 797
 
798
-		update_post_meta( $postid, 'aesop_photoset_gallery_layout', sanitize_text_field( trim( $psLayout ) ) );
798
+		update_post_meta($postid, 'aesop_photoset_gallery_layout', sanitize_text_field(trim($psLayout)));
799 799
 
800
-		update_post_meta( $postid, 'aesop_photoset_gallery_lightbox', sanitize_text_field( trim( $psLightbox ) ) );
800
+		update_post_meta($postid, 'aesop_photoset_gallery_lightbox', sanitize_text_field(trim($psLightbox)));
801 801
 		
802
-		update_post_meta( $postid, 'aesop_hero_gallery_height', sanitize_text_field( trim( $gallery_height ) ) );
802
+		update_post_meta($postid, 'aesop_hero_gallery_height', sanitize_text_field(trim($gallery_height)));
803 803
 		
804 804
 		//hardwired for now
805 805
 		
806
-		update_post_meta( $postid, 'aesop_hero_gallery_transition_speed', 300 );
806
+		update_post_meta($postid, 'aesop_hero_gallery_transition_speed', 300);
807 807
 
808 808
 	}
809 809
 	
810
-	function getEnglishMonthName($foreignMonthName){
810
+	function getEnglishMonthName($foreignMonthName) {
811 811
 
812 812
 		  setlocale(LC_ALL, 'en_US');
813 813
 
814
-		  $month_numbers = range(1,12);
814
+		  $month_numbers = range(1, 12);
815 815
 
816
-		  foreach($month_numbers as $month)
817
-			$english_months[] = strftime('%B',mktime(0,0,0,$month,1,2011));
816
+		  foreach ($month_numbers as $month)
817
+			$english_months[] = strftime('%B', mktime(0, 0, 0, $month, 1, 2011));
818 818
 
819 819
 		  setlocale(LC_ALL, get_locale());
820 820
 
821
-		  foreach($month_numbers as $month)
822
-			$foreign_months[] = utf8_encode(strftime('%B',mktime(0,0,0,$month,1,2011)));
821
+		  foreach ($month_numbers as $month)
822
+			$foreign_months[] = utf8_encode(strftime('%B', mktime(0, 0, 0, $month, 1, 2011)));
823 823
 
824 824
 		  return str_replace($foreign_months, $english_months, $foreignMonthName);
825 825
 	}
826 826
 
827 827
 
828 828
 	
829
-	public function set_date( $postid, $value) {
830
-		if( $value ) {
831
-			$value = self::getEnglishMonthName($value)." ".date("H:i:s", current_time( 'timestamp', 1 ));
829
+	public function set_date($postid, $value) {
830
+		if ($value) {
831
+			$value = self::getEnglishMonthName($value)." ".date("H:i:s", current_time('timestamp', 1));
832 832
             wp_update_post(
833
-				array (
833
+				array(
834 834
 					'ID'            => $postid, // ID of the post to update
835
-					'post_date'     => date( 'Y-m-d H:i:s',  strtotime($value) ),
836
-					'post_date_gmt'     => gmdate( 'Y-m-d H:i:s',  strtotime($value) ),
835
+					'post_date'     => date('Y-m-d H:i:s', strtotime($value)),
836
+					'post_date_gmt'     => gmdate('Y-m-d H:i:s', strtotime($value)),
837 837
 				)
838 838
 			);
839 839
 		}
Please login to merge, or discard this patch.
public/includes/assets.php 1 patch
Spacing   +108 added lines, -108 removed lines patch added patch discarded remove patch
@@ -10,9 +10,9 @@  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 18
     function is_multipage()
@@ -22,16 +22,16 @@  discard block
 block discarded – undo
22 22
         if (!$pos) return -1;
23 23
         
24 24
         global $wp;
25
-        $url =  home_url( $wp->request );
26
-        $index = intval(basename($url)) == 0 ? 0 : intval(basename($url))-1;
25
+        $url = home_url($wp->request);
26
+        $index = intval(basename($url)) == 0 ? 0 : intval(basename($url)) - 1;
27 27
         return $index;        
28 28
     }
29 29
 
30
-	public function scripts(){
30
+	public function scripts() {
31 31
 
32 32
 	
33 33
 		global $post;
34
-		if ( lasso_user_can('edit_posts') 
34
+		if (lasso_user_can('edit_posts') 
35 35
 		     /* uncomment this line to disable Editus on Gutenberg posts*/
36 36
              /* && !( function_exists( 'has_blocks' ) && has_blocks( $post->post_content)  && !is_home()) */              
37 37
              ) {
@@ -39,9 +39,9 @@  discard block
 block discarded – undo
39 39
 			/**    Returns the time offset from UTC
40 40
 			*/
41 41
 			function get_UTC_offset() {
42
-				$timezone_string = get_option( 'timezone_string' );
43
-				if (empty( $timezone_string ) ) {
44
-					return get_option('gmt_offset')*3600;
42
+				$timezone_string = get_option('timezone_string');
43
+				if (empty($timezone_string)) {
44
+					return get_option('gmt_offset') * 3600;
45 45
 				}
46 46
 				
47 47
 				$origin_dtz = new \DateTimeZone($timezone_string);				
@@ -53,8 +53,8 @@  discard block
 block discarded – undo
53 53
 			wp_enqueue_style('lasso-style', LASSO_URL.'/public/assets/css/lasso.css', LASSO_VERSION, true);
54 54
 
55 55
             //don't load autocomplete if it's a stockholm theme
56
-			$themename  	= wp_get_theme()->get('Name');
57
-			if ($themename !='Stockholm' ) {
56
+			$themename = wp_get_theme()->get('Name');
57
+			if ($themename != 'Stockholm') {
58 58
 				wp_enqueue_script('jquery-ui-autocomplete');
59 59
 			}
60 60
 			wp_enqueue_script('jquery-ui-draggable');
@@ -67,30 +67,30 @@  discard block
 block discarded – undo
67 67
 			// url for json api
68 68
 			$home_url = function_exists('json_get_url_prefix') ? json_get_url_prefix() : false;
69 69
 
70
-			$article_object 	= lasso_editor_get_option('article_class','lasso_editor');
70
+			$article_object 	= lasso_editor_get_option('article_class', 'lasso_editor');
71 71
 
72
-			$article_object 	= empty( $article_object ) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object;
72
+			$article_object 	= empty($article_object) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object;
73 73
 
74
-			$featImgClass 		= lasso_editor_get_option('featimg_class','lasso_editor');
75
-			if (empty( $featImgClass )) {
74
+			$featImgClass = lasso_editor_get_option('featimg_class', 'lasso_editor');
75
+			if (empty($featImgClass)) {
76 76
 				$featImgClass = lasso_get_supported_theme_featured_image_class();
77 77
 			}
78
-			$titleClass 		= lasso_editor_get_option('title_class','lasso_editor');
79
-			if (empty( $titleClass )) {
78
+			$titleClass = lasso_editor_get_option('title_class', 'lasso_editor');
79
+			if (empty($titleClass)) {
80 80
 				$titleClass = lasso_get_supported_theme_title_class();
81 81
 			}
82
-			$toolbar_headings  	= lasso_editor_get_option('toolbar_headings', 'lasso_editor');
83
-			$toolbar_headings_h4  	= lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
82
+			$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
83
+			$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
84 84
 			$objectsNoSave  	= lasso_editor_get_option('dont_save', 'lasso_editor');
85
-			$objectsNonEditable  	= lasso_editor_get_option('non_editable', 'lasso_editor');
85
+			$objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor');
86 86
 			$disableRESTSave = lasso_editor_get_option('save_using_rest_disabled', 'lasso_editor');
87
-			$save_to_post_disabled  = lasso_editor_get_option( 'post_save_disabled', 'lasso_editor' );
88
-			$edit_post_disabled  = lasso_editor_get_option( 'post_edit_disabled', 'lasso_editor' );
87
+			$save_to_post_disabled = lasso_editor_get_option('post_save_disabled', 'lasso_editor');
88
+			$edit_post_disabled = lasso_editor_get_option('post_edit_disabled', 'lasso_editor');
89 89
 			
90
-			$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor','b');
91
-			$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor','i');
90
+			$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor', 'b');
91
+			$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor', 'i');
92 92
             
93
-            $use_old_wpimg = lasso_editor_get_option('use_old_wpimg', 'lasso_editor','off');
93
+            $use_old_wpimg = lasso_editor_get_option('use_old_wpimg', 'lasso_editor', 'off');
94 94
             
95 95
             $link_prefix_http = lasso_editor_get_option('link_prefix_http', 'lasso_editor', 'off');
96 96
 
@@ -109,8 +109,8 @@  discard block
 block discarded – undo
109 109
 			
110 110
 			if ($show_color) {
111 111
 				//color picker
112
-				wp_enqueue_style( 'wp-color-picker' );
113
-				wp_enqueue_script( 'iris', admin_url( 'js/iris.min.js' ), array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), false, 1 );
112
+				wp_enqueue_style('wp-color-picker');
113
+				wp_enqueue_script('iris', admin_url('js/iris.min.js'), array('jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch'), false, 1);
114 114
 			}
115 115
 			
116 116
 			// click to insert components, not drag and drop
@@ -122,54 +122,54 @@  discard block
 block discarded – undo
122 122
 			
123 123
 			// custom fields
124 124
 			
125
-			$custom_fields = apply_filters( 'editus_custom_fields', null ); 
125
+			$custom_fields = apply_filters('editus_custom_fields', null); 
126 126
 
127 127
 
128 128
 			// post id reference
129 129
 			$postid 			= get_the_ID();
130 130
 			$tz_offset = get_UTC_offset();
131 131
 			$post_date = get_the_time('U', $postid);
132
-			$time = (time()+$tz_offset);
132
+			$time = (time() + $tz_offset);
133 133
             $delta = $time - $post_date;
134 134
             
135 135
 			$strings = array(
136
-				'save' 				=> __('Save','lasso'),
137
-				'selectText'	  	=> __('Please Select Text First.','lasso'),
138
-				'cancel' 			=> __('Cancel','lasso'),
139
-				'exiteditor' 		=> __('Exit Editor','lasso'),
140
-				'saving' 			=> __('Saving...','lasso'),
141
-				'saved'				=> __('Saved!','lasso'),
142
-				'adding' 			=> __('Adding...','lasso'),
143
-				'added'				=> __('Added!','lasso'),
144
-				'loading' 			=> __('Loading...','lasso'),
145
-				'loadMore'			=> __('Load More','lasso'),
146
-				'close'			=> __('Close','lasso'),
147
-				'noPostsFound'		=> __('No more posts found','lasso'),
148
-				'fetchFail'	    	=> __('Fetching failed.','lasso'),
149
-				'galleryCreated' 	=> __('Gallery Created!','lasso'),
150
-				'galleryUpdated' 	=> __('Gallery Updated!','lasso'),
151
-				'justWrite'			=> __('Just write...','lasso'),
152
-				'chooseImage'		=> __('Choose an image','lasso'),
153
-				'updateImage'		=> __('Update Image','lasso'),
154
-				'insertImage'		=> __('Insert Image','lasso'),
155
-				'selectImage'		=> __('Select Image','lasso'),
156
-				'removeFeatImg'     => __('Remove featured image?','lasso'),
157
-				'updateSelectedImg' => __('Update Selected Image','lasso'),
158
-				'chooseImages'		=> __('Choose images','lasso'),
159
-				'editImage'			=> __('Edit Image','lasso'),
160
-				'addImages'			=> __('Add Images','lasso'),
161
-				'addNewGallery'		=> __('Add New Gallery','lasso'),
162
-				'selectGallery'		=> __('Select Editus Gallery Image','lasso'),
163
-				'useSelectedImages' => __('Use Selected Images','lasso'),
164
-				'publishPost'		=> __('Publish Post?','lasso'),
165
-				'publishYes'		=> __('Yes, publish it!','lasso'),
166
-				'deletePost'		=> __('Trash Post?','lasso'),
167
-				'deleteYes'			=> __('Yes, trash it!','lasso'),
168
-				'warning'			=> __('Oh snap!','laso'),
169
-				'cancelText'		=> __('O.K. got it!','lasso'),
170
-				'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'),
136
+				'save' 				=> __('Save', 'lasso'),
137
+				'selectText'	  	=> __('Please Select Text First.', 'lasso'),
138
+				'cancel' 			=> __('Cancel', 'lasso'),
139
+				'exiteditor' 		=> __('Exit Editor', 'lasso'),
140
+				'saving' 			=> __('Saving...', 'lasso'),
141
+				'saved'				=> __('Saved!', 'lasso'),
142
+				'adding' 			=> __('Adding...', 'lasso'),
143
+				'added'				=> __('Added!', 'lasso'),
144
+				'loading' 			=> __('Loading...', 'lasso'),
145
+				'loadMore'			=> __('Load More', 'lasso'),
146
+				'close'			=> __('Close', 'lasso'),
147
+				'noPostsFound'		=> __('No more posts found', 'lasso'),
148
+				'fetchFail'	    	=> __('Fetching failed.', 'lasso'),
149
+				'galleryCreated' 	=> __('Gallery Created!', 'lasso'),
150
+				'galleryUpdated' 	=> __('Gallery Updated!', 'lasso'),
151
+				'justWrite'			=> __('Just write...', 'lasso'),
152
+				'chooseImage'		=> __('Choose an image', 'lasso'),
153
+				'updateImage'		=> __('Update Image', 'lasso'),
154
+				'insertImage'		=> __('Insert Image', 'lasso'),
155
+				'selectImage'		=> __('Select Image', 'lasso'),
156
+				'removeFeatImg'     => __('Remove featured image?', 'lasso'),
157
+				'updateSelectedImg' => __('Update Selected Image', 'lasso'),
158
+				'chooseImages'		=> __('Choose images', 'lasso'),
159
+				'editImage'			=> __('Edit Image', 'lasso'),
160
+				'addImages'			=> __('Add Images', 'lasso'),
161
+				'addNewGallery'		=> __('Add New Gallery', 'lasso'),
162
+				'selectGallery'		=> __('Select Editus Gallery Image', 'lasso'),
163
+				'useSelectedImages' => __('Use Selected Images', 'lasso'),
164
+				'publishPost'		=> __('Publish Post?', 'lasso'),
165
+				'publishYes'		=> __('Yes, publish it!', 'lasso'),
166
+				'deletePost'		=> __('Trash Post?', 'lasso'),
167
+				'deleteYes'			=> __('Yes, trash it!', 'lasso'),
168
+				'warning'			=> __('Oh snap!', 'laso'),
169
+				'cancelText'		=> __('O.K. got it!', 'lasso'),
170
+				'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'),
171 171
 				'missingConfirm'	=> __('Update Settings', 'lasso'),
172
-				'helperText'		=> __('one more letter','lasso'),
172
+				'helperText'		=> __('one more letter', 'lasso'),
173 173
 				'editingBackup'  	=> __('You are currently editing a backup copy of this post.'),
174 174
 				
175 175
 				'catsPlaceholder'     => __('add categories...'),
@@ -178,11 +178,11 @@  discard block
 block discarded – undo
178 178
 				
179 179
 			);
180 180
 
181
-			$api_url = trailingslashit( home_url() ) . 'lasso-internal-api';
181
+			$api_url = trailingslashit(home_url()).'lasso-internal-api';
182 182
 
183 183
 			$gallery_class = new gallery();
184 184
 			$gallery_nonce_action = $gallery_class->nonce_action;
185
-			$gallery_nonce = wp_create_nonce( $gallery_nonce_action );
185
+			$gallery_nonce = wp_create_nonce($gallery_nonce_action);
186 186
 			
187 187
 			
188 188
             if ($allow_change_date) {
@@ -197,13 +197,13 @@  discard block
 block discarded – undo
197 197
 			  
198 198
 			if (function_exists('rest_url')) {
199 199
 				//$rest_root = esc_url_raw( rest_url());
200
-				$rest_nonce = wp_create_nonce( 'wp_rest' );
201
-				$settings = array( 'root' => $rest_root, 'nonce' => $rest_nonce );
202
-				wp_enqueue_script( 'wp-api', '', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
203
-				wp_localize_script( 'wp-api', 'wpApiSettings', $settings );
204
-				wp_localize_script( 'wp-api', 'WP_API_Settings', $settings );
200
+				$rest_nonce = wp_create_nonce('wp_rest');
201
+				$settings = array('root' => $rest_root, 'nonce' => $rest_nonce);
202
+				wp_enqueue_script('wp-api', '', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true);
203
+				wp_localize_script('wp-api', 'wpApiSettings', $settings);
204
+				wp_localize_script('wp-api', 'WP_API_Settings', $settings);
205 205
 				
206
-				if ( class_exists( 'WP_REST_Controller' )) {
206
+				if (class_exists('WP_REST_Controller')) {
207 207
 					// we are using REST API V2
208 208
 					$using_restapiv2 = true;
209 209
 				}
@@ -223,8 +223,8 @@  discard block
 block discarded – undo
223 223
 
224 224
 			// localized objects
225 225
 			$objects = array(
226
-				'ajaxurl' 			=> esc_url( $api_url ),
227
-				'ajaxurl2' 			=> esc_url( admin_url( 'admin-ajax.php' )),
226
+				'ajaxurl' 			=> esc_url($api_url),
227
+				'ajaxurl2' 			=> esc_url(admin_url('admin-ajax.php')),
228 228
 				'siteUrl'           => site_url(),
229 229
 				'rest_root'         => $rest_root,
230 230
 				'rest_nonce'        => $rest_nonce,
@@ -233,13 +233,13 @@  discard block
 block discarded – undo
233 233
 				'featImgClass'		=> $featImgClass,
234 234
 				'titleClass'		=> $titleClass,
235 235
 				'strings'			=> $strings,
236
-				'settingsLink'		=> function_exists('is_multisite') && is_multisite() ? network_admin_url( 'settings.php?page=lasso-editor' ) : admin_url( 'admin.php?page=lasso-editor-settings' ),
237
-				'post_status'		=> get_post_status( $postid ),
236
+				'settingsLink'		=> function_exists('is_multisite') && is_multisite() ? network_admin_url('settings.php?page=lasso-editor') : admin_url('admin.php?page=lasso-editor-settings'),
237
+				'post_status'		=> get_post_status($postid),
238 238
 				'postid'			=> $postid,
239 239
 				'permalink'			=> $permalink,
240 240
 				'edit_others_pages'	=> current_user_can('edit_others_pages') ? true : false,
241 241
 				'edit_others_posts'	=> current_user_can('edit_others_posts') ? true : false,
242
-				'userCanEdit'		=> current_user_can('edit_post', $postid ),
242
+				'userCanEdit'		=> current_user_can('edit_post', $postid),
243 243
 				'can_publish'		=> is_page() ? current_user_can('publish_pages') : current_user_can('publish_posts'),
244 244
 				//'can_publish_posts'	=> current_user_can('publish_posts'),
245 245
 				//'can_publish_pages'	=> current_user_can('publish_pages'),
@@ -275,37 +275,37 @@  discard block
 block discarded – undo
275 275
 				'postTags'    		=> lasso_get_objects('tag'),
276 276
 				'noResultsDiv'		=> lasso_editor_empty_results(),
277 277
 				'noRevisionsDiv'	=> lasso_editor_empty_results('revision'),
278
-				'mapTileProvider'   => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider( $postid ) : false,
279
-				'mapLocations'		=> get_post_meta( $postid, 'ase_map_component_locations' ),
280
-				'mapStart'			=> get_post_meta( $postid, 'ase_map_component_start_point', true ),
281
-				'mapZoom'			=> get_post_meta( $postid, 'ase_map_component_zoom', true ),
278
+				'mapTileProvider'   => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider($postid) : false,
279
+				'mapLocations'		=> get_post_meta($postid, 'ase_map_component_locations'),
280
+				'mapStart'			=> get_post_meta($postid, 'ase_map_component_start_point', true),
281
+				'mapZoom'			=> get_post_meta($postid, 'ase_map_component_zoom', true),
282 282
 				'revisionModal' 	=> lasso_editor_revision_modal(),
283 283
 				'isMobile'          => wp_is_mobile(),
284
-				'enableAutoSave'    => lasso_editor_get_option( 'enable_autosave', 'lasso_editor' ),
284
+				'enableAutoSave'    => lasso_editor_get_option('enable_autosave', 'lasso_editor'),
285 285
 				'showColor'         => $show_color,
286 286
 				'showAlignment'     => $show_align,
287 287
 				'showIgnoredItems'  => lasso_editor_get_option('show_ignored_items', 'lasso_editor'),
288 288
 				'restapi2'          => $using_restapiv2,
289 289
 				'saveusingrest'     => $using_restapiv2 && !$disableRESTSave,
290
-				'newObjectContent'  => '<p>'.apply_filters( 'lasso_new_object_content', __( 'Once upon a time...','lasso') ).'</p>',
290
+				'newObjectContent'  => '<p>'.apply_filters('lasso_new_object_content', __('Once upon a time...', 'lasso')).'</p>',
291 291
 				'disableSavePost'   => $save_to_post_disabled,
292 292
 				'disableEditPost'   => $edit_post_disabled,
293 293
 				'boldTag'           => $bold_tag,
294 294
 				'iTag'           	=> $i_tag,
295 295
 				'customFields'      => $custom_fields,
296
-				'clickToInsert'     => ($insert_comp_ui =='click'),
297
-				'buttonOnEmptyP'     => ($insert_comp_ui =='mediumcom'),      // auto show a button to insert components on an empty paragraph      
296
+				'clickToInsert'     => ($insert_comp_ui == 'click'),
297
+				'buttonOnEmptyP'     => ($insert_comp_ui == 'mediumcom'), // auto show a button to insert components on an empty paragraph      
298 298
                 'rtl'               => is_rtl(),				
299
-				'skipToEdit'        =>( $delta < 10 && $delta >=0 ), // if it's a new post, skip to edit mode
299
+				'skipToEdit'        =>($delta < 10 && $delta >= 0), // if it's a new post, skip to edit mode
300 300
 				'linksEditable'    => $links_editable,
301 301
 				'supportPendingStatus' => !$no_pending_status,
302
-				'tableCode' => apply_filters( 'lasso_table_html_code','<table><tr><th>Cell 1</th><th>Cell 2</th></tr><tr><td>Cell 3</td><td>Cell 4</td></tr></table><p></p>'),
303
-                'hasGutenberg' => (function_exists( 'has_blocks' ) && has_blocks( $post->post_content)) || self::gutenberg_active(),//,
302
+				'tableCode' => apply_filters('lasso_table_html_code', '<table><tr><th>Cell 1</th><th>Cell 2</th></tr><tr><td>Cell 3</td><td>Cell 4</td></tr></table><p></p>'),
303
+                'hasGutenberg' => (function_exists('has_blocks') && has_blocks($post->post_content)) || self::gutenberg_active(), //,
304 304
                 'multipages'=> $multipage,
305 305
                 'post_content'=>$post_content,
306 306
                 'post_excerpt'=>$post_excerpt,
307
-                'oldWPimg'=> $use_old_wpimg =='on',
308
-                'prefixHTTP'=> $link_prefix_http =='on'
307
+                'oldWPimg'=> $use_old_wpimg == 'on',
308
+                'prefixHTTP'=> $link_prefix_http == 'on'
309 309
 			);
310 310
 
311 311
 
@@ -314,9 +314,9 @@  discard block
 block discarded – undo
314 314
 			
315 315
 			if (!$using_restapiv2) {
316 316
                // enqueue REST API V1
317
-			   wp_enqueue_script( 'wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
318
-			   $settings = array( 'root' => home_url( $home_url ), 'nonce' => wp_create_nonce( 'wp_json' ) );
319
-			   wp_localize_script( 'wp-api-js', 'WP_API_Settings', $settings );
317
+			   wp_enqueue_script('wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true);
318
+			   $settings = array('root' => home_url($home_url), 'nonce' => wp_create_nonce('wp_json'));
319
+			   wp_localize_script('wp-api-js', 'WP_API_Settings', $settings);
320 320
 			}
321 321
 			
322 322
 			if ($allow_change_date) {
@@ -325,13 +325,13 @@  discard block
 block discarded – undo
325 325
 				wp_enqueue_style('jquery-ui');
326 326
 			}
327 327
 
328
-			$postfix = ( defined( 'SCRIPT_DEBUG' ) && true === SCRIPT_DEBUG ) ? '' : '.min';
328
+			$postfix = (defined('SCRIPT_DEBUG') && true === SCRIPT_DEBUG) ? '' : '.min';
329 329
 			if ($show_color) {
330
-				wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api','iris'), LASSO_VERSION, true);
330
+				wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api', 'iris'), LASSO_VERSION, true);
331 331
 			} else {
332
-			    wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
332
+			    wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
333 333
 			}
334
-			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects ) );
334
+			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects));
335 335
 
336 336
 
337 337
 		}
@@ -341,20 +341,20 @@  discard block
 block discarded – undo
341 341
     function gutenberg_active() {
342 342
         
343 343
         // Gutenberg plugin is installed and activated.
344
-        $gutenberg = ! ( false === has_filter( 'replace_editor', 'gutenberg_init' ) );
344
+        $gutenberg = !(false === has_filter('replace_editor', 'gutenberg_init'));
345 345
 
346 346
         // Block editor since 5.0.
347
-        $block_editor = version_compare( $GLOBALS['wp_version'], '5.0-beta', '>' );
347
+        $block_editor = version_compare($GLOBALS['wp_version'], '5.0-beta', '>');
348 348
 
349
-        if ( ! $gutenberg && ! $block_editor ) {
349
+        if (!$gutenberg && !$block_editor) {
350 350
             return false;
351 351
         }
352 352
 
353
-        if ( self::is_classic_editor_plugin_active() ) {
354
-            $editor_option       = get_option( 'classic-editor-replace' );
355
-            $block_editor_active = array( 'no-replace', 'block' );
353
+        if (self::is_classic_editor_plugin_active()) {
354
+            $editor_option       = get_option('classic-editor-replace');
355
+            $block_editor_active = array('no-replace', 'block');
356 356
 
357
-            return in_array( $editor_option, $block_editor_active, true );
357
+            return in_array($editor_option, $block_editor_active, true);
358 358
         }
359 359
 
360 360
         return true;
@@ -366,11 +366,11 @@  discard block
 block discarded – undo
366 366
      * @return bool
367 367
      */
368 368
     function is_classic_editor_plugin_active() {
369
-        if ( ! function_exists( 'is_plugin_active' ) ) {
370
-            include_once ABSPATH . 'wp-admin/includes/plugin.php';
369
+        if (!function_exists('is_plugin_active')) {
370
+            include_once ABSPATH.'wp-admin/includes/plugin.php';
371 371
         }
372 372
 
373
-        if ( is_plugin_active( 'classic-editor/classic-editor.php' ) ) {
373
+        if (is_plugin_active('classic-editor/classic-editor.php')) {
374 374
             return true;
375 375
         }
376 376
 
Please login to merge, or discard this patch.
public/includes/components.php 1 patch
Spacing   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -16,80 +16,80 @@  discard block
 block discarded – undo
16 16
 
17 17
 	$array = array(
18 18
 		'quote' => array(
19
-			'name'    => __('Quote','lasso'),
19
+			'name'    => __('Quote', 'lasso'),
20 20
 			'content' => lasso_quote_component(),
21 21
 		),
22 22
 		'image' => array(
23
-			'name'    => __('Image','lasso'),
23
+			'name'    => __('Image', 'lasso'),
24 24
 			'content' => lasso_image_component(),
25 25
 		),
26 26
 		'parallax' => array(
27
-			'name'    => __('Parallax','lasso'),
27
+			'name'    => __('Parallax', 'lasso'),
28 28
 			'content' => lasso_parallax_component(),
29 29
 		),
30 30
 		'audio' => array(
31
-			'name'    => __('Audio','lasso'),
31
+			'name'    => __('Audio', 'lasso'),
32 32
 			'content' => lasso_audio_component(),
33 33
 		),
34 34
 		'content' => array(
35
-			'name'    => __('Content','lasso'),
35
+			'name'    => __('Content', 'lasso'),
36 36
 			'content' => lasso_content_component(),
37 37
 		),
38 38
 		'character' => array(
39
-			'name'    => __('Character','lasso'),
39
+			'name'    => __('Character', 'lasso'),
40 40
 			'content' => lasso_character_component(),
41 41
 		),
42 42
 		'collection' => array(
43
-			'name'    => __('Collection','lasso'),
43
+			'name'    => __('Collection', 'lasso'),
44 44
 			'content' => lasso_collections_component(),
45 45
 		),
46 46
 		'document' => array(
47
-			'name'    => __('Document','lasso'),
47
+			'name'    => __('Document', 'lasso'),
48 48
 			'content' => lasso_document_component(),
49 49
 		),
50 50
 		'gallery' => array(
51
-			'name'    => __('Gallery','lasso'),
51
+			'name'    => __('Gallery', 'lasso'),
52 52
 			'content' => lasso_gallery_component(),
53 53
 		),
54 54
 		'chapter' => array(
55
-			'name'    => __('Chapter','lasso'),
55
+			'name'    => __('Chapter', 'lasso'),
56 56
 			'content' => lasso_heading_component(),
57 57
 		),
58 58
 		'map' => array(
59
-			'name'    => __('Map','lasso'),
59
+			'name'    => __('Map', 'lasso'),
60 60
 			'content' => lasso_map_component(),
61 61
 		),
62 62
 		'timeline_stop' => array(
63
-			'name'    => __('Timeline','lasso'),
63
+			'name'    => __('Timeline', 'lasso'),
64 64
 			'content' => lasso_timeline_component(),
65 65
 		),
66 66
 		'video' => array(
67
-			'name'    => __('Video','lasso'),
67
+			'name'    => __('Video', 'lasso'),
68 68
 			'content' => lasso_video_component(),
69 69
 		),
70 70
 		'wpimg' => array(
71
-			'name'    => __('WordPress Image','lasso'),
71
+			'name'    => __('WordPress Image', 'lasso'),
72 72
 			'content' => lasso_wp_image(),
73 73
 		),
74 74
 		'wpquote' => array(
75
-			'name'    => __('WordPress Quote','lasso'),
75
+			'name'    => __('WordPress Quote', 'lasso'),
76 76
 			'content' => lasso_wp_quote(),
77 77
 		),
78 78
 		'gallery_pop' => array(
79
-			'name'    => __('Gallery Pop','lasso'),
79
+			'name'    => __('Gallery Pop', 'lasso'),
80 80
 			'content' => lasso_gallery_pop_component(),
81 81
 		),
82 82
 		'events' => array(
83
-			'name'    => __('Events','lasso'),
83
+			'name'    => __('Events', 'lasso'),
84 84
 			'content' => lasso_event_component(),
85 85
 		),
86 86
 		'wpvideo' => array(
87
-			'name'    => __('WordPress Image','lasso'),
87
+			'name'    => __('WordPress Image', 'lasso'),
88 88
 			'content' => lasso_wp_video(),
89 89
 		),
90 90
 	);
91 91
 
92
-	return apply_filters( 'lasso_components', $array );
92
+	return apply_filters('lasso_components', $array);
93 93
 }
94 94
 
95 95
 /**
@@ -115,124 +115,124 @@  discard block
 block discarded – undo
115 115
  */
116 116
 
117 117
 // 1
118
-if ( !function_exists( 'lasso_quote_component' ) ):
118
+if (!function_exists('lasso_quote_component')):
119 119
 	function lasso_quote_component() {
120 120
 
121
-		return do_shortcode( '[aesop_quote quote="The Universe is made of stories, not of atoms."]' );
121
+		return do_shortcode('[aesop_quote quote="The Universe is made of stories, not of atoms."]');
122 122
 	}
123 123
 endif;
124 124
 
125 125
 // 2
126
-if ( !function_exists( 'lasso_image_component' ) ):
126
+if (!function_exists('lasso_image_component')):
127 127
 	function lasso_image_component() {
128 128
 
129
-		return do_shortcode( '[aesop_image img="'.LASSO_URL.'/public/assets/img/empty-img.png" align="center" imgwidth="100%"]' );
129
+		return do_shortcode('[aesop_image img="'.LASSO_URL.'/public/assets/img/empty-img.png" align="center" imgwidth="100%"]');
130 130
 	}
131 131
 endif;
132 132
 
133 133
 // 3
134
-if ( !function_exists( 'lasso_parallax_component' ) ):
134
+if (!function_exists('lasso_parallax_component')):
135 135
 	function lasso_parallax_component() {
136 136
 
137
-		return do_shortcode( '[aesop_parallax img="'.LASSO_URL.'/public/assets/img/empty-img.png"]' );
137
+		return do_shortcode('[aesop_parallax img="'.LASSO_URL.'/public/assets/img/empty-img.png"]');
138 138
 	}
139 139
 endif;
140 140
 
141 141
 // 4
142
-if ( !function_exists( 'lasso_audio_component' ) ):
142
+if (!function_exists('lasso_audio_component')):
143 143
 	function lasso_audio_component() {
144 144
 
145
-		return do_shortcode( '[aesop_audio src="http://users.skynet.be/fa046054/home/P22/track06.mp3"]' );
145
+		return do_shortcode('[aesop_audio src="http://users.skynet.be/fa046054/home/P22/track06.mp3"]');
146 146
 
147 147
 	}
148 148
 endif;
149 149
 
150 150
 // 5
151
-if ( !function_exists( 'lasso_content_component' ) ):
151
+if (!function_exists('lasso_content_component')):
152 152
 	function lasso_content_component() {
153 153
 
154
-		return do_shortcode( '[aesop_content]Start typing here...[/aesop_content]' );
154
+		return do_shortcode('[aesop_content]Start typing here...[/aesop_content]');
155 155
 	}
156 156
 endif;
157 157
 
158 158
 // 6
159
-if ( !function_exists( 'lasso_character_component' ) ):
159
+if (!function_exists('lasso_character_component')):
160 160
 	function lasso_character_component() {
161 161
 
162
-		return do_shortcode( '[aesop_character img="'.LASSO_URL.'/public/assets/img/empty-img.png" name="Joes Apartment" width="150px"]' );
162
+		return do_shortcode('[aesop_character img="'.LASSO_URL.'/public/assets/img/empty-img.png" name="Joes Apartment" width="150px"]');
163 163
 
164 164
 	}
165 165
 endif;
166 166
 
167 167
 // 7
168
-if ( !function_exists( 'lasso_collections_component' ) ):
168
+if (!function_exists('lasso_collections_component')):
169 169
 	function lasso_collections_component() {
170 170
 
171
-		return do_shortcode( '[aesop_collection]' );
171
+		return do_shortcode('[aesop_collection]');
172 172
 	}
173 173
 endif;
174 174
 
175 175
 // 8
176
-if ( !function_exists( 'lasso_document_component' ) ):
176
+if (!function_exists('lasso_document_component')):
177 177
 	function lasso_document_component() {
178 178
 
179
-		return do_shortcode( '[aesop_document src="'.LASSO_URL.'/public/assets/img/empty-img.png" ]' );
179
+		return do_shortcode('[aesop_document src="'.LASSO_URL.'/public/assets/img/empty-img.png" ]');
180 180
 
181 181
 	}
182 182
 endif;
183 183
 
184 184
 // 9
185
-if ( !function_exists( 'lasso_gallery_component' ) ):
185
+if (!function_exists('lasso_gallery_component')):
186 186
 	function lasso_gallery_component() {
187 187
 
188
-		return do_shortcode( '[aesop_gallery]' );
188
+		return do_shortcode('[aesop_gallery]');
189 189
 
190 190
 	}
191 191
 endif;
192 192
 
193 193
 // 10
194
-if ( !function_exists( 'lasso_heading_component' ) ):
194
+if (!function_exists('lasso_heading_component')):
195 195
 	function lasso_heading_component() {
196 196
 
197
-		return do_shortcode( '[aesop_chapter title="Chapter One" img="'.LASSO_URL.'/public/assets/img/empty-img.png" full="on"]' );
197
+		return do_shortcode('[aesop_chapter title="Chapter One" img="'.LASSO_URL.'/public/assets/img/empty-img.png" full="on"]');
198 198
 	}
199 199
 endif;
200 200
 
201 201
 // 11
202
-if ( !function_exists( 'lasso_map_component' ) ):
202
+if (!function_exists('lasso_map_component')):
203 203
 	function lasso_map_component() {
204 204
 
205 205
 		return '<form id="lasso--map-form" class="aesop-component aesop-map-component lasso--map-drag-holder" enctype="multipart/form-data">
206 206
 				'.lasso_map_form_footer().'
207
-				'.do_shortcode( '[aesop_map sticky="off"]' ).'
207
+				'.do_shortcode('[aesop_map sticky="off"]').'
208 208
 			</form>';
209 209
 
210 210
 	}
211 211
 endif;
212 212
 
213 213
 // 12
214
-if ( !function_exists( 'lasso_timeline_component' ) ):
214
+if (!function_exists('lasso_timeline_component')):
215 215
 	function lasso_timeline_component() {
216 216
 
217
-		return do_shortcode( '[aesop_timeline_stop num="Title" title="2014"]' );
217
+		return do_shortcode('[aesop_timeline_stop num="Title" title="2014"]');
218 218
 
219 219
 	}
220 220
 endif;
221 221
 
222 222
 // 13
223
-if ( !function_exists( 'lasso_video_component' ) ):
223
+if (!function_exists('lasso_video_component')):
224 224
 	function lasso_video_component() {
225 225
 
226
-		return do_shortcode( '[aesop_video src="vimeo" id="59940289" width="100%" align="center"]' );
226
+		return do_shortcode('[aesop_video src="vimeo" id="59940289" width="100%" align="center"]');
227 227
 
228 228
 	}
229 229
 endif;
230 230
 
231 231
 // 14 - since 0.9.1
232
-if ( !function_exists('lasso_wp_image') ):
232
+if (!function_exists('lasso_wp_image')):
233 233
 
234
-	function lasso_wp_image(){
235
-        $use_old_wpimg = lasso_editor_get_option('use_old_wpimg', 'lasso_editor','off');
234
+	function lasso_wp_image() {
235
+        $use_old_wpimg = lasso_editor_get_option('use_old_wpimg', 'lasso_editor', 'off');
236 236
         if ($use_old_wpimg != 'on') {
237 237
         	return '<figure data-component-type="wpimg" class="lasso--wpimg__wrap lasso-component"><img  src="'.LASSO_URL.'/public/assets/img/empty-img.png"></div>';
238 238
         } else {
@@ -243,9 +243,9 @@  discard block
 block discarded – undo
243 243
 endif;
244 244
 
245 245
 // 15 - since 0.9.2
246
-if ( !function_exists('lasso_wp_quote') ):
246
+if (!function_exists('lasso_wp_quote')):
247 247
 
248
-	function lasso_wp_quote(){
248
+	function lasso_wp_quote() {
249 249
 		return '<blockquote data-component-type="wpquote" class="lasso--wpquote lasso-component"><p>The universe is made of stories.</p></blockquote>';
250 250
 	}
251 251
 
@@ -253,15 +253,15 @@  discard block
 block discarded – undo
253 253
 
254 254
 // 16 gallery pop added but not fully supported as of 0.9.9.11 
255 255
 
256
-if ( !function_exists( 'lasso_gallery_pop_component' ) ):
256
+if (!function_exists('lasso_gallery_pop_component')):
257 257
 	function lasso_gallery_pop_component() {
258
-		return do_shortcode( '[aesop_gallery_pop]' );
258
+		return do_shortcode('[aesop_gallery_pop]');
259 259
 	}
260 260
 endif;
261 261
 
262 262
 // 17 - work in progress
263 263
 
264
-if ( !function_exists( 'lasso_event_component' ) ):
264
+if (!function_exists('lasso_event_component')):
265 265
 	function lasso_event_component() {
266 266
 		$id = editus_get_one_id('aesop_events');
267 267
 		return '<div data-component-type="events" class="aesop-component lasso-component"><p>Aesop Event: After setting the event, save and reload the page.</p></div>';
@@ -269,9 +269,9 @@  discard block
 block discarded – undo
269 269
 endif;
270 270
 
271 271
 // 18 - work in progress
272
-if ( !function_exists('lasso_wp_video') ):
272
+if (!function_exists('lasso_wp_video')):
273 273
 
274
-	function lasso_wp_video(){
274
+	function lasso_wp_video() {
275 275
 		return '<div data-component-type="wpvideo" class="lasso--wpvideo__wrap lasso-component"><video class="wp-video-0"></video>';
276 276
 	}
277 277
 
@@ -280,10 +280,10 @@  discard block
 block discarded – undo
280 280
 // helper function to retrieve one id for default option
281 281
 function editus_get_one_id($type)
282 282
 {
283
-	$args = array( 'posts_per_page' => 1, 'post_type' => $type );
284
-	$posts = get_posts( $args );
285
-	if ( $posts ) {
286
-		foreach ( $posts as $post ) {
283
+	$args = array('posts_per_page' => 1, 'post_type' => $type);
284
+	$posts = get_posts($args);
285
+	if ($posts) {
286
+		foreach ($posts as $post) {
287 287
 			return $post->ID;
288 288
 		}
289 289
 	}
Please login to merge, or discard this patch.
public/includes/editor-modules.php 1 patch
Spacing   +293 added lines, -293 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';
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 		?>
58 58
 		<style>
59 59
 		#lasso-html--table:before {
60
-			content: "<?php esc_attr_e( 'Table', 'lasso' );?>";
60
+			content: "<?php esc_attr_e('Table', 'lasso'); ?>";
61 61
 		}
62 62
 		
63 63
 		
@@ -67,32 +67,32 @@  discard block
 block discarded – undo
67 67
 		?>
68 68
 		
69 69
 		.lasso-editor-controls--wrap, #lasso--post-settings2,#lasso--save,#lasso--post-delete,#lasso--exit,#lasso--publish {
70
-			background-image: -webkit-linear-gradient(top,<?php echo $button_color1;?> 0,<?php echo $button_color2;?> 100%);
71
-			background-image: -o-linear-gradient(top,<?php echo $button_color1;?> 0,<?php echo $button_color2;?> 100%);
72
-			background-image: linear-gradient(to bottom,<?php echo $button_color1;?> 0,<?php echo $button_color2;?> 100%);
73
-			color: <?php echo $text_color;?>;
70
+			background-image: -webkit-linear-gradient(top,<?php echo $button_color1; ?> 0,<?php echo $button_color2; ?> 100%);
71
+			background-image: -o-linear-gradient(top,<?php echo $button_color1; ?> 0,<?php echo $button_color2; ?> 100%);
72
+			background-image: linear-gradient(to bottom,<?php echo $button_color1; ?> 0,<?php echo $button_color2; ?> 100%);
73
+			color: <?php echo $text_color; ?>;
74 74
 		}
75 75
 		
76 76
 		.lasso--controls__right a:before, #lasso-toolbar--html__footer_desc, ul.lasso-editor-controls li:before,#lasso-side-comp-button.toolbar--side li:before
77 77
         {
78
-			color: <?php echo $text_color;?> !important;
78
+			color: <?php echo $text_color; ?> !important;
79 79
 		}
80 80
 		
81 81
 		
82 82
 		
83 83
 		ul.lasso-editor-controls li:hover, #lasso--exit:hover,#lasso--post-settings2:hover,#lasso--post-delete:hover,#lasso--publish:hover,#lasso--save:hover {
84
-			background-image: -webkit-linear-gradient(top,<?php echo $hover_color1;?> 0,<?php echo $hover_color2;?> 100%);
85
-			background-image: -o-linear-gradient(top,<?php echo $hover_color1;?> 0,<?php echo $hover_color2;?> 100%);
86
-			background-image: linear-gradient(to bottom,<?php echo $hover_color1;?> 0,<?php echo $hover_color2;?> 100%);
84
+			background-image: -webkit-linear-gradient(top,<?php echo $hover_color1; ?> 0,<?php echo $hover_color2; ?> 100%);
85
+			background-image: -o-linear-gradient(top,<?php echo $hover_color1; ?> 0,<?php echo $hover_color2; ?> 100%);
86
+			background-image: linear-gradient(to bottom,<?php echo $hover_color1; ?> 0,<?php echo $hover_color2; ?> 100%);
87 87
 		}
88 88
 		
89 89
 		.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,
90 90
 		#lasso-toolbar--link.link--drop-up #lasso-toolbar--link__wrap		{
91
-			background: <?php echo $dialog_color;?>;
92
-			color: <?php echo $text_color;?>;
91
+			background: <?php echo $dialog_color; ?>;
92
+			color: <?php echo $text_color; ?>;
93 93
 		}
94 94
 		.sweet-alert p,.lasso--modal__inner label,.lasso--toolbar__inner label {
95
-			color: <?php echo $text_color;?> !important;
95
+			color: <?php echo $text_color; ?> !important;
96 96
 		}
97 97
 		
98 98
 		<?php if (!$is_mobile) { ?>
@@ -126,48 +126,48 @@  discard block
 block discarded – undo
126 126
         }
127 127
         ?>
128 128
         </style>
129
-		<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();?>" >
129
+		<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(); ?>" >
130 130
 
131
-			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class;?> "  <?php echo $mobile_style ?> >
131
+			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class; ?> "  <?php echo $mobile_style ?> >
132 132
 
133
-				<?php do_action( 'lasso_editor_controls_before' );
133
+				<?php do_action('lasso_editor_controls_before');
134 134
 
135
-				if ( $is_capable ) { ?>
135
+				if ($is_capable) { ?>
136 136
 
137
-					<li id="lasso--edit" title="<?php esc_attr_e( 'Edit Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
137
+					<li id="lasso--edit" title="<?php esc_attr_e('Edit Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
138 138
 
139
-					<?php if ( 'off' == $post_settings_disabled || empty( $post_settings_disabled ) ) { ?>
140
-						<li id="lasso--post-settings" title="<?php esc_attr_e( 'Post Settings', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
139
+					<?php if ('off' == $post_settings_disabled || empty($post_settings_disabled)) { ?>
140
+						<li id="lasso--post-settings" title="<?php esc_attr_e('Post Settings', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
141 141
 					<?php }
142 142
 
143 143
 				} ?>
144 144
 
145
-				<li id="lasso--post-all" title="<?php esc_attr_e( 'All Posts', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
145
+				<li id="lasso--post-all" title="<?php esc_attr_e('All Posts', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
146 146
 
147
-				<?php if ( $is_capable && wp_revisions_enabled( $post ) ) { ?>
148
-					<li id="lasso--post-revisions" title="<?php esc_attr_e( 'Revisions', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
147
+				<?php if ($is_capable && wp_revisions_enabled($post)) { ?>
148
+					<li id="lasso--post-revisions" title="<?php esc_attr_e('Revisions', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
149 149
 				<?php } ?>
150 150
 
151
-				<?php if ( ( 'off' == $post_new_disabled || empty( $post_new_disabled ) && lasso_user_can('edit_posts') ) ) { ?>
152
-					<li id="lasso--post-new" title="<?php esc_attr_e( 'Add Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
151
+				<?php if (('off' == $post_new_disabled || empty($post_new_disabled) && lasso_user_can('edit_posts'))) { ?>
152
+					<li id="lasso--post-new" title="<?php esc_attr_e('Add Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
153 153
 				<?php } ?>
154 154
 
155
-				<?php do_action( 'lasso_editor_controls_after' );?>
155
+				<?php do_action('lasso_editor_controls_after'); ?>
156 156
 
157 157
 			</ul>
158 158
 
159
-			<?php if ( is_singular() && !$is_mobile ) { ?>
159
+			<?php if (is_singular() && !$is_mobile) { ?>
160 160
 
161
-				<div class="lasso--controls__right" data-posttype="<?php echo get_post_type( get_the_ID() );?>" data-status="<?php echo $status;?>">
161
+				<div class="lasso--controls__right" data-posttype="<?php echo get_post_type(get_the_ID()); ?>" data-status="<?php echo $status; ?>">
162 162
 				
163
-					<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>
164
-					<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>
163
+					<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>
164
+					<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>
165 165
 
166 166
 
167
-					<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>
167
+					<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>
168 168
 
169
-					<?php if ( ('draft' == $status ) || ('pending' == $status && $can_publish) ) { ?>
170
-						<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>
169
+					<?php if (('draft' == $status) || ('pending' == $status && $can_publish)) { ?>
170
+						<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>
171 171
 					<?php } ?>
172 172
 					
173 173
 
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 		</div>
179 179
 		
180 180
 		
181
-		<?php do_action( 'lasso_editor_controls_after_outside' );?>
181
+		<?php do_action('lasso_editor_controls_after_outside'); ?>
182 182
 
183 183
 	<?php }
184 184
 }
@@ -196,9 +196,9 @@  discard block
 block discarded – undo
196 196
 
197 197
 
198 198
 	// let users add custom css classes
199
-	$custom_classes = apply_filters( 'lasso_sidebar_classes', '' );
199
+	$custom_classes = apply_filters('lasso_sidebar_classes', '');
200 200
 	?>
201
-	<div id="lasso--sidebar" class="<?php echo sanitize_html_class( $custom_classes );?>" >
201
+	<div id="lasso--sidebar" class="<?php echo sanitize_html_class($custom_classes); ?>" >
202 202
 		<div class="lasso--sidebar__inner">
203 203
 			<div id="aesop-generator-settings"><div id="lasso--component__settings"></div></div>
204 204
 		</div>
@@ -220,21 +220,21 @@  discard block
 block discarded – undo
220 220
 	$is_mobile = wp_is_mobile();
221 221
 
222 222
 	// check for lasso story engine and add a class doniting this
223
-	$ase_status = class_exists( 'Aesop_Core' ) || defined( 'LASSO_CUSTOM' ) ? 'ase-active' : 'ase-not-active';
223
+	$ase_status = class_exists('Aesop_Core') || defined('LASSO_CUSTOM') ? 'ase-active' : 'ase-not-active';
224 224
 
225 225
 	// let users add custom css classes
226
-	$custom_classes = apply_filters( 'lasso_toolbar_classes', '' );
226
+	$custom_classes = apply_filters('lasso_toolbar_classes', '');
227 227
 
228 228
 	// are toolbar headings enabled
229
-	$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
230
-	$toolbar_headings_h4      = lasso_editor_get_option( 'toolbar_headings_h4', 'lasso_editor' );
231
-	$toolbar_list      = lasso_editor_get_option( 'toolbar_list', 'lasso_editor' );
229
+	$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
230
+	$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
231
+	$toolbar_list = lasso_editor_get_option('toolbar_list', 'lasso_editor');
232 232
 
233
-	$toolbar_class  = $toolbar_headings ? 'toolbar-extended' : false;
233
+	$toolbar_class = $toolbar_headings ? 'toolbar-extended' : false;
234 234
 	
235 235
 	// mobile styles
236 236
     $mobile_class = $is_mobile ? 'lasso-mobile' : false;
237
-	$mobile_style =$is_mobile ? 'style="bottom:0px;"' : null;
237
+	$mobile_style = $is_mobile ? 'style="bottom:0px;"' : null;
238 238
 	
239 239
 	//show color
240 240
 	$show_color = lasso_editor_get_option('toolbar_show_color', 'lasso_editor');
@@ -242,126 +242,126 @@  discard block
 block discarded – undo
242 242
 	//show alignment
243 243
 	$show_align = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor');
244 244
 	
245
-	$status = get_post_status( get_the_ID() );
245
+	$status = get_post_status(get_the_ID());
246 246
 	
247
-	$shortcodify_disabled = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
247
+	$shortcodify_disabled = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor');
248 248
 	
249
-	$sc_saving_class = ('on' == $shortcodify_disabled || $ase_status == 'ase-not-active')  ? 'shortcodify-disabled' : 'shortcodify-enabled';
249
+	$sc_saving_class = ('on' == $shortcodify_disabled || $ase_status == 'ase-not-active') ? 'shortcodify-disabled' : 'shortcodify-enabled';
250 250
 
251 251
 
252 252
 	?>
253
-	<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 ?>>
254
-		<ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"';}?>>
255
-			<?php do_action( 'lasso_toolbar_components_before' );?>
256
-		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e( 'Bold', 'lasso' );?>"></li>
257
-		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e( 'Underline', 'lasso' );?>"></li>
258
-		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e( 'Italicize', 'lasso' );?>"></li>
259
-		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e( 'Strikethrough', 'lasso' );?>"></li>
260
-			<li id="lasso-toolbar--components" class="lasso-toolbar--components" title="<?php esc_attr_e( 'Insert Component', 'lasso' );?>" style="color:#ffffa0;">
253
+	<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 ?>>
254
+		<ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"'; }?>>
255
+			<?php do_action('lasso_toolbar_components_before'); ?>
256
+		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e('Bold', 'lasso'); ?>"></li>
257
+		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e('Underline', 'lasso'); ?>"></li>
258
+		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e('Italicize', 'lasso'); ?>"></li>
259
+		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e('Strikethrough', 'lasso'); ?>"></li>
260
+			<li id="lasso-toolbar--components" class="lasso-toolbar--components" title="<?php esc_attr_e('Insert Component', 'lasso'); ?>" style="color:#ffffa0;">
261 261
 			    <ul id="lasso-toolbar--components__list" style="display:none;color:white;">
262
-			    	<?php if ( 'ase-active' == $ase_status ): ?>
263
-						<li data-type="image" title="<?php esc_attr_e( 'Image', 'lasso' );?>" class="lasso-toolbar--component__image"></li>
264
-						<li data-type="character" title="<?php esc_attr_e( 'Character', 'lasso' );?>" class="lasso-toolbar--component__character"></li>
265
-						<li data-type="quote" title="<?php esc_attr_e( 'Quote', 'lasso' );?>"  class="lasso-toolbar--component__quote"></li>
266
-						<!--li data-type="content" title="<?php esc_attr_e( 'Content', 'lasso' );?>"  class="lasso-toolbar--component__content"></li-->
267
-						<li data-type="chapter" title="<?php esc_attr_e( 'Chapter', 'lasso' );?>"  class="lasso-toolbar--component__chapter"></li>
268
-						<li data-type="parallax" title="<?php esc_attr_e( 'Parallax', 'lasso' );?>"  class="lasso-toolbar--component__parallax"></li>
269
-						<li data-type="audio" title="<?php esc_attr_e( 'Audio', 'lasso' );?>"  class="lasso-toolbar--component__audio"></li>
270
-						<li data-type="video" title="<?php esc_attr_e( 'Video', 'lasso' );?>"  class="lasso-toolbar--component__video"></li>
271
-						<li data-type="map" title="<?php esc_attr_e( 'Map', 'lasso' );?>"  class="lasso-toolbar--component__map"></li>
272
-						<li data-type="timeline_stop" title="<?php esc_attr_e( 'Timeline', 'lasso' );?>"  class="lasso-toolbar--component__timeline"></li>
273
-						<li data-type="document" title="<?php esc_attr_e( 'Document', 'lasso' );?>"  class="lasso-toolbar--component__document"></li>
274
-						<li data-type="collection" title="<?php esc_attr_e( 'Collection', 'lasso' );?>"  class="lasso-toolbar--component__collection"></li>
275
-						<li data-type="gallery" title="<?php esc_attr_e( 'Gallery', 'lasso' );?>"  class="lasso-toolbar--component__gallery"></li>
276
-						<?php if ( class_exists ('Aesop_GalleryPop') ) { ?>
277
-						     <li data-type="gallery" title="<?php esc_attr_e( 'Gallery Pop', 'lasso' );?>"  class="lasso-toolbar--component__gallerypop"></li>
262
+			    	<?php if ('ase-active' == $ase_status): ?>
263
+						<li data-type="image" title="<?php esc_attr_e('Image', 'lasso'); ?>" class="lasso-toolbar--component__image"></li>
264
+						<li data-type="character" title="<?php esc_attr_e('Character', 'lasso'); ?>" class="lasso-toolbar--component__character"></li>
265
+						<li data-type="quote" title="<?php esc_attr_e('Quote', 'lasso'); ?>"  class="lasso-toolbar--component__quote"></li>
266
+						<!--li data-type="content" title="<?php esc_attr_e('Content', 'lasso'); ?>"  class="lasso-toolbar--component__content"></li-->
267
+						<li data-type="chapter" title="<?php esc_attr_e('Chapter', 'lasso'); ?>"  class="lasso-toolbar--component__chapter"></li>
268
+						<li data-type="parallax" title="<?php esc_attr_e('Parallax', 'lasso'); ?>"  class="lasso-toolbar--component__parallax"></li>
269
+						<li data-type="audio" title="<?php esc_attr_e('Audio', 'lasso'); ?>"  class="lasso-toolbar--component__audio"></li>
270
+						<li data-type="video" title="<?php esc_attr_e('Video', 'lasso'); ?>"  class="lasso-toolbar--component__video"></li>
271
+						<li data-type="map" title="<?php esc_attr_e('Map', 'lasso'); ?>"  class="lasso-toolbar--component__map"></li>
272
+						<li data-type="timeline_stop" title="<?php esc_attr_e('Timeline', 'lasso'); ?>"  class="lasso-toolbar--component__timeline"></li>
273
+						<li data-type="document" title="<?php esc_attr_e('Document', 'lasso'); ?>"  class="lasso-toolbar--component__document"></li>
274
+						<li data-type="collection" title="<?php esc_attr_e('Collection', 'lasso'); ?>"  class="lasso-toolbar--component__collection"></li>
275
+						<li data-type="gallery" title="<?php esc_attr_e('Gallery', 'lasso'); ?>"  class="lasso-toolbar--component__gallery"></li>
276
+						<?php if (class_exists('Aesop_GalleryPop')) { ?>
277
+						     <li data-type="gallery" title="<?php esc_attr_e('Gallery Pop', 'lasso'); ?>"  class="lasso-toolbar--component__gallerypop"></li>
278 278
 						<?php }?>
279
-						<?php if ( class_exists ('Aesop_Events') ) { ?>
280
-						     <li data-type="events" title="<?php esc_attr_e( 'Event', 'lasso' );?>"  class="lasso-toolbar--component__event"></li>
279
+						<?php if (class_exists('Aesop_Events')) { ?>
280
+						     <li data-type="events" title="<?php esc_attr_e('Event', 'lasso'); ?>"  class="lasso-toolbar--component__event"></li>
281 281
 						<?php }?>
282 282
 					<?php else: ?>
283
-						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );?>" class="image lasso-toolbar--component__image"></li>
284
-						<li data-type="wpquote" title="<?php esc_attr_e( 'WordPress Quote', 'lasso' );?>" class="quote lasso-toolbar--component__quote"></li>
285
-						<!--li data-type="wpvideo" title="<?php esc_attr_e( 'WordPress Video', 'lasso' );?>" class="video lasso-toolbar--component__video"></li-->
283
+						<li data-type="wpimg" title="<?php esc_attr_e('WordPress Image', 'lasso'); ?>" class="image lasso-toolbar--component__image"></li>
284
+						<li data-type="wpquote" title="<?php esc_attr_e('WordPress Quote', 'lasso'); ?>" class="quote lasso-toolbar--component__quote"></li>
285
+						<!--li data-type="wpvideo" title="<?php esc_attr_e('WordPress Video', 'lasso'); ?>" class="video lasso-toolbar--component__video"></li-->
286 286
 					<?php endif; ?>
287
-					<?php do_action( 'lasso_toolbar_components' );?>
287
+					<?php do_action('lasso_toolbar_components'); ?>
288 288
 			    </ul>
289 289
 			</li>
290
-		    <?php if ( $toolbar_headings ): ?>
291
-		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>"></li>
292
-		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>"></li>
290
+		    <?php if ($toolbar_headings): ?>
291
+		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>"></li>
292
+		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>"></li>
293 293
 			<?php endif; ?>
294 294
 			
295 295
 			
296 296
 			
297
-			<?php if ( $toolbar_headings_h4 ): ?>
298
-		    <li id="lasso-toolbar--h4" title="<?php esc_attr_e( 'H4 Heading', 'lasso' );?>"></li>
299
-		    <li id="lasso-toolbar--h5" title="<?php esc_attr_e( 'H5 Heading', 'lasso' );?>"></li>
300
-			<li id="lasso-toolbar--h6" title="<?php esc_attr_e( 'H6 Heading', 'lasso' );?>"></li>
297
+			<?php if ($toolbar_headings_h4): ?>
298
+		    <li id="lasso-toolbar--h4" title="<?php esc_attr_e('H4 Heading', 'lasso'); ?>"></li>
299
+		    <li id="lasso-toolbar--h5" title="<?php esc_attr_e('H5 Heading', 'lasso'); ?>"></li>
300
+			<li id="lasso-toolbar--h6" title="<?php esc_attr_e('H6 Heading', 'lasso'); ?>"></li>
301 301
 			<?php endif; ?>
302 302
 			
303
-			<?php if ( $show_color ): ?>
304
-		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e( 'Set Color for Selected Text', 'lasso' );?>"></li>
305
-		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e( 'Choose Color', 'lasso' );?>"></li>
303
+			<?php if ($show_color): ?>
304
+		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e('Set Color for Selected Text', 'lasso'); ?>"></li>
305
+		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e('Choose Color', 'lasso'); ?>"></li>
306 306
 			<?php endif; ?>
307 307
 			
308
-			<?php if ( $toolbar_list ): ?>
309
-		    <li id="lasso-toolbar--ol" title="<?php esc_attr_e( 'Ordered List', 'lasso' );?>"></li>
310
-		    <li id="lasso-toolbar--ul" title="<?php esc_attr_e( 'Unordered List', 'lasso' );?>"></li>
308
+			<?php if ($toolbar_list): ?>
309
+		    <li id="lasso-toolbar--ol" title="<?php esc_attr_e('Ordered List', 'lasso'); ?>"></li>
310
+		    <li id="lasso-toolbar--ul" title="<?php esc_attr_e('Unordered List', 'lasso'); ?>"></li>
311 311
 			<?php endif; ?>
312 312
 					
313 313
 		    
314
-			<li id="lasso-toolbar--link" title="<?php esc_attr_e( 'Anchor Link', 'lasso' );?>">
314
+			<li id="lasso-toolbar--link" title="<?php esc_attr_e('Anchor Link', 'lasso'); ?>">
315 315
 		    	<div id="lasso-toolbar--link__wrap" <?php echo $mobile_style ?> >
316
-		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'http://url.com', 'lasso' );?>"></div>
317
-		    		<a href="#" title="<?php esc_attr_e( 'Create Link', 'lasso' );?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
316
+		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e('http://url.com', 'lasso'); ?>"></div>
317
+		    		<a href="#" title="<?php esc_attr_e('Create Link', 'lasso'); ?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
318 318
 					<input class="styled-checkbox" type="checkbox" id="aesop-toolbar--link_newtab" checked/>
319
-                    <label for="aesop-toolbar--link_newtab"><?php esc_attr_e( 'Open in a New Tab', 'lasso' );?></label>
319
+                    <label for="aesop-toolbar--link_newtab"><?php esc_attr_e('Open in a New Tab', 'lasso'); ?></label>
320 320
 		    	</div>
321 321
 		    </li>
322
-		    <?php do_action( 'lasso_toolbar_components_after' );?>
323
-		    <li id="lasso-toolbar--html" title="<?php esc_attr_e( 'Insert HTML or Code', 'lasso' );?>">
322
+		    <?php do_action('lasso_toolbar_components_after'); ?>
323
+		    <li id="lasso-toolbar--html" title="<?php esc_attr_e('Insert HTML or Code', 'lasso'); ?>">
324 324
 		    	<div id="lasso-toolbar--html__wrap" <?php echo $mobile_style ?>>
325
-		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?>"></div>
325
+		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?>"></div>
326 326
 		    		<div id="lasso-toolbar--html__footer">
327 327
 					<div id="lasso-toolbar--html__footer_desc" >
328
-					<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?><br>
329
-					<?php esc_attr_e( 'You can also use Shortcodes', 'lasso' );?><br>
330
-					<?php esc_attr_e( 'You can also enter a URL to embed, such as Youtube, Vimeo and Twitter URLs.', 'lasso' );?>
328
+					<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?><br>
329
+					<?php esc_attr_e('You can also use Shortcodes', 'lasso'); ?><br>
330
+					<?php esc_attr_e('You can also enter a URL to embed, such as Youtube, Vimeo and Twitter URLs.', 'lasso'); ?>
331 331
 					</div>
332 332
 		    			<ul class="lasso-toolbar--html-snips">
333 333
 						
334
-		    				<?php if ( !$toolbar_headings ): ?>
335
-		    				<li id="lasso-html--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>">
336
-		    				<li id="lasso-html--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>">
334
+		    				<?php if (!$toolbar_headings): ?>
335
+		    				<li id="lasso-html--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>">
336
+		    				<li id="lasso-html--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>">
337 337
 		    				<?php endif; ?>
338
-		    				<li id="lasso-html--ol" title="<?php esc_attr_e( 'Ordered List', 'lasso' );?>">
339
-							<li id="lasso-html--ul" title="<?php esc_attr_e( 'Unordered List', 'lasso' );?>">
338
+		    				<li id="lasso-html--ol" title="<?php esc_attr_e('Ordered List', 'lasso'); ?>">
339
+							<li id="lasso-html--ul" title="<?php esc_attr_e('Unordered List', 'lasso'); ?>">
340 340
 							
341
-							<li id="lasso-html--table" title="<?php esc_attr_e( 'Table', 'lasso' );?>">
341
+							<li id="lasso-html--table" title="<?php esc_attr_e('Table', 'lasso'); ?>">
342 342
 		    			</ul>
343
-		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e( 'Cancel', 'lasso' );?></a>
344
-		    			<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>
343
+		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e('Cancel', 'lasso'); ?></a>
344
+		    			<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>
345 345
 		    		</div>
346 346
 		    	</div>
347 347
 		    </li>
348
-			<?php if ( $show_align ): ?>
349
-		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e( 'Text Left Align', 'lasso' );?>"></li>
350
-		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e( 'Text Center Align', 'lasso' );?>"></li>
351
-			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e( 'Text Right Align', 'lasso' );?>"></li>
348
+			<?php if ($show_align): ?>
349
+		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e('Text Left Align', 'lasso'); ?>"></li>
350
+		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e('Text Center Align', 'lasso'); ?>"></li>
351
+			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e('Text Right Align', 'lasso'); ?>"></li>
352 352
 			<?php endif; ?>
353 353
 		</ul>
354
-		<?php if ( is_singular() && $is_mobile ) { ?>
354
+		<?php if (is_singular() && $is_mobile) { ?>
355 355
 
356
-				<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;">
356
+				<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;">
357 357
 
358
-					<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>
359
-					<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>
358
+					<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>
359
+					<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>
360 360
 
361
-					<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>
361
+					<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>
362 362
 
363
-					<?php if ( 'draft' == $status && ( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') )  ) { ?>
364
-						<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>
363
+					<?php if ('draft' == $status && (lasso_user_can('publish_posts') || lasso_user_can('publish_pages'))) { ?>
364
+						<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>
365 365
 					<?php } ?>
366 366
 
367 367
 				</div>
@@ -379,20 +379,20 @@  discard block
 block discarded – undo
379 379
  */
380 380
 function lasso_editor_settings_toolbar() {
381 381
 
382
-	$delete_nonce = wp_create_nonce( 'lasso-delete-nonce' );
382
+	$delete_nonce = wp_create_nonce('lasso-delete-nonce');
383 383
 
384 384
 	ob_start();
385 385
 
386 386
 
387 387
 	// let users add custom css classes
388
-	$custom_classes = apply_filters( 'lasso_component_classes', '' );
388
+	$custom_classes = apply_filters('lasso_component_classes', '');
389 389
 
390 390
 	?>
391
-	<ul class="lasso-component--controls editus-center <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
392
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
393
-		<li class="lasso-component--settings__trigger  lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
394
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
395
-		<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>
391
+	<ul class="lasso-component--controls editus-center <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
392
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
393
+		<li class="lasso-component--settings__trigger  lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
394
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
395
+		<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>
396 396
 	</ul>
397 397
 
398 398
 	<?php return ob_get_clean();
@@ -410,13 +410,13 @@  discard block
 block discarded – undo
410 410
 
411 411
 
412 412
 	// has post thumbnail
413
-	$has_thumbnail = has_post_thumbnail( get_the_ID() ) ? 'class="lasso--featImg--has-thumb"' : false;
413
+	$has_thumbnail = has_post_thumbnail(get_the_ID()) ? 'class="lasso--featImg--has-thumb"' : false;
414 414
 
415 415
 	?>
416
-	<ul id="lasso--featImgControls" <?php echo $has_thumbnail;?>>
417
-		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e( 'Replace Image', 'lasso' );?>" href="#"><i class="lasso-icon-image"></i></a></li>
418
-		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e( 'Delete Image', 'lasso' );?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
419
-		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e( 'save', 'lasso' );?></a></li>
416
+	<ul id="lasso--featImgControls" <?php echo $has_thumbnail; ?>>
417
+		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e('Replace Image', 'lasso'); ?>" href="#"><i class="lasso-icon-image"></i></a></li>
418
+		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e('Delete Image', 'lasso'); ?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
419
+		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e('save', 'lasso'); ?></a></li>
420 420
 	</ul>
421 421
 
422 422
 	<?php return ob_get_clean();
@@ -440,19 +440,19 @@  discard block
 block discarded – undo
440 440
 
441 441
 	$postid = get_the_ID();
442 442
 
443
-	$status = get_post_status( $postid );
444
-	$nonce = wp_create_nonce( 'lasso-update-post-settings' );
443
+	$status = get_post_status($postid);
444
+	$nonce = wp_create_nonce('lasso-update-post-settings');
445 445
 
446 446
 	// let users add custom css classes
447
-	$custom_classes = apply_filters( 'lasso_modal_settings_classes', '' );
447
+	$custom_classes = apply_filters('lasso_modal_settings_classes', '');
448 448
 
449 449
 	// objects categories
450
-	$categories 		= lasso_get_post_objects( $postid, 'category' );
451
-	$tags 				= lasso_get_post_objects( $postid, 'tag' );
450
+	$categories = lasso_get_post_objects($postid, 'category');
451
+	$tags = lasso_get_post_objects($postid, 'tag');
452 452
 
453 453
 	// modal tabs
454
-	$tabs  				= lasso_modal_addons('tab');
455
-	$content 			= lasso_modal_addons('content');
454
+	$tabs = lasso_modal_addons('tab');
455
+	$content = lasso_modal_addons('content');
456 456
 	
457 457
 	//editor options
458 458
 	$allow_change_date = lasso_editor_get_option('allow_change_date', 'lasso_editor');
@@ -460,11 +460,11 @@  discard block
 block discarded – undo
460 460
 	$no_url_setting = lasso_editor_get_option('no_url_setting', 'lasso_editor');
461 461
 
462 462
 	// are we singular
463
-	$is_singular 		= is_singular();
463
+	$is_singular = is_singular();
464 464
 	$is_singular_class 	= $is_singular ? 'lasso--postsettings__2col' : 'lasso--postsettings__1col';
465 465
 	$has_thumb_class    = has_post_thumbnail() ? 'has-thumbnail' : 'no-thumbnail';
466 466
 	$theme_supports     = current_theme_supports('post-thumbnails');
467
-	$default_image 		= LASSO_URL.'/admin/assets/img/empty-img.png';
467
+	$default_image = LASSO_URL.'/admin/assets/img/empty-img.png';
468 468
 	
469 469
 	// do we support pending status
470 470
 	$no_pending_status = lasso_editor_get_option('no_pending_status', 'lasso_editor');
@@ -472,26 +472,26 @@  discard block
 block discarded – undo
472 472
     $excerpt = $post->post_excerpt;
473 473
 
474 474
 ?>
475
-	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>">
475
+	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>">
476 476
 		<div class="lasso--modal__inner">
477 477
 
478
-			<?php if( $tabs ) { echo $tabs; } ?>
478
+			<?php if ($tabs) { echo $tabs; } ?>
479 479
 
480 480
 			<div class="lasso--modal__content modal__content--core visible" data-addon-content="core">
481
-				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class;?>" >
481
+				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class; ?>" >
482 482
 
483
-					<?php if ( $is_singular && $theme_supports ) : ?>
483
+					<?php if ($is_singular && $theme_supports) : ?>
484 484
 					<div class="lasso--postsettings__left">
485
-						<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>
486
-						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url( $default_image );?>">
485
+						<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>
486
+						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url($default_image); ?>">
487 487
 
488 488
 							<div id="lasso--post-thumb__controls" class="lasso--post-thumb__controls">
489
-								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image','lasso');?>" class="dashicons dashicons-edit"></i>
490
-								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image','lasso');?>" class="dashicons dashicons-no-alt"></i>
489
+								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image', 'lasso'); ?>" class="dashicons dashicons-edit"></i>
490
+								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image', 'lasso'); ?>" class="dashicons dashicons-no-alt"></i>
491 491
 								<i id="lasso--save-status" class="lasso-icon lasso-icon-spinner6 not-visible"></i>
492 492
 							</div>
493 493
 
494
-							<?php echo has_post_thumbnail() ? get_the_post_thumbnail( $post->ID, 'medium' ) : '<img src="'.$default_image.'">'; ?>
494
+							<?php echo has_post_thumbnail() ? get_the_post_thumbnail($post->ID, 'medium') : '<img src="'.$default_image.'">'; ?>
495 495
 
496 496
 						</div>
497 497
 						<div id="lasso--featImgSave"><a href="#" class="not-visible">Save</a></div>
@@ -501,15 +501,15 @@  discard block
 block discarded – undo
501 501
 
502 502
 					<div class="lasso--postsettings__right">
503 503
 
504
-						<?php if( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') ): ?>
504
+						<?php if (lasso_user_can('publish_posts') || lasso_user_can('publish_pages')): ?>
505 505
 						<div class="lasso--postsettings__option story-status-option">
506
-							<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>
507
-							<ul class="story-status story-status-<?php echo sanitize_html_class( $status );?>">
508
-								<li id="lasso--status-draft"><?php _e( 'Draft', 'lasso' );?></li>
509
-								<?php if( !$no_pending_status ): ?>								
510
-								<li id="lasso--status-pending"><?php _e( 'Pending', 'lasso' );?></li>
506
+							<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>
507
+							<ul class="story-status story-status-<?php echo sanitize_html_class($status); ?>">
508
+								<li id="lasso--status-draft"><?php _e('Draft', 'lasso'); ?></li>
509
+								<?php if (!$no_pending_status): ?>								
510
+								<li id="lasso--status-pending"><?php _e('Pending', 'lasso'); ?></li>
511 511
 								<?php endif; ?>
512
-								<li id="lasso--status-publish"><?php _e( 'Publish', 'lasso' );?></li>
512
+								<li id="lasso--status-publish"><?php _e('Publish', 'lasso'); ?></li>
513 513
 							</ul>
514 514
 							<div class="lasso--slider_wrap">
515 515
 								<div id="lasso--slider"></div>
@@ -517,10 +517,10 @@  discard block
 block discarded – undo
517 517
 						</div>
518 518
 						<?php endif; ?>
519 519
 
520
-						<?php if ( 'publish' == $status  && !$no_url_setting): ?>
520
+						<?php if ('publish' == $status && !$no_url_setting): ?>
521 521
 						<div class="lasso--postsettings__option story-slug-option">
522
-							<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>
523
-							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset( $post ) ? esc_attr( $post->post_name ) : false;?>">
522
+							<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>
523
+							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset($post) ? esc_attr($post->post_name) : false; ?>">
524 524
 						</div>
525 525
 						<?php endif; ?>
526 526
 
@@ -529,30 +529,30 @@  discard block
 block discarded – undo
529 529
 					<div class="lasso--postsettings__middle">
530 530
 
531 531
 						<div class="lasso--postsettings__option story-categories-option">
532
-							<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>
533
-							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories;?>">
532
+							<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>
533
+							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories; ?>">
534 534
 						</div>
535 535
 
536 536
 						<div class="lasso--postsettings__option story-tags-option">
537
-							<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>
538
-							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags;?>">
537
+							<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>
538
+							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags; ?>">
539 539
 						</div>
540 540
                         <?php 
541 541
 						if ($allow_edit_excerpt) { 
542 542
 						?>
543 543
                         <div class="lasso--postsettings__option story-excerpt-option">
544
-							<label><?php _e( 'Excerpt', 'lasso' );?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e( 'Edit excerpt', 'lasso' );?>"><i class="lasso-icon-help"></i></span></label>
545
-							<input id="lasso--excerpt" class="lasso--modal__trigger-footer" type="text" name="excerpt" value="<?php echo $excerpt;?>" style="width:100%">
544
+							<label><?php _e('Excerpt', 'lasso'); ?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e('Edit excerpt', 'lasso'); ?>"><i class="lasso-icon-help"></i></span></label>
545
+							<input id="lasso--excerpt" class="lasso--modal__trigger-footer" type="text" name="excerpt" value="<?php echo $excerpt; ?>" style="width:100%">
546 546
 						</div>
547 547
                         <?php
548 548
 						}?>
549 549
 						<?php 
550 550
 						if ($allow_change_date) { 
551
-						    $dateformat = get_option( 'date_format' ); 
551
+						    $dateformat = get_option('date_format'); 
552 552
 						?>
553
-						    <label><?php _e( 'Post Date', 'lasso' ); ?></label>
554
-							<input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid);?>"/>
555
-							<a href="#" id="lasso--postsettings-setnow"><?php _e( 'Set to Now', 'lasso' ); ?></a>
553
+						    <label><?php _e('Post Date', 'lasso'); ?></label>
554
+							<input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid); ?>"/>
555
+							<a href="#" id="lasso--postsettings-setnow"><?php _e('Set to Now', 'lasso'); ?></a>
556 556
 						<?php
557 557
 						}?>
558 558
 
@@ -574,23 +574,23 @@  discard block
 block discarded – undo
574 574
 					?>
575 575
 					<!--/div-->
576 576
 
577
-					<?php do_action( 'lasso_modal_post_form' ); // action ?>
577
+					<?php do_action('lasso_modal_post_form'); // action ?>
578 578
 
579 579
 					<div class="lasso--postsettings__footer" >
580
-						<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
580
+						<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
581 581
 						<input type="hidden" name="status" value="">
582 582
 						<input type="hidden" name="categories" value="">
583
-						<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
583
+						<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
584 584
 						<input type="hidden" name="action" value="process_update-object_post">
585
-						<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
586
-						<?php do_action( 'lasso_modal_post_form_footer' ); // action ?>
587
-						<input type="submit" id="lasso--postsettings-submit" value="<?php esc_attr_e( 'Save', 'lasso' );?>">
585
+						<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
586
+						<?php do_action('lasso_modal_post_form_footer'); // action ?>
587
+						<input type="submit" id="lasso--postsettings-submit" value="<?php esc_attr_e('Save', 'lasso'); ?>">
588 588
 					</div>
589 589
 
590 590
 				</form>
591 591
 			</div>
592 592
 
593
-			<?php if( $tabs ) { echo $content; } ?>
593
+			<?php if ($tabs) { echo $content; } ?>
594 594
 
595 595
 		</div>
596 596
 
@@ -612,41 +612,41 @@  discard block
 block discarded – undo
612 612
 	ob_start();
613 613
 
614 614
 
615
-	$status = get_post_status( get_the_ID() );
615
+	$status = get_post_status(get_the_ID());
616 616
 
617
-	$nonce = wp_create_nonce( 'lasso-editor-new-post' );
617
+	$nonce = wp_create_nonce('lasso-editor-new-post');
618 618
 
619 619
 	// let users add custom css classes
620
-	$custom_classes = apply_filters( 'lasso_modal_post_classes', '' );
620
+	$custom_classes = apply_filters('lasso_modal_post_classes', '');
621 621
 
622 622
 	// return the post type
623
-	$type = get_post_type( get_the_ID() );
623
+	$type = get_post_type(get_the_ID());
624 624
 
625 625
 	$mobile_style = "";
626 626
 	if (wp_is_mobile()) {
627 627
 		//$mobile_style = 'style="top:140px !important;"';
628 628
 	}
629 629
 	?>
630
-	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" <?php echo $mobile_style;?>">
630
+	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" <?php echo $mobile_style; ?>">
631 631
 		<div class="lasso--modal__inner lasso--hasnewform">
632 632
 
633 633
 			<form id="lasso--postnew__form" enctype="multipart/form-data" class="lasso--post-form">
634 634
 
635 635
 				<div class="lasso--postsettings__option story-slug-option lasso--last-option">
636
-					<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>
637
-					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e( 'Type Your Title Here', 'lasso' );?>">
636
+					<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>
637
+					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e('Type Your Title Here', 'lasso'); ?>">
638 638
 						<div class="lasso--select-wrap" style="width:90px">
639 639
 						<select id="lasso--select-type" name="story_type">
640 640
 
641 641
 							<?php
642 642
 								$types = lasso_post_types_names();
643
-								if ( !empty( $types ) ) {
644
-									foreach( $types as $name => $label ) {										
645
-										$type = preg_replace( '/s\b/','', $name );
643
+								if (!empty($types)) {
644
+									foreach ($types as $name => $label) {										
645
+										$type = preg_replace('/s\b/', '', $name);
646 646
 										if ($type == 'page' && !current_user_can('edit_pages')) {
647 647
 											continue;
648 648
 										}
649
-										printf( '<option value="%s">%s</option>', lcfirst( esc_attr( $type ) ) , ucfirst( esc_attr( $label ) ) );
649
+										printf('<option value="%s">%s</option>', lcfirst(esc_attr($type)), ucfirst(esc_attr($label)));
650 650
 									}
651 651
 
652 652
 								}
@@ -657,19 +657,19 @@  discard block
 block discarded – undo
657 657
 				</div>
658 658
 
659 659
 				<div class="lasso--postsettings__footer">
660
-					<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
660
+					<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
661 661
 					<input type="hidden" name="action" value="process_new-object_post">
662 662
 					<?php
663
-						if ( !empty( $types ) ) {
663
+						if (!empty($types)) {
664 664
 							// get the first element
665 665
 							$keys = array_keys($types);
666
-						    $type =$keys[0];						
667
-							$type = preg_replace( '/s\b/','', $type );
668
-							printf( '<input type="hidden" name="object" value="%s">', lcfirst( esc_attr( $type ) ) );		
666
+						    $type = $keys[0];						
667
+							$type = preg_replace('/s\b/', '', $type);
668
+							printf('<input type="hidden" name="object" value="%s">', lcfirst(esc_attr($type)));		
669 669
 						}
670 670
 					?>
671
-					<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
672
-					<input type="submit" value="<?php esc_attr_e( 'Create', 'lasso' );?>">
671
+					<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
672
+					<input type="submit" value="<?php esc_attr_e('Create', 'lasso'); ?>">
673 673
 				</div>
674 674
 
675 675
 			</form>
@@ -697,18 +697,18 @@  discard block
 block discarded – undo
697 697
 	ob_start();
698 698
 
699 699
 	// post status
700
-	$status = get_post_status( get_the_ID() );
700
+	$status = get_post_status(get_the_ID());
701 701
 
702 702
 	// let users add custom css classes
703
-	$custom_classes = apply_filters( 'lasso_modal_all_post_classes', '' );
703
+	$custom_classes = apply_filters('lasso_modal_all_post_classes', '');
704 704
 
705 705
 	?>
706
-	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" style="max-height:100%">
706
+	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" style="max-height:100%">
707 707
 		<div class="lasso--modal__inner">
708 708
 
709 709
 			<div class="lasso--post-filtering not-visible">
710 710
 				<div class="lasso--search__results">
711
-					<span id="lasso--results-found"></span><?php _e('results found','lasso');?>
711
+					<span id="lasso--results-found"></span><?php _e('results found', 'lasso'); ?>
712 712
 				</div>
713 713
 				<div class="lasso--search">
714 714
 					<i id="lasso--search__toggle" class="dashicons dashicons-search"></i>
@@ -722,18 +722,18 @@  discard block
 block discarded – undo
722 722
 				$post_types = lasso_post_types_names();
723 723
 				$rest_bases = lasso_post_types_rest_base();
724 724
 
725
-				if ( ! empty( $post_types ) ) {
725
+				if (!empty($post_types)) {
726 726
 					$first = 'active';
727
-					foreach( $post_types as $name => $label ) {
727
+					foreach ($post_types as $name => $label) {
728 728
 						if (array_key_exists($name, $rest_bases)) {
729
-							printf( '<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr( $first), esc_attr( $rest_bases[$name] ), esc_attr( $label ) );
729
+							printf('<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr($first), esc_attr($rest_bases[$name]), esc_attr($label));
730 730
 						}
731 731
 						$first = '';
732 732
 					}
733 733
 
734 734
 				}
735 735
 
736
-				do_action('lasso_modal_post_objects');?>
736
+				do_action('lasso_modal_post_objects'); ?>
737 737
 
738 738
 			</ul>
739 739
 			<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
@@ -752,21 +752,21 @@  discard block
 block discarded – undo
752 752
 	ob_start();
753 753
 
754 754
 
755
-    $use_old_wpimg = lasso_editor_get_option('use_old_wpimg', 'lasso_editor','off');
755
+    $use_old_wpimg = lasso_editor_get_option('use_old_wpimg', 'lasso_editor', 'off');
756 756
     
757 757
 	// let users add custom css classes
758
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
758
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
759 759
 
760 760
 	?>
761
-	<ul class="lasso-component--controls editus-center <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
762
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
763
-        <?php if ($use_old_wpimg=='on') {?>
764
-            <li  class="lasso--wpimg-edit lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
761
+	<ul class="lasso-component--controls editus-center <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
762
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
763
+        <?php if ($use_old_wpimg == 'on') {?>
764
+            <li  class="lasso--wpimg-edit lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
765 765
         <?php } else {?>
766
-            <li  class="lasso-component--settings__trigger lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
766
+            <li  class="lasso-component--settings__trigger lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
767 767
         <?php } ?>
768
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
769
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
768
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
769
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
770 770
 	</ul>
771 771
 
772 772
 	<?php return ob_get_clean();
@@ -778,14 +778,14 @@  discard block
 block discarded – undo
778 778
 
779 779
 
780 780
 	// let users add custom css classes
781
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
781
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
782 782
 
783 783
 	?>
784
-	<ul class="lasso-component--controls editus-center <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
785
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
786
-		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
787
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
788
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
784
+	<ul class="lasso-component--controls editus-center <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
785
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
786
+		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
787
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
788
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
789 789
 	</ul>
790 790
 
791 791
 	<?php return ob_get_clean();
@@ -798,16 +798,16 @@  discard block
 block discarded – undo
798 798
  */
799 799
 function lasso_map_form_footer() {
800 800
 
801
-	$nonce = wp_create_nonce( 'lasso-process-map' );
801
+	$nonce = wp_create_nonce('lasso-process-map');
802 802
 
803 803
 	ob_start();
804 804
 
805 805
 	?>
806 806
 	<div class="lasso--map-form__footer">
807
-		<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
808
-		<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
807
+		<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
808
+		<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
809 809
 		<input type="hidden" name="action" value="process_map_save">
810
-		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e( 'Save Locations', 'lasso' );?>">
810
+		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e('Save Locations', 'lasso'); ?>">
811 811
 	</div>
812 812
 
813 813
 	<?php return ob_get_clean();
@@ -825,7 +825,7 @@  discard block
 block discarded – undo
825 825
 
826 826
 	?>
827 827
 	<div id="lasso--pagerefresh" class="visible">
828
-		<?php _e( 'Save this post and refesh the page to see these changes.', 'lasso' );?>
828
+		<?php _e('Save this post and refesh the page to see these changes.', 'lasso'); ?>
829 829
 	</div>
830 830
 
831 831
 	<?php return ob_get_clean();
@@ -839,45 +839,45 @@  discard block
 block discarded – undo
839 839
  */
840 840
 function lasso_editor_options_blob() {
841 841
 
842
-	$codes   = function_exists( 'aesop_shortcodes' ) ? aesop_shortcodes() : array();
843
-    $codes   = add_wpimg_options( $codes );
844
-    $codes   = apply_filters( 'lasso_custom_options', $codes );
845
-	$galleries  = function_exists( 'lasso_editor_galleries_exist' ) && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
842
+	$codes = function_exists('aesop_shortcodes') ? aesop_shortcodes() : array();
843
+    $codes   = add_wpimg_options($codes);
844
+    $codes   = apply_filters('lasso_custom_options', $codes);
845
+	$galleries  = function_exists('lasso_editor_galleries_exist') && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
846 846
 
847
-	$nonce = wp_create_nonce( 'lasso_gallery' );
847
+	$nonce = wp_create_nonce('lasso_gallery');
848 848
 
849 849
 	$blob = array();
850 850
 
851
-	if ( empty( $codes ) )
851
+	if (empty($codes))
852 852
 		return;
853 853
 
854
-	foreach ( $codes as $slug => $shortcode ) {
854
+	foreach ($codes as $slug => $shortcode) {
855 855
 		$return = '';
856 856
 		// Shortcode has atts
857 857
 
858
-		if ( count( $shortcode['atts'] ) && $shortcode['atts'] ) {
858
+		if (count($shortcode['atts']) && $shortcode['atts']) {
859 859
 
860
-			foreach ( $shortcode['atts'] as $attr_name => $attr_info ) {
860
+			foreach ($shortcode['atts'] as $attr_name => $attr_info) {
861 861
 
862 862
 
863
-				$prefix = isset( $attr_info['prefix'] ) ? sprintf( '<span class="lasso-option-prefix">%s</span>', $attr_info['prefix'] ) : null;
863
+				$prefix = isset($attr_info['prefix']) ? sprintf('<span class="lasso-option-prefix">%s</span>', $attr_info['prefix']) : null;
864 864
 
865 865
 				$return .= '<form id="aesop-generator-settings" class="lasso--component-settings-form" class="'.$galleries.'" method="post">';
866 866
 				$return .= '<p data-option="'.$attr_name.'" class="lasso-option aesop-'.$slug.'-'.$attr_name.'">';
867
-				$return .= '<label for="aesop-generator-attr-' . $attr_name . '">' . $attr_info['desc'] . '</label>';
867
+				$return .= '<label for="aesop-generator-attr-'.$attr_name.'">'.$attr_info['desc'].'</label>';
868 868
 				$return .= '<small class="lasso-option-desc">'.$attr_info['tip'].'</small>';
869 869
 				// Select
870 870
 
871
-				if ( isset( $attr_info['values'] ) ) {
871
+				if (isset($attr_info['values'])) {
872 872
 
873
-					$return .= '<select name="' . $attr_name . '" id="aesop-generator-attr-' . $attr_name . '" class="lasso-generator-attr">';
873
+					$return .= '<select name="'.$attr_name.'" id="aesop-generator-attr-'.$attr_name.'" class="lasso-generator-attr">';
874 874
 
875
-					$i=0;
875
+					$i = 0;
876 876
 
877
-					foreach ( $attr_info['values'] as $attr_value ) {
877
+					foreach ($attr_info['values'] as $attr_value) {
878 878
 						$attr_value_selected = $attr_info['default'] == $attr_value ? ' selected="selected"' : '';
879 879
 
880
-						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" ' . $attr_value_selected . '>'.$attr_info['values'][$i]['name'].'</option>';
880
+						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" '.$attr_value_selected.'>'.$attr_info['values'][$i]['name'].'</option>';
881 881
 
882 882
 						$i++;
883 883
 					}
@@ -886,24 +886,24 @@  discard block
 block discarded – undo
886 886
 
887 887
 				} else {
888 888
 
889
-					$attr_field_type = isset( $attr_info['type'] ) ? $attr_info['type'] : 'text';
889
+					$attr_field_type = isset($attr_info['type']) ? $attr_info['type'] : 'text';
890 890
 
891 891
 					// image upload
892
-					if ( 'media_upload' == $attr_info['type'] ) {
892
+					if ('media_upload' == $attr_info['type']) {
893 893
 
894
-						$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.'" />';
894
+						$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.'" />';
895 895
 						$return .= '<a href="#" id="lasso-upload-img" class="lasso-option-button" /></a>';
896 896
 
897
-					} elseif ( 'color' == $attr_info['type'] ) {
897
+					} elseif ('color' == $attr_info['type']) {
898 898
 
899
-						$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.'" />';
899
+						$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.'" />';
900 900
 
901
-					} elseif ( 'text_area' == $attr_info['type'] ) {
901
+					} elseif ('text_area' == $attr_info['type']) {
902 902
 
903
-						$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.'';
903
+						$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.'';
904 904
 
905 905
 					} else {
906
-						$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.'';
906
+						$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.'';
907 907
 					}
908 908
 				}
909 909
 				$return .= '</p>';
@@ -914,9 +914,9 @@  discard block
 block discarded – undo
914 914
 		///////////////////////////
915 915
 		// START GALLERY AND MAP FRONT END STUFFS
916 916
 		///////////////////////////
917
-		if ( isset( $shortcode['front'] ) && true == $shortcode['front'] ) {
917
+		if (isset($shortcode['front']) && true == $shortcode['front']) {
918 918
 
919
-			if ( 'gallery' == $shortcode['front_type'] ) {
919
+			if ('gallery' == $shortcode['front_type']) {
920 920
 
921 921
 				$return .= lasso_gallery_editor_module();
922 922
 
@@ -927,13 +927,13 @@  discard block
 block discarded – undo
927 927
 		///////////////////////////
928 928
 
929 929
 		// Single shortcode (not closed)
930
-		if ( 'single' == $shortcode['type'] ) {
930
+		if ('single' == $shortcode['type']) {
931 931
 
932 932
 			$return .= '<input type="hidden" name="lasso-generator-content" id="lasso-generator-content" value="false" />';
933 933
 
934 934
 		} else {
935 935
 
936
-			$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>';
936
+			$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>';
937 937
 		}
938 938
 
939 939
 		$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>';
@@ -953,95 +953,95 @@  discard block
 block discarded – undo
953 953
 }
954 954
 
955 955
 
956
-function add_wpimg_options( $shortcodes ) {
956
+function add_wpimg_options($shortcodes) {
957 957
     $custom = array(
958 958
         'wpimg'    => array(
959
-            'name'     => __( 'Image', 'lasso' ),
959
+            'name'     => __('Image', 'lasso'),
960 960
             'type'     => 'single',
961 961
             'atts'     => array(
962 962
                 'img'    => array(
963 963
                     'type'  => 'media_upload',
964 964
                     'default'  => '',
965
-                    'desc'   => __( 'Image URL', 'lasso' ),
966
-                    'tip'  => __( 'URL for the image. Click <em>Select Media</em> to open the WordPress Media Library.', 'aesop-core' )
965
+                    'desc'   => __('Image URL', 'lasso'),
966
+                    'tip'  => __('URL for the image. Click <em>Select Media</em> to open the WordPress Media Library.', 'aesop-core')
967 967
                 ),
968 968
                 'align'    => array(
969 969
                     'type'  => 'select',
970 970
                     'values'  => array(						
971 971
                         array(
972 972
                             'value' => 'center',
973
-                            'name' => __( 'Center', 'aesop-core' )
973
+                            'name' => __('Center', 'aesop-core')
974 974
                         ),
975 975
                         array(
976 976
                             'value' => 'left',
977
-                            'name' => __( 'Left', 'aesop-core' )
977
+                            'name' => __('Left', 'aesop-core')
978 978
                         ),
979 979
                         array(
980 980
                             'value' => 'right',
981
-                            'name' => __( 'Right', 'aesop-core' )
981
+                            'name' => __('Right', 'aesop-core')
982 982
                         ),
983 983
                     ),
984 984
                     'default'  => 'center',
985
-                    'desc'   => __( 'Alignment', 'lasso' ),
985
+                    'desc'   => __('Alignment', 'lasso'),
986 986
                     'tip'=>''
987 987
                 ),			
988 988
                 
989 989
                 'imgwidth'    => array(
990 990
                     'type'  => 'text_small',
991 991
                     'default'  => '300px',
992
-                    'desc'   => __( 'Image Width', 'lasso' ),
993
-                    'tip'  => __( 'Width of the image. You can enter the size in pixels or percentage such as <code>40%</code> or <code>500px</code>.', 'aesop-core' )
992
+                    'desc'   => __('Image Width', 'lasso'),
993
+                    'tip'  => __('Width of the image. You can enter the size in pixels or percentage such as <code>40%</code> or <code>500px</code>.', 'aesop-core')
994 994
                 ),
995 995
                 'imgheight'    => array(
996 996
                     'type'  => 'text_small',
997 997
                     'default'  => '',
998
-                    'desc'   => __( 'Image Height', 'lasso' ),
999
-                    'tip'  => __( 'Used only for the Panorama mode. Can be set using pixel values such as <code>500px</code>. If unspecified, the original height would be used. ', 'aesop-core' )
998
+                    'desc'   => __('Image Height', 'lasso'),
999
+                    'tip'  => __('Used only for the Panorama mode. Can be set using pixel values such as <code>500px</code>. If unspecified, the original height would be used. ', 'aesop-core')
1000 1000
                 ),	
1001 1001
                 'linkoption'    => array(
1002 1002
                     'type'  => 'select',
1003 1003
                     'values'  => array(						
1004 1004
                         array(
1005 1005
                             'value' => 'none',
1006
-                            'name' => __( 'None', 'aesop-core' )
1006
+                            'name' => __('None', 'aesop-core')
1007 1007
                         ),
1008 1008
                         array(
1009 1009
                             'value' => 'img',
1010
-                            'name' => __( 'Image', 'aesop-core' )
1010
+                            'name' => __('Image', 'aesop-core')
1011 1011
                         ),
1012 1012
                         array(
1013 1013
                             'value' => 'url',
1014
-                            'name' => __( 'URL', 'aesop-core' )
1014
+                            'name' => __('URL', 'aesop-core')
1015 1015
                         ),
1016 1016
                     ),
1017 1017
                     'default'  => 'none',
1018
-                    'desc'   => __( 'Link', 'lasso' ),
1019
-                    'tip'  => __( 'Click leads to:', 'lasso' )
1018
+                    'desc'   => __('Link', 'lasso'),
1019
+                    'tip'  => __('Click leads to:', 'lasso')
1020 1020
                 ),				
1021 1021
                 
1022 1022
                 'link'    => array(
1023 1023
                     'type'  => 'text',
1024 1024
                     'default'  => '',
1025
-                    'desc'   => __( 'URL Link', 'lasso' ),
1026
-                    'tip'  => __( 'URL link', 'lasso' )
1025
+                    'desc'   => __('URL Link', 'lasso'),
1026
+                    'tip'  => __('URL link', 'lasso')
1027 1027
                 ),
1028 1028
                 'alt'    => array(
1029 1029
                     'type'  => 'text',
1030 1030
                     'default'  => '',
1031
-                    'desc'   => __( 'Image ALT', 'lasso' ),
1032
-                    'tip'  => __( 'ALT tag used for the image. Primarily used for SEO purposes.', 'lasso' )
1031
+                    'desc'   => __('Image ALT', 'lasso'),
1032
+                    'tip'  => __('ALT tag used for the image. Primarily used for SEO purposes.', 'lasso')
1033 1033
                 ),
1034 1034
                 
1035 1035
                 'caption'    => array(
1036 1036
                     'type'  => 'text_area',
1037 1037
                     'default'  => '',
1038
-                    'desc'   => __( 'Caption', 'lasso' ),
1039
-                    'tip'  => __( 'Optional caption for the image.', 'lasso' )
1038
+                    'desc'   => __('Caption', 'lasso'),
1039
+                    'tip'  => __('Optional caption for the image.', 'lasso')
1040 1040
                 ),
1041 1041
                 
1042 1042
 
1043 1043
             ),
1044
-            'desc'     => __( 'An image.', 'aesop-core' ),
1044
+            'desc'     => __('An image.', 'aesop-core'),
1045 1045
             'codes'    => '<script>	            
1046 1046
 						jQuery(document).ready(function($){
1047 1047
                             function linkSetting(l){								
@@ -1065,7 +1065,7 @@  discard block
 block discarded – undo
1065 1065
         )
1066 1066
     );
1067 1067
 
1068
-    return array_merge( $shortcodes, $custom );
1068
+    return array_merge($shortcodes, $custom);
1069 1069
 }
1070 1070
 
1071 1071
 /**
@@ -1085,14 +1085,14 @@  discard block
 block discarded – undo
1085 1085
 				<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
1086 1086
 				<div id="lasso--hide" style="display:none;" class="lasso--post-form">
1087 1087
 					<i class="lasso-icon lasso-icon-move"></i>
1088
-					<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>
1088
+					<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>
1089 1089
 					<div class="lasso--slider_wrap">
1090 1090
 						<div id="lasso--slider"></div>
1091 1091
 					</div>
1092 1092
 					<ul id="lasso--revision-list"></ul>
1093 1093
 					<div class="lasso--btn-group lasso--btn-group-small">
1094
-						<a href="#" class="lasso--btn-secondary" id="lasso--close-modal"><?php _e( 'Cancel', 'lasso' );?></a>
1095
-						<a href="#" class="lasso--btn-primary" id="lasso--select-revision"><?php _e( 'Select', 'lasso' );?></a>
1094
+						<a href="#" class="lasso--btn-secondary" id="lasso--close-modal"><?php _e('Cancel', 'lasso'); ?></a>
1095
+						<a href="#" class="lasso--btn-primary" id="lasso--select-revision"><?php _e('Select', 'lasso'); ?></a>
1096 1096
 					</div>
1097 1097
 				</div>
1098 1098
 
@@ -1115,7 +1115,7 @@  discard block
 block discarded – undo
1115 1115
     // Normalize into a six character long hex string
1116 1116
     $hex = str_replace('#', '', $hex);
1117 1117
     if (strlen($hex) == 3) {
1118
-        $hex = str_repeat(substr($hex,0,1), 2).str_repeat(substr($hex,1,1), 2).str_repeat(substr($hex,2,1), 2);
1118
+        $hex = str_repeat(substr($hex, 0, 1), 2).str_repeat(substr($hex, 1, 1), 2).str_repeat(substr($hex, 2, 1), 2);
1119 1119
     }
1120 1120
 
1121 1121
     // Split into three parts: R, G and B
@@ -1124,7 +1124,7 @@  discard block
 block discarded – undo
1124 1124
 
1125 1125
     foreach ($color_parts as $color) {
1126 1126
         $color   = hexdec($color); // Convert to decimal
1127
-        $color   = max(0,min(255,$color + $steps)); // Adjust color
1127
+        $color   = max(0, min(255, $color + $steps)); // Adjust color
1128 1128
         $return .= str_pad(dechex($color), 2, '0', STR_PAD_LEFT); // Make two char hex code
1129 1129
     }
1130 1130
 
Please login to merge, or discard this patch.
lasso.php 1 patch
Spacing   +40 added lines, -40 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.3.6' );
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.3.6');
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,17 +88,17 @@  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
 
104 104
 
@@ -106,32 +106,32 @@  discard block
 block discarded – undo
106 106
 //table codes to be added
107 107
 class editus_table {
108 108
     
109
-    public function __construct(){
109
+    public function __construct() {
110 110
         $add_table = lasso_editor_get_option('add_table', 'lasso_editor', false);
111 111
         if ($add_table) {
112
-            add_action('wp_enqueue_scripts', array($this,'scripts'));
112
+            add_action('wp_enqueue_scripts', array($this, 'scripts'));
113 113
             
114 114
         }
115 115
 	}
116 116
     
117 117
     function scripts()
118 118
     {
119
-        add_action('lasso_editor_controls_after_outside', array($this,'editus_table_edit_menu'));
120
-            add_filter('lasso_components',array($this,'editus_components_add_table'),10,1);
121
-            add_action( 'lasso_toolbar_components', array($this,'editus_toolbar_components_add_table'), 10 );
122
-            wp_enqueue_style( 'editus-table-style', LASSO_URL.  '/public/assets/css/editus-table-edit-public.css', LASSO_VERSION, true );
123
-            wp_enqueue_script( 'editus_table',  LASSO_URL. '/public/assets/js/editus-table-edit-public.js', array( 'jquery' ), LASSO_VERSION, true );
119
+        add_action('lasso_editor_controls_after_outside', array($this, 'editus_table_edit_menu'));
120
+            add_filter('lasso_components', array($this, 'editus_components_add_table'), 10, 1);
121
+            add_action('lasso_toolbar_components', array($this, 'editus_toolbar_components_add_table'), 10);
122
+            wp_enqueue_style('editus-table-style', LASSO_URL.'/public/assets/css/editus-table-edit-public.css', LASSO_VERSION, true);
123
+            wp_enqueue_script('editus_table', LASSO_URL.'/public/assets/js/editus-table-edit-public.js', array('jquery'), LASSO_VERSION, true);
124 124
     }
125 125
     
126 126
     function editus_table_edit_menu()
127 127
     { ?>
128 128
 
129 129
         <ul class='editus-table-menu'>
130
-          <li data-action="insertcol"><?php echo __('Insert Column','lasso')?></li>
131
-          <li data-action="insertrow"><?php echo __('Insert Row','lasso')?></li>
132
-          <li data-action="delcol"><?php echo __('Delete Column','lasso')?></li>
133
-          <li data-action="delrow"><?php echo __('Delete Row','lasso')?></li>
134
-          <li data-action="deltable"><?php echo __('Delete Table','lasso')?></li
130
+          <li data-action="insertcol"><?php echo __('Insert Column', 'lasso')?></li>
131
+          <li data-action="insertrow"><?php echo __('Insert Row', 'lasso')?></li>
132
+          <li data-action="delcol"><?php echo __('Delete Column', 'lasso')?></li>
133
+          <li data-action="delrow"><?php echo __('Delete Row', 'lasso')?></li>
134
+          <li data-action="deltable"><?php echo __('Delete Table', 'lasso')?></li
135 135
         </ul>
136 136
     <?php
137 137
     }
@@ -143,20 +143,20 @@  discard block
 block discarded – undo
143 143
     }
144 144
 
145 145
 
146
-    function editus_components_add_table( $array ){
146
+    function editus_components_add_table($array) {
147 147
         $custom = array(
148 148
                'htmltable' => array(
149
-                         'name'    => __('HTML Table','lasso'),
149
+                         'name'    => __('HTML Table', 'lasso'),
150 150
                           'content' => self::editus_html_table(),
151 151
                 )
152 152
         );
153
-        return array_merge( $array, $custom );
153
+        return array_merge($array, $custom);
154 154
     }
155 155
 
156 156
 
157 157
     function editus_toolbar_components_add_table( ) {
158 158
           ?>
159
-          <li data-type="htmltable" title="<?php esc_attr_e( 'HTML Table', 'lasso' );?>" class="quote lasso-toolbar--component__htmltable dashicons dashicons-grid-view"></li>
159
+          <li data-type="htmltable" title="<?php esc_attr_e('HTML Table', 'lasso'); ?>" class="quote lasso-toolbar--component__htmltable dashicons dashicons-grid-view"></li>
160 160
           <?php
161 161
     }
162 162
 }
Please login to merge, or discard this patch.
admin/includes/menus/settings.php 1 patch
Spacing   +168 added lines, -168 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,45 +95,45 @@  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 101
         // check for lasso story engine and add a class doniting this
102
-        $ase_status = class_exists( 'Aesop_Core' ) || defined( 'LASSO_CUSTOM' ) ? 'ase-active' : 'ase-not-active';
103
-
104
-		$article_object   = lasso_editor_get_option( 'article_class', 'lasso_editor' );
105
-		$featImgClass    = lasso_editor_get_option( 'featimg_class', 'lasso_editor' );
106
-		$titleClass    = lasso_editor_get_option( 'title_class', 'lasso_editor' );
107
-
108
-		$post_new_disabled   = lasso_editor_get_option( 'post_adding_disabled', 'lasso_editor' );
109
-		$save_to_post_disabled  = lasso_editor_get_option( 'post_save_disabled', 'lasso_editor' );
110
-		$edit_post_disabled  = lasso_editor_get_option( 'post_edit_disabled', 'lasso_editor' );
111
-		$post_settings_disabled = lasso_editor_get_option( 'post_settings_disabled', 'lasso_editor' );
112
-		$allow_change_date = lasso_editor_get_option( 'allow_change_date', 'lasso_editor' );
113
-        $allow_edit_excerpt = lasso_editor_get_option( 'allow_edit_excerpt', 'lasso_editor' );
114
-		$allow_new_category = lasso_editor_get_option( 'allow_new_category', 'lasso_editor' );
115
-		$shortcodify_disabled  = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
116
-		$enable_autosave  = lasso_editor_get_option( 'enable_autosave', 'lasso_editor' );
117
-
118
-		$use_old_ui      = lasso_editor_get_option( 'use_old_ui', 'lasso_editor' );
119
-		$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
120
-		$toolbar_headings_h4      = lasso_editor_get_option( 'toolbar_headings_h4', 'lasso_editor' );
121
-		$toolbar_list      = lasso_editor_get_option( 'toolbar_list', 'lasso_editor' );
122
-		$toolbar_show_color      = lasso_editor_get_option( 'toolbar_show_color', 'lasso_editor' );
123
-		$toolbar_show_alignment  = lasso_editor_get_option( 'toolbar_show_alignment', 'lasso_editor' );
102
+        $ase_status = class_exists('Aesop_Core') || defined('LASSO_CUSTOM') ? 'ase-active' : 'ase-not-active';
103
+
104
+		$article_object   = lasso_editor_get_option('article_class', 'lasso_editor');
105
+		$featImgClass = lasso_editor_get_option('featimg_class', 'lasso_editor');
106
+		$titleClass = lasso_editor_get_option('title_class', 'lasso_editor');
107
+
108
+		$post_new_disabled   = lasso_editor_get_option('post_adding_disabled', 'lasso_editor');
109
+		$save_to_post_disabled  = lasso_editor_get_option('post_save_disabled', 'lasso_editor');
110
+		$edit_post_disabled  = lasso_editor_get_option('post_edit_disabled', 'lasso_editor');
111
+		$post_settings_disabled = lasso_editor_get_option('post_settings_disabled', 'lasso_editor');
112
+		$allow_change_date = lasso_editor_get_option('allow_change_date', 'lasso_editor');
113
+        $allow_edit_excerpt = lasso_editor_get_option('allow_edit_excerpt', 'lasso_editor');
114
+		$allow_new_category = lasso_editor_get_option('allow_new_category', 'lasso_editor');
115
+		$shortcodify_disabled = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor');
116
+		$enable_autosave = lasso_editor_get_option('enable_autosave', 'lasso_editor');
117
+
118
+		$use_old_ui = lasso_editor_get_option('use_old_ui', 'lasso_editor');
119
+		$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
120
+		$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
121
+		$toolbar_list = lasso_editor_get_option('toolbar_list', 'lasso_editor');
122
+		$toolbar_show_color      = lasso_editor_get_option('toolbar_show_color', 'lasso_editor');
123
+		$toolbar_show_alignment  = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor');
124 124
 		
125
-		$objectsNoSave  	= lasso_editor_get_option('dont_save', 'lasso_editor');
126
-		$objectsNonEditable  	= lasso_editor_get_option('non_editable', 'lasso_editor');
125
+		$objectsNoSave = lasso_editor_get_option('dont_save', 'lasso_editor');
126
+		$objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor');
127 127
 		$disable_tour = lasso_editor_get_option('disable_tour', 'lasso_editor');
128 128
 		$show_ignored_items = lasso_editor_get_option('show_ignored_items', 'lasso_editor');
129 129
 		$save_using_rest_disabled = lasso_editor_get_option('save_using_rest_disabled', 'lasso_editor');
130 130
 		
131
-		$default_post_types = apply_filters( 'lasso_allowed_post_types', array( 'post', 'page'));
132
-		$allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor',  $default_post_types);
131
+		$default_post_types = apply_filters('lasso_allowed_post_types', array('post', 'page'));
132
+		$allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', $default_post_types);
133 133
 		
134 134
 		$links_editable = lasso_editor_get_option('links_editable', 'lasso_editor', false);
135
-		$bold_tag = lasso_editor_get_option( 'bold_tag', 'lasso_editor',  "b");
136
-		$i_tag = lasso_editor_get_option( 'i_tag', 'lasso_editor',  "i");
135
+		$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor', "b");
136
+		$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor', "i");
137 137
         
138 138
         $add_table = lasso_editor_get_option('add_table', 'lasso_editor', false);
139 139
 		
@@ -149,36 +149,36 @@  discard block
 block discarded – undo
149 149
         
150 150
         $link_prefix_http = lasso_editor_get_option('link_prefix_http', 'lasso_editor');
151 151
         
152
-        $use_old_wpimg = lasso_editor_get_option('use_old_wpimg', 'lasso_editor','off');
152
+        $use_old_wpimg = lasso_editor_get_option('use_old_wpimg', 'lasso_editor', 'off');
153 153
 
154 154
 ?>
155 155
 		<div class="wrap">
156 156
 
157
-	    	<h2><?php _e( 'Editus Settings', 'lasso' );?></h2>
157
+	    	<h2><?php _e('Editus Settings', 'lasso'); ?></h2>
158 158
 
159 159
 			<form id="lasso-editor-settings-form" class="lasso--form-settings" method="post" enctype="multipart/form-data">
160 160
 
161
-				<?php do_action('lasso_settings_before');?>
161
+				<?php do_action('lasso_settings_before'); ?>
162 162
 				
163 163
 				
164 164
 				
165
-				<h3><?php _e( 'Enable for:', 'lasso' );?></h3>
165
+				<h3><?php _e('Enable for:', 'lasso'); ?></h3>
166 166
 				<div class="lasso-editor-settings--option-wrap">
167 167
 					<div class="lasso-editor-settings--option-inner">
168 168
 						
169
-						<span class="lasso--setting-description"><?php _e( 'Enable Editus for the following post types.', 'lasso' );?></span>
169
+						<span class="lasso--setting-description"><?php _e('Enable Editus for the following post types.', 'lasso'); ?></span>
170 170
 						<?php
171 171
 						$args = array(
172 172
 							'public'   => true
173 173
 						);
174 174
 						 
175
-						$allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
176
-						$post_types = get_post_types( $args, 'objects' );
175
+						$allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
176
+						$post_types = get_post_types($args, 'objects');
177 177
 						 
178
-						foreach ( $post_types  as $post_type ) {
178
+						foreach ($post_types  as $post_type) {
179 179
 						   if ($post_type->name == 'attachment') continue;
180
-						   $checked ="";
181
-						   if (  in_array( $post_type->name, $allowed_post_types )  ) {
180
+						   $checked = "";
181
+						   if (in_array($post_type->name, $allowed_post_types)) {
182 182
 								$checked = 'checked="checked"';
183 183
 						   }
184 184
 						   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>';
@@ -188,131 +188,131 @@  discard block
 block discarded – undo
188 188
 				</div>
189 189
 				
190 190
 
191
-				<h3><?php _e( 'Internal Settings', 'lasso' );?></h3>
191
+				<h3><?php _e('Internal Settings', 'lasso'); ?></h3>
192 192
 				<div class="lasso-editor-settings--option-wrap">
193 193
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
194
-						<label><?php _e( 'Article Class', 'lasso' );?></label>
195
-						<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>
196
-						<input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr( $article_object );?>" placeholder=".entry-content">
194
+						<label><?php _e('Article Class', 'lasso'); ?></label>
195
+						<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>
196
+						<input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr($article_object); ?>" placeholder=".entry-content">
197 197
 					</div>
198 198
 				
199 199
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
200
-						<label><?php _e( 'Featured Image Class', 'lasso' );?></label>
201
-						<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>
202
-						<input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr( $featImgClass );?>" placeholder=".entry-content">
200
+						<label><?php _e('Featured Image Class', 'lasso'); ?></label>
201
+						<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>
202
+						<input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr($featImgClass); ?>" placeholder=".entry-content">
203 203
 					</div>
204 204
 				
205 205
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
206
-						<label><?php _e( 'Article Title Class', 'lasso' );?></label>
207
-						<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>
208
-						<input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr( $titleClass );?>" placeholder=".entry-content">
206
+						<label><?php _e('Article Title Class', 'lasso'); ?></label>
207
+						<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>
208
+						<input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr($titleClass); ?>" placeholder=".entry-content">
209 209
 					</div>
210 210
 				
211 211
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
212
-						<label><?php _e( 'Ignored Items to Save', 'lasso' );?></label>
213
-						<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>
214
-						<textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNoSave );?></textarea>
212
+						<label><?php _e('Ignored Items to Save', 'lasso'); ?></label>
213
+						<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>
214
+						<textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNoSave); ?></textarea>
215 215
 					</div>
216 216
 				
217 217
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
218
-						<label><?php _e( 'Read Only Items', 'lasso' );?></label>
219
-						<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>
220
-						<textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNonEditable );?></textarea>
218
+						<label><?php _e('Read Only Items', 'lasso'); ?></label>
219
+						<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>
220
+						<textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNonEditable); ?></textarea>
221 221
 					</div>
222 222
 				
223 223
 					<div class="lasso-editor-settings--option-inner" >
224
-						<input type="checkbox" class="checkbox" name="lasso_editor[show_ignored_items]" id="lasso_editor[show_ignored_items]" <?php echo checked( $show_ignored_items, 'on' );?> >
225
-						<label for="lasso_editor[show_ignored_items]"> <?php _e( 'Show Ignored Items', 'lasso' );?></label>
226
-						<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>
224
+						<input type="checkbox" class="checkbox" name="lasso_editor[show_ignored_items]" id="lasso_editor[show_ignored_items]" <?php echo checked($show_ignored_items, 'on'); ?> >
225
+						<label for="lasso_editor[show_ignored_items]"> <?php _e('Show Ignored Items', 'lasso'); ?></label>
226
+						<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>
227 227
 					</div>
228 228
 				</div>
229 229
 
230
-				<h3><?php _e( 'Editor UI', 'lasso' );?></h3>
230
+				<h3><?php _e('Editor UI', 'lasso'); ?></h3>
231 231
 				<div class="lasso-editor-settings--option-wrap">
232 232
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
233
-						<input type="checkbox" class="checkbox" name="lasso_editor[use_old_ui]" id="lasso_editor_use_old_ui" <?php echo checked( $use_old_ui, 'on' );?> >
234
-						<label for="lasso_editor[use_old_ui]"><?php _e( 'Use the Old Toolbar', 'lasso' );?></label>
235
-						<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>
233
+						<input type="checkbox" class="checkbox" name="lasso_editor[use_old_ui]" id="lasso_editor_use_old_ui" <?php echo checked($use_old_ui, 'on'); ?> >
234
+						<label for="lasso_editor[use_old_ui]"><?php _e('Use the Old Toolbar', 'lasso'); ?></label>
235
+						<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>
236 236
 					</div>
237 237
 				    <div id="lasso-editor-settings--colors">
238 238
 					<?php
239
-					self::create_section_for_color_picker('button-color1', _e( 'Editor Bar Color Top', 'lasso' ), '#0000ff');
240
-					self::create_section_for_color_picker('button-color2', _e( 'Editor Bar Color Bottom', 'lasso' ), '#000030');
241
-					self::create_section_for_color_picker('dialog-color', _e( 'Dialog Color', 'lasso' ), '#000055');
242
-					self::create_section_for_color_picker('text-color', _e( 'Icon/Text Color', 'lasso' ), '#ffffff');
239
+					self::create_section_for_color_picker('button-color1', _e('Editor Bar Color Top', 'lasso'), '#0000ff');
240
+					self::create_section_for_color_picker('button-color2', _e('Editor Bar Color Bottom', 'lasso'), '#000030');
241
+					self::create_section_for_color_picker('dialog-color', _e('Dialog Color', 'lasso'), '#000055');
242
+					self::create_section_for_color_picker('text-color', _e('Icon/Text Color', 'lasso'), '#ffffff');
243 243
 					?>
244
-					<button type="button" id="lasso-editor-settings--default-colors" ><?php _e( 'Default Colors', 'lasso' );?></button>
244
+					<button type="button" id="lasso-editor-settings--default-colors" ><?php _e('Default Colors', 'lasso'); ?></button>
245 245
 				    <div style="height:50px;"></div>
246 246
 					</div>
247 247
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
248
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked( $toolbar_headings, 'on' );?> >
249
-						<label for="lasso_editor[toolbar_headings]"><?php _e( 'Enable H2 and H3 Buttons', 'lasso' );?></label>
250
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set H2 and H3 settings.', 'lasso' );?></span>
248
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked($toolbar_headings, 'on'); ?> >
249
+						<label for="lasso_editor[toolbar_headings]"><?php _e('Enable H2 and H3 Buttons', 'lasso'); ?></label>
250
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set H2 and H3 settings.', 'lasso'); ?></span>
251 251
 
252 252
 					</div>
253 253
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
254
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings_h4]" id="lasso_editor[toolbar_headings_h4]" <?php echo checked( $toolbar_headings_h4, 'on' );?> >
255
-						<label for="lasso_editor[toolbar_headings_h4]"><?php _e( 'Enable H4/H5/H6 Buttons', 'lasso' );?></label>
256
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set H4/H5/H6 settings.', 'lasso' );?></span>
254
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings_h4]" id="lasso_editor[toolbar_headings_h4]" <?php echo checked($toolbar_headings_h4, 'on'); ?> >
255
+						<label for="lasso_editor[toolbar_headings_h4]"><?php _e('Enable H4/H5/H6 Buttons', 'lasso'); ?></label>
256
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set H4/H5/H6 settings.', 'lasso'); ?></span>
257 257
 
258 258
 					</div>
259 259
 					
260 260
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
261
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_list]" id="lasso_editor[toolbar_list]" <?php echo checked( $toolbar_list, 'on' );?> >
262
-						<label for="lasso_editor[toolbar_list]"><?php _e( 'Enable OL/UL Buttons', 'lasso' );?></label>
263
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to create Ordered and Unordered Lists from text selection.', 'lasso' );?></span>
261
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_list]" id="lasso_editor[toolbar_list]" <?php echo checked($toolbar_list, 'on'); ?> >
262
+						<label for="lasso_editor[toolbar_list]"><?php _e('Enable OL/UL Buttons', 'lasso'); ?></label>
263
+						<span class="lasso--setting-description"><?php _e('Show the buttons to create Ordered and Unordered Lists from text selection.', 'lasso'); ?></span>
264 264
 					</div>
265 265
 					
266 266
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
267
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked( $toolbar_show_color, 'on' );?> >
268
-						<label for="lasso_editor[toolbar_show_color]"><?php _e( 'Enable Text Color Buttons', 'lasso' );?></label>
269
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set text colors.', 'lasso' );?></span>
267
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked($toolbar_show_color, 'on'); ?> >
268
+						<label for="lasso_editor[toolbar_show_color]"><?php _e('Enable Text Color Buttons', 'lasso'); ?></label>
269
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set text colors.', 'lasso'); ?></span>
270 270
 
271 271
 					</div>
272 272
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
273
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked( $toolbar_show_alignment, 'on' );?> >
274
-						<label for="lasso_editor[toolbar_show_alignment]"><?php _e( 'Enable Text Align Buttons', 'lasso' );?></label>
275
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set text alignment.', 'lasso' );?></span>
273
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked($toolbar_show_alignment, 'on'); ?> >
274
+						<label for="lasso_editor[toolbar_show_alignment]"><?php _e('Enable Text Align Buttons', 'lasso'); ?></label>
275
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set text alignment.', 'lasso'); ?></span>
276 276
 
277 277
 					</div>
278 278
 					
279 279
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
280
-						<input type="checkbox" class="checkbox" name="lasso_editor[links_editable]" id="lasso_editor[links_editable]" <?php echo checked( $links_editable, 'on' );?> >
281
-						<label for="lasso_editor[links_editable]"><?php _e( 'Make links editable under the Editing Mode', 'lasso' );?></label>
282
-						<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>
280
+						<input type="checkbox" class="checkbox" name="lasso_editor[links_editable]" id="lasso_editor[links_editable]" <?php echo checked($links_editable, 'on'); ?> >
281
+						<label for="lasso_editor[links_editable]"><?php _e('Make links editable under the Editing Mode', 'lasso'); ?></label>
282
+						<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>
283 283
 
284 284
 					</div>
285 285
 					<div class="lasso-editor-settings--option-inner">
286
-					    <label for="lasso_editor[insert_comp_ui]"> <?php _e( 'Insert Component UI', 'lasso' );?></label>
287
-						<span class="lasso--setting-description"><?php _e( 'UI mechanism to insert components', 'lasso' );?></span>
286
+					    <label for="lasso_editor[insert_comp_ui]"> <?php _e('Insert Component UI', 'lasso'); ?></label>
287
+						<span class="lasso--setting-description"><?php _e('UI mechanism to insert components', 'lasso'); ?></span>
288 288
 						<div class="lasso-editor-settings--option-inner" style="border:none;">
289
-					       <input type="radio" name="lasso_editor[insert_comp_ui]" value='drag' <?php echo checked( $insert_comp_ui, 'drag' );?>> <?php _e( 'Drag and Drop', 'lasso' );?>
289
+					       <input type="radio" name="lasso_editor[insert_comp_ui]" value='drag' <?php echo checked($insert_comp_ui, 'drag'); ?>> <?php _e('Drag and Drop', 'lasso'); ?>
290 290
 						</div>
291 291
 						<div class="lasso-editor-settings--option-inner" style="border:none;">
292
-						<input type="radio" name="lasso_editor[insert_comp_ui]" value="click" <?php echo checked( $insert_comp_ui, 'click' );?>> <?php _e( 'Click', 'lasso' );?>
292
+						<input type="radio" name="lasso_editor[insert_comp_ui]" value="click" <?php echo checked($insert_comp_ui, 'click'); ?>> <?php _e('Click', 'lasso'); ?>
293 293
 						</div>
294 294
 						<div class="lasso-editor-settings--option-inner" style="border:none;">
295
-						<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' );?>
295
+						<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'); ?>
296 296
 						</div>
297 297
 					</div>
298 298
                     
299 299
 				</div>
300 300
 				
301
-				<h3><?php _e( 'Component', 'lasso' );?></h3>
301
+				<h3><?php _e('Component', 'lasso'); ?></h3>
302 302
                 <div class="lasso-editor-settings--option-wrap" style="border:none;" >
303 303
                     <div class="lasso-editor-settings--option-inner" style="border:none">
304
-						<input type="checkbox" class="checkbox" name="lasso_editor[add_table]" id="lasso_editor[add_table]" <?php echo checked( $add_table, 'on' );?> >
305
-						<label for="lasso_editor[add_table]"><?php _e( 'Additional Component: Table', 'lasso' );?></label>
306
-						<span class="lasso--setting-description"><?php _e( 'Allow user to add and edit tables.', 'lasso' );?></span>
304
+						<input type="checkbox" class="checkbox" name="lasso_editor[add_table]" id="lasso_editor[add_table]" <?php echo checked($add_table, 'on'); ?> >
305
+						<label for="lasso_editor[add_table]"><?php _e('Additional Component: Table', 'lasso'); ?></label>
306
+						<span class="lasso--setting-description"><?php _e('Allow user to add and edit tables.', 'lasso'); ?></span>
307 307
 
308 308
 					</div>
309 309
                 
310
-                <?php if ( 'ase-active' != $ase_status ) { ?>
310
+                <?php if ('ase-active' != $ase_status) { ?>
311 311
                 
312 312
                     <div class="lasso-editor-settings--option-inner" style="border:none">
313
-						<input type="checkbox" class="checkbox" name="lasso_editor[use_old_wpimg]" id="lasso_editor[use_old_wpimg]" <?php echo checked( $use_old_wpimg, 'on' );?> >
314
-						<label for="lasso_editor[use_old_wpimg]"><?php _e( 'Use Simple Image', 'lasso' );?></label>
315
-						<span class="lasso--setting-description"><?php _e( 'Use Simple Image Component without Extra Options.', 'lasso' );?></span>
313
+						<input type="checkbox" class="checkbox" name="lasso_editor[use_old_wpimg]" id="lasso_editor[use_old_wpimg]" <?php echo checked($use_old_wpimg, 'on'); ?> >
314
+						<label for="lasso_editor[use_old_wpimg]"><?php _e('Use Simple Image', 'lasso'); ?></label>
315
+						<span class="lasso--setting-description"><?php _e('Use Simple Image Component without Extra Options.', 'lasso'); ?></span>
316 316
 
317 317
 					</div>
318 318
                 
@@ -320,114 +320,114 @@  discard block
 block discarded – undo
320 320
                 </div>
321 321
 				
322 322
 
323
-				<h3><?php _e( 'Post Settings UI', 'lasso' );?></h3>
323
+				<h3><?php _e('Post Settings UI', 'lasso'); ?></h3>
324 324
 				<div class="lasso-editor-settings--option-wrap"  >
325 325
 					<div class="lasso-editor-settings--option-inner" style="border:none">
326
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked( $post_settings_disabled, 'on' );?> >
327
-						<label for="lasso_editor[post_settings_disabled]"> <?php _e( 'Disable Post Settings', 'lasso' );?></label>
328
-						<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>
326
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked($post_settings_disabled, 'on'); ?> >
327
+						<label for="lasso_editor[post_settings_disabled]"> <?php _e('Disable Post Settings', 'lasso'); ?></label>
328
+						<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>
329 329
 					</div>
330 330
 					
331 331
 					<div class="lasso-editor-settings--option-inner" style="border:none">
332
-						<input type="checkbox" class="checkbox" name="lasso_editor[allow_change_date]" id="lasso_editor[allow_change_date]" <?php echo checked( $allow_change_date, 'on' );?> >
333
-						<label for="lasso_editor[allow_change_date]"> <?php _e( 'Allow Changing Post Date', 'lasso' );?></label>
334
-						<span class="lasso--setting-description"><?php _e( 'Add the date selector to change the post\'s date to the Post Setting dialog', 'lasso' );?></span>
332
+						<input type="checkbox" class="checkbox" name="lasso_editor[allow_change_date]" id="lasso_editor[allow_change_date]" <?php echo checked($allow_change_date, 'on'); ?> >
333
+						<label for="lasso_editor[allow_change_date]"> <?php _e('Allow Changing Post Date', 'lasso'); ?></label>
334
+						<span class="lasso--setting-description"><?php _e('Add the date selector to change the post\'s date to the Post Setting dialog', 'lasso'); ?></span>
335 335
 					</div>
336 336
                     
337 337
                     <div class="lasso-editor-settings--option-inner" style="border:none">
338
-						<input type="checkbox" class="checkbox" name="lasso_editor[allow_edit_excerpt]" id="lasso_editor[allow_edit_excerpt]" <?php echo checked( $allow_edit_excerpt, 'on' );?> >
339
-						<label for="lasso_editor[allow_edit_excerpt]"> <?php _e( 'Allow Editing Excerpt', 'lasso' );?></label>
340
-						<span class="lasso--setting-description"><?php _e( 'Allow the post\'s excerpt to be edited in the Post Setting dialog', 'lasso' );?></span>
338
+						<input type="checkbox" class="checkbox" name="lasso_editor[allow_edit_excerpt]" id="lasso_editor[allow_edit_excerpt]" <?php echo checked($allow_edit_excerpt, 'on'); ?> >
339
+						<label for="lasso_editor[allow_edit_excerpt]"> <?php _e('Allow Editing Excerpt', 'lasso'); ?></label>
340
+						<span class="lasso--setting-description"><?php _e('Allow the post\'s excerpt to be edited in the Post Setting dialog', 'lasso'); ?></span>
341 341
 					</div>
342 342
 					
343 343
 					<div class="lasso-editor-settings--option-inner" style="border:none">
344
-						<input type="checkbox" class="checkbox" name="lasso_editor[allow_new_category]" id="lasso_editor[allow_new_category]" <?php echo checked( $allow_new_category, 'on' );?> >
345
-						<label for="lasso_editor[allow_new_category]"> <?php _e( 'Allow Adding New Category', 'lasso' );?></label>
346
-						<span class="lasso--setting-description"><?php _e( 'Add the user to create new, previously non-existing categories for posts.', 'lasso' );?></span>
344
+						<input type="checkbox" class="checkbox" name="lasso_editor[allow_new_category]" id="lasso_editor[allow_new_category]" <?php echo checked($allow_new_category, 'on'); ?> >
345
+						<label for="lasso_editor[allow_new_category]"> <?php _e('Allow Adding New Category', 'lasso'); ?></label>
346
+						<span class="lasso--setting-description"><?php _e('Add the user to create new, previously non-existing categories for posts.', 'lasso'); ?></span>
347 347
 					</div>
348 348
 					
349 349
 					<div class="lasso-editor-settings--option-inner" style="border:none">
350
-						<input type="checkbox" class="checkbox" name="lasso_editor[no_pending_status]" id="lasso_editor[no_pending_status]" <?php echo checked( $no_pending_status, 'on' );?> >
351
-						<label for="lasso_editor[no_pending_status]"> <?php _e( 'Do Not Allow "Pending" Status', 'lasso' );?></label>
352
-						<span class="lasso--setting-description"><?php _e( 'Remove the Option to Set the Status to Pending.', 'lasso' );?></span>
350
+						<input type="checkbox" class="checkbox" name="lasso_editor[no_pending_status]" id="lasso_editor[no_pending_status]" <?php echo checked($no_pending_status, 'on'); ?> >
351
+						<label for="lasso_editor[no_pending_status]"> <?php _e('Do Not Allow "Pending" Status', 'lasso'); ?></label>
352
+						<span class="lasso--setting-description"><?php _e('Remove the Option to Set the Status to Pending.', 'lasso'); ?></span>
353 353
 					</div>
354 354
 					
355 355
 					<div class="lasso-editor-settings--option-inner" style="border:none">
356
-						<input type="checkbox" class="checkbox" name="lasso_editor[no_url_setting]" id="lasso_editor[no_slug_setting]" <?php echo checked( $no_url_setting, 'on' );?> >
357
-						<label for="lasso_editor[no_url_setting]"> <?php _e( 'Remove POST URL Option', 'lasso' );?></label>
358
-						<span class="lasso--setting-description"><?php _e( 'Remove the Option to Set the URL for the Post.', 'lasso' );?></span>
356
+						<input type="checkbox" class="checkbox" name="lasso_editor[no_url_setting]" id="lasso_editor[no_slug_setting]" <?php echo checked($no_url_setting, 'on'); ?> >
357
+						<label for="lasso_editor[no_url_setting]"> <?php _e('Remove POST URL Option', 'lasso'); ?></label>
358
+						<span class="lasso--setting-description"><?php _e('Remove the Option to Set the URL for the Post.', 'lasso'); ?></span>
359 359
 					</div>
360 360
 				
361 361
 					<div class="lasso-editor-settings--option-inner" >
362
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked( $post_new_disabled, 'on' );?> >
363
-						<label for="lasso_editor[post_adding_disabled]"><?php _e( 'Disable Post Adding', 'lasso' );?></label>
364
-						<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>
362
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked($post_new_disabled, 'on'); ?> >
363
+						<label for="lasso_editor[post_adding_disabled]"><?php _e('Disable Post Adding', 'lasso'); ?></label>
364
+						<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>
365 365
 					</div>
366 366
 					
367 367
 
368 368
 				</div>
369 369
 				
370
-				<h3><?php _e( 'Misc', 'lasso' );?></h3>
370
+				<h3><?php _e('Misc', 'lasso'); ?></h3>
371 371
 				<div class="lasso-editor-settings--option-wrap">
372 372
 					<div class="lasso-editor-settings--option-inner" style="border:none">
373
-						<input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked( $disable_tour, 'on' );?> >
374
-						<label for="lasso_editor[disable_tour]"> <?php _e( 'Do Not Show Tour Dialog', 'lasso' );?></label>
375
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable the tour dialog box for all users.', 'lasso' );?></span>
373
+						<input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked($disable_tour, 'on'); ?> >
374
+						<label for="lasso_editor[disable_tour]"> <?php _e('Do Not Show Tour Dialog', 'lasso'); ?></label>
375
+						<span class="lasso--setting-description"><?php _e('Check this box to disable the tour dialog box for all users.', 'lasso'); ?></span>
376 376
 					</div>
377 377
 
378 378
 					<div class="lasso-editor-settings--option-inner" style="border:none">
379
-					    <label for="lasso_editor[bold_tag]"> <?php _e( '"Bold" Tag', 'lasso' );?></label>
380
-						<span class="lasso--setting-description"><?php _e( 'Choose the HTML tag used for the "Bold" style.', 'lasso' );?></span>
381
-					    <input type="radio" name="lasso_editor[bold_tag]" value='b' <?php echo checked( $bold_tag, 'b' );?>> b
382
-						<input type="radio" name="lasso_editor[bold_tag]" value="strong" <?php echo checked( $bold_tag, 'strong' );?>> strong
379
+					    <label for="lasso_editor[bold_tag]"> <?php _e('"Bold" Tag', 'lasso'); ?></label>
380
+						<span class="lasso--setting-description"><?php _e('Choose the HTML tag used for the "Bold" style.', 'lasso'); ?></span>
381
+					    <input type="radio" name="lasso_editor[bold_tag]" value='b' <?php echo checked($bold_tag, 'b'); ?>> b
382
+						<input type="radio" name="lasso_editor[bold_tag]" value="strong" <?php echo checked($bold_tag, 'strong'); ?>> strong
383 383
 					</div>
384 384
 					<div class="lasso-editor-settings--option-inner" style="border:none">
385
-					    <label for="lasso_editor[i_tag]"> <?php _e( '"Italic" Tag', 'lasso' );?></label>
386
-						<span class="lasso--setting-description"><?php _e( 'Choose the HTML tag used for the "Italic" style.', 'lasso' );?></span>
387
-					    <input type="radio" name="lasso_editor[i_tag]" value='i' <?php echo checked( $i_tag, 'i' );?>> i
388
-						<input type="radio" name="lasso_editor[i_tag]" value="em" <?php echo checked( $i_tag, 'em' );?>> em
385
+					    <label for="lasso_editor[i_tag]"> <?php _e('"Italic" Tag', 'lasso'); ?></label>
386
+						<span class="lasso--setting-description"><?php _e('Choose the HTML tag used for the "Italic" style.', 'lasso'); ?></span>
387
+					    <input type="radio" name="lasso_editor[i_tag]" value='i' <?php echo checked($i_tag, 'i'); ?>> i
388
+						<input type="radio" name="lasso_editor[i_tag]" value="em" <?php echo checked($i_tag, 'em'); ?>> em
389 389
 					</div>
390 390
                     <div class="lasso-editor-settings--option-inner" >
391
-						<input type="checkbox" class="checkbox" name="lasso_editor[link_prefix_http]" id="lasso_editor[link_prefix_http]" <?php echo checked( $link_prefix_http, 'on' );?> >
392
-						<label for="lasso_editor[link_prefix_http]"><?php _e( 'Auto Prefix HTTP to links', 'lasso' );?></label>
393
-						<span class="lasso--setting-description"><?php _e( 'When user adds a hyperlink, automatically add http:// if the user does not specify it explicitly.', 'lasso' );?></span>
391
+						<input type="checkbox" class="checkbox" name="lasso_editor[link_prefix_http]" id="lasso_editor[link_prefix_http]" <?php echo checked($link_prefix_http, 'on'); ?> >
392
+						<label for="lasso_editor[link_prefix_http]"><?php _e('Auto Prefix HTTP to links', 'lasso'); ?></label>
393
+						<span class="lasso--setting-description"><?php _e('When user adds a hyperlink, automatically add http:// if the user does not specify it explicitly.', 'lasso'); ?></span>
394 394
 					</div>
395 395
 				</div>
396 396
 
397
-				<h3><?php _e( 'Advanced Options', 'lasso' );?></h3>
398
-                <span class="lasso--setting-description"><?php _e( 'Suggested not to turn these options on without consulting the developer.', 'lasso' );?></span>
397
+				<h3><?php _e('Advanced Options', 'lasso'); ?></h3>
398
+                <span class="lasso--setting-description"><?php _e('Suggested not to turn these options on without consulting the developer.', 'lasso'); ?></span>
399 399
                 <span class="lasso--setting-description"> </span>
400 400
 				<div class="lasso-editor-settings--option-wrap ">
401 401
 					<div class="lasso-editor-settings--option-inner" style="border:none">
402
-						<input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked( $shortcodify_disabled, 'on' );?> >
403
-						<label for="lasso_editor[shortcodify_disabled]"><?php _e( 'Disable Aesop Component Conversion', 'lasso' );?></label>
404
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso' );?></span>
402
+						<input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked($shortcodify_disabled, 'on'); ?> >
403
+						<label for="lasso_editor[shortcodify_disabled]"><?php _e('Disable Aesop Component Conversion', 'lasso'); ?></label>
404
+						<span class="lasso--setting-description"><?php _e('Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso'); ?></span>
405 405
 					</div>
406 406
 				
407 407
 					<div class="lasso-editor-settings--option-inner" style="border:none">
408
-						<input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked( $enable_autosave, 'on' );?> >
409
-						<label for="lasso_editor[enable_autosave]"><?php _e( 'Enable Auto Save', 'lasso' );?></label>
410
-						<span class="lasso--setting-description"><?php _e( 'Check this box to enable auto save.', 'lasso' );?></span>
408
+						<input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked($enable_autosave, 'on'); ?> >
409
+						<label for="lasso_editor[enable_autosave]"><?php _e('Enable Auto Save', 'lasso'); ?></label>
410
+						<span class="lasso--setting-description"><?php _e('Check this box to enable auto save.', 'lasso'); ?></span>
411 411
 					</div>
412 412
 				
413 413
 					<div class="lasso-editor-settings--option-inner" style="border:none">
414
-						<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' );?> >
415
-						<label for="lasso_editor[post_save_disabled]"><?php _e( 'Disable Post Saving', 'lasso' );?></label>
416
-						<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>
414
+						<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'); ?> >
415
+						<label for="lasso_editor[post_save_disabled]"><?php _e('Disable Post Saving', 'lasso'); ?></label>
416
+						<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>
417 417
 
418 418
 					</div>
419 419
 					
420 420
 					<div class="lasso-editor-settings--option-inner" style="border:none">
421
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_edit_disabled]" id="lasso_editor[post_edit_disabled]" <?php echo checked( $edit_post_disabled, 'on' );?> >
422
-						<label for="lasso_editor[post_edit_disabled]"><?php _e( 'Disable Post Editing', 'lasso' );?></label>
423
-						<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>
421
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_edit_disabled]" id="lasso_editor[post_edit_disabled]" <?php echo checked($edit_post_disabled, 'on'); ?> >
422
+						<label for="lasso_editor[post_edit_disabled]"><?php _e('Disable Post Editing', 'lasso'); ?></label>
423
+						<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>
424 424
 
425 425
 					</div>
426 426
 				
427 427
 					<div class="lasso-editor-settings--option-inner">
428
-						<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' );?> >
429
-						<label for="lasso_editor[save_using_rest_disabled]"><?php _e( "Don't Use REST API to Save", 'lasso' );?></label>
430
-						<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>
428
+						<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'); ?> >
429
+						<label for="lasso_editor[save_using_rest_disabled]"><?php _e("Don't Use REST API to Save", 'lasso'); ?></label>
430
+						<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>
431 431
 
432 432
 					</div>
433 433
 				</div>
@@ -437,11 +437,11 @@  discard block
 block discarded – undo
437 437
 
438 438
 				<div class="lasso-editor-settings--submit">
439 439
 				    <input type="hidden" name="action" value="lasso-editor-settings" />
440
-				    <input type="submit" class="button-primary" value="<?php esc_attr_e( 'Save Settings', 'lasso' );?>" />
441
-					<?php wp_nonce_field( 'nonce', 'lasso_editor_settings' ); ?>
440
+				    <input type="submit" class="button-primary" value="<?php esc_attr_e('Save Settings', 'lasso'); ?>" />
441
+					<?php wp_nonce_field('nonce', 'lasso_editor_settings'); ?>
442 442
 				</div>
443 443
 				
444
-				<?php do_action('lasso_settings_after');?>
444
+				<?php do_action('lasso_settings_after'); ?>
445 445
 			</form>
446 446
 
447 447
 		</div><?php
Please login to merge, or discard this patch.