Completed
Push — master ( 99c38a...8d9355 )
by
unknown
01:40
created
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
 					$(document).ready(function(){
@@ -56,19 +56,19 @@  discard block
 block discarded – undo
56 56
 				</script>
57 57
 				<div class="lasso--modal__inner">
58 58
 
59
-					<?php echo self::tour_slides();?>
59
+					<?php echo self::tour_slides(); ?>
60 60
 
61 61
 					<div class="lasso--postsettings__footer">
62 62
 
63 63
 						<div class="lasso--postsettings__option">
64 64
 							<label for="hide_tour" class="checkbox-control checkbox">
65
-					        	<input type="checkbox" id="hide_tour" name="hide_tour" <?php checked( $tour_hidden, 1 ); ?>>
65
+					        	<input type="checkbox" id="hide_tour" name="hide_tour" <?php checked($tour_hidden, 1); ?>>
66 66
 					        	<span class="control-indicator"></span>
67
-								<?php _e('Don\'t show this again','lasso');?>
67
+								<?php _e('Don\'t show this again', 'lasso'); ?>
68 68
 					        </label>
69 69
 						</div>
70 70
 
71
-						<input id ="editus_tour_submit" type="submit" value="<?php _e( 'Okay, got it!', 'lasso' );?>" data-nonce="<?php echo $nonce;?>" >
71
+						<input id ="editus_tour_submit" type="submit" value="<?php _e('Okay, got it!', 'lasso'); ?>" data-nonce="<?php echo $nonce; ?>" >
72 72
 					</div>
73 73
 
74 74
 				</div>
@@ -92,20 +92,20 @@  discard block
 block discarded – undo
92 92
 			<?php
93 93
 
94 94
 			$out = '<ul><li>';
95
-			$out .= sprintf( '<img src="%s">', LASSO_URL.'/public/assets/img/s-1.jpg' );
96
-			$out .= '<p>'.__('Access posts by clicking the list icon. Create a new post by clicking the new post icon.','lasso').'</p>';
95
+			$out .= sprintf('<img src="%s">', LASSO_URL.'/public/assets/img/s-1.jpg');
96
+			$out .= '<p>'.__('Access posts by clicking the list icon. Create a new post by clicking the new post icon.', 'lasso').'</p>';
97 97
 			$out .= '</li><li>';
98
-			$out .= sprintf( '<img src="%s">', LASSO_URL.'/public/assets/img/s-2.jpg' );
99
-			$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>';
98
+			$out .= sprintf('<img src="%s">', LASSO_URL.'/public/assets/img/s-2.jpg');
99
+			$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>';
100 100
 			$out .= '</li><li>';
101
-			$out .= sprintf( '<img src="%s">', LASSO_URL.'/public/assets/img/s-3.jpg' );
102
-			$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>';
101
+			$out .= sprintf('<img src="%s">', LASSO_URL.'/public/assets/img/s-3.jpg');
102
+			$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>';
103 103
 			$out .= '</li><li>';
104
-			$out .= sprintf( '<img src="%s">', LASSO_URL.'/public/assets/img/s-4.jpg' );
105
-			$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>';
104
+			$out .= sprintf('<img src="%s">', LASSO_URL.'/public/assets/img/s-4.jpg');
105
+			$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>';
106 106
 			$out .= '</li></ul>';
107 107
 
108
-			echo apply_filters( 'lasso_tour_slides', $out );
108
+			echo apply_filters('lasso_tour_slides', $out);
109 109
 
110 110
 		?></div><?php
111 111
 
Please login to merge, or discard this patch.
public/includes/underscore-templates.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@  discard block
 block discarded – undo
11 11
 		
12 12
 		// only run on posts and pages if user is logged in
13 13
 		if ( is_user_logged_in() && lasso_user_can('edit_posts') ) { 
14
-		    if ( !class_exists( 'WP_REST_Controller' ) ) {
15
-			    // using rest api v1 
14
+			if ( !class_exists( 'WP_REST_Controller' ) ) {
15
+				// using rest api v1 
16 16
 				?>
17 17
 				<script type="text/html" id="lasso-tmpl--post">
18 18
 					<li>
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 			<?php
32 32
 			} else {
33 33
 				// using rest api v2 
34
-		    ?>
34
+			?>
35 35
 				<script type="text/html" id="lasso-tmpl--post">
36 36
 					<li>
37 37
 						<a href="<%= post.link %>" class="lasso--post-list__item <?php echo $can_delete_class;?> <%= post.status %>" data-postid="<%= post.id %>" >
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 					</li>
48 48
 				</script>
49 49
 		<?php 
50
-		    }
50
+			}
51 51
 		}
52 52
 
53 53
 	}
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,28 +1,28 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if ( !function_exists( 'lasso_backbone_templates' ) ):
3
+if (!function_exists('lasso_backbone_templates')):
4 4
 
5 5
 	add_action('wp_footer', 'lasso_backbone_templates');
6
-	function lasso_backbone_templates(){
6
+	function lasso_backbone_templates() {
7 7
 
8 8
 		$can_delete = lasso_user_can('delete_posts');
9 9
 		$can_delete_class = $can_delete ? false : 'no-delete';
10 10
 
11 11
 		
12 12
 		// only run on posts and pages if user is logged in
13
-		if ( is_user_logged_in() && lasso_user_can('edit_posts') ) { 
14
-		    if ( !class_exists( 'WP_REST_Controller' ) ) {
13
+		if (is_user_logged_in() && lasso_user_can('edit_posts')) { 
14
+		    if (!class_exists('WP_REST_Controller')) {
15 15
 			    // using rest api v1 
16 16
 				?>
17 17
 				<script type="text/html" id="lasso-tmpl--post">
18 18
 					<li>
19
-						<a href="<%= post.link %>" class="lasso--post-list__item <?php echo $can_delete_class;?> <%= post.status %>" data-postid="<%= post.ID %>" >
19
+						<a href="<%= post.link %>" class="lasso--post-list__item <?php echo $can_delete_class; ?> <%= post.status %>" data-postid="<%= post.ID %>" >
20 20
 							<%= post.title %>
21 21
 
22 22
 							<div class="lasso--post-list__controls">
23
-								<span title="<?php echo esc_attr_e('Edit Post','lasso');?>" id="lasso--post__edit"></span>
24
-								<?php if( $can_delete ): ?>
25
-								<span title="<?php echo esc_attr_e('Delete Post','lasso');?>" id="lasso--post__delete"></span>
23
+								<span title="<?php echo esc_attr_e('Edit Post', 'lasso'); ?>" id="lasso--post__edit"></span>
24
+								<?php if ($can_delete): ?>
25
+								<span title="<?php echo esc_attr_e('Delete Post', 'lasso'); ?>" id="lasso--post__delete"></span>
26 26
 								<?php endif; ?>
27 27
 							</div>
28 28
 						</a>
@@ -34,13 +34,13 @@  discard block
 block discarded – undo
34 34
 		    ?>
35 35
 				<script type="text/html" id="lasso-tmpl--post">
36 36
 					<li>
37
-						<a href="<%= post.link %>" class="lasso--post-list__item <?php echo $can_delete_class;?> <%= post.status %>" data-postid="<%= post.id %>" >
37
+						<a href="<%= post.link %>" class="lasso--post-list__item <?php echo $can_delete_class; ?> <%= post.status %>" data-postid="<%= post.id %>" >
38 38
 							<%= post.title.rendered %>
39 39
 
40 40
 							<div class="lasso--post-list__controls">
41
-								<span title="<?php echo esc_attr_e('Edit Post','lasso');?>" id="lasso--post__edit"></span>
42
-								<?php if( $can_delete ): ?>
43
-								<span title="<?php echo esc_attr_e('Delete Post','lasso');?>" id="lasso--post__delete"></span>
41
+								<span title="<?php echo esc_attr_e('Edit Post', 'lasso'); ?>" id="lasso--post__edit"></span>
42
+								<?php if ($can_delete): ?>
43
+								<span title="<?php echo esc_attr_e('Delete Post', 'lasso'); ?>" id="lasso--post__delete"></span>
44 44
 								<?php endif; ?>
45 45
 							</div>
46 46
 						</a>
Please login to merge, or discard this patch.
includes/process/save.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -163,6 +163,9 @@
 block discarded – undo
163 163
 		return $content;
164 164
 	}
165 165
 	
166
+	/**
167
+	 * @param string $content
168
+	 */
166 169
 	protected function remove_comments($content) {
167 170
 		return preg_replace('/<!--(.*)-->/Uis', '', $content);
168 171
 	}
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@
 block discarded – undo
146 146
 	 */
147 147
 	protected function replace_rendered_shortcodes( $content ) {
148 148
 		//debug line
149
-        //file_put_contents(WP_PLUGIN_DIR."/file1.txt", $content);
149
+		//file_put_contents(WP_PLUGIN_DIR."/file1.txt", $content);
150 150
 		
151 151
 
152 152
 		if ( false === strpos( $content, '--EDITUS_OTHER_SHORTCODE_START|' ) ) {
Please login to merge, or discard this patch.
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -19,27 +19,27 @@  discard block
 block discarded – undo
19 19
 	 *
20 20
 	 * @return bool Always returns true.
21 21
 	 */
22
-	public function content( $data ) {
22
+	public function content($data) {
23 23
 
24 24
 		$save_to_post_disabled = $this->save_to_post_disables();
25 25
 
26
-		$postid = (int) $data[ 'post_id' ];
27
-		$content = $this->replace_rendered_shortcodes( $data[ 'content' ] );
28
-		$content = $this->remove_comments( $content );
26
+		$postid = (int) $data['post_id'];
27
+		$content = $this->replace_rendered_shortcodes($data['content']);
28
+		$content = $this->remove_comments($content);
29 29
 
30
-		if ( 'off' == $save_to_post_disabled || empty( $save_to_post_disabled ) ) {
30
+		if ('off' == $save_to_post_disabled || empty($save_to_post_disabled)) {
31 31
 
32 32
 			$args = array(
33 33
 				'ID'           => (int) $postid,
34 34
 				'post_content' => $content
35 35
 			);
36 36
 
37
-			wp_update_post( apply_filters( 'lasso_object_save_args', $args ) );
37
+			wp_update_post(apply_filters('lasso_object_save_args', $args));
38 38
 
39 39
 		}
40 40
 
41 41
 		// run save action
42
-		do_action( 'lasso_post_saved', $postid, $content, get_current_user_ID() );
42
+		do_action('lasso_post_saved', $postid, $content, get_current_user_ID());
43 43
 
44 44
 		return true;
45 45
 
@@ -54,25 +54,25 @@  discard block
 block discarded – undo
54 54
 	 *
55 55
 	 * @return bool Always returns true.
56 56
 	 */
57
-	public function publish_content( $data ) {
57
+	public function publish_content($data) {
58 58
 		$save_to_post_disabled = $this->save_to_post_disables();
59 59
 
60
-		$postid = (int) $data[ 'post_id' ];
61
-		$content = $this->replace_rendered_shortcodes( $data[ 'content' ] );
62
-		$content = $this->remove_comments( $content );
60
+		$postid = (int) $data['post_id'];
61
+		$content = $this->replace_rendered_shortcodes($data['content']);
62
+		$content = $this->remove_comments($content);
63 63
 
64
-		if ( 'off' == $save_to_post_disabled || empty( $save_to_post_disabled ) ) {
64
+		if ('off' == $save_to_post_disabled || empty($save_to_post_disabled)) {
65 65
 
66
-			$args = array (
66
+			$args = array(
67 67
 				'ID'           	=> $postid,
68 68
 				'post_content' 	=> $content,
69 69
 				'post_status' 	=> 'publish'
70 70
 			);
71
-			wp_update_post( apply_filters( 'lasso_object_publish_args', $args ) );
71
+			wp_update_post(apply_filters('lasso_object_publish_args', $args));
72 72
 
73 73
 		}
74 74
 
75
-		do_action( 'lasso_post_published', $postid, $content, get_current_user_ID() );
75
+		do_action('lasso_post_published', $postid, $content, get_current_user_ID());
76 76
 
77 77
 		return true;
78 78
 
@@ -85,13 +85,13 @@  discard block
 block discarded – undo
85 85
 	 *
86 86
 	 * @return array Array of keys to pull from $_POST per action and their sanitization callback
87 87
 	 */
88
-	public static function params(){
89
-		$params[ 'process_save_content' ] = array(
88
+	public static function params() {
89
+		$params['process_save_content'] = array(
90 90
 			'post_id' => 'absint',
91 91
 			'content' => 'wp_kses_post'
92 92
 		);
93 93
 
94
-		$params[ 'process_save_publish_content' ] = array(
94
+		$params['process_save_publish_content'] = array(
95 95
 			'post_id' => 'absint',
96 96
 			'content' => 'wp_kses_post'
97 97
 		);
@@ -107,11 +107,11 @@  discard block
 block discarded – undo
107 107
 	 * @return array Array of additional functions to use to authorize action.
108 108
 	 */
109 109
 	public static function auth_callbacks() {
110
-		$params[ 'process_save_content' ] = array(
110
+		$params['process_save_content'] = array(
111 111
 			'lasso_user_can'
112 112
 		);
113 113
 
114
-		$params[ 'process_save_publish_content' ] = array();
114
+		$params['process_save_publish_content'] = array();
115 115
 
116 116
 		return $params;
117 117
 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 	 * @return bool
128 128
 	 */
129 129
 	protected function save_to_post_disables() {
130
-		$save_to_post_disabled = lasso_editor_get_option( 'post_save_disabled', 'lasso_editor' );
130
+		$save_to_post_disabled = lasso_editor_get_option('post_save_disabled', 'lasso_editor');
131 131
 
132 132
 		return $save_to_post_disabled;
133 133
 
@@ -144,15 +144,15 @@  discard block
 block discarded – undo
144 144
 	 *
145 145
 	 * @return string
146 146
 	 */
147
-	protected function replace_rendered_shortcodes( $content ) {
147
+	protected function replace_rendered_shortcodes($content) {
148 148
 		//debug line
149 149
         //file_put_contents(WP_PLUGIN_DIR."/file1.txt", $content);
150 150
 		
151 151
 
152
-		if ( false === strpos( $content, '--EDITUS_OTHER_SHORTCODE_START|' ) ) {
152
+		if (false === strpos($content, '--EDITUS_OTHER_SHORTCODE_START|')) {
153 153
 			return $content;
154 154
 		}
155
-		$content = htmlspecialchars_decode ($content);
155
+		$content = htmlspecialchars_decode($content);
156 156
 
157 157
 		$content = preg_replace(
158 158
 			'/<!--EDITUS_OTHER_SHORTCODE_START\|\[(.*?)\]-->(.*?)<!--EDITUS_OTHER_SHORTCODE_END-->/s',
Please login to merge, or discard this patch.
public/includes/helpers.php 4 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 		'public' => true,
244 244
 	), 'objects' );
245 245
 	$post_types = array_combine( array_keys( $post_types ), wp_list_pluck( $post_types, 'label' ) );
246
-    unset( $post_types[ 'attachment' ] );
246
+	unset( $post_types[ 'attachment' ] );
247 247
 
248 248
 	/**
249 249
 	 * Set which post types are allowed
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
 	$post_types = get_post_types( array(
271 271
 		'public' => true,
272 272
 	), 'names' );
273
-    unset( $post_types[ 'attachment' ] );
273
+	unset( $post_types[ 'attachment' ] );
274 274
 
275 275
 	/**
276 276
 	 * Set which post types are allowed
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
  */
383 383
 if ( !function_exists( 'lasso_user_can' ) ):
384 384
 	function lasso_user_can( $action = '', $postid = 0 ) {
385
-        $result = false;
385
+		$result = false;
386 386
 		if ( empty( $action ) )
387 387
 			$action = 'edit_posts';
388 388
 
@@ -397,17 +397,17 @@  discard block
 block discarded – undo
397 397
 				$allowed_post_types = array_diff($allowed_post_types,array('page'));
398 398
 			}
399 399
 			
400
-            if (!empty($allowed_post_types) && !empty($postid)) {
400
+			if (!empty($allowed_post_types) && !empty($postid)) {
401 401
 				$type = get_post_type( $postid );
402
-                $allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
402
+				$allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
403 403
 				
404
-                if ( in_array( $type, $allowed_post_types ) ) {
404
+				if ( in_array( $type, $allowed_post_types ) ) {
405 405
 				   $result =  true;
406
-			    }
407
-            } else {
408
-                //we are not checking against a post, return true
406
+				}
407
+			} else {
408
+				//we are not checking against a post, return true
409 409
 				$result =  true;
410
-        	}
410
+			}
411 411
 		} else {
412 412
 			$result = false;
413 413
 		}
Please login to merge, or discard this patch.
Braces   +27 added lines, -19 removed lines patch added patch discarded remove patch
@@ -15,8 +15,9 @@  discard block
 block discarded – undo
15 15
 if( !function_exists('lasso_editor_get_option')):
16 16
 	function lasso_editor_get_option( $option, $section, $default = '' ) {
17 17
 
18
-		if ( empty( $option ) )
19
-			return;
18
+		if ( empty( $option ) ) {
19
+					return;
20
+		}
20 21
 
21 22
 		if ( function_exists( 'is_multisite' ) && is_multisite() ) {
22 23
 
@@ -44,11 +45,12 @@  discard block
 block discarded – undo
44 45
 
45 46
 	$q = new wp_query( array( 'post_type' => 'ai_galleries', 'post_status' => 'publish' ) );
46 47
 
47
-	if ( $q->have_posts() )
48
-		return true;
49
-	else
50
-		return false;
51
-}
48
+	if ( $q->have_posts() ) {
49
+			return true;
50
+	} else {
51
+			return false;
52
+	}
53
+	}
52 54
 
53 55
 /**
54 56
  * Return a CSS class of an automatically supported theme
@@ -194,13 +196,15 @@  discard block
 block discarded – undo
194 196
 */
195 197
 function lasso_get_post_objects( $postid = '', $taxonomy = 'category') {
196 198
 
197
-	if ( empty( $postid ) )
198
-		$postid = get_the_ID();
199
+	if ( empty( $postid ) ) {
200
+			$postid = get_the_ID();
201
+	}
199 202
 
200 203
 	$objects = 'category' == $taxonomy ? get_the_category( $postid ) : get_the_tags( $postid );
201 204
 
202
-	if ( empty( $objects) )
203
-		return;
205
+	if ( empty( $objects) ) {
206
+			return;
207
+	}
204 208
 
205 209
 	$out = '';
206 210
 	foreach( $objects as $object ) {
@@ -222,8 +226,9 @@  discard block
 block discarded – undo
222 226
 
223 227
 	$objects = 'category' == $taxonomy ? get_categories(array('hide_empty' => 0)) : get_tags(array('hide_empty' => 0));
224 228
 
225
-	if ( empty( $objects) )
226
-		return;
229
+	if ( empty( $objects) ) {
230
+			return;
231
+	}
227 232
 
228 233
 	$out = "";
229 234
 	foreach( $objects as $object ) {
@@ -345,8 +350,9 @@  discard block
 block discarded – undo
345 350
 */
346 351
 function lasso_clean_string( $string = '' ) {
347 352
 
348
-	if ( empty( $string ) )
349
-		return;
353
+	if ( empty( $string ) ) {
354
+			return;
355
+	}
350 356
 
351 357
 	return sanitize_text_field( strtolower( preg_replace('/[\s_]/', '-', $string ) ) );
352 358
 }
@@ -385,11 +391,13 @@  discard block
 block discarded – undo
385 391
 if ( !function_exists( 'lasso_user_can' ) ):
386 392
 	function lasso_user_can( $action = '', $postid = 0 ) {
387 393
         $result = false;
388
-		if ( empty( $action ) )
389
-			$action = 'edit_posts';
394
+		if ( empty( $action ) ) {
395
+					$action = 'edit_posts';
396
+		}
390 397
 
391
-		if ( empty( $postid ) && $action != 'edit_posts' && $action != 'publish_posts' && $action != 'delete_posts')
392
-			$postid = get_the_ID();
398
+		if ( empty( $postid ) && $action != 'edit_posts' && $action != 'publish_posts' && $action != 'delete_posts') {
399
+					$postid = get_the_ID();
400
+		}
393 401
 
394 402
 		if ( is_user_logged_in() && current_user_can( $action, $postid ) ) {
395 403
 			// check against post types:
Please login to merge, or discard this patch.
Doc Comments   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,6 +13,10 @@  discard block
 block discarded – undo
13 13
  * @since 1.0
14 14
  */
15 15
 if( !function_exists('lasso_editor_get_option')):
16
+
17
+	/**
18
+	 * @param string $section
19
+	 */
16 20
 	function lasso_editor_get_option( $option, $section, $default = '' ) {
17 21
 
18 22
 		if ( empty( $option ) )
@@ -216,7 +220,7 @@  discard block
 block discarded – undo
216 220
  *	Return an array of categories for autocomplete
217 221
  *
218 222
  *	@since 0.9.3
219
- *	@return array all categoiries
223
+ *	@return null|string all categoiries
220 224
 */
221 225
 function lasso_get_objects( $taxonomy = 'category' ) {
222 226
 
@@ -309,7 +313,7 @@  discard block
 block discarded – undo
309 313
 *	Used internally as a callback to build a tab or content area for modal addons
310 314
 *
311 315
 *	@param $tab object
312
-*	@param $type string tab or content
316
+*	@param string $type string tab or content
313 317
 *	@uses lasso_modal_addons()
314 318
 *	@since 0.9.4
315 319
 */
Please login to merge, or discard this patch.
Spacing   +84 added lines, -84 removed lines patch added patch discarded remove patch
@@ -12,24 +12,24 @@  discard block
 block discarded – undo
12 12
  * @return the option value
13 13
  * @since 1.0
14 14
  */
15
-if( !function_exists('lasso_editor_get_option')):
16
-	function lasso_editor_get_option( $option, $section, $default = '' ) {
15
+if (!function_exists('lasso_editor_get_option')):
16
+	function lasso_editor_get_option($option, $section, $default = '') {
17 17
 
18
-		if ( empty( $option ) )
18
+		if (empty($option))
19 19
 			return;
20 20
 
21
-		if ( function_exists( 'is_multisite' ) && is_multisite() ) {
21
+		if (function_exists('is_multisite') && is_multisite()) {
22 22
 
23
-			$options = get_site_option( $section );
23
+			$options = get_site_option($section);
24 24
 
25 25
 		} else {
26 26
 
27
-			$options = get_option( $section );
27
+			$options = get_option($section);
28 28
 		}
29 29
 		
30
-		$options = apply_filters( 'editus_filter_options', $options );
30
+		$options = apply_filters('editus_filter_options', $options);
31 31
 
32
-		if ( isset( $options[$option] ) ) {
32
+		if (isset($options[$option])) {
33 33
 			return $options[$option];
34 34
 		}
35 35
 
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
  */
45 45
 function lasso_editor_galleries_exist() {
46 46
 
47
-	$q = new wp_query( array( 'post_type' => 'ai_galleries', 'post_status' => 'publish' ) );
47
+	$q = new wp_query(array('post_type' => 'ai_galleries', 'post_status' => 'publish'));
48 48
 
49
-	if ( $q->have_posts() )
49
+	if ($q->have_posts())
50 50
 		return true;
51 51
 	else
52 52
 		return false;
@@ -61,9 +61,9 @@  discard block
 block discarded – undo
61 61
 function lasso_get_supported_theme_class() {
62 62
 
63 63
 	$name  	= wp_get_theme()->get('Name');
64
-	$slug  	= lasso_clean_string( $name );
64
+	$slug  	= lasso_clean_string($name);
65 65
 
66
-	switch ( $slug ) {
66
+	switch ($slug) {
67 67
 		case 'aesop-story-theme': // aesop
68 68
 			$out = '.aesop-entry-content';
69 69
 			break;
@@ -112,16 +112,16 @@  discard block
 block discarded – undo
112 112
 
113 113
 	}
114 114
 
115
-	return apply_filters('lasso_content_class', !empty( $out ) ? $out : false);
115
+	return apply_filters('lasso_content_class', !empty($out) ? $out : false);
116 116
 	//return !empty( $out ) ? $out : false;
117 117
 }
118 118
 
119 119
 function lasso_get_supported_theme_title_class() {
120 120
 
121 121
 	$name  	= wp_get_theme()->get('Name');
122
-	$slug  	= lasso_clean_string( $name );
122
+	$slug  	= lasso_clean_string($name);
123 123
 
124
-	switch ( $slug ) {
124
+	switch ($slug) {
125 125
 
126 126
 		case 'aesop-story-theme': // aesop
127 127
 			$out = '.aesop-entry-title';
@@ -149,16 +149,16 @@  discard block
 block discarded – undo
149 149
 			break;
150 150
 	}
151 151
 
152
-	return apply_filters('lasso_title_class', !empty( $out ) ? $out : false);
152
+	return apply_filters('lasso_title_class', !empty($out) ? $out : false);
153 153
 }
154 154
 
155 155
 //since 0.9.9.6
156 156
 function lasso_get_supported_theme_featured_image_class() {
157 157
 
158 158
 	$name  	= wp_get_theme()->get('Name');
159
-	$slug  	= lasso_clean_string( $name );
159
+	$slug  	= lasso_clean_string($name);
160 160
 
161
-	return apply_filters('lasso_featured_image_class', !empty( $out ) ? $out : false);
161
+	return apply_filters('lasso_featured_image_class', !empty($out) ? $out : false);
162 162
 }
163 163
 
164 164
 
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 *	@since 0.8.7
170 170
 *	@return string of comma separated classes
171 171
 */
172
-function lasso_supported_no_save(){
172
+function lasso_supported_no_save() {
173 173
 
174 174
 	return apply_filters('lasso_dont_save', '.lasso--ignore,.sharedaddy,.us_wrapper,.meta,.edit-link,.ssba,.addtoany_share_save_container,.mashsb-container,.heateor_sss_sharing_container,.nc_socialPanel,.jp-relatedposts,.fb-comments,.adsbygoogle,.swp_social_panel');
175 175
 }
@@ -183,8 +183,8 @@  discard block
 block discarded – undo
183 183
  *
184 184
  * @return array|mixed|object|string|void
185 185
  */
186
-function lasso_sanitize_data( $data ) {
187
-	return \lasso\sanatize::do_sanitize( $data );
186
+function lasso_sanitize_data($data) {
187
+	return \lasso\sanatize::do_sanitize($data);
188 188
 
189 189
 }
190 190
 
@@ -194,18 +194,18 @@  discard block
 block discarded – undo
194 194
  *	@since 0.9.3
195 195
  *	@return string of comma delimited category slugs
196 196
 */
197
-function lasso_get_post_objects( $postid = '', $taxonomy = 'category') {
197
+function lasso_get_post_objects($postid = '', $taxonomy = 'category') {
198 198
 
199
-	if ( empty( $postid ) )
199
+	if (empty($postid))
200 200
 		$postid = get_the_ID();
201 201
 
202
-	$objects = 'category' == $taxonomy ? get_the_category( $postid ) : get_the_tags( $postid );
202
+	$objects = 'category' == $taxonomy ? get_the_category($postid) : get_the_tags($postid);
203 203
 
204
-	if ( empty( $objects) )
204
+	if (empty($objects))
205 205
 		return;
206 206
 
207 207
 	$out = '';
208
-	foreach( $objects as $object ) {
208
+	foreach ($objects as $object) {
209 209
 		//$out .= $object->slug.', ';
210 210
 		$out .= $object->name.',';
211 211
 	}
@@ -220,15 +220,15 @@  discard block
 block discarded – undo
220 220
  *	@since 0.9.3
221 221
  *	@return array all categoiries
222 222
 */
223
-function lasso_get_objects( $taxonomy = 'category' ) {
223
+function lasso_get_objects($taxonomy = 'category') {
224 224
 
225 225
 	$objects = 'category' == $taxonomy ? get_categories(array('hide_empty' => 0)) : get_tags(array('hide_empty' => 0));
226 226
 
227
-	if ( empty( $objects) )
227
+	if (empty($objects))
228 228
 		return;
229 229
 
230 230
 	$out = "";
231
-	foreach( $objects as $object ) {
231
+	foreach ($objects as $object) {
232 232
 		$out .= $object->name.',';
233 233
 	}
234 234
 
@@ -243,11 +243,11 @@  discard block
 block discarded – undo
243 243
  * @since 0.9.4
244 244
  */
245 245
 function lasso_post_types_names() {
246
-	$post_types = get_post_types( array(
246
+	$post_types = get_post_types(array(
247 247
 		'public' => true,
248
-	), 'objects' );
249
-	$post_types = array_combine( array_keys( $post_types ), wp_list_pluck( $post_types, 'label' ) );
250
-    unset( $post_types[ 'attachment' ] );
248
+	), 'objects');
249
+	$post_types = array_combine(array_keys($post_types), wp_list_pluck($post_types, 'label'));
250
+    unset($post_types['attachment']);
251 251
 
252 252
 	/**
253 253
 	 * Set which post types are allowed
@@ -256,14 +256,14 @@  discard block
 block discarded – undo
256 256
 	 *
257 257
 	 * @param array $allowed_post_types Array of names (not labels) of allowed post types. Must be registered.
258 258
 	 */
259
-	$allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor', array( 'post', 'page') );
260
-	$allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
259
+	$allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', array('post', 'page'));
260
+	$allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
261 261
 	if (!current_user_can('edit_pages')) {
262
-		$allowed_post_types = array_diff($allowed_post_types,array('page'));
262
+		$allowed_post_types = array_diff($allowed_post_types, array('page'));
263 263
 	}
264
-	foreach( $post_types as $name => $label ) {
265
-		if ( ! in_array( $name, $allowed_post_types ) ) {
266
-			unset( $post_types[ $name ] );
264
+	foreach ($post_types as $name => $label) {
265
+		if (!in_array($name, $allowed_post_types)) {
266
+			unset($post_types[$name]);
267 267
 		}
268 268
 	}
269 269
 	return $post_types;
@@ -271,10 +271,10 @@  discard block
 block discarded – undo
271 271
 
272 272
 
273 273
 function lasso_post_types() {
274
-	$post_types = get_post_types( array(
274
+	$post_types = get_post_types(array(
275 275
 		'public' => true,
276
-	), 'names' );
277
-    unset( $post_types[ 'attachment' ] );
276
+	), 'names');
277
+    unset($post_types['attachment']);
278 278
 
279 279
 	/**
280 280
 	 * Set which post types are allowed
@@ -283,11 +283,11 @@  discard block
 block discarded – undo
283 283
 	 *
284 284
 	 * @param array $allowed_post_types Array of names (not labels) of allowed post types. Must be registered.
285 285
 	 */
286
-	$allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor', array( 'post') );
287
-	$allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
288
-	foreach( $post_types as $name => $label ) {
289
-		if ( ! in_array( $name, $allowed_post_types ) ) {
290
-			unset( $post_types[ $name ] );
286
+	$allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', array('post'));
287
+	$allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
288
+	foreach ($post_types as $name => $label) {
289
+		if (!in_array($name, $allowed_post_types)) {
290
+			unset($post_types[$name]);
291 291
 		}
292 292
 	}
293 293
 	return $post_types;
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 	global $wp_post_types;
298 298
 	$post_types = lasso_post_types();
299 299
 	$rest_base = array();
300
-	foreach ( $post_types as $post_type) {
300
+	foreach ($post_types as $post_type) {
301 301
 		$rest_base[$post_type] = $wp_post_types[$post_type]->rest_base;
302 302
 	}
303 303
     
@@ -315,22 +315,22 @@  discard block
 block discarded – undo
315 315
 *	@uses lasso_modal_addons()
316 316
 *	@since 0.9.4
317 317
 */
318
-function lasso_modal_addons_content( $tab = '', $type ){
318
+function lasso_modal_addons_content($tab = '', $type) {
319 319
 
320
-	$name = lasso_clean_string( $tab['name'] );
320
+	$name = lasso_clean_string($tab['name']);
321 321
 
322
-	if ( 'tab' == $type ) {
322
+	if ('tab' == $type) {
323 323
 
324
-		$out = sprintf( '<li data-addon-name="%s">%s</li>', $name, $tab['name'] );
324
+		$out = sprintf('<li data-addon-name="%s">%s</li>', $name, $tab['name']);
325 325
 
326
-	} else if ( 'content' == $type ){
326
+	} else if ('content' == $type) {
327 327
 
328
-		$content = isset( $tab['content'] ) && is_callable( $tab['content'] ) ? call_user_func( $tab['content'] ) : false;
329
-		$options = isset( $tab['options'] ) && is_callable( $tab['options'] ) ? call_user_func( $tab['options'] ) : false;
328
+		$content = isset($tab['content']) && is_callable($tab['content']) ? call_user_func($tab['content']) : false;
329
+		$options = isset($tab['options']) && is_callable($tab['options']) ? call_user_func($tab['options']) : false;
330 330
 
331
-		$out = sprintf( '<div class="lasso--modal__content not-visible" data-addon-content="%s">
331
+		$out = sprintf('<div class="lasso--modal__content not-visible" data-addon-content="%s">
332 332
 			%s%s
333
-			</div>', $name, $content, lasso_option_form( $name, $options ) );
333
+			</div>', $name, $content, lasso_option_form($name, $options));
334 334
 
335 335
 	}
336 336
 
@@ -345,12 +345,12 @@  discard block
 block discarded – undo
345 345
 *
346 346
 * @return void|string
347 347
 */
348
-function lasso_clean_string( $string = '' ) {
348
+function lasso_clean_string($string = '') {
349 349
 
350
-	if ( empty( $string ) )
350
+	if (empty($string))
351 351
 		return;
352 352
 
353
-	return sanitize_text_field( strtolower( preg_replace('/[\s_]/', '-', $string ) ) );
353
+	return sanitize_text_field(strtolower(preg_replace('/[\s_]/', '-', $string)));
354 354
 }
355 355
 
356 356
 /**
@@ -363,13 +363,13 @@  discard block
 block discarded – undo
363 363
  *
364 364
  * @return void|string
365 365
  */
366
-function lasso_unclean_string( $string = '' ) {
366
+function lasso_unclean_string($string = '') {
367 367
 
368
-	if ( empty( $string ) ) {
368
+	if (empty($string)) {
369 369
 		return;
370 370
 	}
371 371
 
372
-	return sanitize_text_field( strtolower( str_replace( '-', '_', $string ) ) );
372
+	return sanitize_text_field(strtolower(str_replace('-', '_', $string)));
373 373
 }
374 374
 
375 375
 
@@ -384,40 +384,40 @@  discard block
 block discarded – undo
384 384
  * @param unknown $postid int the id of the post object to check against
385 385
  * @since 0.9.9.7 added filter 'lasso_user_can_filter'
386 386
  */
387
-if ( !function_exists( 'lasso_user_can' ) ):
388
-	function lasso_user_can( $action = '', $postid = 0 ) {
387
+if (!function_exists('lasso_user_can')):
388
+	function lasso_user_can($action = '', $postid = 0) {
389 389
         $result = false;
390
-		if ( empty( $action ) )
390
+		if (empty($action))
391 391
 			$action = 'edit_posts';
392 392
 
393
-		if ( empty( $postid ) && $action != 'edit_posts' && $action != 'publish_posts' && $action != 'delete_posts')
393
+		if (empty($postid) && $action != 'edit_posts' && $action != 'publish_posts' && $action != 'delete_posts')
394 394
 			$postid = get_the_ID();
395 395
 
396
-		if ( is_user_logged_in() && current_user_can( $action, $postid ) ) {
396
+		if (is_user_logged_in() && current_user_can($action, $postid)) {
397 397
 			// check against post types:
398
-			$allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor', array( 'post', 'page') );
398
+			$allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', array('post', 'page'));
399 399
 			
400 400
 			if (!current_user_can('edit_pages')) {
401
-				$allowed_post_types = array_diff($allowed_post_types,array('page'));
401
+				$allowed_post_types = array_diff($allowed_post_types, array('page'));
402 402
 			}
403 403
 			
404 404
             if (!empty($allowed_post_types) && !empty($postid)) {
405
-				$type = get_post_type( $postid );
406
-                $allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
405
+				$type = get_post_type($postid);
406
+                $allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
407 407
 				
408
-                if ( in_array( $type, $allowed_post_types ) ) {
409
-				   $result =  true;
408
+                if (in_array($type, $allowed_post_types)) {
409
+				   $result = true;
410 410
 			    }
411 411
             } else {
412 412
                 //we are not checking against a post, return true
413
-				$result =  true;
413
+				$result = true;
414 414
         	}
415 415
 		} else {
416 416
 			$result = false;
417 417
 		}
418 418
 		//if ( function_exists( 'is_gutenberg_page' ) && has_blocks() ) return false;
419 419
 		
420
-		return apply_filters( 'lasso_user_can_filter', $result,  $action, $postid);
420
+		return apply_filters('lasso_user_can_filter', $result, $action, $postid);
421 421
 	}
422 422
 endif;
423 423
 
@@ -426,25 +426,25 @@  discard block
 block discarded – undo
426 426
 *
427 427
 *	@since 0.9.5
428 428
 */
429
-if ( !function_exists('lasso_editor_empty_results') ):
429
+if (!function_exists('lasso_editor_empty_results')):
430 430
 
431
-	function lasso_editor_empty_results( $type = 'posts' ){
431
+	function lasso_editor_empty_results($type = 'posts') {
432 432
 
433
-		if ( 'posts' == $type ) {
433
+		if ('posts' == $type) {
434 434
 
435
-			$string = apply_filters('lasso_empty_state_message', __('No posts to show', 'lasso') );
435
+			$string = apply_filters('lasso_empty_state_message', __('No posts to show', 'lasso'));
436 436
 			$icon = 'lasso-icon-file-text2';
437 437
 			$button = false;
438 438
 
439
-		} elseif ( 'revision' == $type ) {
439
+		} elseif ('revision' == $type) {
440 440
 
441
-			$string = apply_filters('lasso_empty_state_message', __('No revisions found', 'lasso') );
441
+			$string = apply_filters('lasso_empty_state_message', __('No revisions found', 'lasso'));
442 442
 			$icon = 'lasso-icon-history';
443
-			$button = sprintf('<a href="#" class="lasso--btn-secondary" id="lasso--close-modal">%s</a>', __('Close','lasso') );
443
+			$button = sprintf('<a href="#" class="lasso--btn-secondary" id="lasso--close-modal">%s</a>', __('Close', 'lasso'));
444 444
 
445 445
 		}
446 446
 
447
-		return sprintf('<div id="lasso--empty-state" class="lasso--empty-state"><i class="lasso--empty-state-icon lasso-icon %s"></i><p>%s</p>%s</div>', $icon, $string, $button );
447
+		return sprintf('<div id="lasso--empty-state" class="lasso--empty-state"><i class="lasso--empty-state-icon lasso-icon %s"></i><p>%s</p>%s</div>', $icon, $string, $button);
448 448
 	}
449 449
 
450 450
 endif;
Please login to merge, or discard this patch.
public/includes/components.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -279,6 +279,9 @@
 block discarded – undo
279 279
 endif;
280 280
 
281 281
 // helper function to retrieve one id for default option
282
+/**
283
+ * @param string $type
284
+ */
282 285
 function editus_get_one_id($type)
283 286
 {
284 287
 	$args = array( 'posts_per_page' => 1, 'post_type' => $type );
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -232,12 +232,12 @@
 block discarded – undo
232 232
 if ( !function_exists('lasso_wp_image') ):
233 233
 
234 234
 	function lasso_wp_image(){
235
-        $use_old_wpimg = lasso_editor_get_option('use_old_wpimg', 'lasso_editor','off');
236
-        if ($use_old_wpimg != 'on') {
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
-        } else {
239
-            return '<figure data-component-type="wpimg" data-linkoption="img" class="lasso--wpimg__wrap lasso-component"><img  src="'.LASSO_URL.'/public/assets/img/empty-img.png"></div>';
240
-        }
235
+		$use_old_wpimg = lasso_editor_get_option('use_old_wpimg', 'lasso_editor','off');
236
+		if ($use_old_wpimg != 'on') {
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
+		} else {
239
+			return '<figure data-component-type="wpimg" data-linkoption="img" class="lasso--wpimg__wrap lasso-component"><img  src="'.LASSO_URL.'/public/assets/img/empty-img.png"></div>';
240
+		}
241 241
 	}
242 242
 
243 243
 endif;
Please login to merge, or discard this 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.
lasso.php 4 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,8 +63,9 @@
 block discarded – undo
63 63
 
64 64
 function lasso_editor_get_option( $option, $section, $default = '' ) {
65 65
 
66
-	if ( empty( $option ) )
67
-		return;
66
+	if ( empty( $option ) ) {
67
+			return;
68
+	}
68 69
 
69 70
 	if ( function_exists( 'is_multisite' ) && is_multisite() ) {
70 71
 
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -61,6 +61,9 @@
 block discarded – undo
61 61
 }
62 62
 
63 63
 
64
+/**
65
+ * @param string $section
66
+ */
64 67
 function lasso_editor_get_option( $option, $section, $default = '' ) {
65 68
 
66 69
 	if ( empty( $option ) )
Please login to merge, or discard this patch.
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 add_filter('register_post_type_args', 'lasso_show_in_rest', 10, 2);
49 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( ) );
51
+	$allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor', array( ) );
52 52
 	$allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
53 53
 	if (in_array( $post_type,$allowed_post_types)) {
54 54
 		$args['show_in_rest'] = true;
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 		}
58 58
 	}
59 59
  
60
-    return $args;
60
+	return $args;
61 61
 }
62 62
 
63 63
 
@@ -106,25 +106,25 @@  discard block
 block discarded – undo
106 106
 //table codes to be added
107 107
 class editus_table {
108 108
     
109
-    public function __construct(){
110
-        $add_table = lasso_editor_get_option('add_table', 'lasso_editor', false);
111
-        if ($add_table) {
112
-            add_action('wp_enqueue_scripts', array($this,'scripts'));
109
+	public function __construct(){
110
+		$add_table = lasso_editor_get_option('add_table', 'lasso_editor', false);
111
+		if ($add_table) {
112
+			add_action('wp_enqueue_scripts', array($this,'scripts'));
113 113
             
114
-        }
114
+		}
115 115
 	}
116 116
     
117
-    function scripts()
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 );
124
-    }
117
+	function scripts()
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 );
124
+	}
125 125
     
126
-    function editus_table_edit_menu()
127
-    { ?>
126
+	function editus_table_edit_menu()
127
+	{ ?>
128 128
 
129 129
         <ul class='editus-table-menu'>
130 130
           <li data-action="insertcol"><?php echo __('Insert Column','lasso')?></li>
@@ -134,31 +134,31 @@  discard block
 block discarded – undo
134 134
           <li data-action="deltable"><?php echo __('Delete Table','lasso')?></li
135 135
         </ul>
136 136
     <?php
137
-    }
137
+	}
138 138
     
139 139
     
140
-    function editus_html_table()
141
-    {   
142
-        return '<figure class="wp-block-table"><table><tr><th>Cell 1</th><th>Cell 2</th></tr><tr><td>Cell 3</td><td>Cell 4</td></tr></table></figure><p></p>';
143
-    }
140
+	function editus_html_table()
141
+	{   
142
+		return '<figure class="wp-block-table"><table><tr><th>Cell 1</th><th>Cell 2</th></tr><tr><td>Cell 3</td><td>Cell 4</td></tr></table></figure><p></p>';
143
+	}
144 144
 
145 145
 
146
-    function editus_components_add_table( $array ){
147
-        $custom = array(
148
-               'htmltable' => array(
149
-                         'name'    => __('HTML Table','lasso'),
150
-                          'content' => self::editus_html_table(),
151
-                )
152
-        );
153
-        return array_merge( $array, $custom );
154
-    }
146
+	function editus_components_add_table( $array ){
147
+		$custom = array(
148
+			   'htmltable' => array(
149
+						 'name'    => __('HTML Table','lasso'),
150
+						  'content' => self::editus_html_table(),
151
+				)
152
+		);
153
+		return array_merge( $array, $custom );
154
+	}
155 155
 
156 156
 
157
-    function editus_toolbar_components_add_table( ) {
158
-          ?>
157
+	function editus_toolbar_components_add_table( ) {
158
+		  ?>
159 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
 }
163 163
 
164 164
 
Please login to merge, or discard this 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.
includes/process/update_object.php 4 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -182,7 +182,7 @@
 block discarded – undo
182 182
      *  @param    string|bool     $value    The term slug, or a comma separated list of slugs. Or false to remove all terms set for post.
183 183
 	 *                                      The first item is the name of taxonomy
184 184
 	 *
185
-	 *  @return bool True if update was successful, false if not.
185
+	 *  @return boolean|null True if update was successful, false if not.
186 186
 	 */
187 187
 	public function set_custom_taxonomy( $postid, $value) {
188 188
 		
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 	 *  @since    0.9.3
135 135
 	 *
136 136
 	 *  @param    int    	$postid       	The current postid
137
-     *  @param    string|bool     $value    The term slug, or a comma separated list of slugs. Or false to remove all terms set for post.
137
+	 *  @param    string|bool     $value    The term slug, or a comma separated list of slugs. Or false to remove all terms set for post.
138 138
 	 *  @param    string     $taxonomy    	The name of the taxonomy to which the term belongs.
139 139
 	 *
140 140
 	 *  @return bool True if update was successful, false if not.
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 			}
148 148
 			
149 149
 			if ($taxonomy =='category') {
150
-                // convert from names to category ids
150
+				// convert from names to category ids
151 151
 				$cats = array();
152 152
 				if (is_array($value)) {
153 153
 					foreach ($value as $cat) {
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 	 *
180 180
 	 *
181 181
 	 *  @param    int    	$postid       	The current postid
182
-     *  @param    string|bool     $value    The term slug, or a comma separated list of slugs. Or false to remove all terms set for post.
182
+	 *  @param    string|bool     $value    The term slug, or a comma separated list of slugs. Or false to remove all terms set for post.
183 183
 	 *                                      The first item is the name of taxonomy
184 184
 	 *
185 185
 	 *  @return bool True if update was successful, false if not.
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 				$value = explode( ',', $value );
193 193
 			}
194 194
 						
195
-            // Deleting first array item
195
+			// Deleting first array item
196 196
 			$taxonomy = array_shift($value);
197 197
 			$cats = array();
198 198
 			foreach ($value as $cat) {
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 		
215 215
 		if( $value ) {
216 216
 			$time = current_time('mysql');
217
-            wp_update_post(
217
+			wp_update_post(
218 218
 				array (
219 219
 					'ID'            => $postid, // ID of the post to update
220 220
 					'post_date'     => date( 'Y-m-d H:i:s',  strtotime($value) ),
Please login to merge, or discard this patch.
Spacing   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
 use lasso\internal_api\api_action;
11 11
 
12
-class update_object implements api_action{
12
+class update_object implements api_action {
13 13
 
14 14
 	/**
15 15
 	 * The nonce action for this request.
@@ -29,11 +29,11 @@  discard block
 block discarded – undo
29 29
 	 *
30 30
 	 * @return bool Always returns true.
31 31
 	 */
32
-	public function post( $data ) {
32
+	public function post($data) {
33 33
 
34
-		$status = isset( $data['status'] ) ? $data['status'] : false;
35
-		$postid = isset( $data['postid'] ) ? $data['postid'] : false;
36
-		$slug   = isset( $data['story_slug'] ) ? $data['story_slug'] : false;
34
+		$status = isset($data['status']) ? $data['status'] : false;
35
+		$postid = isset($data['postid']) ? $data['postid'] : false;
36
+		$slug   = isset($data['story_slug']) ? $data['story_slug'] : false;
37 37
 
38 38
 
39 39
 
@@ -43,28 +43,28 @@  discard block
 block discarded – undo
43 43
 			'post_status' 	=> $status
44 44
 		);
45 45
 
46
-		wp_update_post( apply_filters( 'lasso_object_status_update_args', $args ) );
46
+		wp_update_post(apply_filters('lasso_object_status_update_args', $args));
47 47
 
48 48
 
49 49
 		// update categories
50
-		$cats  = isset( $data['story_cats'] ) ? $data['story_cats'] : false;
51
-		self::set_post_terms( $postid, $cats, 'category' );
50
+		$cats = isset($data['story_cats']) ? $data['story_cats'] : false;
51
+		self::set_post_terms($postid, $cats, 'category');
52 52
 
53 53
 
54 54
 		// update tags
55
-		$tags = isset( $data['story_tags'] ) ? $data['story_tags'] : false;
56
-		self::set_post_terms( $postid, $tags, 'post_tag' );
55
+		$tags = isset($data['story_tags']) ? $data['story_tags'] : false;
56
+		self::set_post_terms($postid, $tags, 'post_tag');
57 57
 		
58 58
 		// update custom taxonomy
59
-		$taxs  = isset( $data['story_custom_taxonomy'] ) ? $data['story_custom_taxonomy'] : false;
60
-		self::set_custom_taxonomy( $postid, $taxs );
59
+		$taxs = isset($data['story_custom_taxonomy']) ? $data['story_custom_taxonomy'] : false;
60
+		self::set_custom_taxonomy($postid, $taxs);
61 61
 		
62 62
 		//update date
63
-		$date  = isset( $data['post_date'] ) ? $data['post_date'] : false;
64
-		self::set_date( $postid, $date );
63
+		$date = isset($data['post_date']) ? $data['post_date'] : false;
64
+		self::set_date($postid, $date);
65 65
 
66 66
 
67
-		do_action( 'lasso_post_updated', $postid, $slug, $status, get_current_user_ID() );
67
+		do_action('lasso_post_updated', $postid, $slug, $status, get_current_user_ID());
68 68
 
69 69
 		return true;
70 70
 
@@ -78,8 +78,8 @@  discard block
 block discarded – undo
78 78
 	 *
79 79
 	 * @return array Array of keys to pull from $_POST per action and their sanitization callback
80 80
 	 */
81
-	public static function params(){
82
-		$params[ 'process_update_object_post' ] = array(
81
+	public static function params() {
82
+		$params['process_update_object_post'] = array(
83 83
 			'postid' => 'absint',
84 84
 			'status' => 'strip_tags',
85 85
 			'story_slug' => array(
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 	 * @return array Array of additional functions to use to authorize action.
118 118
 	 */
119 119
 	public static function auth_callbacks() {
120
-		$params[ 'process_update_object_post' ] = array(
120
+		$params['process_update_object_post'] = array(
121 121
 			'lasso_user_can'
122 122
 		);
123 123
 
@@ -139,14 +139,14 @@  discard block
 block discarded – undo
139 139
 	 *
140 140
 	 *  @return bool True if update was successful, false if not.
141 141
 	 */
142
-	public function set_post_terms( $postid, $value, $taxonomy ) {
143
-		if( $value ) {
142
+	public function set_post_terms($postid, $value, $taxonomy) {
143
+		if ($value) {
144 144
 			// first check if multiple, make array if so.
145
-			if ( self::has_multiple_objects( $value ) ) {	
146
-				$value = explode( ',', $value );
145
+			if (self::has_multiple_objects($value)) {	
146
+				$value = explode(',', $value);
147 147
 			}
148 148
 			
149
-			if ($taxonomy =='category') {
149
+			if ($taxonomy == 'category') {
150 150
                 // convert from names to category ids
151 151
 				$cats = array();
152 152
 				if (is_array($value)) {
@@ -159,17 +159,17 @@  discard block
 block discarded – undo
159 159
 				}
160 160
 			}
161 161
 	
162
-			$result = wp_set_object_terms( $postid, $value, $taxonomy );
162
+			$result = wp_set_object_terms($postid, $value, $taxonomy);
163 163
 		}
164
-		else  {
164
+		else {
165 165
 			//remove all terms from post
166
-			$result = wp_set_object_terms( $postid, null, $taxonomy );
166
+			$result = wp_set_object_terms($postid, null, $taxonomy);
167 167
 
168 168
 		}
169 169
 
170
-		if ( ! is_wp_error( $result ) ) {
170
+		if (!is_wp_error($result)) {
171 171
 			return true;
172
-		}else{
172
+		} else {
173 173
 			return false;
174 174
 		}
175 175
 	}
@@ -184,12 +184,12 @@  discard block
 block discarded – undo
184 184
 	 *
185 185
 	 *  @return bool True if update was successful, false if not.
186 186
 	 */
187
-	public function set_custom_taxonomy( $postid, $value) {
187
+	public function set_custom_taxonomy($postid, $value) {
188 188
 		
189
-		if( $value ) {
189
+		if ($value) {
190 190
 			// first check if multiple, make array if so.
191
-			if ( self::has_multiple_objects( $value ) ) {	
192
-				$value = explode( ',', $value );
191
+			if (self::has_multiple_objects($value)) {	
192
+				$value = explode(',', $value);
193 193
 			}
194 194
 						
195 195
             // Deleting first array item
@@ -201,24 +201,24 @@  discard block
 block discarded – undo
201 201
 			$value = $cats;
202 202
 			
203 203
 	
204
-			$result = wp_set_object_terms( $postid, $cats, $taxonomy );
205
-			if ( ! is_wp_error( $result ) ) {
204
+			$result = wp_set_object_terms($postid, $cats, $taxonomy);
205
+			if (!is_wp_error($result)) {
206 206
 				return true;
207
-			}else{
207
+			} else {
208 208
 				return false;
209 209
 			}
210 210
 		}
211 211
 	}
212 212
 	
213
-	public function set_date( $postid, $value) {
213
+	public function set_date($postid, $value) {
214 214
 		
215
-		if( $value ) {
215
+		if ($value) {
216 216
 			$time = current_time('mysql');
217 217
             wp_update_post(
218
-				array (
218
+				array(
219 219
 					'ID'            => $postid, // ID of the post to update
220
-					'post_date'     => date( 'Y-m-d H:i:s',  strtotime($value) ),
221
-					'post_date_gmt'     => gmdate( 'Y-m-d H:i:s',  strtotime($value) ),
220
+					'post_date'     => date('Y-m-d H:i:s', strtotime($value)),
221
+					'post_date_gmt'     => gmdate('Y-m-d H:i:s', strtotime($value)),
222 222
 				)
223 223
 			);
224 224
 		}
@@ -232,9 +232,9 @@  discard block
 block discarded – undo
232 232
 	 *  @return   bool               True if there are multiple terms; otherwise, false.
233 233
 	 *	@since   0.9.3
234 234
 	 */
235
-	public function has_multiple_objects( $value ) {
235
+	public function has_multiple_objects($value) {
236 236
 
237
-		return 0 < strpos( $value, ',' );
237
+		return 0 < strpos($value, ',');
238 238
 
239 239
 	}
240 240
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -160,8 +160,7 @@  discard block
 block discarded – undo
160 160
 			}
161 161
 	
162 162
 			$result = wp_set_object_terms( $postid, $value, $taxonomy );
163
-		}
164
-		else  {
163
+		} else  {
165 164
 			//remove all terms from post
166 165
 			$result = wp_set_object_terms( $postid, null, $taxonomy );
167 166
 
@@ -169,7 +168,7 @@  discard block
 block discarded – undo
169 168
 
170 169
 		if ( ! is_wp_error( $result ) ) {
171 170
 			return true;
172
-		}else{
171
+		} else{
173 172
 			return false;
174 173
 		}
175 174
 	}
@@ -204,7 +203,7 @@  discard block
 block discarded – undo
204 203
 			$result = wp_set_object_terms( $postid, $cats, $taxonomy );
205 204
 			if ( ! is_wp_error( $result ) ) {
206 205
 				return true;
207
-			}else{
206
+			} else{
208 207
 				return false;
209 208
 			}
210 209
 		}
Please login to merge, or discard this patch.
includes/process/new_object.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -28,26 +28,26 @@  discard block
 block discarded – undo
28 28
 	 *
29 29
 	 * @since 1.0
30 30
 	 */
31
-	public function post( $data ) {
31
+	public function post($data) {
32 32
 
33
-		$title  = $data[ 'story_title' ];
33
+		$title  = $data['story_title'];
34 34
 
35
-		$object = is_null( $data[ 'object'] ) ? false : $data[ 'object' ];
35
+		$object = is_null($data['object']) ? false : $data['object'];
36 36
 
37 37
 		// insert a new post
38 38
 		$args = array(
39 39
 			'post_title'    => $title,
40 40
 			'post_status'   => 'draft',
41 41
 			'post_type'    	=> $object,
42
-			'post_content'  => apply_filters( 'lasso_new_object_content', '<p>'.__( 'Once upon a time...','lasso').'</p>' )
42
+			'post_content'  => apply_filters('lasso_new_object_content', '<p>'.__('Once upon a time...', 'lasso').'</p>')
43 43
 		);
44 44
 
45
-		$postid = wp_insert_post( apply_filters( 'lasso_insert_object_args', $args ) );
45
+		$postid = wp_insert_post(apply_filters('lasso_insert_object_args', $args));
46 46
 
47
-		do_action( 'lasso_new_object', $postid, $object, $title, get_current_user_ID() );
47
+		do_action('lasso_new_object', $postid, $object, $title, get_current_user_ID());
48 48
 
49 49
 		return array(
50
-			'postlink' => get_permalink( $postid )
50
+			'postlink' => get_permalink($postid)
51 51
 		);
52 52
 
53 53
 	}
@@ -60,8 +60,8 @@  discard block
 block discarded – undo
60 60
 	 * @return array Array of keys to pull from $_POST per action and their sanitization callback
61 61
 	 */
62 62
 	public static function params() {
63
-		$params[ 'process_new_object_post' ] = array(
64
-			'story_title' => array( 'wp_strip_all_tags', 'trim' ),
63
+		$params['process_new_object_post'] = array(
64
+			'story_title' => array('wp_strip_all_tags', 'trim'),
65 65
 			'object' => 'trim'
66 66
 		);
67 67
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 	 * @return array Array of additional functions to use to authorize action.
78 78
 	 */
79 79
 	public static function auth_callbacks() {
80
-		$params[ 'process_new_object_post' ] = array();
80
+		$params['process_new_object_post'] = array();
81 81
 
82 82
 		return $params;
83 83
 
Please login to merge, or discard this patch.
public/includes/editor-modules.php 4 patches
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -188,8 +188,11 @@  discard block
 block discarded – undo
188 188
 						<?php if ( class_exists ('Aesop_Events') ) { ?>
189 189
 						     <li data-type="events" title="<?php esc_attr_e( 'Event', 'lasso' );?>"  class="lasso-toolbar--component__event"></li>
190 190
 						<?php }?>
191
-					<?php else: ?>
192
-						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );?>" class="image lasso-toolbar--component__image"></li>
191
+					<?php else {
192
+	: ?>
193
+						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );
194
+}
195
+?>" class="image lasso-toolbar--component__image"></li>
193 196
 						<li data-type="wpquote" title="<?php esc_attr_e( 'WordPress Quote', 'lasso' );?>" class="quote lasso-toolbar--component__quote"></li>
194 197
 						<!--li data-type="wpvideo" title="<?php esc_attr_e( 'WordPress Video', 'lasso' );?>" class="video lasso-toolbar--component__video"></li-->
195 198
 					<?php endif; ?>
@@ -712,8 +715,9 @@  discard block
 block discarded – undo
712 715
 
713 716
 	$blob = array();
714 717
 
715
-	if ( empty( $codes ) )
716
-		return;
718
+	if ( empty( $codes ) ) {
719
+			return;
720
+	}
717 721
 
718 722
 	foreach ( $codes as $slug => $shortcode ) {
719 723
 		$return = '';
Please login to merge, or discard this patch.
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -923,6 +923,7 @@
 block discarded – undo
923 923
  * Takes a color code and returns an adjusted value
924 924
  * @since 1.0.0
925 925
  * Steps should be between -255 and 255. Negative = darker, positive = lighter
926
+ * @param integer $steps
926 927
  * @return string
927 928
  */
928 929
 function lasso_editor_adjustBrightness($hex, $steps) { 
Please login to merge, or discard this patch.
Indentation   +118 added lines, -118 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 				height: 42px;
115 115
 			}
116 116
 		<?php
117
-            } 
117
+			} 
118 118
 		} else { 
119 119
 		?> 
120 120
 
@@ -123,8 +123,8 @@  discard block
 block discarded – undo
123 123
             }
124 124
             
125 125
         <?php
126
-        }
127
-        ?>
126
+		}
127
+		?>
128 128
         </style>
129 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
 
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 	$toolbar_class  = $toolbar_headings ? 'toolbar-extended' : false;
234 234
 	
235 235
 	// mobile styles
236
-    $mobile_class = $is_mobile ? 'lasso-mobile' : false;
236
+	$mobile_class = $is_mobile ? 'lasso-mobile' : false;
237 237
 	$mobile_style =$is_mobile ? 'style="bottom:0px;"' : null;
238 238
 	
239 239
 	//show color
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
 	
457 457
 	//editor options
458 458
 	$allow_change_date = lasso_editor_get_option('allow_change_date', 'lasso_editor');
459
-    $allow_edit_excerpt = lasso_editor_get_option('allow_edit_excerpt', 'lasso_editor');
459
+	$allow_edit_excerpt = lasso_editor_get_option('allow_edit_excerpt', 'lasso_editor');
460 460
 	$no_url_setting = lasso_editor_get_option('no_url_setting', 'lasso_editor');
461 461
 
462 462
 	// are we singular
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
 	// do we support pending status
470 470
 	$no_pending_status = lasso_editor_get_option('no_pending_status', 'lasso_editor');
471 471
     
472
-    $excerpt = $post->post_excerpt;
472
+	$excerpt = $post->post_excerpt;
473 473
 
474 474
 ?>
475 475
 	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>">
@@ -548,7 +548,7 @@  discard block
 block discarded – undo
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 553
 						    <label><?php _e( 'Post Date', 'lasso' ); ?></label>
554 554
 							<input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid);?>"/>
@@ -663,7 +663,7 @@  discard block
 block discarded – undo
663 663
 						if ( !empty( $types ) ) {
664 664
 							// get the first element
665 665
 							$keys = array_keys($types);
666
-						    $type =$keys[0];						
666
+							$type =$keys[0];						
667 667
 							$type = preg_replace( '/s\b/','', $type );
668 668
 							printf( '<input type="hidden" name="object" value="%s">', lcfirst( esc_attr( $type ) ) );		
669 669
 						}
@@ -691,8 +691,8 @@  discard block
 block discarded – undo
691 691
 	global $post;
692 692
 	
693 693
 	global $wp_post_types;
694
-    $labels = &$wp_post_types['post']->labels;
695
-    $labels->name = 'Articles';
694
+	$labels = &$wp_post_types['post']->labels;
695
+	$labels->name = 'Articles';
696 696
 
697 697
 	ob_start();
698 698
 
@@ -752,7 +752,7 @@  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 758
 	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
@@ -840,8 +840,8 @@  discard block
 block discarded – undo
840 840
 function lasso_editor_options_blob() {
841 841
 
842 842
 	$codes   = function_exists( 'aesop_shortcodes' ) ? aesop_shortcodes() : array();
843
-    $codes   = add_wpimg_options( $codes );
844
-    $codes   = apply_filters( 'lasso_custom_options', $codes );
843
+	$codes   = add_wpimg_options( $codes );
844
+	$codes   = apply_filters( 'lasso_custom_options', $codes );
845 845
 	$galleries  = function_exists( 'lasso_editor_galleries_exist' ) && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
846 846
 
847 847
 	$nonce = wp_create_nonce( 'lasso_gallery' );
@@ -943,9 +943,9 @@  discard block
 block discarded – undo
943 943
 		$return .= '</form>';
944 944
 
945 945
 		// extra JS codes
946
-        if (isset($shortcode['codes'])) {
947
-		    $return .= $shortcode['codes'];
948
-        }
946
+		if (isset($shortcode['codes'])) {
947
+			$return .= $shortcode['codes'];
948
+		}
949 949
 		$blob[$slug] = $return;
950 950
 	}
951 951
 
@@ -954,95 +954,95 @@  discard block
 block discarded – undo
954 954
 
955 955
 
956 956
 function add_wpimg_options( $shortcodes ) {
957
-    $custom = array(
958
-        'wpimg'    => array(
959
-            'name'     => __( 'Image', 'lasso' ),
960
-            'type'     => 'single',
961
-            'atts'     => array(
962
-                'img'    => array(
963
-                    'type'  => 'media_upload',
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' )
967
-                ),
968
-                'align'    => array(
969
-                    'type'  => 'select',
970
-                    'values'  => array(						
971
-                        array(
972
-                            'value' => 'center',
973
-                            'name' => __( 'Center', 'aesop-core' )
974
-                        ),
975
-                        array(
976
-                            'value' => 'left',
977
-                            'name' => __( 'Left', 'aesop-core' )
978
-                        ),
979
-                        array(
980
-                            'value' => 'right',
981
-                            'name' => __( 'Right', 'aesop-core' )
982
-                        ),
983
-                    ),
984
-                    'default'  => 'center',
985
-                    'desc'   => __( 'Alignment', 'lasso' ),
986
-                    'tip'=>''
987
-                ),			
957
+	$custom = array(
958
+		'wpimg'    => array(
959
+			'name'     => __( 'Image', 'lasso' ),
960
+			'type'     => 'single',
961
+			'atts'     => array(
962
+				'img'    => array(
963
+					'type'  => 'media_upload',
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' )
967
+				),
968
+				'align'    => array(
969
+					'type'  => 'select',
970
+					'values'  => array(						
971
+						array(
972
+							'value' => 'center',
973
+							'name' => __( 'Center', 'aesop-core' )
974
+						),
975
+						array(
976
+							'value' => 'left',
977
+							'name' => __( 'Left', 'aesop-core' )
978
+						),
979
+						array(
980
+							'value' => 'right',
981
+							'name' => __( 'Right', 'aesop-core' )
982
+						),
983
+					),
984
+					'default'  => 'center',
985
+					'desc'   => __( 'Alignment', 'lasso' ),
986
+					'tip'=>''
987
+				),			
988 988
                 
989
-                'imgwidth'    => array(
990
-                    'type'  => 'text_small',
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' )
994
-                ),
995
-                'imgheight'    => array(
996
-                    'type'  => 'text_small',
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' )
1000
-                ),	
1001
-                'linkoption'    => array(
1002
-                    'type'  => 'select',
1003
-                    'values'  => array(						
1004
-                        array(
1005
-                            'value' => 'none',
1006
-                            'name' => __( 'None', 'aesop-core' )
1007
-                        ),
1008
-                        array(
1009
-                            'value' => 'img',
1010
-                            'name' => __( 'Image', 'aesop-core' )
1011
-                        ),
1012
-                        array(
1013
-                            'value' => 'url',
1014
-                            'name' => __( 'URL', 'aesop-core' )
1015
-                        ),
1016
-                    ),
1017
-                    'default'  => 'none',
1018
-                    'desc'   => __( 'Link', 'lasso' ),
1019
-                    'tip'  => __( 'Click leads to:', 'lasso' )
1020
-                ),				
989
+				'imgwidth'    => array(
990
+					'type'  => 'text_small',
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' )
994
+				),
995
+				'imgheight'    => array(
996
+					'type'  => 'text_small',
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' )
1000
+				),	
1001
+				'linkoption'    => array(
1002
+					'type'  => 'select',
1003
+					'values'  => array(						
1004
+						array(
1005
+							'value' => 'none',
1006
+							'name' => __( 'None', 'aesop-core' )
1007
+						),
1008
+						array(
1009
+							'value' => 'img',
1010
+							'name' => __( 'Image', 'aesop-core' )
1011
+						),
1012
+						array(
1013
+							'value' => 'url',
1014
+							'name' => __( 'URL', 'aesop-core' )
1015
+						),
1016
+					),
1017
+					'default'  => 'none',
1018
+					'desc'   => __( 'Link', 'lasso' ),
1019
+					'tip'  => __( 'Click leads to:', 'lasso' )
1020
+				),				
1021 1021
                 
1022
-                'link'    => array(
1023
-                    'type'  => 'text',
1024
-                    'default'  => '',
1025
-                    'desc'   => __( 'URL Link', 'lasso' ),
1026
-                    'tip'  => __( 'URL link', 'lasso' )
1027
-                ),
1028
-                'alt'    => array(
1029
-                    'type'  => 'text',
1030
-                    'default'  => '',
1031
-                    'desc'   => __( 'Image ALT', 'lasso' ),
1032
-                    'tip'  => __( 'ALT tag used for the image. Primarily used for SEO purposes.', 'lasso' )
1033
-                ),
1022
+				'link'    => array(
1023
+					'type'  => 'text',
1024
+					'default'  => '',
1025
+					'desc'   => __( 'URL Link', 'lasso' ),
1026
+					'tip'  => __( 'URL link', 'lasso' )
1027
+				),
1028
+				'alt'    => array(
1029
+					'type'  => 'text',
1030
+					'default'  => '',
1031
+					'desc'   => __( 'Image ALT', 'lasso' ),
1032
+					'tip'  => __( 'ALT tag used for the image. Primarily used for SEO purposes.', 'lasso' )
1033
+				),
1034 1034
                 
1035
-                'caption'    => array(
1036
-                    'type'  => 'text_area',
1037
-                    'default'  => '',
1038
-                    'desc'   => __( 'Caption', 'lasso' ),
1039
-                    'tip'  => __( 'Optional caption for the image.', 'lasso' )
1040
-                ),
1035
+				'caption'    => array(
1036
+					'type'  => 'text_area',
1037
+					'default'  => '',
1038
+					'desc'   => __( 'Caption', 'lasso' ),
1039
+					'tip'  => __( 'Optional caption for the image.', 'lasso' )
1040
+				),
1041 1041
                 
1042 1042
 
1043
-            ),
1044
-            'desc'     => __( 'An image.', 'aesop-core' ),
1045
-            'codes'    => '<script>	            
1043
+			),
1044
+			'desc'     => __( 'An image.', 'aesop-core' ),
1045
+			'codes'    => '<script>	            
1046 1046
 						jQuery(document).ready(function($){
1047 1047
                             function linkSetting(l){								
1048 1048
 							    if ( l=="url") {
@@ -1062,10 +1062,10 @@  discard block
 block discarded – undo
1062 1062
 							})
1063 1063
 						});
1064 1064
 			           </script>'
1065
-        )
1066
-    );
1065
+		)
1066
+	);
1067 1067
 
1068
-    return array_merge( $shortcodes, $custom );
1068
+	return array_merge( $shortcodes, $custom );
1069 1069
 }
1070 1070
 
1071 1071
 /**
@@ -1110,23 +1110,23 @@  discard block
 block discarded – undo
1110 1110
  * @return string
1111 1111
  */
1112 1112
 function lasso_editor_adjustBrightness($hex, $steps) { 
1113
-    $steps = max(-255, min(255, $steps));
1113
+	$steps = max(-255, min(255, $steps));
1114 1114
 
1115
-    // Normalize into a six character long hex string
1116
-    $hex = str_replace('#', '', $hex);
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);
1119
-    }
1115
+	// Normalize into a six character long hex string
1116
+	$hex = str_replace('#', '', $hex);
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);
1119
+	}
1120 1120
 
1121
-    // Split into three parts: R, G and B
1122
-    $color_parts = str_split($hex, 2);
1123
-    $return = '#';
1121
+	// Split into three parts: R, G and B
1122
+	$color_parts = str_split($hex, 2);
1123
+	$return = '#';
1124 1124
 
1125
-    foreach ($color_parts as $color) {
1126
-        $color   = hexdec($color); // Convert to decimal
1127
-        $color   = max(0,min(255,$color + $steps)); // Adjust color
1128
-        $return .= str_pad(dechex($color), 2, '0', STR_PAD_LEFT); // Make two char hex code
1129
-    }
1125
+	foreach ($color_parts as $color) {
1126
+		$color   = hexdec($color); // Convert to decimal
1127
+		$color   = max(0,min(255,$color + $steps)); // Adjust color
1128
+		$return .= str_pad(dechex($color), 2, '0', STR_PAD_LEFT); // Make two char hex code
1129
+	}
1130 1130
 
1131
-    return $return;
1131
+	return $return;
1132 1132
 }
Please login to merge, or discard this 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.