Completed
Push — master ( fdcbf7...cafb48 )
by
unknown
02:11
created
lasso.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -18,27 +18,27 @@
 block discarded – undo
18 18
  */
19 19
 
20 20
 // If this file is called directly, abort.
21
-if ( ! defined( 'WPINC' ) ) {
21
+if (!defined('WPINC')) {
22 22
 	die;
23 23
 }
24 24
 
25 25
 // Set some constants
26
-define( 'LASSO_VERSION', '0.9.13.0' );
27
-define( 'LASSO_DIR', plugin_dir_path( __FILE__ ) );
28
-define( 'LASSO_URL', plugins_url( '', __FILE__ ) );
29
-define( 'LASSO_FILE', __FILE__ );
26
+define('LASSO_VERSION', '0.9.13.0');
27
+define('LASSO_DIR', plugin_dir_path(__FILE__));
28
+define('LASSO_URL', plugins_url('', __FILE__));
29
+define('LASSO_FILE', __FILE__);
30 30
 
31 31
 /**
32 32
  * Load plugin if PHP version is 5.4 or later.
33 33
  */
34
-if ( version_compare( PHP_VERSION, '5.4.0', '>=' ) ) {
34
+if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
35 35
 
36
-	include_once( LASSO_DIR . '/bootstrap.php' );
36
+	include_once(LASSO_DIR.'/bootstrap.php');
37 37
 
38 38
 } else {
39 39
 
40 40
 	add_action('admin_head', 'lasso_fail_notice');
41
-	function lasso_fail_notice(){
41
+	function lasso_fail_notice() {
42 42
 
43 43
 		printf('<div class="error"><p>Lasso requires PHP 5.4 or higher.</p></div>');
44 44
 
Please login to merge, or discard this patch.
public/includes/tour.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -11,16 +11,16 @@  discard block
 block discarded – undo
11 11
 
12 12
 	public function __construct() {
13 13
 
14
-	    $disable_tour = lasso_editor_get_option('disable_tour', 'lasso_editor');
14
+		$disable_tour = lasso_editor_get_option('disable_tour', 'lasso_editor');
15 15
 		if (!$disable_tour) {
16
-		    add_action( 'wp_footer',       array( $this, 'draw_tour' ) );
16
+			add_action( 'wp_footer',       array( $this, 'draw_tour' ) );
17 17
 		}
18 18
 	}
19 19
 
20 20
 	/**
21
-	*	Draw the modal used to house the walk through
22
-	*	@since 0.6
23
-	*/
21
+	 *	Draw the modal used to house the walk through
22
+	 *	@since 0.6
23
+	 */
24 24
 	public function draw_tour() {
25 25
 
26 26
 		$tour_hidden = get_user_meta( get_current_user_ID(), 'lasso_hide_tour', true );
@@ -80,9 +80,9 @@  discard block
 block discarded – undo
80 80
 	}
81 81
 
82 82
 	/**
83
-	*	Draw the inner slides for the welcome walkthrough
84
-	*	@since 0.6
85
-	*/
83
+	 *	Draw the inner slides for the welcome walkthrough
84
+	 *	@since 0.6
85
+	 */
86 86
 	public function tour_slides() { ?>
87 87
 
88 88
 		<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 
14 14
 	    $disable_tour = lasso_editor_get_option('disable_tour', 'lasso_editor');
15 15
 		if (!$disable_tour) {
16
-		    add_action( 'wp_footer',       array( $this, 'draw_tour' ) );
16
+		    add_action('wp_footer', array($this, 'draw_tour'));
17 17
 		}
18 18
 	}
19 19
 
@@ -23,19 +23,19 @@  discard block
 block discarded – undo
23 23
 	*/
24 24
 	public function draw_tour() {
25 25
 
26
-		$tour_hidden = get_user_meta( get_current_user_ID(), 'lasso_hide_tour', true );
26
+		$tour_hidden = get_user_meta(get_current_user_ID(), 'lasso_hide_tour', true);
27 27
 
28
-		if ( lasso_user_can() && !$tour_hidden ) {
28
+		if (lasso_user_can() && !$tour_hidden) {
29 29
 
30 30
 			global $post;
31 31
 
32
-			$nonce = wp_create_nonce( 'lasso-editor-tour' );
32
+			$nonce = wp_create_nonce('lasso-editor-tour');
33 33
 
34 34
 			// let users add custom css classes
35
-			$custom_classes = apply_filters( 'lasso_modal_tour_classes', '' );
35
+			$custom_classes = apply_filters('lasso_modal_tour_classes', '');
36 36
 
37 37
 			?>
38
-			<div id="lasso--tour__modal" class="lasso--modal lasso--tour__modal lasso--modal__checkbox <?php echo sanitize_html_class( $custom_classes );?>">
38
+			<div id="lasso--tour__modal" class="lasso--modal lasso--tour__modal lasso--modal__checkbox <?php echo sanitize_html_class($custom_classes); ?>">
39 39
 				<script>
40 40
 					(function( $ ) {
41 41
 						jQuery(document).ready(function($){
@@ -55,19 +55,19 @@  discard block
 block discarded – undo
55 55
 				</script>
56 56
 				<div class="lasso--modal__inner">
57 57
 
58
-					<?php echo self::tour_slides();?>
58
+					<?php echo self::tour_slides(); ?>
59 59
 
60 60
 					<div class="lasso--postsettings__footer">
61 61
 
62 62
 						<div class="lasso--postsettings__option">
63 63
 							<label for="hide_tour" class="checkbox-control checkbox">
64
-					        	<input type="checkbox" id="hide_tour" name="hide_tour" <?php checked( $tour_hidden, 1 ); ?>>
64
+					        	<input type="checkbox" id="hide_tour" name="hide_tour" <?php checked($tour_hidden, 1); ?>>
65 65
 					        	<span class="control-indicator"></span>
66
-								<?php _e('Don\'t show this again','lasso');?>
66
+								<?php _e('Don\'t show this again', 'lasso'); ?>
67 67
 					        </label>
68 68
 						</div>
69 69
 
70
-						<input type="submit" value="<?php _e( 'Okay, got it!', 'lasso' );?>" data-nonce="<?php echo $nonce;?>" >
70
+						<input type="submit" value="<?php _e('Okay, got it!', 'lasso'); ?>" data-nonce="<?php echo $nonce; ?>" >
71 71
 					</div>
72 72
 
73 73
 				</div>
@@ -91,20 +91,20 @@  discard block
 block discarded – undo
91 91
 			<?php
92 92
 
93 93
 			$out = '<ul><li>';
94
-			$out .= sprintf( '<img src="%s">', LASSO_URL.'/public/assets/img/s-1.jpg' );
95
-			$out .= '<p>'.__('Access posts by clicking the list icon. Create a new post by clicking the new post icon.','lasso').'</p>';
94
+			$out .= sprintf('<img src="%s">', LASSO_URL.'/public/assets/img/s-1.jpg');
95
+			$out .= '<p>'.__('Access posts by clicking the list icon. Create a new post by clicking the new post icon.', 'lasso').'</p>';
96 96
 			$out .= '</li><li>';
97
-			$out .= sprintf( '<img src="%s">', LASSO_URL.'/public/assets/img/s-2.jpg' );
98
-			$out .= '<p>'.__('While on a single post, edit by clicking the Pen icon. Access post settings with the settings icon. Press escape to exit any modal.','lasso').'</p>';
97
+			$out .= sprintf('<img src="%s">', LASSO_URL.'/public/assets/img/s-2.jpg');
98
+			$out .= '<p>'.__('While on a single post, edit by clicking the Pen icon. Access post settings with the settings icon. Press escape to exit any modal.', 'lasso').'</p>';
99 99
 			$out .= '</li><li>';
100
-			$out .= sprintf( '<img src="%s">', LASSO_URL.'/public/assets/img/s-3.jpg' );
101
-			$out .= '<p>'.__('Highlight a piece of text, and click on a formatting option to style it. Click the Disk icon or CMD-S to save. Click the orange "X" button to exit the editor.','lasso').'</p>';
100
+			$out .= sprintf('<img src="%s">', LASSO_URL.'/public/assets/img/s-3.jpg');
101
+			$out .= '<p>'.__('Highlight a piece of text, and click on a formatting option to style it. Click the Disk icon or CMD-S to save. Click the orange "X" button to exit the editor.', 'lasso').'</p>';
102 102
 			$out .= '</li><li>';
103
-			$out .= sprintf( '<img src="%s">', LASSO_URL.'/public/assets/img/s-4.jpg' );
104
-			$out .= '<p>'.__('Story components can be added by clicking the plus icon, and dragging any component from the component tray into the story.','lasso').'</p>';
103
+			$out .= sprintf('<img src="%s">', LASSO_URL.'/public/assets/img/s-4.jpg');
104
+			$out .= '<p>'.__('Story components can be added by clicking the plus icon, and dragging any component from the component tray into the story.', 'lasso').'</p>';
105 105
 			$out .= '</li></ul>';
106 106
 
107
-			echo apply_filters( 'lasso_tour_slides', $out );
107
+			echo apply_filters('lasso_tour_slides', $out);
108 108
 
109 109
 		?></div><?php
110 110
 
Please login to merge, or discard this patch.
public/includes/editor-modules.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 	$toolbar_class  = $toolbar_headings ? 'toolbar-extended' : false;
149 149
 	
150 150
 	// mobile styles
151
-    $mobile_class = $is_mobile ? 'lasso-mobile' : false;
151
+	$mobile_class = $is_mobile ? 'lasso-mobile' : false;
152 152
 	$mobile_style =$is_mobile ? 'style="top:40px;"' : null;
153 153
 	
154 154
 	//show color
@@ -513,8 +513,8 @@  discard block
 block discarded – undo
513 513
 	global $post;
514 514
 	
515 515
 	global $wp_post_types;
516
-    $labels = &$wp_post_types['post']->labels;
517
-    $labels->name = 'Articles';
516
+	$labels = &$wp_post_types['post']->labels;
517
+	$labels->name = 'Articles';
518 518
 
519 519
 	ob_start();
520 520
 
Please login to merge, or discard this patch.
Spacing   +207 added lines, -207 removed lines patch added patch discarded remove patch
@@ -12,32 +12,32 @@  discard block
 block discarded – undo
12 12
  *
13 13
  * @since 1.0
14 14
  */
15
-add_action( 'wp_footer', 'lasso_editor_controls' );
15
+add_action('wp_footer', 'lasso_editor_controls');
16 16
 function lasso_editor_controls() {
17 17
 
18 18
 	global $post;
19 19
 
20
-	if ( lasso_user_can('edit_posts') ) {
20
+	if (lasso_user_can('edit_posts')) {
21 21
 
22
-		$status = get_post_status( get_the_ID() );
22
+		$status = get_post_status(get_the_ID());
23 23
 
24 24
 		// let users add custom css classes
25
-		$custom_classes = apply_filters( 'lasso_control_classes', '' );
25
+		$custom_classes = apply_filters('lasso_control_classes', '');
26 26
 
27 27
 		$post_access_class   = '';
28
-		$post_new_disabled   = lasso_editor_get_option( 'post_adding_disabled', 'lasso_editor' );
29
-		$post_settings_disabled = lasso_editor_get_option( 'post_settings_disabled', 'lasso_editor' );
30
-		$shortcodify_disabled = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
28
+		$post_new_disabled   = lasso_editor_get_option('post_adding_disabled', 'lasso_editor');
29
+		$post_settings_disabled = lasso_editor_get_option('post_settings_disabled', 'lasso_editor');
30
+		$shortcodify_disabled = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor');
31 31
 
32 32
 
33 33
 		// CSS class if adding new post objects is disabled
34
-		if ( 'on' == $post_new_disabled ) { $post_access_class = 'lasso--post-new-disabled'; }
34
+		if ('on' == $post_new_disabled) { $post_access_class = 'lasso--post-new-disabled'; }
35 35
 
36 36
 		// CSS class if adjust settings is disabled
37
-		if ( 'on' == $post_settings_disabled ) { $post_access_class = 'lasso--post-settings-disabled'; }
37
+		if ('on' == $post_settings_disabled) { $post_access_class = 'lasso--post-settings-disabled'; }
38 38
 
39 39
 		// CSS class if adding new post objects AND settings are disabled
40
-		if ( 'on' == $post_new_disabled && 'on' == $post_settings_disabled ) { $post_access_class = 'lasso--post-all-disabled'; }
40
+		if ('on' == $post_new_disabled && 'on' == $post_settings_disabled) { $post_access_class = 'lasso--post-all-disabled'; }
41 41
 
42 42
 		// CSS class if shortcodify or (Aesop Shortcode Conversion) is disabled
43 43
 		$sc_saving_class = 'on' == $shortcodify_disabled ? 'shortcodify-disabled' : 'shortcodify-enabled';
@@ -47,44 +47,44 @@  discard block
 block discarded – undo
47 47
 		
48 48
 		$mobile_style = wp_is_mobile() ? 'style="top:40px;"' : null;
49 49
 
50
-		?><div id="lasso--controls" class="lasso-post-status--<?php echo sanitize_html_class( $status );?> <?php echo sanitize_html_class( $custom_classes );?>" data-post-id="<?php echo get_the_ID();?>" >
50
+		?><div id="lasso--controls" class="lasso-post-status--<?php echo sanitize_html_class($status); ?> <?php echo sanitize_html_class($custom_classes); ?>" data-post-id="<?php echo get_the_ID(); ?>" >
51 51
 
52
-			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class;?> "  <?php echo $mobile_style ?> >
52
+			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class; ?> "  <?php echo $mobile_style ?> >
53 53
 
54
-				<?php do_action( 'lasso_editor_controls_before' );
54
+				<?php do_action('lasso_editor_controls_before');
55 55
 
56
-				if ( $is_capable ) { ?>
56
+				if ($is_capable) { ?>
57 57
 
58
-					<li id="lasso--edit" title="<?php esc_attr_e( 'Edit Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
58
+					<li id="lasso--edit" title="<?php esc_attr_e('Edit Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
59 59
 
60
-					<?php if ( 'off' == $post_settings_disabled || empty( $post_settings_disabled ) ) { ?>
61
-						<li id="lasso--post-settings" title="<?php esc_attr_e( 'Post Settings', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
60
+					<?php if ('off' == $post_settings_disabled || empty($post_settings_disabled)) { ?>
61
+						<li id="lasso--post-settings" title="<?php esc_attr_e('Post Settings', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
62 62
 					<?php }
63 63
 
64 64
 				} ?>
65 65
 
66
-				<li id="lasso--post-all" title="<?php esc_attr_e( 'All Posts', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
66
+				<li id="lasso--post-all" title="<?php esc_attr_e('All Posts', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
67 67
 
68
-				<?php if ( $is_capable && wp_revisions_enabled( $post ) ) { ?>
69
-					<li id="lasso--post-revisions" title="<?php esc_attr_e( 'Revisions', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
68
+				<?php if ($is_capable && wp_revisions_enabled($post)) { ?>
69
+					<li id="lasso--post-revisions" title="<?php esc_attr_e('Revisions', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
70 70
 				<?php } ?>
71 71
 
72
-				<?php if ( ( 'off' == $post_new_disabled || empty( $post_new_disabled ) && lasso_user_can('publish_posts') ) ) { ?>
73
-					<li id="lasso--post-new" title="<?php esc_attr_e( 'Add Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
72
+				<?php if (('off' == $post_new_disabled || empty($post_new_disabled) && lasso_user_can('publish_posts'))) { ?>
73
+					<li id="lasso--post-new" title="<?php esc_attr_e('Add Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
74 74
 				<?php } ?>
75 75
 
76
-				<?php do_action( 'lasso_editor_controls_after' );?>
76
+				<?php do_action('lasso_editor_controls_after'); ?>
77 77
 
78 78
 			</ul>
79 79
 
80
-			<?php if ( is_singular() ) { ?>
80
+			<?php if (is_singular()) { ?>
81 81
 
82 82
 				<div class="lasso--controls__right">
83 83
 
84
-					<a href="#" title="<?php esc_attr_e( 'Save Post', 'lasso' );?>" id="lasso--save" class="lasso-save-post lasso--button <?php echo $sc_saving_class;?>"></a>
84
+					<a href="#" title="<?php esc_attr_e('Save Post', 'lasso'); ?>" id="lasso--save" class="lasso-save-post lasso--button <?php echo $sc_saving_class; ?>"></a>
85 85
 
86
-					<?php if ( 'draft' == $status && ( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') )  ) { ?>
87
-						<a href="#" title="<?php esc_attr_e( 'Publish Post', 'lasso' );?>" id="lasso--publish" class="lasso-publish-post lasso--button <?php echo $sc_saving_class;?>"></a>
86
+					<?php if ('draft' == $status && (lasso_user_can('publish_posts') || lasso_user_can('publish_pages'))) { ?>
87
+						<a href="#" title="<?php esc_attr_e('Publish Post', 'lasso'); ?>" id="lasso--publish" class="lasso-publish-post lasso--button <?php echo $sc_saving_class; ?>"></a>
88 88
 					<?php } ?>
89 89
 
90 90
 				</div>
@@ -107,13 +107,13 @@  discard block
 block discarded – undo
107 107
 
108 108
 	ob_start();
109 109
 
110
-	if ( !lasso_user_can() )
110
+	if (!lasso_user_can())
111 111
 		return;
112 112
 
113 113
 	// let users add custom css classes
114
-	$custom_classes = apply_filters( 'lasso_sidebar_classes', '' );
114
+	$custom_classes = apply_filters('lasso_sidebar_classes', '');
115 115
 	?>
116
-	<div id="lasso--sidebar" class="<?php echo sanitize_html_class( $custom_classes );?>" >
116
+	<div id="lasso--sidebar" class="<?php echo sanitize_html_class($custom_classes); ?>" >
117 117
 		<div class="lasso--sidebar__inner">
118 118
 			<div id="lasso--component__settings"></div>
119 119
 		</div>
@@ -131,25 +131,25 @@  discard block
 block discarded – undo
131 131
 
132 132
 	ob_start();
133 133
 
134
-	if ( !lasso_user_can() )
134
+	if (!lasso_user_can())
135 135
 		return;
136 136
 	
137 137
 	$is_mobile = wp_is_mobile();
138 138
 
139 139
 	// check for lasso story engine and add a class doniting this
140
-	$ase_status = class_exists( 'Aesop_Core' ) || defined( 'LASSO_CUSTOM' ) ? 'ase-active' : 'ase-not-active';
140
+	$ase_status = class_exists('Aesop_Core') || defined('LASSO_CUSTOM') ? 'ase-active' : 'ase-not-active';
141 141
 
142 142
 	// let users add custom css classes
143
-	$custom_classes = apply_filters( 'lasso_toolbar_classes', '' );
143
+	$custom_classes = apply_filters('lasso_toolbar_classes', '');
144 144
 
145 145
 	// are toolbar headings enabled
146
-	$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
146
+	$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
147 147
 
148
-	$toolbar_class  = $toolbar_headings ? 'toolbar-extended' : false;
148
+	$toolbar_class = $toolbar_headings ? 'toolbar-extended' : false;
149 149
 	
150 150
 	// mobile styles
151 151
     $mobile_class = $is_mobile ? 'lasso-mobile' : false;
152
-	$mobile_style =$is_mobile ? 'style="top:40px;"' : null;
152
+	$mobile_style = $is_mobile ? 'style="top:40px;"' : null;
153 153
 	
154 154
 	//show color
155 155
 	$show_color = lasso_editor_get_option('toolbar_show_color', 'lasso_editor');
@@ -159,84 +159,84 @@  discard block
 block discarded – undo
159 159
 
160 160
 
161 161
 	?>
162
-	<div class="lasso--toolbar_wrap lasso-editor-controls--wrap <?php echo $toolbar_class.' '.$mobile_class.' '.$ase_status.' '.sanitize_html_class( $custom_classes );?>" <?php echo $mobile_style ?>>
162
+	<div class="lasso--toolbar_wrap lasso-editor-controls--wrap <?php echo $toolbar_class.' '.$mobile_class.' '.$ase_status.' '.sanitize_html_class($custom_classes); ?>" <?php echo $mobile_style ?>>
163 163
 		<ul class="lasso--toolbar__inner lasso-editor-controls">
164
-			<?php do_action( 'lasso_toolbar_components_before' );?>
165
-		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e( 'Bold', 'lasso' );?>"></li>
166
-		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e( 'Underline', 'lasso' );?>"></li>
167
-		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e( 'Italicize', 'lasso' );?>"></li>
168
-		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e( 'Strikethrough', 'lasso' );?>"></li>
169
-		    <?php if ( $toolbar_headings ): ?>
170
-		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>"></li>
171
-		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>"></li>
164
+			<?php do_action('lasso_toolbar_components_before'); ?>
165
+		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e('Bold', 'lasso'); ?>"></li>
166
+		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e('Underline', 'lasso'); ?>"></li>
167
+		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e('Italicize', 'lasso'); ?>"></li>
168
+		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e('Strikethrough', 'lasso'); ?>"></li>
169
+		    <?php if ($toolbar_headings): ?>
170
+		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>"></li>
171
+		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>"></li>
172 172
 			<?php endif; ?>
173 173
 			
174
-			<?php if ( $show_color ): ?>
175
-		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e( 'Set Text Color', 'lasso' );?>"></li>
176
-		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e( 'Choose Color', 'lasso' );?>"></li>
174
+			<?php if ($show_color): ?>
175
+		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e('Set Text Color', 'lasso'); ?>"></li>
176
+		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e('Choose Color', 'lasso'); ?>"></li>
177 177
 			<?php endif; ?>
178 178
 			
179 179
 		    
180 180
 			
181 181
 			
182 182
 			
183
-		    <li id="lasso-toolbar--components" title="<?php esc_attr_e( 'Insert Component', 'lasso' );?>">
183
+		    <li id="lasso-toolbar--components" title="<?php esc_attr_e('Insert Component', 'lasso'); ?>">
184 184
 			    <ul id="lasso-toolbar--components__list" style="display:none;">
185
-			    	<?php if ( 'ase-active' == $ase_status ): ?>
186
-						<li data-type="image" title="<?php esc_attr_e( 'Image', 'lasso' );?>" class="lasso-toolbar--component__image"></li>
187
-						<li data-type="character" title="<?php esc_attr_e( 'Character', 'lasso' );?>" class="lasso-toolbar--component__character"></li>
188
-						<li data-type="quote" title="<?php esc_attr_e( 'Quote', 'lasso' );?>"  class="lasso-toolbar--component__quote"></li>
189
-						<li data-type="content" title="<?php esc_attr_e( 'Content', 'lasso' );?>"  class="lasso-toolbar--component__content"></li>
190
-						<li data-type="chapter" title="<?php esc_attr_e( 'Chapter', 'lasso' );?>"  class="lasso-toolbar--component__chapter"></li>
191
-						<li data-type="parallax" title="<?php esc_attr_e( 'Parallax', 'lasso' );?>"  class="lasso-toolbar--component__parallax"></li>
192
-						<li data-type="audio" title="<?php esc_attr_e( 'Audio', 'lasso' );?>"  class="lasso-toolbar--component__audio"></li>
193
-						<li data-type="video" title="<?php esc_attr_e( 'Video', 'lasso' );?>"  class="lasso-toolbar--component__video"></li>
194
-						<li data-type="map" title="<?php esc_attr_e( 'Map', 'lasso' );?>"  class="lasso-toolbar--component__map"></li>
195
-						<li data-type="timeline_stop" title="<?php esc_attr_e( 'Timeline', 'lasso' );?>"  class="lasso-toolbar--component__timeline"></li>
196
-						<li data-type="document" title="<?php esc_attr_e( 'Document', 'lasso' );?>"  class="lasso-toolbar--component__document"></li>
197
-						<li data-type="collection" title="<?php esc_attr_e( 'Collection', 'lasso' );?>"  class="lasso-toolbar--component__collection"></li>
198
-						<li data-type="gallery" title="<?php esc_attr_e( 'Gallery', 'lasso' );?>"  class="lasso-toolbar--component__gallery"></li>
199
-						<?php if ( class_exists ('Aesop_GalleryPop') ) { ?>
200
-						     <li data-type="gallery" title="<?php esc_attr_e( 'Gallery Pop', 'lasso' );?>"  class="lasso-toolbar--component__gallerypop"></li>
185
+			    	<?php if ('ase-active' == $ase_status): ?>
186
+						<li data-type="image" title="<?php esc_attr_e('Image', 'lasso'); ?>" class="lasso-toolbar--component__image"></li>
187
+						<li data-type="character" title="<?php esc_attr_e('Character', 'lasso'); ?>" class="lasso-toolbar--component__character"></li>
188
+						<li data-type="quote" title="<?php esc_attr_e('Quote', 'lasso'); ?>"  class="lasso-toolbar--component__quote"></li>
189
+						<li data-type="content" title="<?php esc_attr_e('Content', 'lasso'); ?>"  class="lasso-toolbar--component__content"></li>
190
+						<li data-type="chapter" title="<?php esc_attr_e('Chapter', 'lasso'); ?>"  class="lasso-toolbar--component__chapter"></li>
191
+						<li data-type="parallax" title="<?php esc_attr_e('Parallax', 'lasso'); ?>"  class="lasso-toolbar--component__parallax"></li>
192
+						<li data-type="audio" title="<?php esc_attr_e('Audio', 'lasso'); ?>"  class="lasso-toolbar--component__audio"></li>
193
+						<li data-type="video" title="<?php esc_attr_e('Video', 'lasso'); ?>"  class="lasso-toolbar--component__video"></li>
194
+						<li data-type="map" title="<?php esc_attr_e('Map', 'lasso'); ?>"  class="lasso-toolbar--component__map"></li>
195
+						<li data-type="timeline_stop" title="<?php esc_attr_e('Timeline', 'lasso'); ?>"  class="lasso-toolbar--component__timeline"></li>
196
+						<li data-type="document" title="<?php esc_attr_e('Document', 'lasso'); ?>"  class="lasso-toolbar--component__document"></li>
197
+						<li data-type="collection" title="<?php esc_attr_e('Collection', 'lasso'); ?>"  class="lasso-toolbar--component__collection"></li>
198
+						<li data-type="gallery" title="<?php esc_attr_e('Gallery', 'lasso'); ?>"  class="lasso-toolbar--component__gallery"></li>
199
+						<?php if (class_exists('Aesop_GalleryPop')) { ?>
200
+						     <li data-type="gallery" title="<?php esc_attr_e('Gallery Pop', 'lasso'); ?>"  class="lasso-toolbar--component__gallerypop"></li>
201 201
 						<?php }?>
202 202
 					<?php else: ?>
203
-						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );?>" class="image lasso-toolbar--component__image"></li>
204
-						<li data-type="wpquote" title="<?php esc_attr_e( 'WordPress Quote', 'lasso' );?>" class="quote lasso-toolbar--component__quote"></li>
205
-						<!--li data-type="wpvideo" title="<?php esc_attr_e( 'WordPress Video', 'lasso' );?>" class="video lasso-toolbar--component__video"></li-->
203
+						<li data-type="wpimg" title="<?php esc_attr_e('WordPress Image', 'lasso'); ?>" class="image lasso-toolbar--component__image"></li>
204
+						<li data-type="wpquote" title="<?php esc_attr_e('WordPress Quote', 'lasso'); ?>" class="quote lasso-toolbar--component__quote"></li>
205
+						<!--li data-type="wpvideo" title="<?php esc_attr_e('WordPress Video', 'lasso'); ?>" class="video lasso-toolbar--component__video"></li-->
206 206
 					<?php endif; ?>
207
-					<?php do_action( 'lasso_toolbar_components' );?>
207
+					<?php do_action('lasso_toolbar_components'); ?>
208 208
 			    </ul>
209 209
 			</li>
210
-			<li id="lasso-toolbar--link" title="<?php esc_attr_e( 'Anchor Link', 'lasso' );?>">
210
+			<li id="lasso-toolbar--link" title="<?php esc_attr_e('Anchor Link', 'lasso'); ?>">
211 211
 		    	<div id="lasso-toolbar--link__wrap" <?php echo $mobile_style ?> >
212
-		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'http://url.com', 'lasso' );?>"></div>
213
-		    		<a href="#" title="<?php esc_attr_e( 'Create Link', 'lasso' );?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
212
+		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e('http://url.com', 'lasso'); ?>"></div>
213
+		    		<a href="#" title="<?php esc_attr_e('Create Link', 'lasso'); ?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
214 214
 					<input class="styled-checkbox" type="checkbox" id="aesop-toolbar--link_newtab" checked/>
215 215
                     <label for="aesop-toolbar--link_newtab">Open in Another Tab</label>
216 216
 		    	</div>
217 217
 		    </li>
218
-		    <?php do_action( 'lasso_toolbar_components_after' );?>
219
-		    <li id="lasso-toolbar--html" title="<?php esc_attr_e( 'Insert HTML', 'lasso' );?>">
218
+		    <?php do_action('lasso_toolbar_components_after'); ?>
219
+		    <li id="lasso-toolbar--html" title="<?php esc_attr_e('Insert HTML', 'lasso'); ?>">
220 220
 		    	<div id="lasso-toolbar--html__wrap" <?php echo $mobile_style ?>>
221
-		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?>"></div>
221
+		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?>"></div>
222 222
 		    		<div id="lasso-toolbar--html__footer">
223 223
 		    			<ul class="lasso-toolbar--html-snips">
224
-		    				<?php if ( !$toolbar_headings ): ?>
225
-		    				<li id="lasso-html--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>">
226
-		    				<li id="lasso-html--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>">
224
+		    				<?php if (!$toolbar_headings): ?>
225
+		    				<li id="lasso-html--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>">
226
+		    				<li id="lasso-html--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>">
227 227
 		    				<?php endif; ?>
228
-		    				<li id="lasso-html--ul" title="<?php esc_attr_e( 'Unordered List', 'lasso' );?>">
229
-		    				<li id="lasso-html--ol" title="<?php esc_attr_e( 'Ordered List', 'lasso' );?>">
228
+		    				<li id="lasso-html--ul" title="<?php esc_attr_e('Unordered List', 'lasso'); ?>">
229
+		    				<li id="lasso-html--ol" title="<?php esc_attr_e('Ordered List', 'lasso'); ?>">
230 230
 		    			</ul>
231
-		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e( 'Cancel', 'lasso' );?></a>
232
-		    			<a href="#" title="<?php esc_attr_e( 'Insert HTML', 'lasso' );?>" class="lasso-toolbar--html__control" id="lasso-toolbar--html__insert" ><?php _e( 'Insert', 'lasso' );?></a>
231
+		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e('Cancel', 'lasso'); ?></a>
232
+		    			<a href="#" title="<?php esc_attr_e('Insert HTML', 'lasso'); ?>" class="lasso-toolbar--html__control" id="lasso-toolbar--html__insert" ><?php _e('Insert', 'lasso'); ?></a>
233 233
 		    		</div>
234 234
 		    	</div>
235 235
 		    </li>
236
-			<?php if ( $show_align ): ?>
237
-		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e( 'Text Left Align', 'lasso' );?>"></li>
238
-		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e( 'Text Center Align', 'lasso' );?>"></li>
239
-			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e( 'Text Right Align', 'lasso' );?>"></li>
236
+			<?php if ($show_align): ?>
237
+		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e('Text Left Align', 'lasso'); ?>"></li>
238
+		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e('Text Center Align', 'lasso'); ?>"></li>
239
+			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e('Text Right Align', 'lasso'); ?>"></li>
240 240
 			<?php endif; ?>
241 241
 		</ul>
242 242
 	</div>
@@ -251,22 +251,22 @@  discard block
 block discarded – undo
251 251
  */
252 252
 function lasso_editor_settings_toolbar() {
253 253
 
254
-	$delete_nonce = wp_create_nonce( 'lasso-delete-nonce' );
254
+	$delete_nonce = wp_create_nonce('lasso-delete-nonce');
255 255
 
256 256
 	ob_start();
257 257
 
258
-	if ( !lasso_user_can() )
258
+	if (!lasso_user_can())
259 259
 		return;
260 260
 
261 261
 	// let users add custom css classes
262
-	$custom_classes = apply_filters( 'lasso_component_classes', '' );
262
+	$custom_classes = apply_filters('lasso_component_classes', '');
263 263
 
264 264
 	?>
265
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
266
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
267
-		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
268
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
269
-		<li class="lasso-delete" data-postid="<?php echo get_the_ID();?>" data-nonce="<?php echo $delete_nonce;?>" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
265
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
266
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
267
+		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
268
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
269
+		<li class="lasso-delete" data-postid="<?php echo get_the_ID(); ?>" data-nonce="<?php echo $delete_nonce; ?>" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
270 270
 	</ul>
271 271
 
272 272
 	<?php return ob_get_clean();
@@ -282,17 +282,17 @@  discard block
 block discarded – undo
282 282
 
283 283
 	ob_start();
284 284
 
285
-	if ( !lasso_user_can() )
285
+	if (!lasso_user_can())
286 286
 		return;
287 287
 
288 288
 	// has post thumbnail
289
-	$has_thumbnail = has_post_thumbnail( get_the_ID() ) ? 'class="lasso--featImg--has-thumb"' : false;
289
+	$has_thumbnail = has_post_thumbnail(get_the_ID()) ? 'class="lasso--featImg--has-thumb"' : false;
290 290
 
291 291
 	?>
292
-	<ul id="lasso--featImgControls" <?php echo $has_thumbnail;?>>
293
-		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e( 'Replace Image', 'lasso' );?>" href="#"><i class="lasso-icon-image"></i></a></li>
294
-		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e( 'Delete Image', 'lasso' );?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
295
-		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e( 'save', 'lasso' );?></a></li>
292
+	<ul id="lasso--featImgControls" <?php echo $has_thumbnail; ?>>
293
+		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e('Replace Image', 'lasso'); ?>" href="#"><i class="lasso-icon-image"></i></a></li>
294
+		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e('Delete Image', 'lasso'); ?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
295
+		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e('save', 'lasso'); ?></a></li>
296 296
 	</ul>
297 297
 
298 298
 	<?php return ob_get_clean();
@@ -311,55 +311,55 @@  discard block
 block discarded – undo
311 311
 
312 312
 	ob_start();
313 313
 
314
-	if ( !lasso_user_can() )
314
+	if (!lasso_user_can())
315 315
 		return;
316 316
 
317 317
 	global $post;
318 318
 
319 319
 	$postid = get_the_ID();
320 320
 
321
-	$status = get_post_status( $postid );
322
-	$nonce = wp_create_nonce( 'lasso-update-post-settings' );
321
+	$status = get_post_status($postid);
322
+	$nonce = wp_create_nonce('lasso-update-post-settings');
323 323
 
324 324
 	// let users add custom css classes
325
-	$custom_classes = apply_filters( 'lasso_modal_settings_classes', '' );
325
+	$custom_classes = apply_filters('lasso_modal_settings_classes', '');
326 326
 
327 327
 	// objects categories
328
-	$categories 		= lasso_get_post_objects( $postid, 'category' );
329
-	$tags 				= lasso_get_post_objects( $postid, 'tag' );
328
+	$categories = lasso_get_post_objects($postid, 'category');
329
+	$tags = lasso_get_post_objects($postid, 'tag');
330 330
 
331 331
 	// modal tabs
332
-	$tabs  				= lasso_modal_addons('tab');
333
-	$content 			= lasso_modal_addons('content');
332
+	$tabs = lasso_modal_addons('tab');
333
+	$content = lasso_modal_addons('content');
334 334
 
335 335
 	// are we singular
336
-	$is_singular 		= is_singular();
336
+	$is_singular = is_singular();
337 337
 	$is_singular_class 	= $is_singular ? 'lasso--postsettings__2col' : 'lasso--postsettings__1col';
338 338
 	$has_thumb_class    = has_post_thumbnail() ? 'has-thumbnail' : 'no-thumbnail';
339 339
 	$theme_supports     = current_theme_supports('post-thumbnails');
340
-	$default_image 		= LASSO_URL.'/admin/assets/img/empty-img.png';
340
+	$default_image = LASSO_URL.'/admin/assets/img/empty-img.png';
341 341
 
342 342
 ?>
343
-	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>">
343
+	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>">
344 344
 		<div class="lasso--modal__inner">
345 345
 
346
-			<?php if( $tabs ) { echo $tabs; } ?>
346
+			<?php if ($tabs) { echo $tabs; } ?>
347 347
 
348 348
 			<div class="lasso--modal__content modal__content--core visible" data-addon-content="core">
349
-				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class;?>" >
349
+				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class; ?>" >
350 350
 
351
-					<?php if ( $is_singular && $theme_supports ) : ?>
351
+					<?php if ($is_singular && $theme_supports) : ?>
352 352
 					<div class="lasso--postsettings__left">
353
-						<label><?php _e( 'Featured Image', 'lasso' );?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e( 'Change the featured image for this post.', 'lasso' );?>"><i class="lasso-icon-help"></i></span></label>
354
-						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url( $default_image );?>">
353
+						<label><?php _e('Featured Image', 'lasso'); ?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e('Change the featured image for this post.', 'lasso'); ?>"><i class="lasso-icon-help"></i></span></label>
354
+						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url($default_image); ?>">
355 355
 
356 356
 							<div id="lasso--post-thumb__controls" class="lasso--post-thumb__controls">
357
-								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image','lasso');?>" class="dashicons dashicons-edit"></i>
358
-								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image','lasso');?>" class="dashicons dashicons-no-alt"></i>
357
+								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image', 'lasso'); ?>" class="dashicons dashicons-edit"></i>
358
+								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image', 'lasso'); ?>" class="dashicons dashicons-no-alt"></i>
359 359
 								<i id="lasso--save-status" class="lasso-icon lasso-icon-spinner6 not-visible"></i>
360 360
 							</div>
361 361
 
362
-							<?php echo has_post_thumbnail() ? get_the_post_thumbnail( $post->ID, 'medium' ) : '<img src="'.$default_image.'">'; ?>
362
+							<?php echo has_post_thumbnail() ? get_the_post_thumbnail($post->ID, 'medium') : '<img src="'.$default_image.'">'; ?>
363 363
 
364 364
 						</div>
365 365
 						<div id="lasso--featImgSave"><a href="#" class="not-visible">Save</a></div>
@@ -369,12 +369,12 @@  discard block
 block discarded – undo
369 369
 
370 370
 					<div class="lasso--postsettings__right">
371 371
 
372
-						<?php if( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') ): ?>
372
+						<?php if (lasso_user_can('publish_posts') || lasso_user_can('publish_pages')): ?>
373 373
 						<div class="lasso--postsettings__option story-status-option">
374
-							<label><?php _e( 'Status', 'lasso' );?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e( 'Change the status of the post to draft or publish.', 'lasso' );?>"><i class="lasso-icon-help"></i></span></label>
375
-							<ul class="story-status story-status-<?php echo sanitize_html_class( $status );?>">
376
-								<li id="lasso--status-draft"><?php _e( 'Draft', 'lasso' );?></li>
377
-								<li id="lasso--status-publish"><?php _e( 'Publish', 'lasso' );?></li>
374
+							<label><?php _e('Status', 'lasso'); ?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e('Change the status of the post to draft or publish.', 'lasso'); ?>"><i class="lasso-icon-help"></i></span></label>
375
+							<ul class="story-status story-status-<?php echo sanitize_html_class($status); ?>">
376
+								<li id="lasso--status-draft"><?php _e('Draft', 'lasso'); ?></li>
377
+								<li id="lasso--status-publish"><?php _e('Publish', 'lasso'); ?></li>
378 378
 							</ul>
379 379
 							<div class="lasso--slider_wrap">
380 380
 								<div id="lasso--slider"></div>
@@ -382,10 +382,10 @@  discard block
 block discarded – undo
382 382
 						</div>
383 383
 						<?php endif; ?>
384 384
 
385
-						<?php if ( 'publish' == $status ): ?>
385
+						<?php if ('publish' == $status): ?>
386 386
 						<div class="lasso--postsettings__option story-slug-option">
387
-							<label><?php _e( 'Post URL', 'lasso' );?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e( 'Change the URL (slug) of this post.', 'lasso' );?>"><i class="lasso-icon-help"></i></span></label>
388
-							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset( $post ) ? esc_attr( $post->post_name ) : false;?>">
387
+							<label><?php _e('Post URL', 'lasso'); ?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e('Change the URL (slug) of this post.', 'lasso'); ?>"><i class="lasso-icon-help"></i></span></label>
388
+							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset($post) ? esc_attr($post->post_name) : false; ?>">
389 389
 						</div>
390 390
 						<?php endif; ?>
391 391
 
@@ -394,34 +394,34 @@  discard block
 block discarded – undo
394 394
 					<div class="lasso--postsettings__middle">
395 395
 
396 396
 						<div class="lasso--postsettings__option story-categories-option">
397
-							<label><?php _e( 'Categories', 'lasso' );?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e( 'Type a category name and press enter.', 'lasso' );?>"><i class="lasso-icon-help"></i></span></label>
398
-							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories;?>">
397
+							<label><?php _e('Categories', 'lasso'); ?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e('Type a category name and press enter.', 'lasso'); ?>"><i class="lasso-icon-help"></i></span></label>
398
+							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories; ?>">
399 399
 						</div>
400 400
 
401 401
 						<div class="lasso--postsettings__option story-tags-option">
402
-							<label><?php _e( 'Tags', 'lasso' );?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e( 'Type a tag name and press enter.', 'lasso' );?>"><i class="lasso-icon-help"></i></span></label>
403
-							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags;?>">
402
+							<label><?php _e('Tags', 'lasso'); ?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e('Type a tag name and press enter.', 'lasso'); ?>"><i class="lasso-icon-help"></i></span></label>
403
+							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags; ?>">
404 404
 						</div>
405 405
 
406 406
 					</div>
407 407
 
408
-					<?php do_action( 'lasso_modal_post_form' ); // action ?>
408
+					<?php do_action('lasso_modal_post_form'); // action ?>
409 409
 
410 410
 					<div class="lasso--postsettings__footer" style="display:none;">
411
-						<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
411
+						<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
412 412
 						<input type="hidden" name="status" value="">
413 413
 						<input type="hidden" name="categories" value="">
414
-						<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
414
+						<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
415 415
 						<input type="hidden" name="action" value="process_update-object_post">
416
-						<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
417
-						<?php do_action( 'lasso_modal_post_form_footer' ); // action ?>
418
-						<input type="submit" value="<?php esc_attr_e( 'Save', 'lasso' );?>">
416
+						<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
417
+						<?php do_action('lasso_modal_post_form_footer'); // action ?>
418
+						<input type="submit" value="<?php esc_attr_e('Save', 'lasso'); ?>">
419 419
 					</div>
420 420
 
421 421
 				</form>
422 422
 			</div>
423 423
 
424
-			<?php if( $tabs ) { echo $content; } ?>
424
+			<?php if ($tabs) { echo $content; } ?>
425 425
 
426 426
 		</div>
427 427
 
@@ -442,41 +442,41 @@  discard block
 block discarded – undo
442 442
 
443 443
 	ob_start();
444 444
 
445
-	if ( !lasso_user_can('edit_posts') )
445
+	if (!lasso_user_can('edit_posts'))
446 446
 		return;
447 447
 
448
-	$status = get_post_status( get_the_ID() );
448
+	$status = get_post_status(get_the_ID());
449 449
 
450
-	$nonce = wp_create_nonce( 'lasso-editor-new-post' );
450
+	$nonce = wp_create_nonce('lasso-editor-new-post');
451 451
 
452 452
 	// let users add custom css classes
453
-	$custom_classes = apply_filters( 'lasso_modal_post_classes', '' );
453
+	$custom_classes = apply_filters('lasso_modal_post_classes', '');
454 454
 
455 455
 	// return the post type
456
-	$type = get_post_type( get_the_ID() );
456
+	$type = get_post_type(get_the_ID());
457 457
 
458 458
 	?>
459
-	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>">
459
+	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>">
460 460
 		<div class="lasso--modal__inner">
461 461
 
462 462
 			<form id="lasso--postnew__form" enctype="multipart/form-data" class="lasso--post-form">
463 463
 
464 464
 				<div class="lasso--postsettings__option story-slug-option lasso--last-option">
465
-					<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>
466
-					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e( 'Grump Wizards Make Toxic Brew', 'lasso' );?>">
465
+					<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>
466
+					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e('Grump Wizards Make Toxic Brew', 'lasso'); ?>">
467 467
 						<div class="lasso--select-wrap" style="width:90px">
468 468
 						<select id="lasso--select-type" name="story_type">
469 469
 
470 470
 							<?php
471 471
 								$types = lasso_post_types();
472 472
 
473
-								if ( !empty( $types ) ) {
473
+								if (!empty($types)) {
474 474
 
475
-									foreach( $types as $type ) {
475
+									foreach ($types as $type) {
476 476
 
477
-										$type = preg_replace( '/s\b/','', $type );
477
+										$type = preg_replace('/s\b/', '', $type);
478 478
 
479
-										printf( '<option value="%s">%s</option>', lcfirst( esc_attr( $type ) ) , ucfirst( esc_attr( $type ) ) );
479
+										printf('<option value="%s">%s</option>', lcfirst(esc_attr($type)), ucfirst(esc_attr($type)));
480 480
 									}
481 481
 
482 482
 								}
@@ -487,11 +487,11 @@  discard block
 block discarded – undo
487 487
 				</div>
488 488
 
489 489
 				<div class="lasso--postsettings__footer" style="display:none;">
490
-					<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
490
+					<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
491 491
 					<input type="hidden" name="action" value="process_new-object_post">
492 492
 					<input type="hidden" name="object" value="post">
493
-					<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
494
-					<input type="submit" value="<?php esc_attr_e( 'Create', 'lasso' );?>">
493
+					<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
494
+					<input type="submit" value="<?php esc_attr_e('Create', 'lasso'); ?>">
495 495
 				</div>
496 496
 
497 497
 			</form>
@@ -519,18 +519,18 @@  discard block
 block discarded – undo
519 519
 	ob_start();
520 520
 
521 521
 	// post status
522
-	$status = get_post_status( get_the_ID() );
522
+	$status = get_post_status(get_the_ID());
523 523
 
524 524
 	// let users add custom css classes
525
-	$custom_classes = apply_filters( 'lasso_modal_all_post_classes', '' );
525
+	$custom_classes = apply_filters('lasso_modal_all_post_classes', '');
526 526
 
527 527
 	?>
528
-	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>">
528
+	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>">
529 529
 		<div class="lasso--modal__inner">
530 530
 
531 531
 			<div class="lasso--post-filtering not-visible">
532 532
 				<div class="lasso--search__results">
533
-					<span id="lasso--results-found"></span><?php _e('results found','lasso');?>
533
+					<span id="lasso--results-found"></span><?php _e('results found', 'lasso'); ?>
534 534
 				</div>
535 535
 				<div class="lasso--search">
536 536
 					<i id="lasso--search__toggle" class="dashicons dashicons-search"></i>
@@ -543,18 +543,18 @@  discard block
 block discarded – undo
543 543
 
544 544
 				$post_types = lasso_post_types_names();
545 545
 
546
-				if ( ! empty( $post_types ) ) {
546
+				if (!empty($post_types)) {
547 547
 					$first = 'active';
548
-					foreach( $post_types as $name => $label ) {
548
+					foreach ($post_types as $name => $label) {
549 549
 						//printf( '<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr( $first), esc_attr( $name ), esc_attr( $label ) );
550 550
 						//print_r($post_types);
551
-						printf( '<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr( $first), esc_attr( $name ), esc_attr( $label ) );
551
+						printf('<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr($first), esc_attr($name), esc_attr($label));
552 552
 						$first = '';
553 553
 					}
554 554
 
555 555
 				}
556 556
 
557
-				do_action('lasso_modal_post_objects');?>
557
+				do_action('lasso_modal_post_objects'); ?>
558 558
 
559 559
 			</ul>
560 560
 			<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
@@ -572,18 +572,18 @@  discard block
 block discarded – undo
572 572
 
573 573
 	ob_start();
574 574
 
575
-	if ( !lasso_user_can() )
575
+	if (!lasso_user_can())
576 576
 		return;
577 577
 
578 578
 	// let users add custom css classes
579
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
579
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
580 580
 
581 581
 	?>
582
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
583
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
584
-		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
585
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
586
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
582
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
583
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
584
+		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
585
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
586
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
587 587
 	</ul>
588 588
 
589 589
 	<?php return ob_get_clean();
@@ -593,18 +593,18 @@  discard block
 block discarded – undo
593 593
 
594 594
 	ob_start();
595 595
 
596
-	if ( !lasso_user_can() )
596
+	if (!lasso_user_can())
597 597
 		return;
598 598
 
599 599
 	// let users add custom css classes
600
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
600
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
601 601
 
602 602
 	?>
603
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
604
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
605
-		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
606
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
607
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
603
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
604
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
605
+		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
606
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
607
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
608 608
 	</ul>
609 609
 
610 610
 	<?php return ob_get_clean();
@@ -617,16 +617,16 @@  discard block
 block discarded – undo
617 617
  */
618 618
 function lasso_map_form_footer() {
619 619
 
620
-	$nonce = wp_create_nonce( 'lasso-process-map' );
620
+	$nonce = wp_create_nonce('lasso-process-map');
621 621
 
622 622
 	ob_start();
623 623
 
624 624
 	?>
625 625
 	<div class="lasso--map-form__footer">
626
-		<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
627
-		<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
626
+		<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
627
+		<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
628 628
 		<input type="hidden" name="action" value="process_map_save">
629
-		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e( 'Save Locations', 'lasso' );?>">
629
+		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e('Save Locations', 'lasso'); ?>">
630 630
 	</div>
631 631
 
632 632
 	<?php return ob_get_clean();
@@ -644,7 +644,7 @@  discard block
 block discarded – undo
644 644
 
645 645
 	?>
646 646
 	<div id="lasso--pagerefresh" class="visible">
647
-		<?php _e( 'Save this post and refesh the page to see these changes.', 'lasso' );?>
647
+		<?php _e('Save this post and refesh the page to see these changes.', 'lasso'); ?>
648 648
 	</div>
649 649
 
650 650
 	<?php return ob_get_clean();
@@ -658,43 +658,43 @@  discard block
 block discarded – undo
658 658
  */
659 659
 function lasso_editor_options_blob() {
660 660
 
661
-	$codes   = function_exists( 'aesop_shortcodes' ) ? aesop_shortcodes() : apply_filters( 'lasso_custom_options', '' );
662
-	$galleries  = function_exists( 'lasso_editor_galleries_exist' ) && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
661
+	$codes = function_exists('aesop_shortcodes') ? aesop_shortcodes() : apply_filters('lasso_custom_options', '');
662
+	$galleries = function_exists('lasso_editor_galleries_exist') && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
663 663
 
664
-	$nonce = wp_create_nonce( 'lasso_gallery' );
664
+	$nonce = wp_create_nonce('lasso_gallery');
665 665
 
666 666
 	$blob = array();
667 667
 
668
-	if ( empty( $codes ) )
668
+	if (empty($codes))
669 669
 		return;
670 670
 
671
-	foreach ( $codes as $slug => $shortcode ) {
671
+	foreach ($codes as $slug => $shortcode) {
672 672
 		$return = '';
673 673
 		// Shortcode has atts
674 674
 
675
-		if ( count( $shortcode['atts'] ) && $shortcode['atts'] ) {
675
+		if (count($shortcode['atts']) && $shortcode['atts']) {
676 676
 
677
-			foreach ( $shortcode['atts'] as $attr_name => $attr_info ) {
677
+			foreach ($shortcode['atts'] as $attr_name => $attr_info) {
678 678
 
679 679
 
680
-				$prefix = isset( $attr_info['prefix'] ) ? sprintf( '<span class="lasso-option-prefix">%s</span>', $attr_info['prefix'] ) : null;
680
+				$prefix = isset($attr_info['prefix']) ? sprintf('<span class="lasso-option-prefix">%s</span>', $attr_info['prefix']) : null;
681 681
 
682 682
 				$return .= '<form id="lasso--component-settings-form" class="'.$galleries.'" method="post">';
683 683
 				$return .= '<p data-option="'.$attr_name.'" class="lasso-option lasso-'.$slug.'-'.$attr_name.'">';
684
-				$return .= '<label for="lasso-generator-attr-' . $attr_name . '">' . $attr_info['desc'] . '</label>';
684
+				$return .= '<label for="lasso-generator-attr-'.$attr_name.'">'.$attr_info['desc'].'</label>';
685 685
 				$return .= '<small class="lasso-option-desc">'.$attr_info['tip'].'</small>';
686 686
 				// Select
687 687
 
688
-				if ( isset( $attr_info['values'] ) ) {
688
+				if (isset($attr_info['values'])) {
689 689
 
690
-					$return .= '<select name="' . $attr_name . '" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr">';
690
+					$return .= '<select name="'.$attr_name.'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr">';
691 691
 
692
-					$i=0;
692
+					$i = 0;
693 693
 
694
-					foreach ( $attr_info['values'] as $attr_value ) {
694
+					foreach ($attr_info['values'] as $attr_value) {
695 695
 						$attr_value_selected = $attr_info['default'] == $attr_value ? ' selected="selected"' : '';
696 696
 
697
-						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" ' . $attr_value_selected . '>'.$attr_info['values'][$i]['name'].'</option>';
697
+						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" '.$attr_value_selected.'>'.$attr_info['values'][$i]['name'].'</option>';
698 698
 
699 699
 						$i++;
700 700
 					}
@@ -703,24 +703,24 @@  discard block
 block discarded – undo
703 703
 
704 704
 				} else {
705 705
 
706
-					$attr_field_type = isset( $attr_info['type'] ) ? $attr_info['type'] : 'text';
706
+					$attr_field_type = isset($attr_info['type']) ? $attr_info['type'] : 'text';
707 707
 
708 708
 					// image upload
709
-					if ( 'media_upload' == $attr_info['type'] ) {
709
+					if ('media_upload' == $attr_info['type']) {
710 710
 
711
-						$return .= '<input type="' . $attr_field_type . '" name="' . $attr_name . '" value="'.$attr_info['default'].'" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />';
711
+						$return .= '<input type="'.$attr_field_type.'" name="'.$attr_name.'" value="'.$attr_info['default'].'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />';
712 712
 						$return .= '<a href="#" id="lasso-upload-img" class="lasso-option-button" /></a>';
713 713
 
714
-					} elseif ( 'color' == $attr_info['type'] ) {
714
+					} elseif ('color' == $attr_info['type']) {
715 715
 
716
-						$return .= '<input type="color" name="' . $attr_name . '" value="'.$attr_info['default'].'" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />';
716
+						$return .= '<input type="color" name="'.$attr_name.'" value="'.$attr_info['default'].'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />';
717 717
 
718
-					} elseif ( 'text_area' == $attr_info['type'] ) {
718
+					} elseif ('text_area' == $attr_info['type']) {
719 719
 
720
-						$return .= '<textarea name="' . $attr_name . '" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" placeholder="'.$attr_info['default'].'" /></textarea>'.$prefix.'';
720
+						$return .= '<textarea name="'.$attr_name.'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" placeholder="'.$attr_info['default'].'" /></textarea>'.$prefix.'';
721 721
 
722 722
 					} else {
723
-						$return .= '<input type="' . $attr_field_type . '" name="' . $attr_name . '" value="'.$attr_info['default'].'" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />'.$prefix.'';
723
+						$return .= '<input type="'.$attr_field_type.'" name="'.$attr_name.'" value="'.$attr_info['default'].'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />'.$prefix.'';
724 724
 					}
725 725
 				}
726 726
 				$return .= '</p>';
@@ -731,9 +731,9 @@  discard block
 block discarded – undo
731 731
 		///////////////////////////
732 732
 		// START GALLERY AND MAP FRONT END STUFFS
733 733
 		///////////////////////////
734
-		if ( isset( $shortcode['front'] ) && true == $shortcode['front'] ) {
734
+		if (isset($shortcode['front']) && true == $shortcode['front']) {
735 735
 
736
-			if ( 'gallery' == $shortcode['front_type'] ) {
736
+			if ('gallery' == $shortcode['front_type']) {
737 737
 
738 738
 				$return .= lasso_gallery_editor_module();
739 739
 
@@ -744,13 +744,13 @@  discard block
 block discarded – undo
744 744
 		///////////////////////////
745 745
 
746 746
 		// Single shortcode (not closed)
747
-		if ( 'single' == $shortcode['type'] ) {
747
+		if ('single' == $shortcode['type']) {
748 748
 
749 749
 			$return .= '<input type="hidden" name="lasso-generator-content" id="lasso-generator-content" value="false" />';
750 750
 
751 751
 		} else {
752 752
 
753
-			$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>';
753
+			$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>';
754 754
 		}
755 755
 
756 756
 		$return .= '<p class="lasso-buttoninsert-wrap"><a href="#" class="lasso-generator-cancel" id="lasso--sidebar__close">Cancel
@@ -783,7 +783,7 @@  discard block
 block discarded – undo
783 783
 				<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
784 784
 				<div id="lasso--hide" style="display:none;" class="lasso--post-form">
785 785
 					<i class="lasso-icon lasso-icon-move"></i>
786
-					<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>
786
+					<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>
787 787
 					<div class="lasso--slider_wrap">
788 788
 						<div id="lasso--slider"></div>
789 789
 					</div>
Please login to merge, or discard this patch.
admin/includes/menus/settings.php 1 patch
Spacing   +72 added lines, -72 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,22 +45,22 @@  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
-			$options = array_map( 'sanitize_text_field', $options );
55
+			$options = array_map('sanitize_text_field', $options);
56 56
 
57
-			if ( function_exists( 'is_multisite' ) && is_multisite() ) {
57
+			if (function_exists('is_multisite') && is_multisite()) {
58 58
 
59
-				update_site_option( 'lasso_editor', $options );
59
+				update_site_option('lasso_editor', $options);
60 60
 
61 61
 			} else {
62 62
 
63
-				update_option( 'lasso_editor', $options );
63
+				update_option('lasso_editor', $options);
64 64
 			}
65 65
 
66 66
 			wp_send_json_success();
@@ -82,159 +82,159 @@  discard block
 block discarded – undo
82 82
 	 */
83 83
 	function lasso_editor_settings_form() {
84 84
 
85
-		if ( !is_user_logged_in() )
85
+		if (!is_user_logged_in())
86 86
 			return;
87 87
 
88
-		$article_object   = lasso_editor_get_option( 'article_class', 'lasso_editor' );
89
-		$featImgClass    = lasso_editor_get_option( 'featimg_class', 'lasso_editor' );
90
-		$titleClass    = lasso_editor_get_option( 'title_class', 'lasso_editor' );
88
+		$article_object = lasso_editor_get_option('article_class', 'lasso_editor');
89
+		$featImgClass = lasso_editor_get_option('featimg_class', 'lasso_editor');
90
+		$titleClass = lasso_editor_get_option('title_class', 'lasso_editor');
91 91
 
92
-		$post_new_disabled   = lasso_editor_get_option( 'post_adding_disabled', 'lasso_editor' );
93
-		$save_to_post_disabled  = lasso_editor_get_option( 'post_save_disabled', 'lasso_editor' );
94
-		$post_settings_disabled = lasso_editor_get_option( 'post_settings_disabled', 'lasso_editor' );
95
-		$shortcodify_disabled  = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
96
-		$enable_autosave  = lasso_editor_get_option( 'enable_autosave', 'lasso_editor' );
92
+		$post_new_disabled = lasso_editor_get_option('post_adding_disabled', 'lasso_editor');
93
+		$save_to_post_disabled  = lasso_editor_get_option('post_save_disabled', 'lasso_editor');
94
+		$post_settings_disabled = lasso_editor_get_option('post_settings_disabled', 'lasso_editor');
95
+		$shortcodify_disabled  = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor');
96
+		$enable_autosave = lasso_editor_get_option('enable_autosave', 'lasso_editor');
97 97
 
98
-		$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
99
-		$toolbar_show_color      = lasso_editor_get_option( 'toolbar_show_color', 'lasso_editor' );
100
-		$toolbar_show_alignment  = lasso_editor_get_option( 'toolbar_show_alignment', 'lasso_editor' );
98
+		$toolbar_headings      = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
99
+		$toolbar_show_color      = lasso_editor_get_option('toolbar_show_color', 'lasso_editor');
100
+		$toolbar_show_alignment  = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor');
101 101
 		
102
-		$objectsNoSave  	= lasso_editor_get_option('dont_save', 'lasso_editor');
103
-		$objectsNonEditable  	= lasso_editor_get_option('non_editable', 'lasso_editor');
102
+		$objectsNoSave = lasso_editor_get_option('dont_save', 'lasso_editor');
103
+		$objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor');
104 104
 		$disable_tour = lasso_editor_get_option('disable_tour', 'lasso_editor');
105 105
 
106 106
 ?>
107 107
 		<div class="wrap">
108 108
 
109
-	    	<h2><?php _e( 'Editus Settings', 'lasso' );?></h2>
109
+	    	<h2><?php _e('Editus Settings', 'lasso'); ?></h2>
110 110
 
111 111
 			<form id="lasso-editor-settings-form" class="lasso--form-settings" method="post" enctype="multipart/form-data">
112 112
 
113
-				<?php do_action('lasso_settings_before');?>
113
+				<?php do_action('lasso_settings_before'); ?>
114 114
 
115 115
 				<div class="lasso-editor-settings--option-wrap">
116 116
 					<div class="lasso-editor-settings--option-inner">
117
-						<label><?php _e( 'Article Class', 'lasso' );?></label>
118
-						<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>
119
-						<input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr( $article_object );?>" placeholder=".entry-content">
117
+						<label><?php _e('Article Class', 'lasso'); ?></label>
118
+						<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>
119
+						<input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr($article_object); ?>" placeholder=".entry-content">
120 120
 					</div>
121 121
 				</div>
122 122
 
123 123
 				<div class="lasso-editor-settings--option-wrap">
124 124
 					<div class="lasso-editor-settings--option-inner">
125
-						<label><?php _e( 'Featured Image Class', 'lasso' );?></label>
126
-						<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>
127
-						<input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr( $featImgClass );?>" placeholder=".entry-content">
125
+						<label><?php _e('Featured Image Class', 'lasso'); ?></label>
126
+						<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>
127
+						<input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr($featImgClass); ?>" placeholder=".entry-content">
128 128
 					</div>
129 129
 				</div>
130 130
 
131 131
 				<div class="lasso-editor-settings--option-wrap">
132 132
 					<div class="lasso-editor-settings--option-inner">
133
-						<label><?php _e( 'Article Title Class', 'lasso' );?></label>
134
-						<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>
135
-						<input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr( $titleClass );?>" placeholder=".entry-content">
133
+						<label><?php _e('Article Title Class', 'lasso'); ?></label>
134
+						<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>
135
+						<input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr($titleClass); ?>" placeholder=".entry-content">
136 136
 					</div>
137 137
 				</div>
138 138
 
139 139
 				<!-- Advanced -->
140 140
 				<div class="lasso-editor-settings--option-wrap">
141 141
 					<div class="lasso-editor-settings--option-inner">
142
-						<label><?php _e( 'Ignored Items to Save', 'lasso' );?></label>
143
-						<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>
144
-						<textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNoSave );?></textarea>
142
+						<label><?php _e('Ignored Items to Save', 'lasso'); ?></label>
143
+						<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>
144
+						<textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNoSave); ?></textarea>
145 145
 					</div>
146 146
 				</div>
147 147
 				
148 148
 				<div class="lasso-editor-settings--option-wrap">
149 149
 					<div class="lasso-editor-settings--option-inner">
150
-						<label><?php _e( 'Read Only Items', 'lasso' );?></label>
151
-						<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>
152
-						<textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNonEditable );?></textarea>
150
+						<label><?php _e('Read Only Items', 'lasso'); ?></label>
151
+						<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>
152
+						<textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNonEditable); ?></textarea>
153 153
 					</div>
154 154
 				</div>
155 155
 
156 156
 				<div class="lasso-editor-settings--option-wrap">
157 157
 					<div class="lasso-editor-settings--option-inner">
158
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked( $toolbar_headings, 'on' );?> >
159
-						<label for="lasso_editor[toolbar_headings]"><?php _e( 'Enable H2 and H3 Buttons', 'lasso' );?></label>
160
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set H2 and H3 settings.', 'lasso' );?></span>
158
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked($toolbar_headings, 'on'); ?> >
159
+						<label for="lasso_editor[toolbar_headings]"><?php _e('Enable H2 and H3 Buttons', 'lasso'); ?></label>
160
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set H2 and H3 settings.', 'lasso'); ?></span>
161 161
 
162 162
 					</div>
163 163
 				</div>
164 164
 				
165 165
 				<div class="lasso-editor-settings--option-wrap">
166 166
 					<div class="lasso-editor-settings--option-inner">
167
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked( $toolbar_show_color, 'on' );?> >
168
-						<label for="lasso_editor[toolbar_show_color]"><?php _e( 'Enable Text Color Buttons', 'lasso' );?></label>
169
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set text colors.', 'lasso' );?></span>
167
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked($toolbar_show_color, 'on'); ?> >
168
+						<label for="lasso_editor[toolbar_show_color]"><?php _e('Enable Text Color Buttons', 'lasso'); ?></label>
169
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set text colors.', 'lasso'); ?></span>
170 170
 
171 171
 					</div>
172 172
 				</div>
173 173
 				
174 174
 				<div class="lasso-editor-settings--option-wrap">
175 175
 					<div class="lasso-editor-settings--option-inner">
176
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked( $toolbar_show_alignment, 'on' );?> >
177
-						<label for="lasso_editor[toolbar_show_alignment]"><?php _e( 'Enable Text Align Buttons', 'lasso' );?></label>
178
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set text alignment.', 'lasso' );?></span>
176
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked($toolbar_show_alignment, 'on'); ?> >
177
+						<label for="lasso_editor[toolbar_show_alignment]"><?php _e('Enable Text Align Buttons', 'lasso'); ?></label>
178
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set text alignment.', 'lasso'); ?></span>
179 179
 
180 180
 					</div>
181 181
 				</div>
182 182
 
183 183
 				<div class="lasso-editor-settings--option-wrap">
184 184
 					<div class="lasso-editor-settings--option-inner">
185
-						<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' );?> >
186
-						<label for="lasso_editor[post_save_disabled]"><?php _e( 'Disable Post Saving', 'lasso' );?></label>
187
-						<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>
185
+						<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'); ?> >
186
+						<label for="lasso_editor[post_save_disabled]"><?php _e('Disable Post Saving', 'lasso'); ?></label>
187
+						<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>
188 188
 
189 189
 					</div>
190 190
 				</div>
191 191
 
192 192
 				<div class="lasso-editor-settings--option-wrap">
193 193
 					<div class="lasso-editor-settings--option-inner">
194
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked( $post_settings_disabled, 'on' );?> >
195
-						<label for="lasso_editor[post_settings_disabled]"> <?php _e( 'Disable Post Settings', 'lasso' );?></label>
196
-						<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>
194
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked($post_settings_disabled, 'on'); ?> >
195
+						<label for="lasso_editor[post_settings_disabled]"> <?php _e('Disable Post Settings', 'lasso'); ?></label>
196
+						<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>
197 197
 					</div>
198 198
 				</div>
199 199
 
200 200
 				<div class="lasso-editor-settings--option-wrap">
201 201
 					<div class="lasso-editor-settings--option-inner">
202
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked( $post_new_disabled, 'on' );?> >
203
-						<label for="lasso_editor[post_adding_disabled]"><?php _e( 'Disable Post Adding', 'lasso' );?></label>
204
-						<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>
202
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked($post_new_disabled, 'on'); ?> >
203
+						<label for="lasso_editor[post_adding_disabled]"><?php _e('Disable Post Adding', 'lasso'); ?></label>
204
+						<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>
205 205
 					</div>
206 206
 				</div>
207 207
 
208 208
 				<div class="lasso-editor-settings--option-wrap">
209 209
 					<div class="lasso-editor-settings--option-inner">
210
-						<input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked( $shortcodify_disabled, 'on' );?> >
211
-						<label for="lasso_editor[shortcodify_disabled]"><?php _e( 'Disable Aesop Component Conversion', 'lasso' );?></label>
212
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso' );?></span>
210
+						<input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked($shortcodify_disabled, 'on'); ?> >
211
+						<label for="lasso_editor[shortcodify_disabled]"><?php _e('Disable Aesop Component Conversion', 'lasso'); ?></label>
212
+						<span class="lasso--setting-description"><?php _e('Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso'); ?></span>
213 213
 					</div>
214 214
 				</div>
215 215
 				
216 216
 				<div class="lasso-editor-settings--option-wrap last">
217 217
 					<div class="lasso-editor-settings--option-inner">
218
-						<input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked( $enable_autosave, 'on' );?> >
219
-						<label for="lasso_editor[enable_autosave]"><?php _e( 'Enable Auto Save', 'lasso' );?></label>
220
-						<span class="lasso--setting-description"><?php _e( 'Check this box to enable auto save.', 'lasso' );?></span>
218
+						<input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked($enable_autosave, 'on'); ?> >
219
+						<label for="lasso_editor[enable_autosave]"><?php _e('Enable Auto Save', 'lasso'); ?></label>
220
+						<span class="lasso--setting-description"><?php _e('Check this box to enable auto save.', 'lasso'); ?></span>
221 221
 					</div>
222 222
 				</div>
223 223
 				
224 224
 				<div class="lasso-editor-settings--option-wrap">
225 225
 					<div class="lasso-editor-settings--option-inner">
226
-						<input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked( $disable_tour, 'on' );?> >
227
-						<label for="lasso_editor[disable_tour]"> <?php _e( 'Do Not Show Tour Dialog', 'lasso' );?></label>
228
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable the tour dialog box for all users.', 'lasso' );?></span>
226
+						<input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked($disable_tour, 'on'); ?> >
227
+						<label for="lasso_editor[disable_tour]"> <?php _e('Do Not Show Tour Dialog', 'lasso'); ?></label>
228
+						<span class="lasso--setting-description"><?php _e('Check this box to disable the tour dialog box for all users.', 'lasso'); ?></span>
229 229
 					</div>
230 230
 				</div>
231 231
 
232
-				<?php do_action('lasso_settings_after');?>
232
+				<?php do_action('lasso_settings_after'); ?>
233 233
 
234 234
 				<div class="lasso-editor-settings--submit">
235 235
 				    <input type="hidden" name="action" value="lasso-editor-settings" />
236
-				    <input type="submit" class="button-primary" value="<?php esc_attr_e( 'Save Settings', 'lasso' );?>" />
237
-					<?php wp_nonce_field( 'nonce', 'lasso_editor_settings' ); ?>
236
+				    <input type="submit" class="button-primary" value="<?php esc_attr_e('Save Settings', 'lasso'); ?>" />
237
+					<?php wp_nonce_field('nonce', 'lasso_editor_settings'); ?>
238 238
 				</div>
239 239
 			</form>
240 240
 
Please login to merge, or discard this patch.