Completed
Push — master ( 3737f0...b3eac7 )
by
unknown
43s
created
lasso.php 2 patches
Indentation   +66 added lines, -66 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><br></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><br></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
 
@@ -169,41 +169,41 @@  discard block
 block discarded – undo
169 169
 //table codes to be added
170 170
 class editus_paragraph {
171 171
     
172
-    public function __construct(){
173
-        $add_paragraph = lasso_editor_get_option('add_paragraph', 'lasso_editor', false);
174
-        if ($add_paragraph) {
175
-            add_action('wp_enqueue_scripts', array($this,'scripts'));
172
+	public function __construct(){
173
+		$add_paragraph = lasso_editor_get_option('add_paragraph', 'lasso_editor', false);
174
+		if ($add_paragraph) {
175
+			add_action('wp_enqueue_scripts', array($this,'scripts'));
176 176
             
177
-        }
177
+		}
178 178
 	}
179 179
     
180
-    function scripts()
181
-    {
182
-            add_action('lasso_editor_controls_after_outside', array($this,'editus_paragraph_style'));
183
-            add_filter('lasso_components',array($this,'editus_components_add_paragraph'),10,1);
184
-            add_action( 'lasso_toolbar_components', array($this,'editus_toolbar_components_add_paragraph'), 10 );
185
-            //wp_enqueue_style( 'editus-table-style', LASSO_URL.  '/public/assets/css/editus-table-edit-public.css', LASSO_VERSION, true );
186
-            //wp_enqueue_script( 'editus_table',  LASSO_URL. '/public/assets/js/editus-table-edit-public.js', array( 'jquery' ), LASSO_VERSION, true );
187
-    }
180
+	function scripts()
181
+	{
182
+			add_action('lasso_editor_controls_after_outside', array($this,'editus_paragraph_style'));
183
+			add_filter('lasso_components',array($this,'editus_components_add_paragraph'),10,1);
184
+			add_action( 'lasso_toolbar_components', array($this,'editus_toolbar_components_add_paragraph'), 10 );
185
+			//wp_enqueue_style( 'editus-table-style', LASSO_URL.  '/public/assets/css/editus-table-edit-public.css', LASSO_VERSION, true );
186
+			//wp_enqueue_script( 'editus_table',  LASSO_URL. '/public/assets/js/editus-table-edit-public.js', array( 'jquery' ), LASSO_VERSION, true );
187
+	}
188 188
    
189
-    function editus_components_add_paragraph( $array ){
190
-        $custom = array(
191
-               'htmlparagraph' => array(
192
-                         'name'    => __('HTML Paragraph','lasso'),
193
-                          'content' => self::editus_html_paragraph(),
194
-                )
195
-        );
196
-        return array_merge( $array, $custom );
197
-    }
189
+	function editus_components_add_paragraph( $array ){
190
+		$custom = array(
191
+			   'htmlparagraph' => array(
192
+						 'name'    => __('HTML Paragraph','lasso'),
193
+						  'content' => self::editus_html_paragraph(),
194
+				)
195
+		);
196
+		return array_merge( $array, $custom );
197
+	}
198 198
     
199 199
     
200
-    function editus_html_paragraph()
201
-    {   
202
-        return '<p contenteditable="true"><br></p>';
203
-    }
200
+	function editus_html_paragraph()
201
+	{   
202
+		return '<p contenteditable="true"><br></p>';
203
+	}
204 204
 
205
-    function editus_paragraph_style()
206
-    { ?>
205
+	function editus_paragraph_style()
206
+	{ ?>
207 207
         <style>
208 208
         #lasso-toolbar--components__list .lasso-toolbar--component__htmlparagraph:before
209 209
         { 
@@ -212,14 +212,14 @@  discard block
 block discarded – undo
212 212
         }
213 213
         </style>
214 214
     <?php
215
-    }
215
+	}
216 216
     
217 217
 
218
-    function editus_toolbar_components_add_paragraph( ) {
219
-          ?>
218
+	function editus_toolbar_components_add_paragraph( ) {
219
+		  ?>
220 220
           <li data-type="htmlparagraph" title="<?php esc_attr_e( 'HTML Paragraph', 'lasso' );?>" class="quote lasso-toolbar--component__htmlparagraph dashicons dashicons-editor-paragraph"></li>
221 221
           <?php
222
-    }
222
+	}
223 223
 }
224 224
 
225 225
 new editus_paragraph();
Please login to merge, or discard this patch.
Spacing   +49 added lines, -49 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.4.5' );
27
-define( 'LASSO_DIR', plugin_dir_path( __FILE__ ) );
28
-define( 'LASSO_URL', plugins_url( '', __FILE__ ) );
29
-define( 'LASSO_FILE', __FILE__ );
26
+define('LASSO_VERSION', '1.4.5');
27
+define('LASSO_DIR', plugin_dir_path(__FILE__));
28
+define('LASSO_URL', plugins_url('', __FILE__));
29
+define('LASSO_FILE', __FILE__);
30 30
 
31 31
 /**
32 32
  * Load plugin if PHP version is 5.4 or later.
33 33
  */
34
-if ( version_compare( PHP_VERSION, '5.4.0', '>=' ) ) {
34
+if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
35 35
 
36
-	include_once( LASSO_DIR . '/bootstrap.php' );
36
+	include_once(LASSO_DIR.'/bootstrap.php');
37 37
 
38 38
 } else {
39 39
 
40 40
 	add_action('admin_head', 'lasso_fail_notice');
41
-	function lasso_fail_notice(){
41
+	function lasso_fail_notice() {
42 42
 
43 43
 		printf('<div class="error"><p>Editus requires PHP 5.4 or higher.</p></div>');
44 44
 
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
 }
47 47
 
48 48
 add_filter('register_post_type_args', 'lasso_show_in_rest', 10, 2);
49
-function lasso_show_in_rest($args, $post_type){
49
+function lasso_show_in_rest($args, $post_type) {
50 50
  
51
-    $allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor', array( ) );
52
-	$allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
53
-	if (in_array( $post_type,$allowed_post_types)) {
51
+    $allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', array( ));
52
+	$allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
53
+	if (in_array($post_type, $allowed_post_types)) {
54 54
 		$args['show_in_rest'] = true;
55 55
 		if ($post_type != 'post' && $post_type != 'page') {
56 56
 			$args['rest_base'] = $post_type;
@@ -61,21 +61,21 @@  discard block
 block discarded – undo
61 61
 }
62 62
 
63 63
 
64
-function lasso_editor_get_option( $option, $section, $default = '' ) {
64
+function lasso_editor_get_option($option, $section, $default = '') {
65 65
 
66
-	if ( empty( $option ) )
66
+	if (empty($option))
67 67
 		return;
68 68
 
69
-	if ( function_exists( 'is_multisite' ) && is_multisite() ) {
69
+	if (function_exists('is_multisite') && is_multisite()) {
70 70
 
71
-		$options = get_site_option( $section );
71
+		$options = get_site_option($section);
72 72
 
73 73
 	} else {
74 74
 
75
-		$options = get_option( $section );
75
+		$options = get_option($section);
76 76
 	}
77 77
 
78
-	if ( isset( $options[$option] ) ) {
78
+	if (isset($options[$option])) {
79 79
 		return $options[$option];
80 80
 	}
81 81
 
@@ -88,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
 }
@@ -169,31 +169,31 @@  discard block
 block discarded – undo
169 169
 //table codes to be added
170 170
 class editus_paragraph {
171 171
     
172
-    public function __construct(){
172
+    public function __construct() {
173 173
         $add_paragraph = lasso_editor_get_option('add_paragraph', 'lasso_editor', false);
174 174
         if ($add_paragraph) {
175
-            add_action('wp_enqueue_scripts', array($this,'scripts'));
175
+            add_action('wp_enqueue_scripts', array($this, 'scripts'));
176 176
             
177 177
         }
178 178
 	}
179 179
     
180 180
     function scripts()
181 181
     {
182
-            add_action('lasso_editor_controls_after_outside', array($this,'editus_paragraph_style'));
183
-            add_filter('lasso_components',array($this,'editus_components_add_paragraph'),10,1);
184
-            add_action( 'lasso_toolbar_components', array($this,'editus_toolbar_components_add_paragraph'), 10 );
182
+            add_action('lasso_editor_controls_after_outside', array($this, 'editus_paragraph_style'));
183
+            add_filter('lasso_components', array($this, 'editus_components_add_paragraph'), 10, 1);
184
+            add_action('lasso_toolbar_components', array($this, 'editus_toolbar_components_add_paragraph'), 10);
185 185
             //wp_enqueue_style( 'editus-table-style', LASSO_URL.  '/public/assets/css/editus-table-edit-public.css', LASSO_VERSION, true );
186 186
             //wp_enqueue_script( 'editus_table',  LASSO_URL. '/public/assets/js/editus-table-edit-public.js', array( 'jquery' ), LASSO_VERSION, true );
187 187
     }
188 188
    
189
-    function editus_components_add_paragraph( $array ){
189
+    function editus_components_add_paragraph($array) {
190 190
         $custom = array(
191 191
                'htmlparagraph' => array(
192
-                         'name'    => __('HTML Paragraph','lasso'),
192
+                         'name'    => __('HTML Paragraph', 'lasso'),
193 193
                           'content' => self::editus_html_paragraph(),
194 194
                 )
195 195
         );
196
-        return array_merge( $array, $custom );
196
+        return array_merge($array, $custom);
197 197
     }
198 198
     
199 199
     
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 
218 218
     function editus_toolbar_components_add_paragraph( ) {
219 219
           ?>
220
-          <li data-type="htmlparagraph" title="<?php esc_attr_e( 'HTML Paragraph', 'lasso' );?>" class="quote lasso-toolbar--component__htmlparagraph dashicons dashicons-editor-paragraph"></li>
220
+          <li data-type="htmlparagraph" title="<?php esc_attr_e('HTML Paragraph', 'lasso'); ?>" class="quote lasso-toolbar--component__htmlparagraph dashicons dashicons-editor-paragraph"></li>
221 221
           <?php
222 222
     }
223 223
 }
Please login to merge, or discard this patch.
admin/includes/menus/settings.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -98,8 +98,8 @@  discard block
 block discarded – undo
98 98
 		if ( !is_user_logged_in() )
99 99
 			return;
100 100
         
101
-        // check for lasso story engine and add a class doniting this
102
-        $ase_status = class_exists( 'Aesop_Core' ) || defined( 'LASSO_CUSTOM' ) ? 'ase-active' : 'ase-not-active';
101
+		// check for lasso story engine and add a class doniting this
102
+		$ase_status = class_exists( 'Aesop_Core' ) || defined( 'LASSO_CUSTOM' ) ? 'ase-active' : 'ase-not-active';
103 103
 
104 104
 		$article_object   = lasso_editor_get_option( 'article_class', 'lasso_editor' );
105 105
 		$featImgClass    = lasso_editor_get_option( 'featimg_class', 'lasso_editor' );
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 		$edit_post_disabled  = lasso_editor_get_option( 'post_edit_disabled', 'lasso_editor' );
111 111
 		$post_settings_disabled = lasso_editor_get_option( 'post_settings_disabled', 'lasso_editor' );
112 112
 		$allow_change_date = lasso_editor_get_option( 'allow_change_date', 'lasso_editor' );
113
-        $allow_edit_excerpt = lasso_editor_get_option( 'allow_edit_excerpt', 'lasso_editor' );
113
+		$allow_edit_excerpt = lasso_editor_get_option( 'allow_edit_excerpt', 'lasso_editor' );
114 114
 		$allow_new_category = lasso_editor_get_option( 'allow_new_category', 'lasso_editor' );
115 115
 		$shortcodify_disabled  = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
116 116
 		$enable_autosave  = lasso_editor_get_option( 'enable_autosave', 'lasso_editor' );
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 		$toolbar_show_color      = lasso_editor_get_option( 'toolbar_show_color', 'lasso_editor' );
123 123
 		$toolbar_show_alignment  = lasso_editor_get_option( 'toolbar_show_alignment', 'lasso_editor' );
124 124
         
125
-        $text_select_popup = lasso_editor_get_option('text_select_popup', 'lasso_editor', false);
125
+		$text_select_popup = lasso_editor_get_option('text_select_popup', 'lasso_editor', false);
126 126
 		
127 127
 		$objectsNoSave  	= lasso_editor_get_option('dont_save', 'lasso_editor');
128 128
 		$objectsNonEditable  	= lasso_editor_get_option('non_editable', 'lasso_editor');
@@ -137,8 +137,8 @@  discard block
 block discarded – undo
137 137
 		$bold_tag = lasso_editor_get_option( 'bold_tag', 'lasso_editor',  "b");
138 138
 		$i_tag = lasso_editor_get_option( 'i_tag', 'lasso_editor',  "i");
139 139
         
140
-        $add_table = lasso_editor_get_option('add_table', 'lasso_editor', false);
141
-        $add_paragraph = lasso_editor_get_option('add_paragraph', 'lasso_editor', false);
140
+		$add_table = lasso_editor_get_option('add_table', 'lasso_editor', false);
141
+		$add_paragraph = lasso_editor_get_option('add_paragraph', 'lasso_editor', false);
142 142
 		
143 143
 		// do we support pending status
144 144
 		$no_pending_status = lasso_editor_get_option('no_pending_status', 'lasso_editor');
@@ -150,16 +150,16 @@  discard block
 block discarded – undo
150 150
 			$insert_comp_ui = 'drag';
151 151
 		}
152 152
         
153
-        $link_prefix_http = lasso_editor_get_option('link_prefix_http', 'lasso_editor');
153
+		$link_prefix_http = lasso_editor_get_option('link_prefix_http', 'lasso_editor');
154 154
         
155
-        $use_old_wpimg = lasso_editor_get_option('use_old_wpimg', 'lasso_editor','off');
156
-        $use_wp_block_image = lasso_editor_get_option('use_wp_block_image', 'lasso_editor','off');
155
+		$use_old_wpimg = lasso_editor_get_option('use_old_wpimg', 'lasso_editor','off');
156
+		$use_wp_block_image = lasso_editor_get_option('use_wp_block_image', 'lasso_editor','off');
157 157
 		
158 158
 		$support_custom_taxonomy   = lasso_editor_get_option( 'support_custom_taxonomy', 'lasso_editor' );
159 159
         
160
-        $new_post_text    = lasso_editor_get_option( 'new_post_text', 'lasso_editor' );
160
+		$new_post_text    = lasso_editor_get_option( 'new_post_text', 'lasso_editor' );
161 161
         
162
-        $no_wrap_shortcode    = lasso_editor_get_option( 'no_wrap_shortcode', 'lasso_editor');
162
+		$no_wrap_shortcode    = lasso_editor_get_option( 'no_wrap_shortcode', 'lasso_editor');
163 163
 
164 164
 ?>
165 165
 		<div class="wrap">
Please login to merge, or discard this patch.
Spacing   +190 added lines, -190 removed lines patch added patch discarded remove patch
@@ -9,9 +9,9 @@  discard block
 block discarded – undo
9 9
 
10 10
 	function __construct() {
11 11
 
12
-		add_action( 'admin_menu',     array( $this, 'menu' ) );
13
-		add_action( 'network_admin_menu',   array( $this, 'menu' ) );
14
-		add_action( 'wp_ajax_lasso-editor-settings', array( $this, 'process_settings' ) );
12
+		add_action('admin_menu', array($this, 'menu'));
13
+		add_action('network_admin_menu', array($this, 'menu'));
14
+		add_action('wp_ajax_lasso-editor-settings', array($this, 'process_settings'));
15 15
 
16 16
 	}
17 17
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	function menu() {
24 24
 
25 25
 		// CHANGED Removed condition.
26
-		add_submenu_page( 'lasso-editor', __( 'Settings', 'lasso' ), __( 'Settings', 'lasso' ), 'manage_options', 'lasso-editor-settings', array( $this, 'settings' ) );
26
+		add_submenu_page('lasso-editor', __('Settings', 'lasso'), __('Settings', 'lasso'), 'manage_options', 'lasso-editor-settings', array($this, 'settings'));
27 27
 
28 28
 	}
29 29
 
@@ -45,26 +45,26 @@  discard block
 block discarded – undo
45 45
 	function process_settings() {
46 46
 
47 47
 		// bail out if current user isn't and administrator and they are not logged in
48
-		if ( !current_user_can( 'manage_options' ) || !is_user_logged_in() )
48
+		if (!current_user_can('manage_options') || !is_user_logged_in())
49 49
 			return;
50 50
 
51
-		if ( isset( $_POST['action'] ) && 'lasso-editor-settings' == $_POST['action'] && check_admin_referer( 'nonce', 'lasso_editor_settings' ) ) {
51
+		if (isset($_POST['action']) && 'lasso-editor-settings' == $_POST['action'] && check_admin_referer('nonce', 'lasso_editor_settings')) {
52 52
 
53
-			$options = isset( $_POST['lasso_editor'] ) ? $_POST['lasso_editor'] : false;
53
+			$options = isset($_POST['lasso_editor']) ? $_POST['lasso_editor'] : false;
54 54
 			
55 55
 			$arr = $options['allowed_post_types'];
56
-			$options = array_map( 'sanitize_text_field', $options );
57
-			$options['allowed_post_types'] = array_keys( $arr);
56
+			$options = array_map('sanitize_text_field', $options);
57
+			$options['allowed_post_types'] = array_keys($arr);
58 58
 
59 59
 			
60 60
 
61
-			if ( function_exists( 'is_multisite' ) && is_multisite() ) {
61
+			if (function_exists('is_multisite') && is_multisite()) {
62 62
 
63
-				update_site_option( 'lasso_editor', $options );
63
+				update_site_option('lasso_editor', $options);
64 64
 
65 65
 			} else {
66 66
 
67
-				update_option( 'lasso_editor', $options );
67
+				update_option('lasso_editor', $options);
68 68
 			}
69 69
 
70 70
 			wp_send_json_success();
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	}
81 81
 	
82 82
 	function create_section_for_color_picker($id, $title, $defvalue) { 
83
-		$color_value = lasso_editor_get_option( $id, 'lasso_editor',$defvalue );
83
+		$color_value = lasso_editor_get_option($id, 'lasso_editor', $defvalue);
84 84
 	 
85 85
 		echo '<div lass="lasso-editor-settings--option-inner">'."\n";
86 86
 		echo '<label>'.$title.'</label>';
@@ -95,47 +95,47 @@  discard block
 block discarded – undo
95 95
 	 */
96 96
 	function lasso_editor_settings_form() {
97 97
 
98
-		if ( !is_user_logged_in() )
98
+		if (!is_user_logged_in())
99 99
 			return;
100 100
         
101 101
         // check for lasso story engine and add a class doniting this
102
-        $ase_status = class_exists( 'Aesop_Core' ) || defined( 'LASSO_CUSTOM' ) ? 'ase-active' : 'ase-not-active';
103
-
104
-		$article_object   = lasso_editor_get_option( 'article_class', 'lasso_editor' );
105
-		$featImgClass    = lasso_editor_get_option( 'featimg_class', 'lasso_editor' );
106
-		$titleClass    = lasso_editor_get_option( 'title_class', 'lasso_editor' );
107
-
108
-		$post_new_disabled   = lasso_editor_get_option( 'post_adding_disabled', 'lasso_editor' );
109
-		$save_to_post_disabled  = lasso_editor_get_option( 'post_save_disabled', 'lasso_editor' );
110
-		$edit_post_disabled  = lasso_editor_get_option( 'post_edit_disabled', 'lasso_editor' );
111
-		$post_settings_disabled = lasso_editor_get_option( 'post_settings_disabled', 'lasso_editor' );
112
-		$allow_change_date = lasso_editor_get_option( 'allow_change_date', 'lasso_editor' );
113
-        $allow_edit_excerpt = lasso_editor_get_option( 'allow_edit_excerpt', 'lasso_editor' );
114
-		$allow_new_category = lasso_editor_get_option( 'allow_new_category', 'lasso_editor' );
115
-		$shortcodify_disabled  = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
116
-		$enable_autosave  = lasso_editor_get_option( 'enable_autosave', 'lasso_editor' );
117
-
118
-		$use_old_ui      = lasso_editor_get_option( 'use_old_ui', 'lasso_editor' );
119
-		$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
120
-		$toolbar_headings_h4      = lasso_editor_get_option( 'toolbar_headings_h4', 'lasso_editor' );
121
-		$toolbar_list      = lasso_editor_get_option( 'toolbar_list', 'lasso_editor' );
122
-		$toolbar_show_color      = lasso_editor_get_option( 'toolbar_show_color', 'lasso_editor' );
123
-		$toolbar_show_alignment  = lasso_editor_get_option( 'toolbar_show_alignment', 'lasso_editor' );
102
+        $ase_status = class_exists('Aesop_Core') || defined('LASSO_CUSTOM') ? 'ase-active' : 'ase-not-active';
103
+
104
+		$article_object   = lasso_editor_get_option('article_class', 'lasso_editor');
105
+		$featImgClass = lasso_editor_get_option('featimg_class', 'lasso_editor');
106
+		$titleClass = lasso_editor_get_option('title_class', 'lasso_editor');
107
+
108
+		$post_new_disabled   = lasso_editor_get_option('post_adding_disabled', 'lasso_editor');
109
+		$save_to_post_disabled  = lasso_editor_get_option('post_save_disabled', 'lasso_editor');
110
+		$edit_post_disabled  = lasso_editor_get_option('post_edit_disabled', 'lasso_editor');
111
+		$post_settings_disabled = lasso_editor_get_option('post_settings_disabled', 'lasso_editor');
112
+		$allow_change_date = lasso_editor_get_option('allow_change_date', 'lasso_editor');
113
+        $allow_edit_excerpt = lasso_editor_get_option('allow_edit_excerpt', 'lasso_editor');
114
+		$allow_new_category = lasso_editor_get_option('allow_new_category', 'lasso_editor');
115
+		$shortcodify_disabled = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor');
116
+		$enable_autosave = lasso_editor_get_option('enable_autosave', 'lasso_editor');
117
+
118
+		$use_old_ui = lasso_editor_get_option('use_old_ui', 'lasso_editor');
119
+		$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
120
+		$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
121
+		$toolbar_list = lasso_editor_get_option('toolbar_list', 'lasso_editor');
122
+		$toolbar_show_color      = lasso_editor_get_option('toolbar_show_color', 'lasso_editor');
123
+		$toolbar_show_alignment  = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor');
124 124
         
125 125
         $text_select_popup = lasso_editor_get_option('text_select_popup', 'lasso_editor', false);
126 126
 		
127
-		$objectsNoSave  	= lasso_editor_get_option('dont_save', 'lasso_editor');
128
-		$objectsNonEditable  	= lasso_editor_get_option('non_editable', 'lasso_editor');
127
+		$objectsNoSave = lasso_editor_get_option('dont_save', 'lasso_editor');
128
+		$objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor');
129 129
 		$disable_tour = lasso_editor_get_option('disable_tour', 'lasso_editor');
130 130
 		$show_ignored_items = lasso_editor_get_option('show_ignored_items', 'lasso_editor');
131 131
 		$save_using_rest_disabled = lasso_editor_get_option('save_using_rest_disabled', 'lasso_editor');
132 132
 		
133
-		$default_post_types = apply_filters( 'lasso_allowed_post_types', array( 'post', 'page'));
134
-		$allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor',  $default_post_types);
133
+		$default_post_types = apply_filters('lasso_allowed_post_types', array('post', 'page'));
134
+		$allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', $default_post_types);
135 135
 		
136 136
 		$links_editable = lasso_editor_get_option('links_editable', 'lasso_editor', false);
137
-		$bold_tag = lasso_editor_get_option( 'bold_tag', 'lasso_editor',  "b");
138
-		$i_tag = lasso_editor_get_option( 'i_tag', 'lasso_editor',  "i");
137
+		$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor', "b");
138
+		$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor', "i");
139 139
         
140 140
         $add_table = lasso_editor_get_option('add_table', 'lasso_editor', false);
141 141
         $add_paragraph = lasso_editor_get_option('add_paragraph', 'lasso_editor', false);
@@ -152,43 +152,43 @@  discard block
 block discarded – undo
152 152
         
153 153
         $link_prefix_http = lasso_editor_get_option('link_prefix_http', 'lasso_editor');
154 154
         
155
-        $use_old_wpimg = lasso_editor_get_option('use_old_wpimg', 'lasso_editor','off');
156
-        $use_wp_block_image = lasso_editor_get_option('use_wp_block_image', 'lasso_editor','off');
155
+        $use_old_wpimg = lasso_editor_get_option('use_old_wpimg', 'lasso_editor', 'off');
156
+        $use_wp_block_image = lasso_editor_get_option('use_wp_block_image', 'lasso_editor', 'off');
157 157
 		
158
-		$support_custom_taxonomy   = lasso_editor_get_option( 'support_custom_taxonomy', 'lasso_editor' );
158
+		$support_custom_taxonomy = lasso_editor_get_option('support_custom_taxonomy', 'lasso_editor');
159 159
         
160
-        $new_post_text    = lasso_editor_get_option( 'new_post_text', 'lasso_editor' );
160
+        $new_post_text = lasso_editor_get_option('new_post_text', 'lasso_editor');
161 161
         
162
-        $no_wrap_shortcode    = lasso_editor_get_option( 'no_wrap_shortcode', 'lasso_editor');
162
+        $no_wrap_shortcode = lasso_editor_get_option('no_wrap_shortcode', 'lasso_editor');
163 163
 
164 164
 ?>
165 165
 		<div class="wrap">
166 166
         
167
-	    	<h2><?php _e( 'Editus Settings', 'lasso' );?></h2>
167
+	    	<h2><?php _e('Editus Settings', 'lasso'); ?></h2>
168 168
             
169 169
 			<form id="lasso-editor-settings-form" class="lasso--form-settings" method="post" enctype="multipart/form-data">
170 170
 
171
-				<?php do_action('lasso_settings_before');?>
171
+				<?php do_action('lasso_settings_before'); ?>
172 172
 				
173 173
 				
174 174
 				
175
-				<h3><?php _e( 'Enable for:', 'lasso' );?></h3>
175
+				<h3><?php _e('Enable for:', 'lasso'); ?></h3>
176 176
 				<div class="lasso-editor-settings--option-wrap">
177 177
 					<div class="lasso-editor-settings--option-inner">
178 178
 						
179
-						<span class="lasso--setting-description"><?php _e( 'Enable Editus for the following post types.', 'lasso' );?></span>
179
+						<span class="lasso--setting-description"><?php _e('Enable Editus for the following post types.', 'lasso'); ?></span>
180 180
 						<?php
181 181
 						$args = array(
182 182
 							'public'   => true
183 183
 						);
184 184
 						 
185
-						$allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
186
-						$post_types = get_post_types( $args, 'objects' );
185
+						$allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
186
+						$post_types = get_post_types($args, 'objects');
187 187
 						 
188
-						foreach ( $post_types  as $post_type ) {
188
+						foreach ($post_types  as $post_type) {
189 189
 						   if ($post_type->name == 'attachment') continue;
190
-						   $checked ="";
191
-						   if (  in_array( $post_type->name, $allowed_post_types )  ) {
190
+						   $checked = "";
191
+						   if (in_array($post_type->name, $allowed_post_types)) {
192 192
 								$checked = 'checked="checked"';
193 193
 						   }
194 194
 						   echo '<label><input type="checkbox" '.$checked.' name="lasso_editor[allowed_post_types]['.$post_type->name.']" id="lasso_editor[allowed_post_types]['.$post_type->name.']" >'.$post_type->name.'</label>';
@@ -198,140 +198,140 @@  discard block
 block discarded – undo
198 198
 				</div>
199 199
 				
200 200
 
201
-				<h3><?php _e( 'Internal Settings', 'lasso' );?></h3>
201
+				<h3><?php _e('Internal Settings', 'lasso'); ?></h3>
202 202
 				<div class="lasso-editor-settings--option-wrap">
203 203
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
204
-						<label><?php _e( 'Article Class', 'lasso' );?></label>
205
-						<span class="lasso--setting-description"><?php _e( 'Provide the CSS class (including the preceding dot) of container that holds the post. This should be the first parent container class that holds the_content.', 'lasso' );?></span>
206
-						<input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr( $article_object );?>" placeholder=".entry-content">
204
+						<label><?php _e('Article Class', 'lasso'); ?></label>
205
+						<span class="lasso--setting-description"><?php _e('Provide the CSS class (including the preceding dot) of container that holds the post. This should be the first parent container class that holds the_content.', 'lasso'); ?></span>
206
+						<input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr($article_object); ?>" placeholder=".entry-content">
207 207
 					</div>
208 208
 				
209 209
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
210
-						<label><?php _e( 'Featured Image Class', 'lasso' );?></label>
211
-						<span class="lasso--setting-description"><?php _e( 'Provide the CSS class that uses a featured image as a background image. This currently only supports themes that have the featured image set as background image.', 'lasso' );?></span>
212
-						<input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr( $featImgClass );?>" placeholder=".entry-content">
210
+						<label><?php _e('Featured Image Class', 'lasso'); ?></label>
211
+						<span class="lasso--setting-description"><?php _e('Provide the CSS class that uses a featured image as a background image. This currently only supports themes that have the featured image set as background image.', 'lasso'); ?></span>
212
+						<input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr($featImgClass); ?>" placeholder=".entry-content">
213 213
 					</div>
214 214
 				
215 215
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
216
-						<label><?php _e( 'Article Title Class', 'lasso' );?></label>
217
-						<span class="lasso--setting-description"><?php _e( 'Provide the CSS class for the post title. This will enable you to update the title of the post by clicking and typing.', 'lasso' );?></span>
218
-						<input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr( $titleClass );?>" placeholder=".entry-content">
216
+						<label><?php _e('Article Title Class', 'lasso'); ?></label>
217
+						<span class="lasso--setting-description"><?php _e('Provide the CSS class for the post title. This will enable you to update the title of the post by clicking and typing.', 'lasso'); ?></span>
218
+						<input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr($titleClass); ?>" placeholder=".entry-content">
219 219
 					</div>
220 220
 				
221 221
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
222
-						<label><?php _e( 'Ignored Items to Save', 'lasso' );?></label>
223
-						<span class="lasso--setting-description"><?php _e( 'If your post container holds additional markup, list the css class names (comma separated, including the dot) of those items. When you enter the editor, Editus will remove (NOT delete) these items so that it does not save them as HTML.', 'lasso' );?></span>
224
-						<textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNoSave );?></textarea>
222
+						<label><?php _e('Ignored Items to Save', 'lasso'); ?></label>
223
+						<span class="lasso--setting-description"><?php _e('If your post container holds additional markup, list the css class names (comma separated, including the dot) of those items. When you enter the editor, Editus will remove (NOT delete) these items so that it does not save them as HTML.', 'lasso'); ?></span>
224
+						<textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNoSave); ?></textarea>
225 225
 					</div>
226 226
 				
227 227
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
228
-						<label><?php _e( 'Read Only Items', 'lasso' );?></label>
229
-						<span class="lasso--setting-description"><?php _e( 'If your post has items that should not be editable, list the css class names (comma separated, including the dot) of those items.', 'lasso' );?></span>
230
-						<textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNonEditable );?></textarea>
228
+						<label><?php _e('Read Only Items', 'lasso'); ?></label>
229
+						<span class="lasso--setting-description"><?php _e('If your post has items that should not be editable, list the css class names (comma separated, including the dot) of those items.', 'lasso'); ?></span>
230
+						<textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNonEditable); ?></textarea>
231 231
 					</div>
232 232
 				
233 233
 					<div class="lasso-editor-settings--option-inner" >
234
-						<input type="checkbox" class="checkbox" name="lasso_editor[show_ignored_items]" id="lasso_editor[show_ignored_items]" <?php echo checked( $show_ignored_items, 'on' );?> >
235
-						<label for="lasso_editor[show_ignored_items]"> <?php _e( 'Show Ignored Items', 'lasso' );?></label>
236
-						<span class="lasso--setting-description"><?php _e( 'By default the ignored items are hidden. Check this to show ignored items while keeping them uneditable.', 'lasso' );?></span>
234
+						<input type="checkbox" class="checkbox" name="lasso_editor[show_ignored_items]" id="lasso_editor[show_ignored_items]" <?php echo checked($show_ignored_items, 'on'); ?> >
235
+						<label for="lasso_editor[show_ignored_items]"> <?php _e('Show Ignored Items', 'lasso'); ?></label>
236
+						<span class="lasso--setting-description"><?php _e('By default the ignored items are hidden. Check this to show ignored items while keeping them uneditable.', 'lasso'); ?></span>
237 237
 					</div>
238 238
 				</div>
239 239
 
240
-				<h3><?php _e( 'Editor UI', 'lasso' );?></h3>
240
+				<h3><?php _e('Editor UI', 'lasso'); ?></h3>
241 241
 				<div class="lasso-editor-settings--option-wrap">
242 242
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
243
-						<input type="checkbox" class="checkbox" name="lasso_editor[use_old_ui]" id="lasso_editor_use_old_ui" <?php echo checked( $use_old_ui, 'on' );?> >
244
-						<label for="lasso_editor[use_old_ui]"><?php _e( 'Use the Old Toolbar', 'lasso' );?></label>
245
-						<span class="lasso--setting-description"><?php _e( 'Use this option to disable the new color options and use the pre-1.0 toolbar.', 'lasso' );?></span>
243
+						<input type="checkbox" class="checkbox" name="lasso_editor[use_old_ui]" id="lasso_editor_use_old_ui" <?php echo checked($use_old_ui, 'on'); ?> >
244
+						<label for="lasso_editor[use_old_ui]"><?php _e('Use the Old Toolbar', 'lasso'); ?></label>
245
+						<span class="lasso--setting-description"><?php _e('Use this option to disable the new color options and use the pre-1.0 toolbar.', 'lasso'); ?></span>
246 246
 					</div>
247 247
 				    <div id="lasso-editor-settings--colors">
248 248
 					<?php
249
-					self::create_section_for_color_picker('button-color1', _e( 'Editor Bar Color Top', 'lasso' ), '#0000ff');
250
-					self::create_section_for_color_picker('button-color2', _e( 'Editor Bar Color Bottom', 'lasso' ), '#000030');
251
-					self::create_section_for_color_picker('dialog-color', _e( 'Dialog Color', 'lasso' ), '#000055');
252
-					self::create_section_for_color_picker('text-color', _e( 'Icon/Text Color', 'lasso' ), '#ffffff');
249
+					self::create_section_for_color_picker('button-color1', _e('Editor Bar Color Top', 'lasso'), '#0000ff');
250
+					self::create_section_for_color_picker('button-color2', _e('Editor Bar Color Bottom', 'lasso'), '#000030');
251
+					self::create_section_for_color_picker('dialog-color', _e('Dialog Color', 'lasso'), '#000055');
252
+					self::create_section_for_color_picker('text-color', _e('Icon/Text Color', 'lasso'), '#ffffff');
253 253
 					?>
254
-					<button type="button" id="lasso-editor-settings--default-colors" ><?php _e( 'Default Colors', 'lasso' );?></button>
254
+					<button type="button" id="lasso-editor-settings--default-colors" ><?php _e('Default Colors', 'lasso'); ?></button>
255 255
 				    <div style="height:50px;"></div>
256 256
 					</div>
257 257
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
258
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked( $toolbar_headings, 'on' );?> >
259
-						<label for="lasso_editor[toolbar_headings]"><?php _e( 'Enable H2 and H3 Buttons', 'lasso' );?></label>
260
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set H2 and H3 settings.', 'lasso' );?></span>
258
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked($toolbar_headings, 'on'); ?> >
259
+						<label for="lasso_editor[toolbar_headings]"><?php _e('Enable H2 and H3 Buttons', 'lasso'); ?></label>
260
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set H2 and H3 settings.', 'lasso'); ?></span>
261 261
 
262 262
 					</div>
263 263
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
264
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings_h4]" id="lasso_editor[toolbar_headings_h4]" <?php echo checked( $toolbar_headings_h4, 'on' );?> >
265
-						<label for="lasso_editor[toolbar_headings_h4]"><?php _e( 'Enable H4/H5/H6 Buttons', 'lasso' );?></label>
266
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set H4/H5/H6 settings.', 'lasso' );?></span>
264
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings_h4]" id="lasso_editor[toolbar_headings_h4]" <?php echo checked($toolbar_headings_h4, 'on'); ?> >
265
+						<label for="lasso_editor[toolbar_headings_h4]"><?php _e('Enable H4/H5/H6 Buttons', 'lasso'); ?></label>
266
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set H4/H5/H6 settings.', 'lasso'); ?></span>
267 267
 
268 268
 					</div>
269 269
 					
270 270
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
271
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_list]" id="lasso_editor[toolbar_list]" <?php echo checked( $toolbar_list, 'on' );?> >
272
-						<label for="lasso_editor[toolbar_list]"><?php _e( 'Enable OL/UL Buttons', 'lasso' );?></label>
273
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to create Ordered and Unordered Lists from text selection.', 'lasso' );?></span>
271
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_list]" id="lasso_editor[toolbar_list]" <?php echo checked($toolbar_list, 'on'); ?> >
272
+						<label for="lasso_editor[toolbar_list]"><?php _e('Enable OL/UL Buttons', 'lasso'); ?></label>
273
+						<span class="lasso--setting-description"><?php _e('Show the buttons to create Ordered and Unordered Lists from text selection.', 'lasso'); ?></span>
274 274
 					</div>
275 275
 					
276 276
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
277
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked( $toolbar_show_color, 'on' );?> >
278
-						<label for="lasso_editor[toolbar_show_color]"><?php _e( 'Enable Text Color Buttons', 'lasso' );?></label>
279
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set text colors.', 'lasso' );?></span>
277
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked($toolbar_show_color, 'on'); ?> >
278
+						<label for="lasso_editor[toolbar_show_color]"><?php _e('Enable Text Color Buttons', 'lasso'); ?></label>
279
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set text colors.', 'lasso'); ?></span>
280 280
 
281 281
 					</div>
282 282
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
283
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked( $toolbar_show_alignment, 'on' );?> >
284
-						<label for="lasso_editor[toolbar_show_alignment]"><?php _e( 'Enable Text Align Buttons', 'lasso' );?></label>
285
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set text alignment.', 'lasso' );?></span>
283
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked($toolbar_show_alignment, 'on'); ?> >
284
+						<label for="lasso_editor[toolbar_show_alignment]"><?php _e('Enable Text Align Buttons', 'lasso'); ?></label>
285
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set text alignment.', 'lasso'); ?></span>
286 286
 
287 287
 					</div>
288 288
 					
289 289
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
290
-						<input type="checkbox" class="checkbox" name="lasso_editor[links_editable]" id="lasso_editor[links_editable]" <?php echo checked( $links_editable, 'on' );?> >
291
-						<label for="lasso_editor[links_editable]"><?php _e( 'Make links editable under the Editing Mode', 'lasso' );?></label>
292
-						<span class="lasso--setting-description"><?php _e( 'Make links editable under the Editing Mode. Turning this on will make the links non-clickable while editing.', 'lasso' );?></span>
290
+						<input type="checkbox" class="checkbox" name="lasso_editor[links_editable]" id="lasso_editor[links_editable]" <?php echo checked($links_editable, 'on'); ?> >
291
+						<label for="lasso_editor[links_editable]"><?php _e('Make links editable under the Editing Mode', 'lasso'); ?></label>
292
+						<span class="lasso--setting-description"><?php _e('Make links editable under the Editing Mode. Turning this on will make the links non-clickable while editing.', 'lasso'); ?></span>
293 293
 
294 294
 					</div>
295 295
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
296
-					    <label for="lasso_editor[insert_comp_ui]"> <?php _e( 'Insert Component UI', 'lasso' );?></label>
297
-						<span class="lasso--setting-description"><?php _e( 'UI mechanism to insert components', 'lasso' );?></span>
296
+					    <label for="lasso_editor[insert_comp_ui]"> <?php _e('Insert Component UI', 'lasso'); ?></label>
297
+						<span class="lasso--setting-description"><?php _e('UI mechanism to insert components', 'lasso'); ?></span>
298 298
 						<div class="lasso-editor-settings--option-inner" style="border:none;">
299
-					       <input type="radio" name="lasso_editor[insert_comp_ui]" value='drag' <?php echo checked( $insert_comp_ui, 'drag' );?>> <?php _e( 'Drag and Drop', 'lasso' );?>
299
+					       <input type="radio" name="lasso_editor[insert_comp_ui]" value='drag' <?php echo checked($insert_comp_ui, 'drag'); ?>> <?php _e('Drag and Drop', 'lasso'); ?>
300 300
 						</div>
301 301
 						<div class="lasso-editor-settings--option-inner" style="border:none;">
302
-						<input type="radio" name="lasso_editor[insert_comp_ui]" value="click" <?php echo checked( $insert_comp_ui, 'click' );?>> <?php _e( 'Click', 'lasso' );?>
302
+						<input type="radio" name="lasso_editor[insert_comp_ui]" value="click" <?php echo checked($insert_comp_ui, 'click'); ?>> <?php _e('Click', 'lasso'); ?>
303 303
 						</div>
304 304
 						<div class="lasso-editor-settings--option-inner" style="border:none;">
305
-						<input type="radio" name="lasso_editor[insert_comp_ui]" value="mediumcom" <?php echo checked( $insert_comp_ui, 'mediumcom' );?>> <?php _e( 'Auto Button on Empty Paragraph. medium.com-like UI.', 'lasso' );?>
305
+						<input type="radio" name="lasso_editor[insert_comp_ui]" value="mediumcom" <?php echo checked($insert_comp_ui, 'mediumcom'); ?>> <?php _e('Auto Button on Empty Paragraph. medium.com-like UI.', 'lasso'); ?>
306 306
 						</div>
307 307
 					</div>
308 308
                     
309 309
                     <div class="lasso-editor-settings--option-inner" >
310
-						<input type="checkbox" class="checkbox" name="lasso_editor[text_select_popup]" id="lasso_editor[text_select_popup]" <?php echo checked( $text_select_popup, 'on' );?> >
311
-						<label for="lasso_editor[text_select_popup]"><?php _e( 'Popup When Text is Selected', 'lasso' );?></label>
312
-						<span class="lasso--setting-description"><?php _e( 'Instead of using the bottom toolbar to format texts, use a popup box to format texts.', 'lasso' );?></span>
310
+						<input type="checkbox" class="checkbox" name="lasso_editor[text_select_popup]" id="lasso_editor[text_select_popup]" <?php echo checked($text_select_popup, 'on'); ?> >
311
+						<label for="lasso_editor[text_select_popup]"><?php _e('Popup When Text is Selected', 'lasso'); ?></label>
312
+						<span class="lasso--setting-description"><?php _e('Instead of using the bottom toolbar to format texts, use a popup box to format texts.', 'lasso'); ?></span>
313 313
 
314 314
 					</div>
315 315
                     
316 316
 				</div>
317 317
 				
318
-				<h3><?php _e( 'Component', 'lasso' );?></h3>
318
+				<h3><?php _e('Component', 'lasso'); ?></h3>
319 319
                 <div class="lasso-editor-settings--option-wrap" style="border:none;" >
320 320
                     <div class="lasso-editor-settings--option-inner" style="border:none">
321
-						<input type="checkbox" class="checkbox" name="lasso_editor[add_table]" id="lasso_editor[add_table]" <?php echo checked( $add_table, 'on' );?> >
322
-						<label for="lasso_editor[add_table]"><span class="dashicons dashicons-grid-view"> </span> <?php _e( 'Additional Component: Table', 'lasso' );?></label>
323
-						<span class="lasso--setting-description"><?php _e( 'Allow user to add and edit tables.', 'lasso' );?></span>
321
+						<input type="checkbox" class="checkbox" name="lasso_editor[add_table]" id="lasso_editor[add_table]" <?php echo checked($add_table, 'on'); ?> >
322
+						<label for="lasso_editor[add_table]"><span class="dashicons dashicons-grid-view"> </span> <?php _e('Additional Component: Table', 'lasso'); ?></label>
323
+						<span class="lasso--setting-description"><?php _e('Allow user to add and edit tables.', 'lasso'); ?></span>
324 324
 
325 325
 					</div>
326 326
                     
327 327
                      <div class="lasso-editor-settings--option-inner" style="border:none">
328
-						<input type="checkbox" class="checkbox" name="lasso_editor[add_paragraph]" id="lasso_editor[add_paragraph]" <?php echo checked( $add_paragraph, 'on' );?> >
329
-						<label for="lasso_editor[add_paragraph]"><span class="dashicons dashicons-editor-paragraph"></span><?php _e( 'Additional Component: Paragraph', 'lasso' );?></label>
330
-						<span class="lasso--setting-description"><?php _e( 'Plain HTML Paragraph.', 'lasso' );?></span>
328
+						<input type="checkbox" class="checkbox" name="lasso_editor[add_paragraph]" id="lasso_editor[add_paragraph]" <?php echo checked($add_paragraph, 'on'); ?> >
329
+						<label for="lasso_editor[add_paragraph]"><span class="dashicons dashicons-editor-paragraph"></span><?php _e('Additional Component: Paragraph', 'lasso'); ?></label>
330
+						<span class="lasso--setting-description"><?php _e('Plain HTML Paragraph.', 'lasso'); ?></span>
331 331
 
332 332
 					</div>
333 333
                 
334
-                <?php if ( 'ase-active' != $ase_status ) { ?>
334
+                <?php if ('ase-active' != $ase_status) { ?>
335 335
                     <script>
336 336
                     $(document).ready(function(){
337 337
                         $("#lasso_editor\\[use_old_wpimg\\]").on('change', function(){                        
@@ -357,150 +357,150 @@  discard block
 block discarded – undo
357 357
                     </script>
358 358
                 
359 359
                     <div class="lasso-editor-settings--option-inner" style="border:none">
360
-						<input type="checkbox" class="checkbox" name="lasso_editor[use_old_wpimg]" id="lasso_editor[use_old_wpimg]" <?php echo checked( $use_old_wpimg, 'on' );?> >
361
-						<label for="lasso_editor[use_old_wpimg]"><?php _e( 'Use Simple Image', 'lasso' );?></label>
362
-						<span class="lasso--setting-description"><?php _e( 'Use Simple Image Component without Extra Options.', 'lasso' );?></span>
360
+						<input type="checkbox" class="checkbox" name="lasso_editor[use_old_wpimg]" id="lasso_editor[use_old_wpimg]" <?php echo checked($use_old_wpimg, 'on'); ?> >
361
+						<label for="lasso_editor[use_old_wpimg]"><?php _e('Use Simple Image', 'lasso'); ?></label>
362
+						<span class="lasso--setting-description"><?php _e('Use Simple Image Component without Extra Options.', 'lasso'); ?></span>
363 363
 
364 364
 					</div>
365 365
                 
366 366
                 
367 367
                     <div class="lasso-editor-settings--option-inner">
368
-						<input type="checkbox" class="checkbox" name="lasso_editor[use_wp_block_image]" id="lasso_editor[use_wp_block_image]" <?php echo checked( $use_wp_block_image, 'on' );?> >
369
-						<label for="lasso_editor[use_wp_block_image]"><?php _e( 'Use WP Image Block', 'lasso' );?></label>
370
-						<span class="lasso--setting-description"><?php _e( 'Use WP Image Block as the image component. Gutenberg Block Editor needs to be enabled.', 'lasso' );?></span>
368
+						<input type="checkbox" class="checkbox" name="lasso_editor[use_wp_block_image]" id="lasso_editor[use_wp_block_image]" <?php echo checked($use_wp_block_image, 'on'); ?> >
369
+						<label for="lasso_editor[use_wp_block_image]"><?php _e('Use WP Image Block', 'lasso'); ?></label>
370
+						<span class="lasso--setting-description"><?php _e('Use WP Image Block as the image component. Gutenberg Block Editor needs to be enabled.', 'lasso'); ?></span>
371 371
 
372 372
 					</div>
373 373
                 <?php }?>
374 374
                 </div>
375 375
 				
376 376
 
377
-				<h3><?php _e( 'Post Settings UI', 'lasso' );?></h3>
377
+				<h3><?php _e('Post Settings UI', 'lasso'); ?></h3>
378 378
 				<div class="lasso-editor-settings--option-wrap"  >
379 379
 					<div class="lasso-editor-settings--option-inner" style="border:none">
380
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked( $post_settings_disabled, 'on' );?> >
381
-						<label for="lasso_editor[post_settings_disabled]"> <?php _e( 'Disable Post Settings', 'lasso' );?></label>
382
-						<span class="lasso--setting-description"><?php _e( 'Check this to disable users from being able to edit post settings from the front-end.', 'lasso' );?></span>
380
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked($post_settings_disabled, 'on'); ?> >
381
+						<label for="lasso_editor[post_settings_disabled]"> <?php _e('Disable Post Settings', 'lasso'); ?></label>
382
+						<span class="lasso--setting-description"><?php _e('Check this to disable users from being able to edit post settings from the front-end.', 'lasso'); ?></span>
383 383
 					</div>
384 384
 					
385 385
 					<div class="lasso-editor-settings--option-inner" style="border:none">
386
-						<input type="checkbox" class="checkbox" name="lasso_editor[allow_change_date]" id="lasso_editor[allow_change_date]" <?php echo checked( $allow_change_date, 'on' );?> >
387
-						<label for="lasso_editor[allow_change_date]"> <?php _e( 'Allow Changing Post Date', 'lasso' );?></label>
388
-						<span class="lasso--setting-description"><?php _e( 'Add the date selector to change the post\'s date to the Post Setting dialog', 'lasso' );?></span>
386
+						<input type="checkbox" class="checkbox" name="lasso_editor[allow_change_date]" id="lasso_editor[allow_change_date]" <?php echo checked($allow_change_date, 'on'); ?> >
387
+						<label for="lasso_editor[allow_change_date]"> <?php _e('Allow Changing Post Date', 'lasso'); ?></label>
388
+						<span class="lasso--setting-description"><?php _e('Add the date selector to change the post\'s date to the Post Setting dialog', 'lasso'); ?></span>
389 389
 					</div>
390 390
                     
391 391
                     <div class="lasso-editor-settings--option-inner" style="border:none">
392
-						<input type="checkbox" class="checkbox" name="lasso_editor[allow_edit_excerpt]" id="lasso_editor[allow_edit_excerpt]" <?php echo checked( $allow_edit_excerpt, 'on' );?> >
393
-						<label for="lasso_editor[allow_edit_excerpt]"> <?php _e( 'Allow Editing Excerpt', 'lasso' );?></label>
394
-						<span class="lasso--setting-description"><?php _e( 'Allow the post\'s excerpt to be edited in the Post Setting dialog', 'lasso' );?></span>
392
+						<input type="checkbox" class="checkbox" name="lasso_editor[allow_edit_excerpt]" id="lasso_editor[allow_edit_excerpt]" <?php echo checked($allow_edit_excerpt, 'on'); ?> >
393
+						<label for="lasso_editor[allow_edit_excerpt]"> <?php _e('Allow Editing Excerpt', 'lasso'); ?></label>
394
+						<span class="lasso--setting-description"><?php _e('Allow the post\'s excerpt to be edited in the Post Setting dialog', 'lasso'); ?></span>
395 395
 					</div>
396 396
 					
397 397
 					<div class="lasso-editor-settings--option-inner" style="border:none">
398
-						<input type="checkbox" class="checkbox" name="lasso_editor[allow_new_category]" id="lasso_editor[allow_new_category]" <?php echo checked( $allow_new_category, 'on' );?> >
399
-						<label for="lasso_editor[allow_new_category]"> <?php _e( 'Allow Adding New Category', 'lasso' );?></label>
400
-						<span class="lasso--setting-description"><?php _e( 'Add the user to create new, previously non-existing categories for posts.', 'lasso' );?></span>
398
+						<input type="checkbox" class="checkbox" name="lasso_editor[allow_new_category]" id="lasso_editor[allow_new_category]" <?php echo checked($allow_new_category, 'on'); ?> >
399
+						<label for="lasso_editor[allow_new_category]"> <?php _e('Allow Adding New Category', 'lasso'); ?></label>
400
+						<span class="lasso--setting-description"><?php _e('Add the user to create new, previously non-existing categories for posts.', 'lasso'); ?></span>
401 401
 					</div>
402 402
 					
403 403
 					<div class="lasso-editor-settings--option-inner" style="border:none">
404
-						<input type="checkbox" class="checkbox" name="lasso_editor[no_pending_status]" id="lasso_editor[no_pending_status]" <?php echo checked( $no_pending_status, 'on' );?> >
405
-						<label for="lasso_editor[no_pending_status]"> <?php _e( 'Do Not Allow "Pending" Status', 'lasso' );?></label>
406
-						<span class="lasso--setting-description"><?php _e( 'Remove the Option to Set the Status to Pending.', 'lasso' );?></span>
404
+						<input type="checkbox" class="checkbox" name="lasso_editor[no_pending_status]" id="lasso_editor[no_pending_status]" <?php echo checked($no_pending_status, 'on'); ?> >
405
+						<label for="lasso_editor[no_pending_status]"> <?php _e('Do Not Allow "Pending" Status', 'lasso'); ?></label>
406
+						<span class="lasso--setting-description"><?php _e('Remove the Option to Set the Status to Pending.', 'lasso'); ?></span>
407 407
 					</div>
408 408
 					
409 409
 					<div class="lasso-editor-settings--option-inner" style="border:none">
410
-						<input type="checkbox" class="checkbox" name="lasso_editor[no_url_setting]" id="lasso_editor[no_slug_setting]" <?php echo checked( $no_url_setting, 'on' );?> >
411
-						<label for="lasso_editor[no_url_setting]"> <?php _e( 'Remove POST URL Option', 'lasso' );?></label>
412
-						<span class="lasso--setting-description"><?php _e( 'Remove the Option to Set the URL for the Post.', 'lasso' );?></span>
410
+						<input type="checkbox" class="checkbox" name="lasso_editor[no_url_setting]" id="lasso_editor[no_slug_setting]" <?php echo checked($no_url_setting, 'on'); ?> >
411
+						<label for="lasso_editor[no_url_setting]"> <?php _e('Remove POST URL Option', 'lasso'); ?></label>
412
+						<span class="lasso--setting-description"><?php _e('Remove the Option to Set the URL for the Post.', 'lasso'); ?></span>
413 413
 					</div>
414 414
 				
415 415
 					<div class="lasso-editor-settings--option-inner" style="border:none">
416
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked( $post_new_disabled, 'on' );?> >
417
-						<label for="lasso_editor[post_adding_disabled]"><?php _e( 'Disable Post Adding', 'lasso' );?></label>
418
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable users from being able to add new posts from the front-end.', 'lasso' );?></span>
416
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked($post_new_disabled, 'on'); ?> >
417
+						<label for="lasso_editor[post_adding_disabled]"><?php _e('Disable Post Adding', 'lasso'); ?></label>
418
+						<span class="lasso--setting-description"><?php _e('Check this box to disable users from being able to add new posts from the front-end.', 'lasso'); ?></span>
419 419
 					</div>
420 420
 					
421 421
 					<div class="lasso-editor-settings--option-inner" >
422
-						<input type="checkbox" class="checkbox" name="lasso_editor[support_custom_taxonomy]" id="lasso_editor[support_custom_taxonomy]" <?php echo checked( $support_custom_taxonomy, 'on' );?> >
423
-						<label for="lasso_editor[support_custom_taxonomy]"><?php _e( 'Support Custom Taxonomy', 'lasso' );?></label>
424
-						<span class="lasso--setting-description"><?php _e( 'Allow editing custom taxonomies.', 'lasso' );?></span>
422
+						<input type="checkbox" class="checkbox" name="lasso_editor[support_custom_taxonomy]" id="lasso_editor[support_custom_taxonomy]" <?php echo checked($support_custom_taxonomy, 'on'); ?> >
423
+						<label for="lasso_editor[support_custom_taxonomy]"><?php _e('Support Custom Taxonomy', 'lasso'); ?></label>
424
+						<span class="lasso--setting-description"><?php _e('Allow editing custom taxonomies.', 'lasso'); ?></span>
425 425
 					</div>
426 426
 					
427 427
 
428 428
 				</div>
429 429
 				
430
-				<h3><?php _e( 'Misc', 'lasso' );?></h3>
430
+				<h3><?php _e('Misc', 'lasso'); ?></h3>
431 431
 				<div class="lasso-editor-settings--option-wrap">
432 432
 					<div class="lasso-editor-settings--option-inner" style="border:none">
433
-						<input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked( $disable_tour, 'on' );?> >
434
-						<label for="lasso_editor[disable_tour]"> <?php _e( 'Do Not Show Tour Dialog', 'lasso' );?></label>
435
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable the tour dialog box for all users.', 'lasso' );?></span>
433
+						<input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked($disable_tour, 'on'); ?> >
434
+						<label for="lasso_editor[disable_tour]"> <?php _e('Do Not Show Tour Dialog', 'lasso'); ?></label>
435
+						<span class="lasso--setting-description"><?php _e('Check this box to disable the tour dialog box for all users.', 'lasso'); ?></span>
436 436
 					</div>
437 437
                     
438 438
                     <div class="lasso-editor-settings--option-inner" style="border:none;">
439
-						<label><?php _e( 'Placeholder Text for New Post', 'lasso' );?></label>
440
-						<span class="lasso--setting-description"><?php _e( 'Placeholder text to be displayed when a new post is created.', 'lasso' );?></span>
441
-						<input type="text" name="lasso_editor[new_post_text]" id="lasso_editor[new_post_text]" value="<?php echo esc_attr( $new_post_text );?>" placeholder="<?php $def = wp_strip_all_tags(apply_filters( 'lasso_new_object_content', __( 'Once upon a time...','lasso')));echo $def;?>", true)>
439
+						<label><?php _e('Placeholder Text for New Post', 'lasso'); ?></label>
440
+						<span class="lasso--setting-description"><?php _e('Placeholder text to be displayed when a new post is created.', 'lasso'); ?></span>
441
+						<input type="text" name="lasso_editor[new_post_text]" id="lasso_editor[new_post_text]" value="<?php echo esc_attr($new_post_text); ?>" placeholder="<?php $def = wp_strip_all_tags(apply_filters('lasso_new_object_content', __('Once upon a time...', 'lasso'))); echo $def; ?>", true)>
442 442
 					</div>
443 443
 
444 444
 					<div class="lasso-editor-settings--option-inner" style="border:none">
445
-					    <label for="lasso_editor[bold_tag]"> <?php _e( '"Bold" Tag', 'lasso' );?></label>
446
-						<span class="lasso--setting-description"><?php _e( 'Choose the HTML tag used for the "Bold" style.', 'lasso' );?></span>
447
-					    <input type="radio" name="lasso_editor[bold_tag]" value='b' <?php echo checked( $bold_tag, 'b' );?>> b
448
-						<input type="radio" name="lasso_editor[bold_tag]" value="strong" <?php echo checked( $bold_tag, 'strong' );?>> strong
445
+					    <label for="lasso_editor[bold_tag]"> <?php _e('"Bold" Tag', 'lasso'); ?></label>
446
+						<span class="lasso--setting-description"><?php _e('Choose the HTML tag used for the "Bold" style.', 'lasso'); ?></span>
447
+					    <input type="radio" name="lasso_editor[bold_tag]" value='b' <?php echo checked($bold_tag, 'b'); ?>> b
448
+						<input type="radio" name="lasso_editor[bold_tag]" value="strong" <?php echo checked($bold_tag, 'strong'); ?>> strong
449 449
 					</div>
450 450
 					<div class="lasso-editor-settings--option-inner" style="border:none">
451
-					    <label for="lasso_editor[i_tag]"> <?php _e( '"Italic" Tag', 'lasso' );?></label>
452
-						<span class="lasso--setting-description"><?php _e( 'Choose the HTML tag used for the "Italic" style.', 'lasso' );?></span>
453
-					    <input type="radio" name="lasso_editor[i_tag]" value='i' <?php echo checked( $i_tag, 'i' );?>> i
454
-						<input type="radio" name="lasso_editor[i_tag]" value="em" <?php echo checked( $i_tag, 'em' );?>> em
451
+					    <label for="lasso_editor[i_tag]"> <?php _e('"Italic" Tag', 'lasso'); ?></label>
452
+						<span class="lasso--setting-description"><?php _e('Choose the HTML tag used for the "Italic" style.', 'lasso'); ?></span>
453
+					    <input type="radio" name="lasso_editor[i_tag]" value='i' <?php echo checked($i_tag, 'i'); ?>> i
454
+						<input type="radio" name="lasso_editor[i_tag]" value="em" <?php echo checked($i_tag, 'em'); ?>> em
455 455
 					</div>
456 456
                     <div class="lasso-editor-settings--option-inner" >
457
-						<input type="checkbox" class="checkbox" name="lasso_editor[link_prefix_http]" id="lasso_editor[link_prefix_http]" <?php echo checked( $link_prefix_http, 'on' );?> >
458
-						<label for="lasso_editor[link_prefix_http]"><?php _e( 'Auto Prefix HTTP to links', 'lasso' );?></label>
459
-						<span class="lasso--setting-description"><?php _e( 'When user adds a hyperlink, automatically add http:// if the user does not specify it explicitly.', 'lasso' );?></span>
457
+						<input type="checkbox" class="checkbox" name="lasso_editor[link_prefix_http]" id="lasso_editor[link_prefix_http]" <?php echo checked($link_prefix_http, 'on'); ?> >
458
+						<label for="lasso_editor[link_prefix_http]"><?php _e('Auto Prefix HTTP to links', 'lasso'); ?></label>
459
+						<span class="lasso--setting-description"><?php _e('When user adds a hyperlink, automatically add http:// if the user does not specify it explicitly.', 'lasso'); ?></span>
460 460
 					</div>
461 461
 				</div>
462 462
 
463
-				<h3><?php _e( 'Advanced Options', 'lasso' );?></h3>
464
-                <span class="lasso--setting-description"><?php _e( 'Suggested not to turn these options on without consulting the developer.', 'lasso' );?></span>
463
+				<h3><?php _e('Advanced Options', 'lasso'); ?></h3>
464
+                <span class="lasso--setting-description"><?php _e('Suggested not to turn these options on without consulting the developer.', 'lasso'); ?></span>
465 465
                 <span class="lasso--setting-description"> </span>
466 466
 				<div class="lasso-editor-settings--option-wrap ">
467 467
 					<div class="lasso-editor-settings--option-inner" style="border:none">
468
-						<input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked( $shortcodify_disabled, 'on' );?> >
469
-						<label for="lasso_editor[shortcodify_disabled]"><?php _e( 'Disable Aesop Component Conversion', 'lasso' );?></label>
470
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso' );?></span>
468
+						<input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked($shortcodify_disabled, 'on'); ?> >
469
+						<label for="lasso_editor[shortcodify_disabled]"><?php _e('Disable Aesop Component Conversion', 'lasso'); ?></label>
470
+						<span class="lasso--setting-description"><?php _e('Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso'); ?></span>
471 471
 					</div>
472 472
 				
473 473
 					<div class="lasso-editor-settings--option-inner" style="border:none">
474
-						<input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked( $enable_autosave, 'on' );?> >
475
-						<label for="lasso_editor[enable_autosave]"><?php _e( 'Enable Auto Save', 'lasso' );?></label>
476
-						<span class="lasso--setting-description"><?php _e( 'Check this box to enable auto save.', 'lasso' );?></span>
474
+						<input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked($enable_autosave, 'on'); ?> >
475
+						<label for="lasso_editor[enable_autosave]"><?php _e('Enable Auto Save', 'lasso'); ?></label>
476
+						<span class="lasso--setting-description"><?php _e('Check this box to enable auto save.', 'lasso'); ?></span>
477 477
 					</div>
478 478
 				
479 479
 					<div class="lasso-editor-settings--option-inner" style="border:none">
480
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_save_disabled]" id="lasso_editor[post_save_disabled]" <?php echo checked( $save_to_post_disabled, 'on' );?> >
481
-						<label for="lasso_editor[post_save_disabled]"><?php _e( 'Disable Post Saving', 'lasso' );?></label>
482
-						<span class="lasso--setting-description"><?php _e( 'By default the editor will update the database with the post or page it is being used on. Check this box to disable this. If you check this box, it is assumed that you will be using the provided filters to save your own content.', 'lasso' );?></span>
480
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_save_disabled]" id="lasso_editor[post_save_disabled]" <?php echo checked($save_to_post_disabled, 'on'); ?> >
481
+						<label for="lasso_editor[post_save_disabled]"><?php _e('Disable Post Saving', 'lasso'); ?></label>
482
+						<span class="lasso--setting-description"><?php _e('By default the editor will update the database with the post or page it is being used on. Check this box to disable this. If you check this box, it is assumed that you will be using the provided filters to save your own content.', 'lasso'); ?></span>
483 483
 
484 484
 					</div>
485 485
 					
486 486
 					<div class="lasso-editor-settings--option-inner" style="border:none">
487
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_edit_disabled]" id="lasso_editor[post_edit_disabled]" <?php echo checked( $edit_post_disabled, 'on' );?> >
488
-						<label for="lasso_editor[post_edit_disabled]"><?php _e( 'Disable Post Editing', 'lasso' );?></label>
489
-						<span class="lasso--setting-description"><?php _e( 'You may use this option if you only want to edit custom fields. Refer <a href="https://edituswp.com/editing-and-updating-custom-fields-from-frontend/">here</a> for more information. The custom fields you specify will be still editable under the editing mode.', 'lasso' );?></span>
487
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_edit_disabled]" id="lasso_editor[post_edit_disabled]" <?php echo checked($edit_post_disabled, 'on'); ?> >
488
+						<label for="lasso_editor[post_edit_disabled]"><?php _e('Disable Post Editing', 'lasso'); ?></label>
489
+						<span class="lasso--setting-description"><?php _e('You may use this option if you only want to edit custom fields. Refer <a href="https://edituswp.com/editing-and-updating-custom-fields-from-frontend/">here</a> for more information. The custom fields you specify will be still editable under the editing mode.', 'lasso'); ?></span>
490 490
 
491 491
 					</div>
492 492
 				
493 493
 					<div class="lasso-editor-settings--option-inner" style="border:none">
494
-						<input type="checkbox" class="checkbox" name="lasso_editor[save_using_rest_disabled]" id="lasso_editor[save_using_rest_disabled]" <?php echo checked( $save_using_rest_disabled, 'on' );?> >
495
-						<label for="lasso_editor[save_using_rest_disabled]"><?php _e( "Don't Use REST API to Save", 'lasso' );?></label>
496
-						<span class="lasso--setting-description"><?php _e( 'By default the editor will use REST API to save posts. Check this box to use custom AJAX calls instead.', 'lasso' );?></span>
494
+						<input type="checkbox" class="checkbox" name="lasso_editor[save_using_rest_disabled]" id="lasso_editor[save_using_rest_disabled]" <?php echo checked($save_using_rest_disabled, 'on'); ?> >
495
+						<label for="lasso_editor[save_using_rest_disabled]"><?php _e("Don't Use REST API to Save", 'lasso'); ?></label>
496
+						<span class="lasso--setting-description"><?php _e('By default the editor will use REST API to save posts. Check this box to use custom AJAX calls instead.', 'lasso'); ?></span>
497 497
 
498 498
 					</div>
499 499
                     
500 500
                     <div class="lasso-editor-settings--option-inner">
501
-						<input type="checkbox" class="checkbox" name="lasso_editor[no_wrap_shortcode]" id="lasso_editor[no_wrap_shortcode]" <?php echo checked( $no_wrap_shortcode, 'on' );?> >
502
-						<label for="lasso_editor[no_wrap_shortcode]"><?php _e( "Don't Wrap Shortcodes", 'lasso' );?></label>
503
-						<span class="lasso--setting-description"><?php _e( 'By default Editus wraps shortcodes so they can be preserved. Disable this behavior.', 'lasso' );?></span>
501
+						<input type="checkbox" class="checkbox" name="lasso_editor[no_wrap_shortcode]" id="lasso_editor[no_wrap_shortcode]" <?php echo checked($no_wrap_shortcode, 'on'); ?> >
502
+						<label for="lasso_editor[no_wrap_shortcode]"><?php _e("Don't Wrap Shortcodes", 'lasso'); ?></label>
503
+						<span class="lasso--setting-description"><?php _e('By default Editus wraps shortcodes so they can be preserved. Disable this behavior.', 'lasso'); ?></span>
504 504
 
505 505
 					</div>
506 506
 				</div>
@@ -510,11 +510,11 @@  discard block
 block discarded – undo
510 510
 
511 511
 				<div class="lasso-editor-settings--submit">
512 512
 				    <input type="hidden" name="action" value="lasso-editor-settings" />
513
-				    <input type="submit" class="button-primary" value="<?php esc_attr_e( 'Save Settings', 'lasso' );?>" />
514
-					<?php wp_nonce_field( 'nonce', 'lasso_editor_settings' ); ?>
513
+				    <input type="submit" class="button-primary" value="<?php esc_attr_e('Save Settings', 'lasso'); ?>" />
514
+					<?php wp_nonce_field('nonce', 'lasso_editor_settings'); ?>
515 515
 				</div>
516 516
 				
517
-				<?php do_action('lasso_settings_after');?>
517
+				<?php do_action('lasso_settings_after'); ?>
518 518
 			</form>
519 519
 
520 520
 		</div><?php
Please login to merge, or discard this patch.
public/includes/components.php 1 patch
Spacing   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -16,84 +16,84 @@  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
 		'wpimg-block' => array(
75
-			'name'    => __('WordPress Image Block','lasso'),
75
+			'name'    => __('WordPress Image Block', 'lasso'),
76 76
 			'content' => lasso_wp_image_block(),
77 77
 		),
78 78
 		'wpquote' => array(
79
-			'name'    => __('WordPress Quote','lasso'),
79
+			'name'    => __('WordPress Quote', 'lasso'),
80 80
 			'content' => lasso_wp_quote(),
81 81
 		),
82 82
 		'gallery_pop' => array(
83
-			'name'    => __('Gallery Pop','lasso'),
83
+			'name'    => __('Gallery Pop', 'lasso'),
84 84
 			'content' => lasso_gallery_pop_component(),
85 85
 		),
86 86
 		'events' => array(
87
-			'name'    => __('Events','lasso'),
87
+			'name'    => __('Events', 'lasso'),
88 88
 			'content' => lasso_event_component(),
89 89
 		),
90 90
 		'wpvideo' => array(
91
-			'name'    => __('WordPress Image','lasso'),
91
+			'name'    => __('WordPress Image', 'lasso'),
92 92
 			'content' => lasso_wp_video(),
93 93
 		),
94 94
 	);
95 95
 
96
-	return apply_filters( 'lasso_components', $array );
96
+	return apply_filters('lasso_components', $array);
97 97
 }
98 98
 
99 99
 /**
@@ -119,125 +119,125 @@  discard block
 block discarded – undo
119 119
  */
120 120
 
121 121
 // 1
122
-if ( !function_exists( 'lasso_quote_component' ) ):
122
+if (!function_exists('lasso_quote_component')):
123 123
 	function lasso_quote_component() {
124 124
 
125
-		return do_shortcode( '[aesop_quote quote="The Universe is made of stories, not of atoms."]' );
125
+		return do_shortcode('[aesop_quote quote="The Universe is made of stories, not of atoms."]');
126 126
 	}
127 127
 endif;
128 128
 
129 129
 // 2
130
-if ( !function_exists( 'lasso_image_component' ) ):
130
+if (!function_exists('lasso_image_component')):
131 131
 	function lasso_image_component() {
132 132
 
133
-		return do_shortcode( '[aesop_image img="'.LASSO_URL.'/public/assets/img/empty-img.png" align="center" imgwidth="100%"]' );
133
+		return do_shortcode('[aesop_image img="'.LASSO_URL.'/public/assets/img/empty-img.png" align="center" imgwidth="100%"]');
134 134
 	}
135 135
 endif;
136 136
 
137 137
 // 3
138
-if ( !function_exists( 'lasso_parallax_component' ) ):
138
+if (!function_exists('lasso_parallax_component')):
139 139
 	function lasso_parallax_component() {
140 140
 
141
-		return do_shortcode( '[aesop_parallax img="'.LASSO_URL.'/public/assets/img/empty-img.png"]' );
141
+		return do_shortcode('[aesop_parallax img="'.LASSO_URL.'/public/assets/img/empty-img.png"]');
142 142
 	}
143 143
 endif;
144 144
 
145 145
 // 4
146
-if ( !function_exists( 'lasso_audio_component' ) ):
146
+if (!function_exists('lasso_audio_component')):
147 147
 	function lasso_audio_component() {
148 148
 
149
-		return do_shortcode( '[aesop_audio src="http://users.skynet.be/fa046054/home/P22/track06.mp3"]' );
149
+		return do_shortcode('[aesop_audio src="http://users.skynet.be/fa046054/home/P22/track06.mp3"]');
150 150
 
151 151
 	}
152 152
 endif;
153 153
 
154 154
 // 5
155
-if ( !function_exists( 'lasso_content_component' ) ):
155
+if (!function_exists('lasso_content_component')):
156 156
 	function lasso_content_component() {
157 157
 
158
-		return do_shortcode( '[aesop_content]Start typing here...[/aesop_content]' );
158
+		return do_shortcode('[aesop_content]Start typing here...[/aesop_content]');
159 159
 	}
160 160
 endif;
161 161
 
162 162
 // 6
163
-if ( !function_exists( 'lasso_character_component' ) ):
163
+if (!function_exists('lasso_character_component')):
164 164
 	function lasso_character_component() {
165 165
 
166
-		return do_shortcode( '[aesop_character img="'.LASSO_URL.'/public/assets/img/empty-img.png" name="Joes Apartment" width="150px"]' );
166
+		return do_shortcode('[aesop_character img="'.LASSO_URL.'/public/assets/img/empty-img.png" name="Joes Apartment" width="150px"]');
167 167
 
168 168
 	}
169 169
 endif;
170 170
 
171 171
 // 7
172
-if ( !function_exists( 'lasso_collections_component' ) ):
172
+if (!function_exists('lasso_collections_component')):
173 173
 	function lasso_collections_component() {
174 174
 
175
-		return do_shortcode( '[aesop_collection]' );
175
+		return do_shortcode('[aesop_collection]');
176 176
 	}
177 177
 endif;
178 178
 
179 179
 // 8
180
-if ( !function_exists( 'lasso_document_component' ) ):
180
+if (!function_exists('lasso_document_component')):
181 181
 	function lasso_document_component() {
182 182
 
183
-		return do_shortcode( '[aesop_document src="'.LASSO_URL.'/public/assets/img/empty-img.png" ]' );
183
+		return do_shortcode('[aesop_document src="'.LASSO_URL.'/public/assets/img/empty-img.png" ]');
184 184
 
185 185
 	}
186 186
 endif;
187 187
 
188 188
 // 9
189
-if ( !function_exists( 'lasso_gallery_component' ) ):
189
+if (!function_exists('lasso_gallery_component')):
190 190
 	function lasso_gallery_component() {
191 191
 
192
-		return do_shortcode( '[aesop_gallery]' );
192
+		return do_shortcode('[aesop_gallery]');
193 193
 
194 194
 	}
195 195
 endif;
196 196
 
197 197
 // 10
198
-if ( !function_exists( 'lasso_heading_component' ) ):
198
+if (!function_exists('lasso_heading_component')):
199 199
 	function lasso_heading_component() {
200 200
 
201
-		return do_shortcode( '[aesop_chapter title="Chapter One" img="'.LASSO_URL.'/public/assets/img/empty-img.png" full="on"]' );
201
+		return do_shortcode('[aesop_chapter title="Chapter One" img="'.LASSO_URL.'/public/assets/img/empty-img.png" full="on"]');
202 202
 	}
203 203
 endif;
204 204
 
205 205
 // 11
206
-if ( !function_exists( 'lasso_map_component' ) ):
206
+if (!function_exists('lasso_map_component')):
207 207
 	function lasso_map_component() {
208 208
 
209 209
 		return '<form id="lasso--map-form" class="aesop-component aesop-map-component lasso--map-drag-holder" enctype="multipart/form-data">
210 210
 				'.lasso_map_form_footer().'
211
-				'.do_shortcode( '[aesop_map sticky="off"]' ).'
211
+				'.do_shortcode('[aesop_map sticky="off"]').'
212 212
 			</form>';
213 213
 
214 214
 	}
215 215
 endif;
216 216
 
217 217
 // 12
218
-if ( !function_exists( 'lasso_timeline_component' ) ):
218
+if (!function_exists('lasso_timeline_component')):
219 219
 	function lasso_timeline_component() {
220 220
 
221
-		return do_shortcode( '[aesop_timeline_stop num="2014" title="Title"]' );
221
+		return do_shortcode('[aesop_timeline_stop num="2014" title="Title"]');
222 222
 
223 223
 	}
224 224
 endif;
225 225
 
226 226
 // 13
227
-if ( !function_exists( 'lasso_video_component' ) ):
227
+if (!function_exists('lasso_video_component')):
228 228
 	function lasso_video_component() {
229 229
 
230
-		return do_shortcode( '[aesop_video src="vimeo" id="59940289" width="100%" align="center"]' );
230
+		return do_shortcode('[aesop_video src="vimeo" id="59940289" width="100%" align="center"]');
231 231
 
232 232
 	}
233 233
 endif;
234 234
 
235 235
 // 14 - since 0.9.1
236
-if ( !function_exists('lasso_wp_image') ):
236
+if (!function_exists('lasso_wp_image')):
237 237
 
238
-	function lasso_wp_image(){
239
-        $use_old_wpimg = lasso_editor_get_option('use_old_wpimg', 'lasso_editor','off');
240
-        $use_wp_block_image = lasso_editor_get_option('use_wp_block_image', 'lasso_editor','off');
238
+	function lasso_wp_image() {
239
+        $use_old_wpimg = lasso_editor_get_option('use_old_wpimg', 'lasso_editor', 'off');
240
+        $use_wp_block_image = lasso_editor_get_option('use_wp_block_image', 'lasso_editor', 'off');
241 241
         if ($use_wp_block_image == 'on') {
242 242
         	return '<figure class="wp-block-image size-large" data-component-type="wpimg-block"><img  src="'.LASSO_URL.'/public/assets/img/empty-img.png"></figure><p><br></p>';
243 243
         }
@@ -251,9 +251,9 @@  discard block
 block discarded – undo
251 251
 endif;
252 252
 
253 253
 // 15 - since 0.9.2
254
-if ( !function_exists('lasso_wp_quote') ):
254
+if (!function_exists('lasso_wp_quote')):
255 255
 
256
-	function lasso_wp_quote(){
256
+	function lasso_wp_quote() {
257 257
 		return '<blockquote data-component-type="wpquote" class="lasso--wpquote lasso-component"><p>The universe is made of stories.</p></blockquote><p><br></p>';
258 258
 	}
259 259
 
@@ -261,15 +261,15 @@  discard block
 block discarded – undo
261 261
 
262 262
 // 16 gallery pop added but not fully supported as of 0.9.9.11 
263 263
 
264
-if ( !function_exists( 'lasso_gallery_pop_component' ) ):
264
+if (!function_exists('lasso_gallery_pop_component')):
265 265
 	function lasso_gallery_pop_component() {
266
-		return do_shortcode( '[aesop_gallery_pop]' );
266
+		return do_shortcode('[aesop_gallery_pop]');
267 267
 	}
268 268
 endif;
269 269
 
270 270
 // 17 - work in progress
271 271
 
272
-if ( !function_exists( 'lasso_event_component' ) ):
272
+if (!function_exists('lasso_event_component')):
273 273
 	function lasso_event_component() {
274 274
 		$id = editus_get_one_id('aesop_events');
275 275
 		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>';
@@ -277,16 +277,16 @@  discard block
 block discarded – undo
277 277
 endif;
278 278
 
279 279
 // 18 - work in progress
280
-if ( !function_exists('lasso_wp_video') ):
280
+if (!function_exists('lasso_wp_video')):
281 281
 
282
-	function lasso_wp_video(){
282
+	function lasso_wp_video() {
283 283
 		return '<div data-component-type="wpvideo" class="lasso--wpvideo__wrap lasso-component"><video class="wp-video-0"></video>';
284 284
 	}
285 285
 
286 286
 endif;
287 287
 
288
-if ( !function_exists('lasso_wp_image_block') ):
289
-	function lasso_wp_image_block(){
288
+if (!function_exists('lasso_wp_image_block')):
289
+	function lasso_wp_image_block() {
290 290
         return '<figure class="wp-block-image size-large" data-component-type="wpimg-block"><img  src="'.LASSO_URL.'/public/assets/img/empty-img.png"></figure><p><br></p>';
291 291
 	}
292 292
 
@@ -295,10 +295,10 @@  discard block
 block discarded – undo
295 295
 // helper function to retrieve one id for default option
296 296
 function editus_get_one_id($type)
297 297
 {
298
-	$args = array( 'posts_per_page' => 1, 'post_type' => $type );
299
-	$posts = get_posts( $args );
300
-	if ( $posts ) {
301
-		foreach ( $posts as $post ) {
298
+	$args = array('posts_per_page' => 1, 'post_type' => $type);
299
+	$posts = get_posts($args);
300
+	if ($posts) {
301
+		foreach ($posts as $post) {
302 302
 			return $post->ID;
303 303
 		}
304 304
 	}
Please login to merge, or discard this patch.
public/includes/lasso.php 3 patches
Indentation   +129 added lines, -129 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 		
60 60
 		add_action( 'wp_ajax_get_aesop_component',     array( $this, 'get_aesop_component' ) );
61 61
 		add_action( 'wp_ajax_editus_do_shortcode',     array( $this, 'editus_do_shortcode' ) );
62
-        add_action( 'wp_ajax_editus_do_block',     array( $this, 'editus_do_block' ) );
62
+		add_action( 'wp_ajax_editus_do_block',     array( $this, 'editus_do_block' ) );
63 63
 		add_action( 'wp_ajax_editus_lock_post',     array( $this, 'editus_lock_post' ) );
64 64
 		add_action( 'wp_ajax_editus_unlock_post',     array( $this, 'editus_unlock_post' ) );
65 65
 		add_action( 'wp_ajax_editus_hide_tour',     array( $this, 'editus_hide_tour' ) );
@@ -69,19 +69,19 @@  discard block
 block discarded – undo
69 69
 		add_action( 'wp_ajax_editus_featured_img',     array( $this, 'set_featured_img' ) );
70 70
 		add_action( 'wp_ajax_editus_del_featured_img',     array( $this, 'del_featured_img' ) );
71 71
         
72
-        add_action( 'wp_ajax_editus_publish_post',     array( $this, 'on_publish_post' ) );
72
+		add_action( 'wp_ajax_editus_publish_post',     array( $this, 'on_publish_post' ) );
73 73
         
74
-        add_action( 'wp_ajax_editus_create_gallery',     array( $this, 'create_gallery' ) );
75
-        add_action( 'wp_ajax_editus_update_gallery',     array( $this, 'update_gallery' ) );
74
+		add_action( 'wp_ajax_editus_create_gallery',     array( $this, 'create_gallery' ) );
75
+		add_action( 'wp_ajax_editus_update_gallery',     array( $this, 'update_gallery' ) );
76 76
 
77 77
 		// enable saving custom fields through REST API
78 78
 		self::enable_metasave('post');
79 79
 		self::enable_metasave('page');
80 80
         
81
-        $default_post_types = apply_filters( 'lasso_allowed_post_types', array( 'post', 'page'));
81
+		$default_post_types = apply_filters( 'lasso_allowed_post_types', array( 'post', 'page'));
82 82
 		$allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor',  $default_post_types);
83
-        foreach ( $allowed_post_types  as $post_type ) {
84
-           self::enable_metasave($post_type);
83
+		foreach ( $allowed_post_types  as $post_type ) {
84
+		   self::enable_metasave($post_type);
85 85
 		}
86 86
 		//enqueue assets
87 87
 		new assets();
@@ -278,14 +278,14 @@  discard block
 block discarded – undo
278 278
 		$out = load_textdomain( $domain, trailingslashit( LASSO_DIR ). 'languages/' . $domain . '-' . $locale . '.mo' );
279 279
 	}
280 280
 	
281
-    // new ajax function to lock post for editing
281
+	// new ajax function to lock post for editing
282 282
 	public function editus_lock_post()
283 283
 	{
284 284
 		$post_id= $_POST["postid"];
285 285
 		$locked = wp_check_post_lock($post_id);
286 286
 		
287 287
 		if (!$locked) {
288
-		    wp_set_post_lock($post_id);
288
+			wp_set_post_lock($post_id);
289 289
 			echo "true";
290 290
 		} else {
291 291
 			$user_info = get_userdata($locked);
@@ -298,9 +298,9 @@  discard block
 block discarded – undo
298 298
 	{
299 299
 		$post_id= $_POST["postid"];
300 300
 		$locked = wp_check_post_lock($post_id);
301
-        if (!$locked) {
302
-            delete_post_meta( $post_id, '_edit_lock');
303
-        }
301
+		if (!$locked) {
302
+			delete_post_meta( $post_id, '_edit_lock');
303
+		}
304 304
 		echo "true";
305 305
 		
306 306
 		exit;
@@ -328,14 +328,14 @@  discard block
 block discarded – undo
328 328
 		$status = isset( $data['status'] ) ? $data['status'] : false;
329 329
 		$postid = isset( $data['postid'] ) ? $data['postid'] : false;
330 330
 		$slug   = isset( $data['story_slug'] ) ? $data['story_slug'] : false;
331
-        $excerpt   = isset( $data['excerpt'] ) ? $data['excerpt'] : false;
331
+		$excerpt   = isset( $data['excerpt'] ) ? $data['excerpt'] : false;
332 332
 	
333 333
 
334 334
 		$args = array(
335 335
 			'ID'   			=> (int) $postid,
336 336
 			'post_name'  	=> $slug,
337 337
 			'post_status' 	=> $status,
338
-            'post_excerpt'  => wp_strip_all_tags($excerpt,true)
338
+			'post_excerpt'  => wp_strip_all_tags($excerpt,true)
339 339
 		);
340 340
 		
341 341
 		
@@ -410,12 +410,12 @@  discard block
 block discarded – undo
410 410
 		exit;
411 411
 	}
412 412
     
413
-    public function editus_do_block()
413
+	public function editus_do_block()
414 414
 	{
415 415
 		
416 416
 		$code= $_POST["code"];
417 417
 
418
-        $out = do_blocks( $code );
418
+		$out = do_blocks( $code );
419 419
 		
420 420
 		echo $out;
421 421
 		exit;
@@ -434,67 +434,67 @@  discard block
 block discarded – undo
434 434
 			}
435 435
 		}
436 436
 		if ($code == "aesop_video") {
437
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-video.php');
438
-		    echo aesop_video_shortcode($atts);
437
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-video.php');
438
+			echo aesop_video_shortcode($atts);
439 439
 		}
440 440
 		else if ($code == "aesop_image") {
441
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php');
442
-		    echo aesop_image_shortcode($atts);
441
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php');
442
+			echo aesop_image_shortcode($atts);
443 443
 		}
444 444
 		else if ($code == "aesop_quote") {
445
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php');
446
-		    echo aesop_quote_shortcode($atts);
445
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php');
446
+			echo aesop_quote_shortcode($atts);
447 447
 		}
448 448
 		else if ($code == "aesop_parallax") {
449
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php');
450
-		    echo aesop_parallax_shortcode($atts);
449
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php');
450
+			echo aesop_parallax_shortcode($atts);
451 451
 		}
452 452
 		else if ($code == "aesop_character") {
453
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php');
454
-		    echo aesop_character_shortcode($atts);
453
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php');
454
+			echo aesop_character_shortcode($atts);
455 455
 		}
456 456
 		else if ($code == "aesop_collection") {
457
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php');
458
-		    echo aesop_collection_shortcode($atts);
457
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php');
458
+			echo aesop_collection_shortcode($atts);
459 459
 		}
460 460
 		else if ($code == "aesop_chapter") {
461
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php');
462
-		    echo aesop_chapter_shortcode($atts);
461
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php');
462
+			echo aesop_chapter_shortcode($atts);
463 463
 		}
464 464
 		else if ($code == "aesop_content") {
465
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php');
466
-		    echo aesop_content_shortcode($atts, $atts['content_data']);
465
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php');
466
+			echo aesop_content_shortcode($atts, $atts['content_data']);
467 467
 		}
468 468
 		else if ($code == "aesop_gallery") {
469
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
470
-		    echo do_shortcode( '[aesop_gallery id="'.$atts["id"].'"]');
469
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
470
+			echo do_shortcode( '[aesop_gallery id="'.$atts["id"].'"]');
471 471
 		}
472 472
 		else if ($code == "aesop_audio") {
473
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-audio.php');
474
-		    echo aesop_audio_shortcode($atts);
473
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-audio.php');
474
+			echo aesop_audio_shortcode($atts);
475 475
 		}
476 476
 		else if ($code == "aesop_document") {
477
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-document.php');
478
-		    echo aesop_document_shortcode($atts);
477
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-document.php');
478
+			echo aesop_document_shortcode($atts);
479 479
 		}
480 480
 		else if ($code == "aesop_timeline_stop") {		
481
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-timeline.php');
482
-		    echo aesop_timeline_stop_shortcode($atts);
481
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-timeline.php');
482
+			echo aesop_timeline_stop_shortcode($atts);
483 483
 		}
484
-        /*else if ($code == "aesop_content") {
484
+		/*else if ($code == "aesop_content") {
485 485
 		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-content.php');
486 486
 		    echo aesop_content_shortcode($atts);
487 487
 		}*/
488
-        else if ($code == "aesop_wpimg") {
489
-            self::wpimg($atts);
488
+		else if ($code == "aesop_wpimg") {
489
+			self::wpimg($atts);
490 490
 		}
491 491
 		else if ($code == "aesop_wpimg-block") {
492
-            self::wpimg_block($atts);
492
+			self::wpimg_block($atts);
493 493
 		}
494 494
 		else {
495 495
 			$code = '['.$code.' ';
496 496
 			foreach ($atts as $key => $value) {
497
-			    $code = ''.$key.'="'.$value.'" ';
497
+				$code = ''.$key.'="'.$value.'" ';
498 498
 			}
499 499
 			$code = $code.']';
500 500
 			echo do_shortcode($code);
@@ -503,95 +503,95 @@  discard block
 block discarded – undo
503 503
 		exit; 
504 504
 	}
505 505
     
506
-    public static function wpimg($atts) {
506
+	public static function wpimg($atts) {
507 507
 
508
-        echo '<figure data-component-type="wpimg"';
508
+		echo '<figure data-component-type="wpimg"';
509 509
         
510
-        $extra = "";
510
+		$extra = "";
511 511
         
512
-        // try to use srcset and sizes on new WP installs
512
+		// try to use srcset and sizes on new WP installs
513 513
 		if ( function_exists('wp_get_attachment_image_srcset') && $attachment_id = attachment_url_to_postid( $atts['img'] ) ) {
514 514
 			$srcset = wp_get_attachment_image_srcset( $attachment_id, 'full' );
515 515
 			$sizes = wp_get_attachment_image_sizes( $attachment_id, 'full' );
516
-            $extra = "srcset='$srcset' sizes='$sizes' ";
517
-        }
518
-        if ($atts['align']=="left") {
519
-            $extra .= 'class="alignleft';
520
-        } else if ($atts['align']=="right") {
521
-            $extra .= 'class="alignright';
522
-        } else {
523
-            $extra .= 'class="aligncenter';
524
-        }
525
-        if ($atts['imgwidth'] || $atts['imgheight']) {
526
-            if ($atts['imgwidth']) {
527
-                $extra .= 'width:'. $atts['imgwidth'].';';
528
-            }
529
-            if ($atts['imgheight']) {
530
-                $extra .= 'height:'. $atts['imgheight'].';';
531
-            }
516
+			$extra = "srcset='$srcset' sizes='$sizes' ";
517
+		}
518
+		if ($atts['align']=="left") {
519
+			$extra .= 'class="alignleft';
520
+		} else if ($atts['align']=="right") {
521
+			$extra .= 'class="alignright';
522
+		} else {
523
+			$extra .= 'class="aligncenter';
524
+		}
525
+		if ($atts['imgwidth'] || $atts['imgheight']) {
526
+			if ($atts['imgwidth']) {
527
+				$extra .= 'width:'. $atts['imgwidth'].';';
528
+			}
529
+			if ($atts['imgheight']) {
530
+				$extra .= 'height:'. $atts['imgheight'].';';
531
+			}
532 532
             
533
-        }
534
-        $extra .= '"';
533
+		}
534
+		$extra .= '"';
535 535
         
536
-        foreach ($atts as $key => $value) {
536
+		foreach ($atts as $key => $value) {
537 537
 			 echo ' data-'.$key.'="'.$value.'"';
538 538
 		}
539
-        //echo ' class="wp-image- lasso--wpimg__wrap lasso-component">';
540
-        echo ' class="wp-caption lasso-component">';
541
-        $hrefset = false;
542
-        if ($atts['link'] != '' && (!isset($atts['linkoption']) || $atts['linkoption']=="url" ))
543
-        {
544
-            echo '<a href="' . $atts['link'] . '">';
545
-            $hrefset = true;
546
-        } else if (isset($atts['linkoption']) && $atts['linkoption'] == 'img' ) {
547
-            echo '<a href="' . $atts['img'] . '">';
548
-            $hrefset = true;
549
-        }
550
-        echo '<img src="' . $atts['img'] . '" alt="'. $atts['alt']  .  '" '. $extra. '>';
551
-        if ($hrefset)
552
-        {
553
-            echo '</a>';
554
-        }
555
-        if ($atts['caption'])
556
-        {
557
-            echo '<figcaption class="wp-caption-text">'.$atts['caption'].'</figcaption>';
558
-        }
559
-        echo '</figure>';
560
-        echo '<p><br></p>';
561
-        return;
562
-    }
539
+		//echo ' class="wp-image- lasso--wpimg__wrap lasso-component">';
540
+		echo ' class="wp-caption lasso-component">';
541
+		$hrefset = false;
542
+		if ($atts['link'] != '' && (!isset($atts['linkoption']) || $atts['linkoption']=="url" ))
543
+		{
544
+			echo '<a href="' . $atts['link'] . '">';
545
+			$hrefset = true;
546
+		} else if (isset($atts['linkoption']) && $atts['linkoption'] == 'img' ) {
547
+			echo '<a href="' . $atts['img'] . '">';
548
+			$hrefset = true;
549
+		}
550
+		echo '<img src="' . $atts['img'] . '" alt="'. $atts['alt']  .  '" '. $extra. '>';
551
+		if ($hrefset)
552
+		{
553
+			echo '</a>';
554
+		}
555
+		if ($atts['caption'])
556
+		{
557
+			echo '<figcaption class="wp-caption-text">'.$atts['caption'].'</figcaption>';
558
+		}
559
+		echo '</figure>';
560
+		echo '<p><br></p>';
561
+		return;
562
+	}
563 563
 	
564 564
 	public static function wpimg_block($atts) {
565 565
 		$imgextra = '';
566 566
 		if (!empty($atts['id'])) {
567 567
 			$imgextra = 'class="wp-image-'.$atts['id'].'"';
568 568
 		}
569
-        $figclass = 'aligncenter';
570
-        if ($atts['align']=="left") {
571
-            $figclass = 'alignleft';
572
-        } else if ($atts['align']=="right") {
573
-            $figclass = 'alignright';
574
-        } else {
575
-            $figclass = 'aligncenter';
576
-        }
569
+		$figclass = 'aligncenter';
570
+		if ($atts['align']=="left") {
571
+			$figclass = 'alignleft';
572
+		} else if ($atts['align']=="right") {
573
+			$figclass = 'alignright';
574
+		} else {
575
+			$figclass = 'aligncenter';
576
+		}
577 577
         
578
-        echo '<div class="wp-block-image" data-component-type="wpimg-block">'; 
579
-        echo '<figure class="wp-block-image '.$figclass.' size-large" contenteditable="false">';   
580
-        if (!empty($atts['link'])) {
581
-            echo '<a href="'.$atts['link'].'">';
582
-        }        
583
-        echo '<img src="' . $atts['img'] . '" alt="'. $atts['alt']  . '"' . $imgextra . ' >';
584
-        if ($atts['caption'])
585
-        {
586
-            echo '<figcaption>'.$atts['caption'].'</figcaption>';
587
-        }
588
-        if (!empty($atts['link'])) {
589
-            echo '</a>';
590
-        }
591
-        echo '</figure></div>';
592
-        echo '<p><br></p>';
593
-        return;
594
-    }
578
+		echo '<div class="wp-block-image" data-component-type="wpimg-block">'; 
579
+		echo '<figure class="wp-block-image '.$figclass.' size-large" contenteditable="false">';   
580
+		if (!empty($atts['link'])) {
581
+			echo '<a href="'.$atts['link'].'">';
582
+		}        
583
+		echo '<img src="' . $atts['img'] . '" alt="'. $atts['alt']  . '"' . $imgextra . ' >';
584
+		if ($atts['caption'])
585
+		{
586
+			echo '<figcaption>'.$atts['caption'].'</figcaption>';
587
+		}
588
+		if (!empty($atts['link'])) {
589
+			echo '</a>';
590
+		}
591
+		echo '</figure></div>';
592
+		echo '<p><br></p>';
593
+		return;
594
+	}
595 595
 	
596 596
 	
597 597
 	public function get_ase_options()
@@ -627,12 +627,12 @@  discard block
 block discarded – undo
627 627
 		exit;
628 628
 	}
629 629
     
630
-    /* This function doesn't actually publish post, but should be called when a post is published */
631
-    public function on_publish_post( ) {
630
+	/* This function doesn't actually publish post, but should be called when a post is published */
631
+	public function on_publish_post( ) {
632 632
 
633 633
 		$post_id = isset( $_POST['postid'] ) ? $_POST['postid'] : false;
634 634
         
635
-        do_action( 'transition_post_status', 'publish', 'draft', get_post( $post_id ) );
635
+		do_action( 'transition_post_status', 'publish', 'draft', get_post( $post_id ) );
636 636
 
637 637
 		exit;
638 638
 	}
@@ -690,14 +690,14 @@  discard block
 block discarded – undo
690 690
 			$allow_new_category = lasso_editor_get_option( 'allow_new_category', 'lasso_editor' );
691 691
 			
692 692
 			if ($taxonomy =='category') {
693
-                // convert from names to category ids
693
+				// convert from names to category ids
694 694
 				$cats = array();
695 695
 				foreach ($value as $cat) {
696 696
 					$cat_id = get_cat_ID($cat);
697 697
 					if ($cat_id !=0) {
698 698
 						$cats [] = $cat_id;
699 699
 					} else if ($allow_new_category) {
700
-					    $cats [] = wp_create_category($cat);
700
+						$cats [] = wp_create_category($cat);
701 701
 					}
702 702
 				}
703 703
 				$value = $cats;
@@ -717,7 +717,7 @@  discard block
 block discarded – undo
717 717
 		}
718 718
 	}
719 719
     
720
-    public function create_gallery( ) {
720
+	public function create_gallery( ) {
721 721
 
722 722
 		$postid  	= isset( $_POST['postid'] ) ? $_POST['postid'] : false;
723 723
         
@@ -771,10 +771,10 @@  discard block
 block discarded – undo
771 771
 			'message' => 'gallery-created',
772 772
 			'id' => $postid)
773 773
 		);
774
-        exit;
774
+		exit;
775 775
 	}
776 776
     
777
-    public function update_gallery( ) {
777
+	public function update_gallery( ) {
778 778
         
779 779
 		$options      = isset( $_POST['fields'] ) ? $_POST['fields'] : false;
780 780
         
@@ -790,12 +790,12 @@  discard block
 block discarded – undo
790 790
 
791 791
 		self::save_gallery_options( $postid, $gallery_ids, $options, $type );
792 792
 
793
-        echo json_encode( array('message' => 'gallery-updated') );
793
+		echo json_encode( array('message' => 'gallery-updated') );
794 794
 
795
-        exit;
795
+		exit;
796 796
 	}
797 797
     
798
-    public function save_gallery_options( $postid, $gallery_ids, $options, $type = false ) {
798
+	public function save_gallery_options( $postid, $gallery_ids, $options, $type = false ) {
799 799
 
800 800
 		// gallery width
801 801
 		$gallery_width = isset( $options['width'] ) ? $options['width'] : false;
@@ -879,7 +879,7 @@  discard block
 block discarded – undo
879 879
 	public function set_date( $postid, $value) {
880 880
 		if( $value ) {
881 881
 			$value = self::getEnglishMonthName($value)." ".date("H:i:s", current_time( 'timestamp', 1 ));
882
-            wp_update_post(
882
+			wp_update_post(
883 883
 				array (
884 884
 					'ID'            => $postid, // ID of the post to update
885 885
 					'post_date'     => date( 'Y-m-d H:i:s',  strtotime($value) ),
Please login to merge, or discard this patch.
Spacing   +193 added lines, -193 removed lines patch added patch discarded remove patch
@@ -52,35 +52,35 @@  discard block
 block discarded – undo
52 52
 		require_once LASSO_DIR.'/public/includes/wrap-shortcodes.php';
53 53
 
54 54
 		// Activate plugin when new blog is added
55
-		add_action( 'wpmu_new_blog', array( $this, 'activate_new_site' ) );
55
+		add_action('wpmu_new_blog', array($this, 'activate_new_site'));
56 56
 
57 57
 		// Load plugin text domain
58
-		add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
58
+		add_action('init', array($this, 'load_plugin_textdomain'));
59 59
 		
60
-		add_action( 'wp_ajax_get_aesop_component',     array( $this, 'get_aesop_component' ) );
61
-		add_action( 'wp_ajax_editus_do_shortcode',     array( $this, 'editus_do_shortcode' ) );
62
-        add_action( 'wp_ajax_editus_do_block',     array( $this, 'editus_do_block' ) );
63
-		add_action( 'wp_ajax_editus_lock_post',     array( $this, 'editus_lock_post' ) );
64
-		add_action( 'wp_ajax_editus_unlock_post',     array( $this, 'editus_unlock_post' ) );
65
-		add_action( 'wp_ajax_editus_hide_tour',     array( $this, 'editus_hide_tour' ) );
66
-		add_action( 'wp_ajax_editus_set_post_setting',     array( $this, 'editus_set_post_setting' ) );
67
-		add_action( 'wp_ajax_editus_get_ase_options',     array( $this, 'get_ase_options' ) );
68
-		add_action( 'wp_ajax_editus_delete_post',     array( $this, 'delete_post' ) );
69
-		add_action( 'wp_ajax_editus_featured_img',     array( $this, 'set_featured_img' ) );
70
-		add_action( 'wp_ajax_editus_del_featured_img',     array( $this, 'del_featured_img' ) );
60
+		add_action('wp_ajax_get_aesop_component', array($this, 'get_aesop_component'));
61
+		add_action('wp_ajax_editus_do_shortcode', array($this, 'editus_do_shortcode'));
62
+        add_action('wp_ajax_editus_do_block', array($this, 'editus_do_block'));
63
+		add_action('wp_ajax_editus_lock_post', array($this, 'editus_lock_post'));
64
+		add_action('wp_ajax_editus_unlock_post', array($this, 'editus_unlock_post'));
65
+		add_action('wp_ajax_editus_hide_tour', array($this, 'editus_hide_tour'));
66
+		add_action('wp_ajax_editus_set_post_setting', array($this, 'editus_set_post_setting'));
67
+		add_action('wp_ajax_editus_get_ase_options', array($this, 'get_ase_options'));
68
+		add_action('wp_ajax_editus_delete_post', array($this, 'delete_post'));
69
+		add_action('wp_ajax_editus_featured_img', array($this, 'set_featured_img'));
70
+		add_action('wp_ajax_editus_del_featured_img', array($this, 'del_featured_img'));
71 71
         
72
-        add_action( 'wp_ajax_editus_publish_post',     array( $this, 'on_publish_post' ) );
72
+        add_action('wp_ajax_editus_publish_post', array($this, 'on_publish_post'));
73 73
         
74
-        add_action( 'wp_ajax_editus_create_gallery',     array( $this, 'create_gallery' ) );
75
-        add_action( 'wp_ajax_editus_update_gallery',     array( $this, 'update_gallery' ) );
74
+        add_action('wp_ajax_editus_create_gallery', array($this, 'create_gallery'));
75
+        add_action('wp_ajax_editus_update_gallery', array($this, 'update_gallery'));
76 76
 
77 77
 		// enable saving custom fields through REST API
78 78
 		self::enable_metasave('post');
79 79
 		self::enable_metasave('page');
80 80
         
81
-        $default_post_types = apply_filters( 'lasso_allowed_post_types', array( 'post', 'page'));
82
-		$allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor',  $default_post_types);
83
-        foreach ( $allowed_post_types  as $post_type ) {
81
+        $default_post_types = apply_filters('lasso_allowed_post_types', array('post', 'page'));
82
+		$allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', $default_post_types);
83
+        foreach ($allowed_post_types  as $post_type) {
84 84
            self::enable_metasave($post_type);
85 85
 		}
86 86
 		//enqueue assets
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 	public static function get_instance() {
110 110
 
111 111
 		// If the single instance hasn't been set, set it now.
112
-		if ( null == self::$instance ) {
112
+		if (null == self::$instance) {
113 113
 			self::$instance = new self;
114 114
 		}
115 115
 
@@ -126,18 +126,18 @@  discard block
 block discarded – undo
126 126
 	 *                                       WPMU is disabled or plugin is
127 127
 	 *                                       activated on an individual blog.
128 128
 	 */
129
-	public static function activate( $network_wide ) {
129
+	public static function activate($network_wide) {
130 130
 
131
-		if ( function_exists( 'is_multisite' ) && is_multisite() ) {
131
+		if (function_exists('is_multisite') && is_multisite()) {
132 132
 
133
-			if ( $network_wide  ) {
133
+			if ($network_wide) {
134 134
 
135 135
 				// Get all blog ids
136 136
 				$blog_ids = self::get_blog_ids();
137 137
 
138
-				foreach ( $blog_ids as $blog_id ) {
138
+				foreach ($blog_ids as $blog_id) {
139 139
 
140
-					switch_to_blog( $blog_id );
140
+					switch_to_blog($blog_id);
141 141
 					self::single_activate();
142 142
 				}
143 143
 
@@ -163,18 +163,18 @@  discard block
 block discarded – undo
163 163
 	 *                                       WPMU is disabled or plugin is
164 164
 	 *                                       deactivated on an individual blog.
165 165
 	 */
166
-	public static function deactivate( $network_wide ) {
166
+	public static function deactivate($network_wide) {
167 167
 
168
-		if ( function_exists( 'is_multisite' ) && is_multisite() ) {
168
+		if (function_exists('is_multisite') && is_multisite()) {
169 169
 
170
-			if ( $network_wide ) {
170
+			if ($network_wide) {
171 171
 
172 172
 				// Get all blog ids
173 173
 				$blog_ids = self::get_blog_ids();
174 174
 
175
-				foreach ( $blog_ids as $blog_id ) {
175
+				foreach ($blog_ids as $blog_id) {
176 176
 
177
-					switch_to_blog( $blog_id );
177
+					switch_to_blog($blog_id);
178 178
 					self::single_deactivate();
179 179
 
180 180
 				}
@@ -198,13 +198,13 @@  discard block
 block discarded – undo
198 198
 	 *
199 199
 	 * @param int     $blog_id ID of the new blog.
200 200
 	 */
201
-	public function activate_new_site( $blog_id ) {
201
+	public function activate_new_site($blog_id) {
202 202
 
203
-		if ( 1 !== did_action( 'wpmu_new_blog' ) ) {
203
+		if (1 !== did_action('wpmu_new_blog')) {
204 204
 			return;
205 205
 		}
206 206
 
207
-		switch_to_blog( $blog_id );
207
+		switch_to_blog($blog_id);
208 208
 		self::single_activate();
209 209
 		restore_current_blog();
210 210
 
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 			WHERE archived = '0' AND spam = '0'
230 230
 			AND deleted = '0'";
231 231
 
232
-		return $wpdb->get_col( $sql );
232
+		return $wpdb->get_col($sql);
233 233
 
234 234
 	}
235 235
 
@@ -240,18 +240,18 @@  discard block
 block discarded – undo
240 240
 	 */
241 241
 	private static function single_activate() {
242 242
 
243
-		$curr_version = get_option( 'lasso_version' );
243
+		$curr_version = get_option('lasso_version');
244 244
 
245 245
 		// update upgraded from
246
-		if ( $curr_version ) {
247
-			update_option( 'lasso_updated_from', $curr_version );
246
+		if ($curr_version) {
247
+			update_option('lasso_updated_from', $curr_version);
248 248
 		}
249 249
 
250 250
 		// update lasso version option
251
-		update_option( 'lasso_version', LASSO_VERSION );
251
+		update_option('lasso_version', LASSO_VERSION);
252 252
 
253 253
 		// set transietn for activation welcome
254
-		set_transient( '_lasso_welcome_redirect', true, 30 );
254
+		set_transient('_lasso_welcome_redirect', true, 30);
255 255
 
256 256
 
257 257
 	}
@@ -273,15 +273,15 @@  discard block
 block discarded – undo
273 273
 	public function load_plugin_textdomain() {
274 274
 
275 275
 		$domain = $this->plugin_slug;
276
-		$locale = apply_filters( 'plugin_locale', get_locale(), $domain );
276
+		$locale = apply_filters('plugin_locale', get_locale(), $domain);
277 277
 
278
-		$out = load_textdomain( $domain, trailingslashit( LASSO_DIR ). 'languages/' . $domain . '-' . $locale . '.mo' );
278
+		$out = load_textdomain($domain, trailingslashit(LASSO_DIR).'languages/'.$domain.'-'.$locale.'.mo');
279 279
 	}
280 280
 	
281 281
     // new ajax function to lock post for editing
282 282
 	public function editus_lock_post()
283 283
 	{
284
-		$post_id= $_POST["postid"];
284
+		$post_id = $_POST["postid"];
285 285
 		$locked = wp_check_post_lock($post_id);
286 286
 		
287 287
 		if (!$locked) {
@@ -289,17 +289,17 @@  discard block
 block discarded – undo
289 289
 			echo "true";
290 290
 		} else {
291 291
 			$user_info = get_userdata($locked);
292
-			echo _e( 'Post being edited by ', 'lasso' ).$user_info->first_name .  " " . $user_info->last_name;
292
+			echo _e('Post being edited by ', 'lasso').$user_info->first_name." ".$user_info->last_name;
293 293
 		}
294 294
 		exit;
295 295
 	}
296 296
 	
297 297
 	public function editus_unlock_post()
298 298
 	{
299
-		$post_id= $_POST["postid"];
299
+		$post_id = $_POST["postid"];
300 300
 		$locked = wp_check_post_lock($post_id);
301 301
         if (!$locked) {
302
-            delete_post_meta( $post_id, '_edit_lock');
302
+            delete_post_meta($post_id, '_edit_lock');
303 303
         }
304 304
 		echo "true";
305 305
 		
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
 	{
312 312
 		$user_id = get_current_user_ID();
313 313
 				
314
-		update_user_meta( $user_id, 'lasso_hide_tour', true );
314
+		update_user_meta($user_id, 'lasso_hide_tour', true);
315 315
 		exit;
316 316
 	}
317 317
 	
@@ -320,51 +320,51 @@  discard block
 block discarded – undo
320 320
 		$data = array();
321 321
 		parse_str($_POST['data'], $data);
322 322
 		
323
-		if (!wp_verify_nonce( $data[ 'nonce' ], 'lasso-update-post-settings' )) {
323
+		if (!wp_verify_nonce($data['nonce'], 'lasso-update-post-settings')) {
324 324
 			wp_send_json_error();
325 325
 			exit;
326 326
 		}
327 327
 		
328
-		$status = isset( $data['status'] ) ? $data['status'] : false;
329
-		$postid = isset( $data['postid'] ) ? $data['postid'] : false;
330
-		$slug   = isset( $data['story_slug'] ) ? $data['story_slug'] : false;
331
-        $excerpt   = isset( $data['excerpt'] ) ? $data['excerpt'] : false;
328
+		$status = isset($data['status']) ? $data['status'] : false;
329
+		$postid = isset($data['postid']) ? $data['postid'] : false;
330
+		$slug   = isset($data['story_slug']) ? $data['story_slug'] : false;
331
+        $excerpt = isset($data['excerpt']) ? $data['excerpt'] : false;
332 332
 	
333 333
 
334 334
 		$args = array(
335 335
 			'ID'   			=> (int) $postid,
336 336
 			'post_name'  	=> $slug,
337 337
 			'post_status' 	=> $status,
338
-            'post_excerpt'  => wp_strip_all_tags($excerpt,true)
338
+            'post_excerpt'  => wp_strip_all_tags($excerpt, true)
339 339
 		);
340 340
 		
341 341
 		
342 342
 
343
-		wp_update_post( apply_filters( 'lasso_object_status_update_args', $args ) );
343
+		wp_update_post(apply_filters('lasso_object_status_update_args', $args));
344 344
 		
345 345
 		// update categories
346
-		$cats  = isset( $data['story_cats'] ) ? $data['story_cats'] : false;
346
+		$cats = isset($data['story_cats']) ? $data['story_cats'] : false;
347 347
 		
348
-		self::set_post_terms( $postid, $cats, 'category' );
348
+		self::set_post_terms($postid, $cats, 'category');
349 349
 		
350 350
 		// update tags
351
-		$tags = isset( $data['story_tags'] ) ? $data['story_tags'] : false;
352
-		self::set_post_terms( $postid, $tags, 'post_tag' );
351
+		$tags = isset($data['story_tags']) ? $data['story_tags'] : false;
352
+		self::set_post_terms($postid, $tags, 'post_tag');
353 353
 		
354 354
 		// update custom taxonomy
355
-		$custom_taxonomies = isset( $data['story_custom_taxonomies'] ) ? json_decode($data['story_custom_taxonomies']) : false;
355
+		$custom_taxonomies = isset($data['story_custom_taxonomies']) ? json_decode($data['story_custom_taxonomies']) : false;
356 356
         
357 357
 		foreach ($custom_taxonomies as $x => $x_value) {
358
-			self::set_post_terms( $postid, $x_value, $x );
358
+			self::set_post_terms($postid, $x_value, $x);
359 359
 		}
360 360
 		
361 361
 		//update date
362
-		$date  = isset( $data['post_date'] ) ? $data['post_date'] : false;
363
-		self::set_date( $postid, $date );
362
+		$date = isset($data['post_date']) ? $data['post_date'] : false;
363
+		self::set_date($postid, $date);
364 364
 		
365
-		do_action( 'lasso_post_updated', $postid, $slug, $status, get_current_user_ID() );
366
-		$response= array(
367
-			'link'   => get_permalink($postid). (($status=='publish') ? '' : '&preview=true')
365
+		do_action('lasso_post_updated', $postid, $slug, $status, get_current_user_ID());
366
+		$response = array(
367
+			'link'   => get_permalink($postid).(($status == 'publish') ? '' : '&preview=true')
368 368
 		);
369 369
 		wp_send_json_success($response);
370 370
 		exit;
@@ -372,11 +372,11 @@  discard block
 block discarded – undo
372 372
 	
373 373
 	public static function enable_metasave($type)
374 374
 	{
375
-		register_rest_field( $type, 'metadata', array(
376
-			'get_callback' => function ( $data ) {
377
-				return get_post_meta( $data['id']);//, '', '' );
375
+		register_rest_field($type, 'metadata', array(
376
+			'get_callback' => function($data) {
377
+				return get_post_meta($data['id']); //, '', '' );
378 378
 			}, 
379
-			'update_callback' => function( $data, $post ) {
379
+			'update_callback' => function($data, $post) {
380 380
 				foreach ($data as $key => $value) {
381 381
 					update_post_meta($post->ID, $key, $value);
382 382
 				}
@@ -388,13 +388,13 @@  discard block
 block discarded – undo
388 388
 	public function editus_do_shortcode()
389 389
 	{
390 390
 		
391
-		$code= $_POST["code"];
391
+		$code = $_POST["code"];
392 392
 		$code = str_replace('\"', '"', $code);
393 393
 		
394
-		$code_wrapped = lasso_wrap_shortcodes( $code);
395
-		$out =  do_shortcode($code);
394
+		$code_wrapped = lasso_wrap_shortcodes($code);
395
+		$out = do_shortcode($code);
396 396
 		if ($out != '') {
397
-			$out =  do_shortcode($code_wrapped);
397
+			$out = do_shortcode($code_wrapped);
398 398
 			echo $out;
399 399
 			exit;
400 400
 		}
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
 		/** @var \WP_Embed $wp_embed */
405 405
 		global $wp_embed;
406 406
 		$wp_embed->post_ID = $_POST["ID"];
407
-		$out =$wp_embed->run_shortcode( $code_wrapped );
407
+		$out = $wp_embed->run_shortcode($code_wrapped);
408 408
 		
409 409
 		echo $out;
410 410
 		exit;
@@ -413,9 +413,9 @@  discard block
 block discarded – undo
413 413
     public function editus_do_block()
414 414
 	{
415 415
 		
416
-		$code= $_POST["code"];
416
+		$code = $_POST["code"];
417 417
 
418
-        $out = do_blocks( $code );
418
+        $out = do_blocks($code);
419 419
 		
420 420
 		echo $out;
421 421
 		exit;
@@ -425,60 +425,60 @@  discard block
 block discarded – undo
425 425
 	{
426 426
 		
427 427
 		
428
-		$code= $_POST["code"];
428
+		$code = $_POST["code"];
429 429
 		$atts = array(
430 430
 		 );
431 431
 		foreach ($_POST as $key => $value) {
432
-			if ($key !="code" && $key !="action") {
432
+			if ($key != "code" && $key != "action") {
433 433
 				$atts[$key] = $value;
434 434
 			}
435 435
 		}
436 436
 		if ($code == "aesop_video") {
437
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-video.php');
437
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-video.php');
438 438
 		    echo aesop_video_shortcode($atts);
439 439
 		}
440 440
 		else if ($code == "aesop_image") {
441
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php');
441
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php');
442 442
 		    echo aesop_image_shortcode($atts);
443 443
 		}
444 444
 		else if ($code == "aesop_quote") {
445
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php');
445
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php');
446 446
 		    echo aesop_quote_shortcode($atts);
447 447
 		}
448 448
 		else if ($code == "aesop_parallax") {
449
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php');
449
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php');
450 450
 		    echo aesop_parallax_shortcode($atts);
451 451
 		}
452 452
 		else if ($code == "aesop_character") {
453
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php');
453
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php');
454 454
 		    echo aesop_character_shortcode($atts);
455 455
 		}
456 456
 		else if ($code == "aesop_collection") {
457
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php');
457
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php');
458 458
 		    echo aesop_collection_shortcode($atts);
459 459
 		}
460 460
 		else if ($code == "aesop_chapter") {
461
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php');
461
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php');
462 462
 		    echo aesop_chapter_shortcode($atts);
463 463
 		}
464 464
 		else if ($code == "aesop_content") {
465
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php');
465
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php');
466 466
 		    echo aesop_content_shortcode($atts, $atts['content_data']);
467 467
 		}
468 468
 		else if ($code == "aesop_gallery") {
469
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
470
-		    echo do_shortcode( '[aesop_gallery id="'.$atts["id"].'"]');
469
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
470
+		    echo do_shortcode('[aesop_gallery id="'.$atts["id"].'"]');
471 471
 		}
472 472
 		else if ($code == "aesop_audio") {
473
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-audio.php');
473
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-audio.php');
474 474
 		    echo aesop_audio_shortcode($atts);
475 475
 		}
476 476
 		else if ($code == "aesop_document") {
477
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-document.php');
477
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-document.php');
478 478
 		    echo aesop_document_shortcode($atts);
479 479
 		}
480 480
 		else if ($code == "aesop_timeline_stop") {		
481
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-timeline.php');
481
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-timeline.php');
482 482
 		    echo aesop_timeline_stop_shortcode($atts);
483 483
 		}
484 484
         /*else if ($code == "aesop_content") {
@@ -510,24 +510,24 @@  discard block
 block discarded – undo
510 510
         $extra = "";
511 511
         
512 512
         // try to use srcset and sizes on new WP installs
513
-		if ( function_exists('wp_get_attachment_image_srcset') && $attachment_id = attachment_url_to_postid( $atts['img'] ) ) {
514
-			$srcset = wp_get_attachment_image_srcset( $attachment_id, 'full' );
515
-			$sizes = wp_get_attachment_image_sizes( $attachment_id, 'full' );
513
+		if (function_exists('wp_get_attachment_image_srcset') && $attachment_id = attachment_url_to_postid($atts['img'])) {
514
+			$srcset = wp_get_attachment_image_srcset($attachment_id, 'full');
515
+			$sizes = wp_get_attachment_image_sizes($attachment_id, 'full');
516 516
             $extra = "srcset='$srcset' sizes='$sizes' ";
517 517
         }
518
-        if ($atts['align']=="left") {
518
+        if ($atts['align'] == "left") {
519 519
             $extra .= 'class="alignleft';
520
-        } else if ($atts['align']=="right") {
520
+        } else if ($atts['align'] == "right") {
521 521
             $extra .= 'class="alignright';
522 522
         } else {
523 523
             $extra .= 'class="aligncenter';
524 524
         }
525 525
         if ($atts['imgwidth'] || $atts['imgheight']) {
526 526
             if ($atts['imgwidth']) {
527
-                $extra .= 'width:'. $atts['imgwidth'].';';
527
+                $extra .= 'width:'.$atts['imgwidth'].';';
528 528
             }
529 529
             if ($atts['imgheight']) {
530
-                $extra .= 'height:'. $atts['imgheight'].';';
530
+                $extra .= 'height:'.$atts['imgheight'].';';
531 531
             }
532 532
             
533 533
         }
@@ -539,15 +539,15 @@  discard block
 block discarded – undo
539 539
         //echo ' class="wp-image- lasso--wpimg__wrap lasso-component">';
540 540
         echo ' class="wp-caption lasso-component">';
541 541
         $hrefset = false;
542
-        if ($atts['link'] != '' && (!isset($atts['linkoption']) || $atts['linkoption']=="url" ))
542
+        if ($atts['link'] != '' && (!isset($atts['linkoption']) || $atts['linkoption'] == "url"))
543 543
         {
544
-            echo '<a href="' . $atts['link'] . '">';
544
+            echo '<a href="'.$atts['link'].'">';
545 545
             $hrefset = true;
546
-        } else if (isset($atts['linkoption']) && $atts['linkoption'] == 'img' ) {
547
-            echo '<a href="' . $atts['img'] . '">';
546
+        } else if (isset($atts['linkoption']) && $atts['linkoption'] == 'img') {
547
+            echo '<a href="'.$atts['img'].'">';
548 548
             $hrefset = true;
549 549
         }
550
-        echo '<img src="' . $atts['img'] . '" alt="'. $atts['alt']  .  '" '. $extra. '>';
550
+        echo '<img src="'.$atts['img'].'" alt="'.$atts['alt'].'" '.$extra.'>';
551 551
         if ($hrefset)
552 552
         {
553 553
             echo '</a>';
@@ -567,9 +567,9 @@  discard block
 block discarded – undo
567 567
 			$imgextra = 'class="wp-image-'.$atts['id'].'"';
568 568
 		}
569 569
         $figclass = 'aligncenter';
570
-        if ($atts['align']=="left") {
570
+        if ($atts['align'] == "left") {
571 571
             $figclass = 'alignleft';
572
-        } else if ($atts['align']=="right") {
572
+        } else if ($atts['align'] == "right") {
573 573
             $figclass = 'alignright';
574 574
         } else {
575 575
             $figclass = 'aligncenter';
@@ -580,7 +580,7 @@  discard block
 block discarded – undo
580 580
         if (!empty($atts['link'])) {
581 581
             echo '<a href="'.$atts['link'].'">';
582 582
         }        
583
-        echo '<img src="' . $atts['img'] . '" alt="'. $atts['alt']  . '"' . $imgextra . ' >';
583
+        echo '<img src="'.$atts['img'].'" alt="'.$atts['alt'].'"'.$imgextra.' >';
584 584
         if ($atts['caption'])
585 585
         {
586 586
             echo '<figcaption>'.$atts['caption'].'</figcaption>';
@@ -597,20 +597,20 @@  discard block
 block discarded – undo
597 597
 	public function get_ase_options()
598 598
 	{
599 599
 		$blob = lasso_editor_options_blob();
600
-		$code= $_POST["component"];
600
+		$code = $_POST["component"];
601 601
 		echo $blob[$code];
602 602
 		exit; 
603 603
 	}
604 604
 	
605 605
 	public function delete_post( ) {
606 606
 
607
-		$postid = isset( $_POST['postid'] ) ? $_POST['postid'] : false;
607
+		$postid = isset($_POST['postid']) ? $_POST['postid'] : false;
608 608
 
609 609
 		// bail out if the current user can't publish posts
610
-		if ( !lasso_user_can( 'delete_post', $postid ) )
610
+		if (!lasso_user_can('delete_post', $postid))
611 611
 			return;
612 612
 		
613
-		if (!wp_verify_nonce( $_POST[ 'nonce' ], 'lasso_delete_post' )) {
613
+		if (!wp_verify_nonce($_POST['nonce'], 'lasso_delete_post')) {
614 614
 			wp_send_json_error();
615 615
 			exit;
616 616
 		}
@@ -620,9 +620,9 @@  discard block
 block discarded – undo
620 620
 			'post_status' 	=> 'trash'
621 621
 		);
622 622
 
623
-		wp_update_post( apply_filters( 'lasso_object_deleted_args', $args ) );
623
+		wp_update_post(apply_filters('lasso_object_deleted_args', $args));
624 624
 
625
-		do_action( 'lasso_object_deleted', $postid, get_current_user_ID() );
625
+		do_action('lasso_object_deleted', $postid, get_current_user_ID());
626 626
 
627 627
 		exit;
628 628
 	}
@@ -630,40 +630,40 @@  discard block
 block discarded – undo
630 630
     /* This function doesn't actually publish post, but should be called when a post is published */
631 631
     public function on_publish_post( ) {
632 632
 
633
-		$post_id = isset( $_POST['postid'] ) ? $_POST['postid'] : false;
633
+		$post_id = isset($_POST['postid']) ? $_POST['postid'] : false;
634 634
         
635
-        do_action( 'transition_post_status', 'publish', 'draft', get_post( $post_id ) );
635
+        do_action('transition_post_status', 'publish', 'draft', get_post($post_id));
636 636
 
637 637
 		exit;
638 638
 	}
639 639
 	
640 640
 	public function set_featured_img( ) {
641 641
 
642
-		$postid  	= isset( $_POST['postid'] ) ? $_POST['postid'] : false;
643
-		$image_id  	= isset( $_POST['image_id'] ) ? absint( $_POST['image_id'] ) : false;
644
-		if (!wp_verify_nonce( $_POST[ 'nonce' ], 'lasso_gallery' )) {
642
+		$postid = isset($_POST['postid']) ? $_POST['postid'] : false;
643
+		$image_id = isset($_POST['image_id']) ? absint($_POST['image_id']) : false;
644
+		if (!wp_verify_nonce($_POST['nonce'], 'lasso_gallery')) {
645 645
 			wp_send_json_error();
646 646
 			exit;
647 647
 		}	
648 648
 
649
-		set_post_thumbnail( $postid, $image_id );
649
+		set_post_thumbnail($postid, $image_id);
650 650
 
651
-		do_action( 'lasso_featured_image_set', $postid, $image_id, get_current_user_ID() );
651
+		do_action('lasso_featured_image_set', $postid, $image_id, get_current_user_ID());
652 652
 
653 653
 		exit;
654 654
 	}
655 655
 	
656 656
 	public function del_featured_img( ) {
657 657
 
658
-		$postid  = isset( $_POST['postid'] ) ? $_POST['postid'] : false;
659
-		if (!wp_verify_nonce( $_POST[ 'nonce' ], 'lasso_gallery' )) {
658
+		$postid = isset($_POST['postid']) ? $_POST['postid'] : false;
659
+		if (!wp_verify_nonce($_POST['nonce'], 'lasso_gallery')) {
660 660
 			wp_send_json_error();
661 661
 			exit;
662 662
 		}	
663 663
 
664
-		delete_post_thumbnail( $postid );
664
+		delete_post_thumbnail($postid);
665 665
 
666
-		do_action( 'lasso_featured_image_deleted', $postid, get_current_user_ID() );
666
+		do_action('lasso_featured_image_deleted', $postid, get_current_user_ID());
667 667
 
668 668
 		exit;
669 669
 	}
@@ -684,17 +684,17 @@  discard block
 block discarded – undo
684 684
 		return self::$revisions;
685 685
 	}*/
686 686
 	
687
-	public function set_post_terms( $postid, $value, $taxonomy ) {
688
-		if( $value ) {
689
-			$value = explode( ',', $value );
690
-			$allow_new_category = lasso_editor_get_option( 'allow_new_category', 'lasso_editor' );
687
+	public function set_post_terms($postid, $value, $taxonomy) {
688
+		if ($value) {
689
+			$value = explode(',', $value);
690
+			$allow_new_category = lasso_editor_get_option('allow_new_category', 'lasso_editor');
691 691
 			
692
-			if ($taxonomy =='category') {
692
+			if ($taxonomy == 'category') {
693 693
                 // convert from names to category ids
694 694
 				$cats = array();
695 695
 				foreach ($value as $cat) {
696 696
 					$cat_id = get_cat_ID($cat);
697
-					if ($cat_id !=0) {
697
+					if ($cat_id != 0) {
698 698
 						$cats [] = $cat_id;
699 699
 					} else if ($allow_new_category) {
700 700
 					    $cats [] = wp_create_category($cat);
@@ -703,71 +703,71 @@  discard block
 block discarded – undo
703 703
 				$value = $cats;
704 704
 			}
705 705
 	
706
-			$result = wp_set_object_terms( $postid, $value, $taxonomy );
706
+			$result = wp_set_object_terms($postid, $value, $taxonomy);
707 707
 		}
708
-		else  {
708
+		else {
709 709
 			//remove all terms from post
710
-			$result = wp_set_object_terms( $postid, null, $taxonomy );
710
+			$result = wp_set_object_terms($postid, null, $taxonomy);
711 711
 		}
712 712
 
713
-		if ( ! is_wp_error( $result ) ) {
713
+		if (!is_wp_error($result)) {
714 714
 			return true;
715
-		}else{
715
+		} else {
716 716
 			return false;
717 717
 		}
718 718
 	}
719 719
     
720 720
     public function create_gallery( ) {
721 721
 
722
-		$postid  	= isset( $_POST['postid'] ) ? $_POST['postid'] : false;
722
+		$postid = isset($_POST['postid']) ? $_POST['postid'] : false;
723 723
         
724
-		if (!wp_verify_nonce( $_POST[ 'nonce' ], 'lasso_gallery' )) {
724
+		if (!wp_verify_nonce($_POST['nonce'], 'lasso_gallery')) {
725 725
 			wp_send_json_error();
726 726
 			exit;
727 727
 		}	
728 728
 
729
-		if (  ! lasso_user_can( 'publish_posts' ) ) {
729
+		if (!lasso_user_can('publish_posts')) {
730 730
 			return false;
731 731
 
732 732
 		}
733 733
 
734
-		$gallery_ids = isset( $_POST['gallery_ids'] ) ? $_POST['gallery_ids'] : false;
734
+		$gallery_ids = isset($_POST['gallery_ids']) ? $_POST['gallery_ids'] : false;
735 735
 
736 736
 		// bail if no gallery ids
737
-		if ( empty( $gallery_ids ) ) {
737
+		if (empty($gallery_ids)) {
738 738
 			return false;
739 739
 		}
740 740
 
741
-		$type   		 = isset( $_POST['gallery_type'] ) ? $_POST['gallery_type'] : false;
742
-		$edgallerytitle	 = isset( $_POST['edgallerytitle'] ) ? $_POST['edgallerytitle'] : $postid.'-'.rand();
741
+		$type = isset($_POST['gallery_type']) ? $_POST['gallery_type'] : false;
742
+		$edgallerytitle = isset($_POST['edgallerytitle']) ? $_POST['edgallerytitle'] : $postid.'-'.rand();
743 743
 
744 744
 		// insert a new gallery
745 745
 		$args = array(
746
-			'post_title'    => $edgallerytitle ,
746
+			'post_title'    => $edgallerytitle,
747 747
 			'post_status'   => 'publish',
748 748
 			'post_type'     => 'ai_galleries'
749 749
 		);
750 750
 
751
-		$postid = wp_insert_post( apply_filters( 'lasso_insert_gallery_args', $args ) );
751
+		$postid = wp_insert_post(apply_filters('lasso_insert_gallery_args', $args));
752 752
 
753 753
 		// update gallery ids
754
-		if ( $gallery_ids ) {
754
+		if ($gallery_ids) {
755 755
 
756
-			update_post_meta( $postid, '_ase_gallery_images', $gallery_ids );
756
+			update_post_meta($postid, '_ase_gallery_images', $gallery_ids);
757 757
 
758 758
 		}
759 759
 
760 760
 		// update the gallery type
761
-		if ( !empty( $type ) ) {
761
+		if (!empty($type)) {
762 762
 
763
-			update_post_meta( $postid, 'aesop_gallery_type', $type );
763
+			update_post_meta($postid, 'aesop_gallery_type', $type);
764 764
 
765 765
 		}
766 766
 
767
-		do_action( 'lasso_gallery_published', $postid, $gallery_ids, get_current_user_ID() );
767
+		do_action('lasso_gallery_published', $postid, $gallery_ids, get_current_user_ID());
768 768
 
769 769
 
770
-		echo json_encode( array(
770
+		echo json_encode(array(
771 771
 			'message' => 'gallery-created',
772 772
 			'id' => $postid)
773 773
 		);
@@ -776,114 +776,114 @@  discard block
 block discarded – undo
776 776
     
777 777
     public function update_gallery( ) {
778 778
         
779
-		$options      = isset( $_POST['fields'] ) ? $_POST['fields'] : false;
779
+		$options      = isset($_POST['fields']) ? $_POST['fields'] : false;
780 780
         
781
-		$postid   	  = !empty( $options ) ? (int) $options['id'] : false;
782
-		$gallery_ids  = isset( $_POST['gallery_ids'] ) ? $_POST['gallery_ids'] : false;
783
-		if ( $_POST[ 'gallery_type' ] ) {
784
-			$type = $_POST[ 'gallery_type' ];
785
-		}elseif ( ! empty( $options ) && $options[ 'galleryType' ] ) {
786
-			$type = $options[ 'galleryType' ];
787
-		}else{
781
+		$postid = !empty($options) ? (int) $options['id'] : false;
782
+		$gallery_ids  = isset($_POST['gallery_ids']) ? $_POST['gallery_ids'] : false;
783
+		if ($_POST['gallery_type']) {
784
+			$type = $_POST['gallery_type'];
785
+		}elseif (!empty($options) && $options['galleryType']) {
786
+			$type = $options['galleryType'];
787
+		} else {
788 788
 			$type = false;
789 789
 		}
790 790
 
791
-		self::save_gallery_options( $postid, $gallery_ids, $options, $type );
791
+		self::save_gallery_options($postid, $gallery_ids, $options, $type);
792 792
 
793
-        echo json_encode( array('message' => 'gallery-updated') );
793
+        echo json_encode(array('message' => 'gallery-updated'));
794 794
 
795 795
         exit;
796 796
 	}
797 797
     
798
-    public function save_gallery_options( $postid, $gallery_ids, $options, $type = false ) {
798
+    public function save_gallery_options($postid, $gallery_ids, $options, $type = false) {
799 799
 
800 800
 		// gallery width
801
-		$gallery_width = isset( $options['width'] ) ? $options['width'] : false;
801
+		$gallery_width = isset($options['width']) ? $options['width'] : false;
802 802
 
803 803
 		// gallery grid item width
804
-		$item_width = isset( $options['itemwidth'] ) ? $options['itemwidth'] : false;
804
+		$item_width = isset($options['itemwidth']) ? $options['itemwidth'] : false;
805 805
 
806 806
 		// caption
807
-		$caption = isset( $options['caption'] ) ? $options['caption'] : false;
807
+		$caption = isset($options['caption']) ? $options['caption'] : false;
808 808
 
809 809
 		// gallery transition
810
-		$transition = isset( $options['transition'] ) ? $options['transition'] : false;
810
+		$transition = isset($options['transition']) ? $options['transition'] : false;
811 811
 
812 812
 		// gallery transition speed
813
-		$transitionSpeed = isset( $options['speed'] ) ? $options['speed'] : false;
813
+		$transitionSpeed = isset($options['speed']) ? $options['speed'] : false;
814 814
 
815 815
 		// gallery hide thumbs
816
-		$hideThumbs = isset( $options['hideThumbs'] ) ? $options['hideThumbs'] : false;
816
+		$hideThumbs = isset($options['hideThumbs']) ? $options['hideThumbs'] : false;
817 817
 
818 818
 		// photoset layout hardwired to on for now
819
-		$psLayout = isset( $options['pslayout'] ) ? $options['pslayout'] : false;
819
+		$psLayout = isset($options['pslayout']) ? $options['pslayout'] : false;
820 820
 
821 821
 		// photoset layout
822
-		$psLightbox = 'on';//isset( $options['pslightbox'] ) ? $options['pslightbox'] : false;
822
+		$psLightbox = 'on'; //isset( $options['pslightbox'] ) ? $options['pslightbox'] : false;
823 823
 		
824 824
 		// hero gallery height
825
-		$gallery_height = isset( $options['height'] ) ? $options['height'] : false;
825
+		$gallery_height = isset($options['height']) ? $options['height'] : false;
826 826
 
827 827
 		// update gallery ids
828
-		if ( !empty( $gallery_ids ) ) {
828
+		if (!empty($gallery_ids)) {
829 829
 
830
-			update_post_meta( $postid, '_ase_gallery_images', $gallery_ids );
830
+			update_post_meta($postid, '_ase_gallery_images', $gallery_ids);
831 831
 
832 832
 		}
833 833
 
834
-		update_post_meta( $postid, 'aesop_gallery_type', sanitize_text_field( trim( $type ) ) );
834
+		update_post_meta($postid, 'aesop_gallery_type', sanitize_text_field(trim($type)));
835 835
 
836
-		update_post_meta( $postid, 'aesop_gallery_width', sanitize_text_field( trim( $gallery_width ) ) );
836
+		update_post_meta($postid, 'aesop_gallery_width', sanitize_text_field(trim($gallery_width)));
837 837
 
838
-		update_post_meta( $postid, 'aesop_grid_gallery_width', sanitize_text_field( trim( $item_width ) ) );
838
+		update_post_meta($postid, 'aesop_grid_gallery_width', sanitize_text_field(trim($item_width)));
839 839
 
840
-		update_post_meta( $postid, 'aesop_gallery_caption', sanitize_text_field( trim( $caption ) ) );
840
+		update_post_meta($postid, 'aesop_gallery_caption', sanitize_text_field(trim($caption)));
841 841
 
842
-		update_post_meta( $postid, 'aesop_thumb_gallery_transition', sanitize_text_field( trim( $transition ) ) );
842
+		update_post_meta($postid, 'aesop_thumb_gallery_transition', sanitize_text_field(trim($transition)));
843 843
 
844
-		update_post_meta( $postid, 'aesop_thumb_gallery_transition_speed', absint( trim( $transitionSpeed ) ) );
844
+		update_post_meta($postid, 'aesop_thumb_gallery_transition_speed', absint(trim($transitionSpeed)));
845 845
 
846
-		update_post_meta( $postid, 'aesop_thumb_gallery_hide_thumbs', sanitize_text_field( trim( $hideThumbs ) ) );
846
+		update_post_meta($postid, 'aesop_thumb_gallery_hide_thumbs', sanitize_text_field(trim($hideThumbs)));
847 847
 
848
-		update_post_meta( $postid, 'aesop_photoset_gallery_layout', sanitize_text_field( trim( $psLayout ) ) );
848
+		update_post_meta($postid, 'aesop_photoset_gallery_layout', sanitize_text_field(trim($psLayout)));
849 849
 
850
-		update_post_meta( $postid, 'aesop_photoset_gallery_lightbox', sanitize_text_field( trim( $psLightbox ) ) );
850
+		update_post_meta($postid, 'aesop_photoset_gallery_lightbox', sanitize_text_field(trim($psLightbox)));
851 851
 		
852
-		update_post_meta( $postid, 'aesop_hero_gallery_height', sanitize_text_field( trim( $gallery_height ) ) );
852
+		update_post_meta($postid, 'aesop_hero_gallery_height', sanitize_text_field(trim($gallery_height)));
853 853
 		
854 854
 		//hardwired for now
855 855
 		
856
-		update_post_meta( $postid, 'aesop_hero_gallery_transition_speed', 300 );
856
+		update_post_meta($postid, 'aesop_hero_gallery_transition_speed', 300);
857 857
 
858 858
 	}
859 859
 	
860
-	function getEnglishMonthName($foreignMonthName){
860
+	function getEnglishMonthName($foreignMonthName) {
861 861
 
862 862
 		  setlocale(LC_ALL, 'en_US');
863 863
 
864
-		  $month_numbers = range(1,12);
864
+		  $month_numbers = range(1, 12);
865 865
 
866
-		  foreach($month_numbers as $month)
867
-			$english_months[] = strftime('%B',mktime(0,0,0,$month,1,2011));
866
+		  foreach ($month_numbers as $month)
867
+			$english_months[] = strftime('%B', mktime(0, 0, 0, $month, 1, 2011));
868 868
 
869 869
 		  setlocale(LC_ALL, get_locale());
870 870
 
871
-		  foreach($month_numbers as $month)
872
-			$foreign_months[] = utf8_encode(strftime('%B',mktime(0,0,0,$month,1,2011)));
871
+		  foreach ($month_numbers as $month)
872
+			$foreign_months[] = utf8_encode(strftime('%B', mktime(0, 0, 0, $month, 1, 2011)));
873 873
 
874 874
 		  return str_replace($foreign_months, $english_months, $foreignMonthName);
875 875
 	}
876 876
 
877 877
 
878 878
 	
879
-	public function set_date( $postid, $value) {
880
-		if( $value ) {
881
-			$value = self::getEnglishMonthName($value)." ".date("H:i:s", current_time( 'timestamp', 1 ));
879
+	public function set_date($postid, $value) {
880
+		if ($value) {
881
+			$value = self::getEnglishMonthName($value)." ".date("H:i:s", current_time('timestamp', 1));
882 882
             wp_update_post(
883
-				array (
883
+				array(
884 884
 					'ID'            => $postid, // ID of the post to update
885
-					'post_date'     => date( 'Y-m-d H:i:s',  strtotime($value) ),
886
-					'post_date_gmt'     => gmdate( 'Y-m-d H:i:s',  strtotime($value) ),
885
+					'post_date'     => date('Y-m-d H:i:s', strtotime($value)),
886
+					'post_date_gmt'     => gmdate('Y-m-d H:i:s', strtotime($value)),
887 887
 				)
888 888
 			);
889 889
 		}
Please login to merge, or discard this patch.
Braces   +26 added lines, -37 removed lines patch added patch discarded remove patch
@@ -436,48 +436,37 @@  discard block
 block discarded – undo
436 436
 		if ($code == "aesop_video") {
437 437
 		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-video.php');
438 438
 		    echo aesop_video_shortcode($atts);
439
-		}
440
-		else if ($code == "aesop_image") {
439
+		} else if ($code == "aesop_image") {
441 440
 		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php');
442 441
 		    echo aesop_image_shortcode($atts);
443
-		}
444
-		else if ($code == "aesop_quote") {
442
+		} else if ($code == "aesop_quote") {
445 443
 		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php');
446 444
 		    echo aesop_quote_shortcode($atts);
447
-		}
448
-		else if ($code == "aesop_parallax") {
445
+		} else if ($code == "aesop_parallax") {
449 446
 		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php');
450 447
 		    echo aesop_parallax_shortcode($atts);
451
-		}
452
-		else if ($code == "aesop_character") {
448
+		} else if ($code == "aesop_character") {
453 449
 		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php');
454 450
 		    echo aesop_character_shortcode($atts);
455
-		}
456
-		else if ($code == "aesop_collection") {
451
+		} else if ($code == "aesop_collection") {
457 452
 		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php');
458 453
 		    echo aesop_collection_shortcode($atts);
459
-		}
460
-		else if ($code == "aesop_chapter") {
454
+		} else if ($code == "aesop_chapter") {
461 455
 		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php');
462 456
 		    echo aesop_chapter_shortcode($atts);
463
-		}
464
-		else if ($code == "aesop_content") {
457
+		} else if ($code == "aesop_content") {
465 458
 		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php');
466 459
 		    echo aesop_content_shortcode($atts, $atts['content_data']);
467
-		}
468
-		else if ($code == "aesop_gallery") {
460
+		} else if ($code == "aesop_gallery") {
469 461
 		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
470 462
 		    echo do_shortcode( '[aesop_gallery id="'.$atts["id"].'"]');
471
-		}
472
-		else if ($code == "aesop_audio") {
463
+		} else if ($code == "aesop_audio") {
473 464
 		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-audio.php');
474 465
 		    echo aesop_audio_shortcode($atts);
475
-		}
476
-		else if ($code == "aesop_document") {
466
+		} else if ($code == "aesop_document") {
477 467
 		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-document.php');
478 468
 		    echo aesop_document_shortcode($atts);
479
-		}
480
-		else if ($code == "aesop_timeline_stop") {		
469
+		} else if ($code == "aesop_timeline_stop") {		
481 470
 		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-timeline.php');
482 471
 		    echo aesop_timeline_stop_shortcode($atts);
483 472
 		}
@@ -487,11 +476,9 @@  discard block
 block discarded – undo
487 476
 		}*/
488 477
         else if ($code == "aesop_wpimg") {
489 478
             self::wpimg($atts);
490
-		}
491
-		else if ($code == "aesop_wpimg-block") {
479
+		} else if ($code == "aesop_wpimg-block") {
492 480
             self::wpimg_block($atts);
493
-		}
494
-		else {
481
+		} else {
495 482
 			$code = '['.$code.' ';
496 483
 			foreach ($atts as $key => $value) {
497 484
 			    $code = ''.$key.'="'.$value.'" ';
@@ -607,8 +594,9 @@  discard block
 block discarded – undo
607 594
 		$postid = isset( $_POST['postid'] ) ? $_POST['postid'] : false;
608 595
 
609 596
 		// bail out if the current user can't publish posts
610
-		if ( !lasso_user_can( 'delete_post', $postid ) )
611
-			return;
597
+		if ( !lasso_user_can( 'delete_post', $postid ) ) {
598
+					return;
599
+		}
612 600
 		
613 601
 		if (!wp_verify_nonce( $_POST[ 'nonce' ], 'lasso_delete_post' )) {
614 602
 			wp_send_json_error();
@@ -704,15 +692,14 @@  discard block
 block discarded – undo
704 692
 			}
705 693
 	
706 694
 			$result = wp_set_object_terms( $postid, $value, $taxonomy );
707
-		}
708
-		else  {
695
+		} else  {
709 696
 			//remove all terms from post
710 697
 			$result = wp_set_object_terms( $postid, null, $taxonomy );
711 698
 		}
712 699
 
713 700
 		if ( ! is_wp_error( $result ) ) {
714 701
 			return true;
715
-		}else{
702
+		} else{
716 703
 			return false;
717 704
 		}
718 705
 	}
@@ -782,9 +769,9 @@  discard block
 block discarded – undo
782 769
 		$gallery_ids  = isset( $_POST['gallery_ids'] ) ? $_POST['gallery_ids'] : false;
783 770
 		if ( $_POST[ 'gallery_type' ] ) {
784 771
 			$type = $_POST[ 'gallery_type' ];
785
-		}elseif ( ! empty( $options ) && $options[ 'galleryType' ] ) {
772
+		} elseif ( ! empty( $options ) && $options[ 'galleryType' ] ) {
786 773
 			$type = $options[ 'galleryType' ];
787
-		}else{
774
+		} else{
788 775
 			$type = false;
789 776
 		}
790 777
 
@@ -863,13 +850,15 @@  discard block
 block discarded – undo
863 850
 
864 851
 		  $month_numbers = range(1,12);
865 852
 
866
-		  foreach($month_numbers as $month)
867
-			$english_months[] = strftime('%B',mktime(0,0,0,$month,1,2011));
853
+		  foreach($month_numbers as $month) {
854
+		  			$english_months[] = strftime('%B',mktime(0,0,0,$month,1,2011));
855
+		  }
868 856
 
869 857
 		  setlocale(LC_ALL, get_locale());
870 858
 
871
-		  foreach($month_numbers as $month)
872
-			$foreign_months[] = utf8_encode(strftime('%B',mktime(0,0,0,$month,1,2011)));
859
+		  foreach($month_numbers as $month) {
860
+		  			$foreign_months[] = utf8_encode(strftime('%B',mktime(0,0,0,$month,1,2011)));
861
+		  }
873 862
 
874 863
 		  return str_replace($foreign_months, $english_months, $foreignMonthName);
875 864
 	}
Please login to merge, or discard this patch.
public/includes/editor-modules.php 1 patch
Spacing   +352 added lines, -352 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;?>;
78
+			color: <?php echo $text_color; ?>;
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>
@@ -216,17 +216,17 @@  discard block
 block discarded – undo
216 216
 	$is_mobile = wp_is_mobile();
217 217
 
218 218
 	// check for lasso story engine and add a class doniting this
219
-	$ase_status = class_exists( 'Aesop_Core' ) || defined( 'LASSO_CUSTOM' ) ? 'ase-active' : 'ase-not-active';
219
+	$ase_status = class_exists('Aesop_Core') || defined('LASSO_CUSTOM') ? 'ase-active' : 'ase-not-active';
220 220
 
221 221
 	// let users add custom css classes
222
-	$custom_classes = apply_filters( 'lasso_toolbar_classes', '' );
222
+	$custom_classes = apply_filters('lasso_toolbar_classes', '');
223 223
 
224 224
 	// are toolbar headings enabled
225
-	$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
226
-	$toolbar_headings_h4      = lasso_editor_get_option( 'toolbar_headings_h4', 'lasso_editor' );
227
-	$toolbar_list      = lasso_editor_get_option( 'toolbar_list', 'lasso_editor' );
225
+	$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
226
+	$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
227
+	$toolbar_list = lasso_editor_get_option('toolbar_list', 'lasso_editor');
228 228
 
229
-	$toolbar_class  = $toolbar_headings ? 'toolbar-extended' : false;	
229
+	$toolbar_class = $toolbar_headings ? 'toolbar-extended' : false;	
230 230
 	
231 231
 	//show color
232 232
 	$show_color = lasso_editor_get_option('toolbar_show_color', 'lasso_editor');
@@ -234,56 +234,56 @@  discard block
 block discarded – undo
234 234
 	//show alignment
235 235
 	$show_align = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor');
236 236
 	
237
-	$status = get_post_status( get_the_ID() );
237
+	$status = get_post_status(get_the_ID());
238 238
 	
239
-	$shortcodify_disabled = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
239
+	$shortcodify_disabled = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor');
240 240
 	
241
-	$sc_saving_class = ('on' == $shortcodify_disabled || $ase_status == 'ase-not-active')  ? 'shortcodify-disabled' : 'shortcodify-enabled';
241
+	$sc_saving_class = ('on' == $shortcodify_disabled || $ase_status == 'ase-not-active') ? 'shortcodify-disabled' : 'shortcodify-enabled';
242 242
 
243
-    $use_wp_block_image = lasso_editor_get_option('use_wp_block_image', 'lasso_editor','off');
243
+    $use_wp_block_image = lasso_editor_get_option('use_wp_block_image', 'lasso_editor', 'off');
244 244
 
245 245
 	?>
246
-	<div class="lasso--text-popup lasso-editor-controls--wrap <?php echo $toolbar_class.' '.$ase_status.' '.sanitize_html_class( $custom_classes );?>"  style="display:none;">
247
-		<ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"';}?>>
248
-			<?php do_action( 'lasso_toolbar_components_before' );?>
249
-		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e( 'Bold', 'lasso' );?>"></li>
250
-		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e( 'Underline', 'lasso' );?>"></li>
251
-		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e( 'Italicize', 'lasso' );?>"></li>
252
-		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e( 'Strikethrough', 'lasso' );?>"></li>
246
+	<div class="lasso--text-popup lasso-editor-controls--wrap <?php echo $toolbar_class.' '.$ase_status.' '.sanitize_html_class($custom_classes); ?>"  style="display:none;">
247
+		<ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"'; }?>>
248
+			<?php do_action('lasso_toolbar_components_before'); ?>
249
+		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e('Bold', 'lasso'); ?>"></li>
250
+		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e('Underline', 'lasso'); ?>"></li>
251
+		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e('Italicize', 'lasso'); ?>"></li>
252
+		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e('Strikethrough', 'lasso'); ?>"></li>
253 253
 			
254
-		    <?php if ( $toolbar_headings ): ?>
255
-		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>"></li>
256
-		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>"></li>
254
+		    <?php if ($toolbar_headings): ?>
255
+		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>"></li>
256
+		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>"></li>
257 257
 			<?php endif; ?>
258 258
 			
259 259
 			
260 260
 			
261
-			<?php if ( $toolbar_headings_h4 ): ?>
262
-		    <li id="lasso-toolbar--h4" title="<?php esc_attr_e( 'H4 Heading', 'lasso' );?>"></li>
263
-		    <li id="lasso-toolbar--h5" title="<?php esc_attr_e( 'H5 Heading', 'lasso' );?>"></li>
264
-			<li id="lasso-toolbar--h6" title="<?php esc_attr_e( 'H6 Heading', 'lasso' );?>"></li>
261
+			<?php if ($toolbar_headings_h4): ?>
262
+		    <li id="lasso-toolbar--h4" title="<?php esc_attr_e('H4 Heading', 'lasso'); ?>"></li>
263
+		    <li id="lasso-toolbar--h5" title="<?php esc_attr_e('H5 Heading', 'lasso'); ?>"></li>
264
+			<li id="lasso-toolbar--h6" title="<?php esc_attr_e('H6 Heading', 'lasso'); ?>"></li>
265 265
 			<?php endif; ?>
266 266
 			
267
-			<?php if ( $show_color ): ?>
268
-		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e( 'Set Color for Selected Text', 'lasso' );?>"></li>
269
-		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e( 'Choose Color', 'lasso' );?>"></li>
267
+			<?php if ($show_color): ?>
268
+		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e('Set Color for Selected Text', 'lasso'); ?>"></li>
269
+		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e('Choose Color', 'lasso'); ?>"></li>
270 270
 			<?php endif; ?>
271 271
 			
272
-			<?php if ( $toolbar_list ): ?>
273
-		    <li id="lasso-toolbar--ol" title="<?php esc_attr_e( 'Ordered List', 'lasso' );?>"></li>
274
-		    <li id="lasso-toolbar--ul" title="<?php esc_attr_e( 'Unordered List', 'lasso' );?>"></li>
272
+			<?php if ($toolbar_list): ?>
273
+		    <li id="lasso-toolbar--ol" title="<?php esc_attr_e('Ordered List', 'lasso'); ?>"></li>
274
+		    <li id="lasso-toolbar--ul" title="<?php esc_attr_e('Unordered List', 'lasso'); ?>"></li>
275 275
 			<?php endif; ?>
276 276
 					
277 277
 		    
278
-			<li id="lasso-toolbar--link" title="<?php esc_attr_e( 'Anchor Link', 'lasso' );?>">
278
+			<li id="lasso-toolbar--link" title="<?php esc_attr_e('Anchor Link', 'lasso'); ?>">
279 279
 		    	<div id="lasso-toolbar--link__wrap" <?php echo $mobile_style ?> >
280
-		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'http://url.com', 'lasso' );?>"></div>
281
-		    		<a href="#" title="<?php esc_attr_e( 'Create Link', 'lasso' );?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
280
+		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e('http://url.com', 'lasso'); ?>"></div>
281
+		    		<a href="#" title="<?php esc_attr_e('Create Link', 'lasso'); ?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
282 282
 					<input class="styled-checkbox" type="checkbox" id="aesop-toolbar--link_newtab" checked/>
283
-                    <label for="aesop-toolbar--link_newtab"><?php esc_attr_e( 'Open in a New Tab', 'lasso' );?></label>
283
+                    <label for="aesop-toolbar--link_newtab"><?php esc_attr_e('Open in a New Tab', 'lasso'); ?></label>
284 284
 		    	</div>
285 285
 		    </li>
286
-		    <?php do_action( 'lasso_toolbar_components_after' );?>
286
+		    <?php do_action('lasso_toolbar_components_after'); ?>
287 287
 		</ul>				
288 288
 	</div>
289 289
 
@@ -304,21 +304,21 @@  discard block
 block discarded – undo
304 304
 	$is_mobile = wp_is_mobile();
305 305
 
306 306
 	// check for lasso story engine and add a class doniting this
307
-	$ase_status = class_exists( 'Aesop_Core' ) || defined( 'LASSO_CUSTOM' ) ? 'ase-active' : 'ase-not-active';
307
+	$ase_status = class_exists('Aesop_Core') || defined('LASSO_CUSTOM') ? 'ase-active' : 'ase-not-active';
308 308
 
309 309
 	// let users add custom css classes
310
-	$custom_classes = apply_filters( 'lasso_toolbar_classes', '' );
310
+	$custom_classes = apply_filters('lasso_toolbar_classes', '');
311 311
 
312 312
 	// are toolbar headings enabled
313
-	$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
314
-	$toolbar_headings_h4      = lasso_editor_get_option( 'toolbar_headings_h4', 'lasso_editor' );
315
-	$toolbar_list      = lasso_editor_get_option( 'toolbar_list', 'lasso_editor' );
313
+	$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
314
+	$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
315
+	$toolbar_list = lasso_editor_get_option('toolbar_list', 'lasso_editor');
316 316
 
317
-	$toolbar_class  = $toolbar_headings ? 'toolbar-extended' : false;
317
+	$toolbar_class = $toolbar_headings ? 'toolbar-extended' : false;
318 318
 	
319 319
 	// mobile styles
320 320
     $mobile_class = $is_mobile ? 'lasso-mobile' : false;
321
-	$mobile_style =$is_mobile ? 'style="bottom:0px;"' : null;
321
+	$mobile_style = $is_mobile ? 'style="bottom:0px;"' : null;
322 322
 	
323 323
 	//show color
324 324
 	$show_color = lasso_editor_get_option('toolbar_show_color', 'lasso_editor');
@@ -326,140 +326,140 @@  discard block
 block discarded – undo
326 326
 	//show alignment
327 327
 	$show_align = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor');
328 328
 	
329
-	$status = get_post_status( get_the_ID() );
329
+	$status = get_post_status(get_the_ID());
330 330
 	
331
-	$shortcodify_disabled = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
331
+	$shortcodify_disabled = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor');
332 332
 	
333
-	$sc_saving_class = ('on' == $shortcodify_disabled || $ase_status == 'ase-not-active')  ? 'shortcodify-disabled' : 'shortcodify-enabled';
333
+	$sc_saving_class = ('on' == $shortcodify_disabled || $ase_status == 'ase-not-active') ? 'shortcodify-disabled' : 'shortcodify-enabled';
334 334
 
335
-    $use_wp_block_image = lasso_editor_get_option('use_wp_block_image', 'lasso_editor','off');
335
+    $use_wp_block_image = lasso_editor_get_option('use_wp_block_image', 'lasso_editor', 'off');
336 336
 
337 337
 	?>
338
-	<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 ?>>
339
-		<ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"';}?>>
340
-			<?php do_action( 'lasso_toolbar_components_before' );?>
338
+	<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 ?>>
339
+		<ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"'; }?>>
340
+			<?php do_action('lasso_toolbar_components_before'); ?>
341 341
             <?php if (!$text_select_popup) { ?>
342
-		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e( 'Bold', 'lasso' );?>"></li>
343
-		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e( 'Underline', 'lasso' );?>"></li>
344
-		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e( 'Italicize', 'lasso' );?>"></li>
345
-		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e( 'Strikethrough', 'lasso' );?>"></li>
342
+		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e('Bold', 'lasso'); ?>"></li>
343
+		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e('Underline', 'lasso'); ?>"></li>
344
+		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e('Italicize', 'lasso'); ?>"></li>
345
+		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e('Strikethrough', 'lasso'); ?>"></li>
346 346
             <?php }?>
347
-			<li id="lasso-toolbar--components" class="lasso-toolbar--components" title="<?php esc_attr_e( 'Insert Component', 'lasso' );?>" style="color:#ffffa0;">
347
+			<li id="lasso-toolbar--components" class="lasso-toolbar--components" title="<?php esc_attr_e('Insert Component', 'lasso'); ?>" style="color:#ffffa0;">
348 348
 			    <ul id="lasso-toolbar--components__list" style="display:none;color:white;">
349
-			    	<?php if ( 'ase-active' == $ase_status ): ?>
350
-						<li data-type="image" title="<?php esc_attr_e( 'Image', 'lasso' );?>" class="lasso-toolbar--component__image"></li>
351
-						<li data-type="character" title="<?php esc_attr_e( 'Character', 'lasso' );?>" class="lasso-toolbar--component__character"></li>
352
-						<li data-type="quote" title="<?php esc_attr_e( 'Quote', 'lasso' );?>"  class="lasso-toolbar--component__quote"></li>
353
-						<!--li data-type="content" title="<?php esc_attr_e( 'Content', 'lasso' );?>"  class="lasso-toolbar--component__content"></li-->
354
-						<li data-type="chapter" title="<?php esc_attr_e( 'Chapter', 'lasso' );?>"  class="lasso-toolbar--component__chapter"></li>
355
-						<li data-type="parallax" title="<?php esc_attr_e( 'Parallax', 'lasso' );?>"  class="lasso-toolbar--component__parallax"></li>
356
-						<li data-type="audio" title="<?php esc_attr_e( 'Audio', 'lasso' );?>"  class="lasso-toolbar--component__audio"></li>
357
-						<li data-type="video" title="<?php esc_attr_e( 'Video', 'lasso' );?>"  class="lasso-toolbar--component__video"></li>
358
-						<li data-type="map" title="<?php esc_attr_e( 'Map', 'lasso' );?>"  class="lasso-toolbar--component__map"></li>
359
-						<li data-type="timeline_stop" title="<?php esc_attr_e( 'Timeline', 'lasso' );?>"  class="lasso-toolbar--component__timeline"></li>
360
-						<li data-type="document" title="<?php esc_attr_e( 'Document', 'lasso' );?>"  class="lasso-toolbar--component__document"></li>
361
-						<li data-type="collection" title="<?php esc_attr_e( 'Collection', 'lasso' );?>"  class="lasso-toolbar--component__collection"></li>
362
-						<li data-type="gallery" title="<?php esc_attr_e( 'Gallery', 'lasso' );?>"  class="lasso-toolbar--component__gallery"></li>
363
-						<?php if ( class_exists ('Aesop_GalleryPop') ) { ?>
364
-						     <li data-type="gallery" title="<?php esc_attr_e( 'Gallery Pop', 'lasso' );?>"  class="lasso-toolbar--component__gallerypop"></li>
349
+			    	<?php if ('ase-active' == $ase_status): ?>
350
+						<li data-type="image" title="<?php esc_attr_e('Image', 'lasso'); ?>" class="lasso-toolbar--component__image"></li>
351
+						<li data-type="character" title="<?php esc_attr_e('Character', 'lasso'); ?>" class="lasso-toolbar--component__character"></li>
352
+						<li data-type="quote" title="<?php esc_attr_e('Quote', 'lasso'); ?>"  class="lasso-toolbar--component__quote"></li>
353
+						<!--li data-type="content" title="<?php esc_attr_e('Content', 'lasso'); ?>"  class="lasso-toolbar--component__content"></li-->
354
+						<li data-type="chapter" title="<?php esc_attr_e('Chapter', 'lasso'); ?>"  class="lasso-toolbar--component__chapter"></li>
355
+						<li data-type="parallax" title="<?php esc_attr_e('Parallax', 'lasso'); ?>"  class="lasso-toolbar--component__parallax"></li>
356
+						<li data-type="audio" title="<?php esc_attr_e('Audio', 'lasso'); ?>"  class="lasso-toolbar--component__audio"></li>
357
+						<li data-type="video" title="<?php esc_attr_e('Video', 'lasso'); ?>"  class="lasso-toolbar--component__video"></li>
358
+						<li data-type="map" title="<?php esc_attr_e('Map', 'lasso'); ?>"  class="lasso-toolbar--component__map"></li>
359
+						<li data-type="timeline_stop" title="<?php esc_attr_e('Timeline', 'lasso'); ?>"  class="lasso-toolbar--component__timeline"></li>
360
+						<li data-type="document" title="<?php esc_attr_e('Document', 'lasso'); ?>"  class="lasso-toolbar--component__document"></li>
361
+						<li data-type="collection" title="<?php esc_attr_e('Collection', 'lasso'); ?>"  class="lasso-toolbar--component__collection"></li>
362
+						<li data-type="gallery" title="<?php esc_attr_e('Gallery', 'lasso'); ?>"  class="lasso-toolbar--component__gallery"></li>
363
+						<?php if (class_exists('Aesop_GalleryPop')) { ?>
364
+						     <li data-type="gallery" title="<?php esc_attr_e('Gallery Pop', 'lasso'); ?>"  class="lasso-toolbar--component__gallerypop"></li>
365 365
 						<?php }?>
366
-						<?php if ( class_exists ('Aesop_Events') ) { ?>
367
-						     <li data-type="events" title="<?php esc_attr_e( 'Event', 'lasso' );?>"  class="lasso-toolbar--component__event"></li>
366
+						<?php if (class_exists('Aesop_Events')) { ?>
367
+						     <li data-type="events" title="<?php esc_attr_e('Event', 'lasso'); ?>"  class="lasso-toolbar--component__event"></li>
368 368
 						<?php }?>
369 369
 					<?php else: ?>
370 370
                         <?php if ($use_wp_block_image == 'on') { ?>
371
-                            <li data-type="wpimg-block" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );?>" class="image lasso-toolbar--component__image"></li>
371
+                            <li data-type="wpimg-block" title="<?php esc_attr_e('WordPress Image', 'lasso'); ?>" class="image lasso-toolbar--component__image"></li>
372 372
                         <?php } else { ?>
373
-						    <li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );?>" class="image lasso-toolbar--component__image"></li>
373
+						    <li data-type="wpimg" title="<?php esc_attr_e('WordPress Image', 'lasso'); ?>" class="image lasso-toolbar--component__image"></li>
374 374
                         <?php } ?>
375
-						<li data-type="wpquote" title="<?php esc_attr_e( 'WordPress Quote', 'lasso' );?>" class="quote lasso-toolbar--component__quote"></li>
376
-						<!--li data-type="wpvideo" title="<?php esc_attr_e( 'WordPress Video', 'lasso' );?>" class="video lasso-toolbar--component__video"></li-->
375
+						<li data-type="wpquote" title="<?php esc_attr_e('WordPress Quote', 'lasso'); ?>" class="quote lasso-toolbar--component__quote"></li>
376
+						<!--li data-type="wpvideo" title="<?php esc_attr_e('WordPress Video', 'lasso'); ?>" class="video lasso-toolbar--component__video"></li-->
377 377
 					<?php endif; ?>
378
-					<?php do_action( 'lasso_toolbar_components' );?>
378
+					<?php do_action('lasso_toolbar_components'); ?>
379 379
 			    </ul>
380 380
 			</li>
381 381
             <?php if (!$text_select_popup) { ?>
382 382
             
383
-		    <?php if ( $toolbar_headings ): ?>
384
-		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>"></li>
385
-		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>"></li>
383
+		    <?php if ($toolbar_headings): ?>
384
+		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>"></li>
385
+		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>"></li>
386 386
 			<?php endif; ?>
387 387
 			
388 388
 			
389 389
 			
390
-			<?php if ( $toolbar_headings_h4 ): ?>
391
-		    <li id="lasso-toolbar--h4" title="<?php esc_attr_e( 'H4 Heading', 'lasso' );?>"></li>
392
-		    <li id="lasso-toolbar--h5" title="<?php esc_attr_e( 'H5 Heading', 'lasso' );?>"></li>
393
-			<li id="lasso-toolbar--h6" title="<?php esc_attr_e( 'H6 Heading', 'lasso' );?>"></li>
390
+			<?php if ($toolbar_headings_h4): ?>
391
+		    <li id="lasso-toolbar--h4" title="<?php esc_attr_e('H4 Heading', 'lasso'); ?>"></li>
392
+		    <li id="lasso-toolbar--h5" title="<?php esc_attr_e('H5 Heading', 'lasso'); ?>"></li>
393
+			<li id="lasso-toolbar--h6" title="<?php esc_attr_e('H6 Heading', 'lasso'); ?>"></li>
394 394
 			<?php endif; ?>
395 395
 			
396
-			<?php if ( $show_color ): ?>
397
-		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e( 'Set Color for Selected Text', 'lasso' );?>"></li>
398
-		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e( 'Choose Color', 'lasso' );?>"></li>
396
+			<?php if ($show_color): ?>
397
+		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e('Set Color for Selected Text', 'lasso'); ?>"></li>
398
+		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e('Choose Color', 'lasso'); ?>"></li>
399 399
 			<?php endif; ?>
400 400
 			
401
-			<?php if ( $toolbar_list ): ?>
402
-		    <li id="lasso-toolbar--ol" title="<?php esc_attr_e( 'Ordered List', 'lasso' );?>"></li>
403
-		    <li id="lasso-toolbar--ul" title="<?php esc_attr_e( 'Unordered List', 'lasso' );?>"></li>
401
+			<?php if ($toolbar_list): ?>
402
+		    <li id="lasso-toolbar--ol" title="<?php esc_attr_e('Ordered List', 'lasso'); ?>"></li>
403
+		    <li id="lasso-toolbar--ul" title="<?php esc_attr_e('Unordered List', 'lasso'); ?>"></li>
404 404
 			<?php endif; ?>
405 405
 					
406 406
 		    
407
-			<li id="lasso-toolbar--link" title="<?php esc_attr_e( 'Anchor Link', 'lasso' );?>">
407
+			<li id="lasso-toolbar--link" title="<?php esc_attr_e('Anchor Link', 'lasso'); ?>">
408 408
 		    	<div id="lasso-toolbar--link__wrap" <?php echo $mobile_style ?> >
409
-		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'http://url.com', 'lasso' );?>"></div>
410
-		    		<a href="#" title="<?php esc_attr_e( 'Create Link', 'lasso' );?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
409
+		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e('http://url.com', 'lasso'); ?>"></div>
410
+		    		<a href="#" title="<?php esc_attr_e('Create Link', 'lasso'); ?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
411 411
 					<input class="styled-checkbox" type="checkbox" id="aesop-toolbar--link_newtab" checked/>
412
-                    <label for="aesop-toolbar--link_newtab"><?php esc_attr_e( 'Open in a New Tab', 'lasso' );?></label>
412
+                    <label for="aesop-toolbar--link_newtab"><?php esc_attr_e('Open in a New Tab', 'lasso'); ?></label>
413 413
 		    	</div>
414 414
 		    </li>
415 415
             
416 416
             <?php } ?>
417 417
             
418
-		    <?php do_action( 'lasso_toolbar_components_after' );?>
419
-		    <li id="lasso-toolbar--html" title="<?php esc_attr_e( 'Insert HTML or Code', 'lasso' );?>">
418
+		    <?php do_action('lasso_toolbar_components_after'); ?>
419
+		    <li id="lasso-toolbar--html" title="<?php esc_attr_e('Insert HTML or Code', 'lasso'); ?>">
420 420
 		    	<div id="lasso-toolbar--html__wrap" <?php echo $mobile_style ?>>
421
-		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?>"></div>
421
+		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?>"></div>
422 422
 		    		<div id="lasso-toolbar--html__footer">
423 423
 					<div id="lasso-toolbar--html__footer_desc" >
424
-					<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?><br>
425
-					<?php esc_attr_e( 'You can also use Shortcodes', 'lasso' );?><br>
426
-					<?php esc_attr_e( 'You can also enter a URL to embed, such as Youtube, Vimeo and Twitter URLs.', 'lasso' );?>
424
+					<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?><br>
425
+					<?php esc_attr_e('You can also use Shortcodes', 'lasso'); ?><br>
426
+					<?php esc_attr_e('You can also enter a URL to embed, such as Youtube, Vimeo and Twitter URLs.', 'lasso'); ?>
427 427
 					</div>
428 428
 		    			<ul class="lasso-toolbar--html-snips">
429 429
 						
430
-		    				<?php if ( !$toolbar_headings ): ?>
431
-		    				<li id="lasso-html--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>">
432
-		    				<li id="lasso-html--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>">
430
+		    				<?php if (!$toolbar_headings): ?>
431
+		    				<li id="lasso-html--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>">
432
+		    				<li id="lasso-html--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>">
433 433
 		    				<?php endif; ?>
434
-		    				<li id="lasso-html--ol" title="<?php esc_attr_e( 'Ordered List', 'lasso' );?>">
435
-							<li id="lasso-html--ul" title="<?php esc_attr_e( 'Unordered List', 'lasso' );?>">
434
+		    				<li id="lasso-html--ol" title="<?php esc_attr_e('Ordered List', 'lasso'); ?>">
435
+							<li id="lasso-html--ul" title="<?php esc_attr_e('Unordered List', 'lasso'); ?>">
436 436
 							
437
-							<li id="lasso-html--table" title="<?php esc_attr_e( 'Table', 'lasso' );?>">
437
+							<li id="lasso-html--table" title="<?php esc_attr_e('Table', 'lasso'); ?>">
438 438
 		    			</ul>
439
-		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e( 'Cancel', 'lasso' );?></a>
440
-		    			<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>
439
+		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e('Cancel', 'lasso'); ?></a>
440
+		    			<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>
441 441
 		    		</div>
442 442
 		    	</div>
443 443
 		    </li>
444 444
              
445
-			<?php if ( $show_align ): ?>
446
-		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e( 'Text Left Align', 'lasso' );?>"></li>
447
-		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e( 'Text Center Align', 'lasso' );?>"></li>
448
-			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e( 'Text Right Align', 'lasso' );?>"></li>
445
+			<?php if ($show_align): ?>
446
+		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e('Text Left Align', 'lasso'); ?>"></li>
447
+		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e('Text Center Align', 'lasso'); ?>"></li>
448
+			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e('Text Right Align', 'lasso'); ?>"></li>
449 449
 			<?php endif; ?>
450 450
            
451 451
 		</ul>
452
-		<?php if ( is_singular() && $is_mobile ) { ?>
452
+		<?php if (is_singular() && $is_mobile) { ?>
453 453
 
454
-				<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;">
454
+				<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;">
455 455
 
456
-					<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>
457
-					<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>
456
+					<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>
457
+					<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>
458 458
 
459
-					<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>
459
+					<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>
460 460
 
461
-					<?php if ( 'draft' == $status && ( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') )  ) { ?>
462
-						<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>
461
+					<?php if ('draft' == $status && (lasso_user_can('publish_posts') || lasso_user_can('publish_pages'))) { ?>
462
+						<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>
463 463
 					<?php } ?>
464 464
 
465 465
 				</div>
@@ -479,20 +479,20 @@  discard block
 block discarded – undo
479 479
  */
480 480
 function lasso_editor_settings_toolbar() {
481 481
 
482
-	$delete_nonce = wp_create_nonce( 'lasso-delete-nonce' );
482
+	$delete_nonce = wp_create_nonce('lasso-delete-nonce');
483 483
 
484 484
 	ob_start();
485 485
 
486 486
 
487 487
 	// let users add custom css classes
488
-	$custom_classes = apply_filters( 'lasso_component_classes', '' );
488
+	$custom_classes = apply_filters('lasso_component_classes', '');
489 489
 
490 490
 	?>
491
-	<ul class="lasso-component--controls editus-center <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
492
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
493
-		<li class="lasso-component--settings__trigger  lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
494
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
495
-		<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>
491
+	<ul class="lasso-component--controls editus-center <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
492
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
493
+		<li class="lasso-component--settings__trigger  lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
494
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
495
+		<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>
496 496
 	</ul>
497 497
 
498 498
 	<?php return ob_get_clean();
@@ -510,13 +510,13 @@  discard block
 block discarded – undo
510 510
 
511 511
 
512 512
 	// has post thumbnail
513
-	$has_thumbnail = has_post_thumbnail( get_the_ID() ) ? 'class="lasso--featImg--has-thumb"' : false;
513
+	$has_thumbnail = has_post_thumbnail(get_the_ID()) ? 'class="lasso--featImg--has-thumb"' : false;
514 514
 
515 515
 	?>
516
-	<ul id="lasso--featImgControls" <?php echo $has_thumbnail;?>>
517
-		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e( 'Replace Image', 'lasso' );?>" href="#"><i class="lasso-icon-image"></i></a></li>
518
-		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e( 'Delete Image', 'lasso' );?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
519
-		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e( 'save', 'lasso' );?></a></li>
516
+	<ul id="lasso--featImgControls" <?php echo $has_thumbnail; ?>>
517
+		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e('Replace Image', 'lasso'); ?>" href="#"><i class="lasso-icon-image"></i></a></li>
518
+		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e('Delete Image', 'lasso'); ?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
519
+		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e('save', 'lasso'); ?></a></li>
520 520
 	</ul>
521 521
 
522 522
 	<?php return ob_get_clean();
@@ -540,39 +540,39 @@  discard block
 block discarded – undo
540 540
 
541 541
 	$postid = get_the_ID();
542 542
 
543
-	$status = get_post_status( $postid );
544
-	$nonce = wp_create_nonce( 'lasso-update-post-settings' );
543
+	$status = get_post_status($postid);
544
+	$nonce = wp_create_nonce('lasso-update-post-settings');
545 545
 
546 546
 	// let users add custom css classes
547
-	$custom_classes = apply_filters( 'lasso_modal_settings_classes', '' );
547
+	$custom_classes = apply_filters('lasso_modal_settings_classes', '');
548 548
 
549 549
 	// objects categories
550
-	$categories 		= lasso_get_post_objects( $postid, 'category' );
551
-	$tags 				= lasso_get_post_objects( $postid, 'tag' );
550
+	$categories = lasso_get_post_objects($postid, 'category');
551
+	$tags = lasso_get_post_objects($postid, 'tag');
552 552
 	
553 553
 	// modal tabs
554
-	$tabs  				= lasso_modal_addons('tab');
555
-	$content 			= lasso_modal_addons('content');
554
+	$tabs = lasso_modal_addons('tab');
555
+	$content = lasso_modal_addons('content');
556 556
 	
557 557
 	//editor options
558 558
 	$allow_change_date = lasso_editor_get_option('allow_change_date', 'lasso_editor');
559 559
     $allow_edit_excerpt = lasso_editor_get_option('allow_edit_excerpt', 'lasso_editor');
560 560
 	$no_url_setting = lasso_editor_get_option('no_url_setting', 'lasso_editor');
561
-	$support_custom_taxonomy   = lasso_editor_get_option( 'support_custom_taxonomy', 'lasso_editor' );
561
+	$support_custom_taxonomy = lasso_editor_get_option('support_custom_taxonomy', 'lasso_editor');
562 562
 	
563 563
 	//get custom taxonomy
564 564
 	if ($support_custom_taxonomy) {
565
-		$custom_taxonomies         = array_diff(get_object_taxonomies( get_post_type( $postid ), 'names' ), ['category','post_tag','post_format']);
565
+		$custom_taxonomies = array_diff(get_object_taxonomies(get_post_type($postid), 'names'), ['category', 'post_tag', 'post_format']);
566 566
 	} else {
567 567
 		$custom_taxonomies = [];
568 568
 	}
569 569
 
570 570
 	// are we singular
571
-	$is_singular 		= is_singular();
571
+	$is_singular = is_singular();
572 572
 	$is_singular_class 	= $is_singular ? 'lasso--postsettings__2col' : 'lasso--postsettings__1col';
573 573
 	$has_thumb_class    = has_post_thumbnail() ? 'has-thumbnail' : 'no-thumbnail';
574 574
 	$theme_supports     = current_theme_supports('post-thumbnails');
575
-	$default_image 		= LASSO_URL.'/admin/assets/img/empty-img.png';
575
+	$default_image = LASSO_URL.'/admin/assets/img/empty-img.png';
576 576
 	
577 577
 	// do we support pending status
578 578
 	$no_pending_status = lasso_editor_get_option('no_pending_status', 'lasso_editor');
@@ -580,26 +580,26 @@  discard block
 block discarded – undo
580 580
     $excerpt = $post->post_excerpt;
581 581
 
582 582
 ?>
583
-	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>">
583
+	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>">
584 584
 		<div class="lasso--modal__inner">
585 585
 
586
-			<?php if( $tabs ) { echo $tabs; } ?>
586
+			<?php if ($tabs) { echo $tabs; } ?>
587 587
 
588 588
 			<div class="lasso--modal__content modal__content--core visible" data-addon-content="core">
589
-				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class;?>" >
589
+				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class; ?>" >
590 590
 
591
-					<?php if ( $is_singular && $theme_supports ) : ?>
591
+					<?php if ($is_singular && $theme_supports) : ?>
592 592
 					<div class="lasso--postsettings__left">
593
-						<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>
594
-						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url( $default_image );?>">
593
+						<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>
594
+						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url($default_image); ?>">
595 595
 
596 596
 							<div id="lasso--post-thumb__controls" class="lasso--post-thumb__controls">
597
-								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image','lasso');?>" class="dashicons dashicons-edit"></i>
598
-								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image','lasso');?>" class="dashicons dashicons-no-alt"></i>
597
+								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image', 'lasso'); ?>" class="dashicons dashicons-edit"></i>
598
+								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image', 'lasso'); ?>" class="dashicons dashicons-no-alt"></i>
599 599
 								<i id="lasso--save-status" class="lasso-icon lasso-icon-spinner6 not-visible"></i>
600 600
 							</div>
601 601
 
602
-							<?php echo has_post_thumbnail() ? get_the_post_thumbnail( $post->ID, 'medium' ) : '<img src="'.$default_image.'">'; ?>
602
+							<?php echo has_post_thumbnail() ? get_the_post_thumbnail($post->ID, 'medium') : '<img src="'.$default_image.'">'; ?>
603 603
 
604 604
 						</div>
605 605
 						<div id="lasso--featImgSave"><a href="#" class="not-visible">Save</a></div>
@@ -609,15 +609,15 @@  discard block
 block discarded – undo
609 609
 
610 610
 					<div class="lasso--postsettings__right">
611 611
 
612
-						<?php if( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') ): ?>
612
+						<?php if (lasso_user_can('publish_posts') || lasso_user_can('publish_pages')): ?>
613 613
 						<div class="lasso--postsettings__option story-status-option">
614
-							<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>
615
-							<ul class="story-status story-status-<?php echo sanitize_html_class( $status );?>">
616
-								<li id="lasso--status-draft"><?php _e( 'Draft', 'lasso' );?></li>
617
-								<?php if( !$no_pending_status ): ?>								
618
-								<li id="lasso--status-pending"><?php _e( 'Pending', 'lasso' );?></li>
614
+							<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>
615
+							<ul class="story-status story-status-<?php echo sanitize_html_class($status); ?>">
616
+								<li id="lasso--status-draft"><?php _e('Draft', 'lasso'); ?></li>
617
+								<?php if (!$no_pending_status): ?>								
618
+								<li id="lasso--status-pending"><?php _e('Pending', 'lasso'); ?></li>
619 619
 								<?php endif; ?>
620
-								<li id="lasso--status-publish"><?php _e( 'Publish', 'lasso' );?></li>
620
+								<li id="lasso--status-publish"><?php _e('Publish', 'lasso'); ?></li>
621 621
 							</ul>
622 622
 							<div class="lasso--slider_wrap">
623 623
 								<div id="lasso--slider"></div>
@@ -625,10 +625,10 @@  discard block
 block discarded – undo
625 625
 						</div>
626 626
 						<?php endif; ?>
627 627
 
628
-						<?php if ( 'publish' == $status  && !$no_url_setting): ?>
628
+						<?php if ('publish' == $status && !$no_url_setting): ?>
629 629
 						<div class="lasso--postsettings__option story-slug-option">
630
-							<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>
631
-							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset( $post ) ? esc_attr( $post->post_name ) : false;?>">
630
+							<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>
631
+							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset($post) ? esc_attr($post->post_name) : false; ?>">
632 632
 						</div>
633 633
 						<?php endif; ?>
634 634
 
@@ -637,20 +637,20 @@  discard block
 block discarded – undo
637 637
 					<div class="lasso--postsettings__middle">
638 638
 
639 639
 						<div class="lasso--postsettings__option story-categories-option">
640
-							<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>
641
-							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories;?>">
640
+							<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>
641
+							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories; ?>">
642 642
 						</div>
643 643
 
644 644
 						<div class="lasso--postsettings__option story-tags-option">
645
-							<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>
646
-							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags;?>">
645
+							<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>
646
+							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags; ?>">
647 647
 						</div>
648 648
 						
649 649
 						<?php
650 650
 						if (!empty($custom_taxonomies)) {
651 651
 						?>
652 652
 						<div class="lasso--postsettings__option story-custom-taxonomy-option">
653
-							<label><?php _e( 'Custom Taxonomy', 'lasso' );?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e( 'Choose custom taxonomy.', 'lasso' );?>"><i class="lasso-icon-help"></i></span></label>
653
+							<label><?php _e('Custom Taxonomy', 'lasso'); ?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e('Choose custom taxonomy.', 'lasso'); ?>"><i class="lasso-icon-help"></i></span></label>
654 654
 							<select id="lasso--custom-taxo-select" class="lasso--modal__trigger-footer" name="custom_taxo">
655 655
 							<?php foreach ($custom_taxonomies as $taxonomy) {?>
656 656
 							<option value="<?php echo $taxonomy?>"><?php echo $taxonomy?></option>
@@ -667,18 +667,18 @@  discard block
 block discarded – undo
667 667
 						if ($allow_edit_excerpt) { 
668 668
 						?>
669 669
                         <div class="lasso--postsettings__option story-excerpt-option">
670
-							<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>
671
-							<input id="lasso--excerpt" class="lasso--modal__trigger-footer" type="text" name="excerpt" value="<?php echo $excerpt;?>" style="width:100%">
670
+							<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>
671
+							<input id="lasso--excerpt" class="lasso--modal__trigger-footer" type="text" name="excerpt" value="<?php echo $excerpt; ?>" style="width:100%">
672 672
 						</div>
673 673
                         <?php
674 674
 						}?>
675 675
 						<?php 
676 676
 						if ($allow_change_date) { 
677
-						    $dateformat = get_option( 'date_format' ); 
677
+						    $dateformat = get_option('date_format'); 
678 678
 						?>
679
-						    <label><?php _e( 'Post Date', 'lasso' ); ?></label>
680
-							<input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid);?>"/>
681
-							<a href="#" id="lasso--postsettings-setnow"><?php _e( 'Set to Now', 'lasso' ); ?></a>
679
+						    <label><?php _e('Post Date', 'lasso'); ?></label>
680
+							<input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid); ?>"/>
681
+							<a href="#" id="lasso--postsettings-setnow"><?php _e('Set to Now', 'lasso'); ?></a>
682 682
 						<?php
683 683
 						}?>
684 684
 
@@ -700,23 +700,23 @@  discard block
 block discarded – undo
700 700
 					?>
701 701
 					<!--/div-->
702 702
 
703
-					<?php do_action( 'lasso_modal_post_form' ); // action ?>
703
+					<?php do_action('lasso_modal_post_form'); // action ?>
704 704
 
705 705
 					<div class="lasso--postsettings__footer" >
706
-						<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
706
+						<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
707 707
 						<input type="hidden" name="status" value="">
708 708
 						<input type="hidden" name="categories" value="">
709
-						<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
709
+						<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
710 710
 						<input type="hidden" name="action" value="process_update-object_post">
711
-						<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
712
-						<?php do_action( 'lasso_modal_post_form_footer' ); // action ?>
713
-						<input type="submit" id="lasso--postsettings-submit" value="<?php esc_attr_e( 'Save', 'lasso' );?>">
711
+						<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
712
+						<?php do_action('lasso_modal_post_form_footer'); // action ?>
713
+						<input type="submit" id="lasso--postsettings-submit" value="<?php esc_attr_e('Save', 'lasso'); ?>">
714 714
 					</div>
715 715
 
716 716
 				</form>
717 717
 			</div>
718 718
 
719
-			<?php if( $tabs ) { echo $content; } ?>
719
+			<?php if ($tabs) { echo $content; } ?>
720 720
 
721 721
 		</div>
722 722
 
@@ -738,43 +738,43 @@  discard block
 block discarded – undo
738 738
 	ob_start();
739 739
 
740 740
 
741
-	$status = get_post_status( get_the_ID() );
741
+	$status = get_post_status(get_the_ID());
742 742
 
743
-	$nonce = wp_create_nonce( 'lasso-editor-new-post' );
743
+	$nonce = wp_create_nonce('lasso-editor-new-post');
744 744
 
745 745
 	// let users add custom css classes
746
-	$custom_classes = apply_filters( 'lasso_modal_post_classes', '' );
746
+	$custom_classes = apply_filters('lasso_modal_post_classes', '');
747 747
 
748 748
 	// return the post type
749
-	$type = get_post_type( get_the_ID() );
749
+	$type = get_post_type(get_the_ID());
750 750
 
751 751
 	$mobile_style = "";
752 752
 	if (wp_is_mobile()) {
753 753
 		//$mobile_style = 'style="top:140px !important;"';
754 754
 	}
755 755
 	?>
756
-	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" <?php echo $mobile_style;?>">
756
+	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" <?php echo $mobile_style; ?>">
757 757
 		<div class="lasso--modal__inner lasso--hasnewform">
758 758
 
759 759
 			<form id="lasso--postnew__form" enctype="multipart/form-data" class="lasso--post-form">
760 760
 
761 761
 				<div class="lasso--postsettings__option story-slug-option lasso--last-option">
762
-					<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>
763
-					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e( 'Type Your Title Here', 'lasso' );?>">
762
+					<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>
763
+					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e('Type Your Title Here', 'lasso'); ?>">
764 764
 						<div class="lasso--select-wrap" style="width:90px">
765 765
 						<select id="lasso--select-type" name="story_type">
766 766
 
767 767
 							<?php
768 768
 								$types = lasso_post_types_names();
769
-								if ( !empty( $types ) ) {
770
-									foreach( $types as $name => $label ) 
769
+								if (!empty($types)) {
770
+									foreach ($types as $name => $label) 
771 771
                                     {   	
772 772
                                         $type = $name;									
773 773
 										//$type = preg_replace( '/s\b/','', $name );
774 774
 										if ($type == 'page' && !current_user_can('edit_pages')) {
775 775
 											continue;
776 776
 										}
777
-										printf( '<option value="%s">%s</option>', lcfirst( esc_attr( $type ) ) , ucfirst( esc_attr( $label ) ) );
777
+										printf('<option value="%s">%s</option>', lcfirst(esc_attr($type)), ucfirst(esc_attr($label)));
778 778
 									}
779 779
 
780 780
 								}
@@ -785,19 +785,19 @@  discard block
 block discarded – undo
785 785
 				</div>
786 786
 
787 787
 				<div class="lasso--postsettings__footer">
788
-					<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
788
+					<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
789 789
 					<input type="hidden" name="action" value="process_new-object_post">
790 790
 					<?php
791
-						if ( !empty( $types ) ) {
791
+						if (!empty($types)) {
792 792
 							// get the first element
793 793
 							$keys = array_keys($types);
794
-						    $type =$keys[0];						
794
+						    $type = $keys[0];						
795 795
 							//$type = preg_replace( '/s\b/','', $type );
796
-							printf( '<input type="hidden" name="object" value="%s">', lcfirst( esc_attr( $type ) ) );		
796
+							printf('<input type="hidden" name="object" value="%s">', lcfirst(esc_attr($type)));		
797 797
 						}
798 798
 					?>
799
-					<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
800
-					<input type="submit" value="<?php esc_attr_e( 'Create', 'lasso' );?>">
799
+					<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
800
+					<input type="submit" value="<?php esc_attr_e('Create', 'lasso'); ?>">
801 801
 				</div>
802 802
 
803 803
 			</form>
@@ -825,18 +825,18 @@  discard block
 block discarded – undo
825 825
 	ob_start();
826 826
 
827 827
 	// post status
828
-	$status = get_post_status( get_the_ID() );
828
+	$status = get_post_status(get_the_ID());
829 829
 
830 830
 	// let users add custom css classes
831
-	$custom_classes = apply_filters( 'lasso_modal_all_post_classes', '' );
831
+	$custom_classes = apply_filters('lasso_modal_all_post_classes', '');
832 832
 
833 833
 	?>
834
-	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" style="max-height:100%">
834
+	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" style="max-height:100%">
835 835
 		<div class="lasso--modal__inner">
836 836
 
837 837
 			<div class="lasso--post-filtering not-visible">
838 838
 				<div class="lasso--search__results">
839
-					<span id="lasso--results-found"></span><?php _e('results found','lasso');?>
839
+					<span id="lasso--results-found"></span><?php _e('results found', 'lasso'); ?>
840 840
 				</div>
841 841
 				<div class="lasso--search">
842 842
 					<i id="lasso--search__toggle" class="dashicons dashicons-search"></i>
@@ -850,18 +850,18 @@  discard block
 block discarded – undo
850 850
 				$post_types = lasso_post_types_names();
851 851
 				$rest_bases = lasso_post_types_rest_base();
852 852
 
853
-				if ( ! empty( $post_types ) ) {
853
+				if (!empty($post_types)) {
854 854
 					$first = 'active';
855
-					foreach( $post_types as $name => $label ) {
855
+					foreach ($post_types as $name => $label) {
856 856
 						if (array_key_exists($name, $rest_bases)) {
857
-							printf( '<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr( $first), esc_attr( $rest_bases[$name] ), esc_attr( $label ) );
857
+							printf('<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr($first), esc_attr($rest_bases[$name]), esc_attr($label));
858 858
 						}
859 859
 						$first = '';
860 860
 					}
861 861
 
862 862
 				}
863 863
 
864
-				do_action('lasso_modal_post_objects');?>
864
+				do_action('lasso_modal_post_objects'); ?>
865 865
 
866 866
 			</ul>
867 867
 			<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
@@ -880,21 +880,21 @@  discard block
 block discarded – undo
880 880
 	ob_start();
881 881
 
882 882
 
883
-    $use_old_wpimg = lasso_editor_get_option('use_old_wpimg', 'lasso_editor','off');
883
+    $use_old_wpimg = lasso_editor_get_option('use_old_wpimg', 'lasso_editor', 'off');
884 884
     
885 885
 	// let users add custom css classes
886
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
886
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
887 887
 
888 888
 	?>
889
-	<ul class="lasso-component--controls editus-center <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
890
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
891
-        <?php if ($use_old_wpimg=='on') {?>
892
-            <li  class="lasso--wpimg-edit lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
889
+	<ul class="lasso-component--controls editus-center <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
890
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
891
+        <?php if ($use_old_wpimg == 'on') {?>
892
+            <li  class="lasso--wpimg-edit lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
893 893
         <?php } else {?>
894
-            <li  class="lasso-component--settings__trigger lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
894
+            <li  class="lasso-component--settings__trigger lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
895 895
         <?php } ?>
896
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
897
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
896
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
897
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
898 898
 	</ul>
899 899
 
900 900
 	<?php return ob_get_clean();
@@ -905,10 +905,10 @@  discard block
 block discarded – undo
905 905
 
906 906
 	?>
907 907
 	<ul class="lasso-component--controls editus-center" contenteditable="false">
908
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
909
-            <li  class="lasso-component--settings__trigger lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
910
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
911
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
908
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
909
+            <li  class="lasso-component--settings__trigger lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
910
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
911
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
912 912
 	</ul>
913 913
 
914 914
 	<?php return ob_get_clean();
@@ -920,14 +920,14 @@  discard block
 block discarded – undo
920 920
 
921 921
 
922 922
 	// let users add custom css classes
923
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
923
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
924 924
 
925 925
 	?>
926
-	<ul class="lasso-component--controls editus-center <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
927
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
928
-		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
929
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
930
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
926
+	<ul class="lasso-component--controls editus-center <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
927
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
928
+		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
929
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
930
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
931 931
 	</ul>
932 932
 
933 933
 	<?php return ob_get_clean();
@@ -940,16 +940,16 @@  discard block
 block discarded – undo
940 940
  */
941 941
 function lasso_map_form_footer() {
942 942
 
943
-	$nonce = wp_create_nonce( 'lasso-process-map' );
943
+	$nonce = wp_create_nonce('lasso-process-map');
944 944
 
945 945
 	ob_start();
946 946
 
947 947
 	?>
948 948
 	<div class="lasso--map-form__footer">
949
-		<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
950
-		<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
949
+		<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
950
+		<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
951 951
 		<input type="hidden" name="action" value="process_map_save">
952
-		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e( 'Save Locations', 'lasso' );?>">
952
+		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e('Save Locations', 'lasso'); ?>">
953 953
 	</div>
954 954
 
955 955
 	<?php return ob_get_clean();
@@ -967,7 +967,7 @@  discard block
 block discarded – undo
967 967
 
968 968
 	?>
969 969
 	<div id="lasso--pagerefresh" class="visible">
970
-		<?php _e( 'Save this post and refesh the page to see these changes.', 'lasso' );?>
970
+		<?php _e('Save this post and refesh the page to see these changes.', 'lasso'); ?>
971 971
 	</div>
972 972
 
973 973
 	<?php return ob_get_clean();
@@ -981,46 +981,46 @@  discard block
 block discarded – undo
981 981
  */
982 982
 function lasso_editor_options_blob() {
983 983
 
984
-	$codes   = function_exists( 'aesop_shortcodes' ) ? aesop_shortcodes() : array();
985
-    $codes   = add_wpimg_options( $codes );
986
-	$codes   = add_wpimg_block_options( $codes );
987
-    $codes   = apply_filters( 'lasso_custom_options', $codes );
988
-	$galleries  = function_exists( 'lasso_editor_galleries_exist' ) && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
984
+	$codes   = function_exists('aesop_shortcodes') ? aesop_shortcodes() : array();
985
+    $codes   = add_wpimg_options($codes);
986
+	$codes   = add_wpimg_block_options($codes);
987
+    $codes   = apply_filters('lasso_custom_options', $codes);
988
+	$galleries  = function_exists('lasso_editor_galleries_exist') && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
989 989
 
990
-	$nonce = wp_create_nonce( 'lasso_gallery' );
990
+	$nonce = wp_create_nonce('lasso_gallery');
991 991
 
992 992
 	$blob = array();
993 993
 
994
-	if ( empty( $codes ) )
994
+	if (empty($codes))
995 995
 		return;
996 996
 
997
-	foreach ( $codes as $slug => $shortcode ) {
997
+	foreach ($codes as $slug => $shortcode) {
998 998
 		$return = '';
999 999
 		// Shortcode has atts
1000 1000
 
1001
-		if ( count( $shortcode['atts'] ) && $shortcode['atts'] ) {
1001
+		if (count($shortcode['atts']) && $shortcode['atts']) {
1002 1002
 
1003
-			foreach ( $shortcode['atts'] as $attr_name => $attr_info ) {
1003
+			foreach ($shortcode['atts'] as $attr_name => $attr_info) {
1004 1004
 
1005 1005
 
1006
-				$prefix = isset( $attr_info['prefix'] ) ? sprintf( '<span class="lasso-option-prefix">%s</span>', $attr_info['prefix'] ) : null;
1006
+				$prefix = isset($attr_info['prefix']) ? sprintf('<span class="lasso-option-prefix">%s</span>', $attr_info['prefix']) : null;
1007 1007
 
1008 1008
 				$return .= '<form id="aesop-generator-settings" class="lasso--component-settings-form" class="'.$galleries.'" method="post">';
1009 1009
 				$return .= '<p data-option="'.$attr_name.'" class="lasso-option aesop-'.$slug.'-'.$attr_name.'">';
1010
-				$return .= '<label for="aesop-generator-attr-' . $attr_name . '">' . $attr_info['desc'] . '</label>';
1010
+				$return .= '<label for="aesop-generator-attr-'.$attr_name.'">'.$attr_info['desc'].'</label>';
1011 1011
 				$return .= '<small class="lasso-option-desc">'.$attr_info['tip'].'</small>';
1012 1012
 				// Select
1013 1013
 
1014
-				if ( isset( $attr_info['values'] ) ) {
1014
+				if (isset($attr_info['values'])) {
1015 1015
 
1016
-					$return .= '<select name="' . $attr_name . '" id="aesop-generator-attr-' . $attr_name . '" class="lasso-generator-attr">';
1016
+					$return .= '<select name="'.$attr_name.'" id="aesop-generator-attr-'.$attr_name.'" class="lasso-generator-attr">';
1017 1017
 
1018
-					$i=0;
1018
+					$i = 0;
1019 1019
 
1020
-					foreach ( $attr_info['values'] as $attr_value ) {
1020
+					foreach ($attr_info['values'] as $attr_value) {
1021 1021
 						$attr_value_selected = $attr_info['default'] == $attr_value ? ' selected="selected"' : '';
1022 1022
 
1023
-						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" ' . $attr_value_selected . '>'.$attr_info['values'][$i]['name'].'</option>';
1023
+						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" '.$attr_value_selected.'>'.$attr_info['values'][$i]['name'].'</option>';
1024 1024
 
1025 1025
 						$i++;
1026 1026
 					}
@@ -1029,24 +1029,24 @@  discard block
 block discarded – undo
1029 1029
 
1030 1030
 				} else {
1031 1031
 
1032
-					$attr_field_type = isset( $attr_info['type'] ) ? $attr_info['type'] : 'text';
1032
+					$attr_field_type = isset($attr_info['type']) ? $attr_info['type'] : 'text';
1033 1033
 
1034 1034
 					// image upload
1035
-					if ( 'media_upload' == $attr_info['type'] ) {
1035
+					if ('media_upload' == $attr_info['type']) {
1036 1036
 
1037
-						$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.'" />';
1037
+						$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.'" />';
1038 1038
 						$return .= '<a href="#" id="lasso-upload-img" class="lasso-option-button" /></a>';
1039 1039
 
1040
-					} elseif ( 'color' == $attr_info['type'] ) {
1040
+					} elseif ('color' == $attr_info['type']) {
1041 1041
 
1042
-						$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.'" />';
1042
+						$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.'" />';
1043 1043
 
1044
-					} elseif ( 'text_area' == $attr_info['type'] ) {
1044
+					} elseif ('text_area' == $attr_info['type']) {
1045 1045
 
1046
-						$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.'';
1046
+						$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.'';
1047 1047
 
1048 1048
 					} else {
1049
-						$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.'';
1049
+						$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.'';
1050 1050
 					}
1051 1051
 				}
1052 1052
 				$return .= '</p>';
@@ -1057,9 +1057,9 @@  discard block
 block discarded – undo
1057 1057
 		///////////////////////////
1058 1058
 		// START GALLERY AND MAP FRONT END STUFFS
1059 1059
 		///////////////////////////
1060
-		if ( isset( $shortcode['front'] ) && true == $shortcode['front'] ) {
1060
+		if (isset($shortcode['front']) && true == $shortcode['front']) {
1061 1061
 
1062
-			if ( 'gallery' == $shortcode['front_type'] ) {
1062
+			if ('gallery' == $shortcode['front_type']) {
1063 1063
 
1064 1064
 				$return .= lasso_gallery_editor_module();
1065 1065
 
@@ -1070,13 +1070,13 @@  discard block
 block discarded – undo
1070 1070
 		///////////////////////////
1071 1071
 
1072 1072
 		// Single shortcode (not closed)
1073
-		if ( 'single' == $shortcode['type'] ) {
1073
+		if ('single' == $shortcode['type']) {
1074 1074
 
1075 1075
 			$return .= '<input type="hidden" name="lasso-generator-content" id="lasso-generator-content" value="false" />';
1076 1076
 
1077 1077
 		} else {
1078 1078
 
1079
-			$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>';
1079
+			$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>';
1080 1080
 		}
1081 1081
 
1082 1082
 		$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>';
@@ -1096,95 +1096,95 @@  discard block
 block discarded – undo
1096 1096
 }
1097 1097
 
1098 1098
 
1099
-function add_wpimg_options( $shortcodes ) {
1099
+function add_wpimg_options($shortcodes) {
1100 1100
     $custom = array(
1101 1101
         'wpimg'    => array(
1102
-            'name'     => __( 'Image', 'lasso' ),
1102
+            'name'     => __('Image', 'lasso'),
1103 1103
             'type'     => 'single',
1104 1104
             'atts'     => array(
1105 1105
                 'img'    => array(
1106 1106
                     'type'  => 'media_upload',
1107 1107
                     'default'  => '',
1108
-                    'desc'   => __( 'Image URL', 'lasso' ),
1109
-                    'tip'  => __( 'URL for the image. Click <em>Select Media</em> to open the WordPress Media Library.', 'aesop-core' )
1108
+                    'desc'   => __('Image URL', 'lasso'),
1109
+                    'tip'  => __('URL for the image. Click <em>Select Media</em> to open the WordPress Media Library.', 'aesop-core')
1110 1110
                 ),
1111 1111
                 'align'    => array(
1112 1112
                     'type'  => 'select',
1113 1113
                     'values'  => array(						
1114 1114
                         array(
1115 1115
                             'value' => 'center',
1116
-                            'name' => __( 'Center', 'aesop-core' )
1116
+                            'name' => __('Center', 'aesop-core')
1117 1117
                         ),
1118 1118
                         array(
1119 1119
                             'value' => 'left',
1120
-                            'name' => __( 'Left', 'aesop-core' )
1120
+                            'name' => __('Left', 'aesop-core')
1121 1121
                         ),
1122 1122
                         array(
1123 1123
                             'value' => 'right',
1124
-                            'name' => __( 'Right', 'aesop-core' )
1124
+                            'name' => __('Right', 'aesop-core')
1125 1125
                         ),
1126 1126
                     ),
1127 1127
                     'default'  => 'center',
1128
-                    'desc'   => __( 'Alignment', 'lasso' ),
1128
+                    'desc'   => __('Alignment', 'lasso'),
1129 1129
                     'tip'=>''
1130 1130
                 ),			
1131 1131
                 
1132 1132
                 'imgwidth'    => array(
1133 1133
                     'type'  => 'text_small',
1134 1134
                     'default'  => '300px',
1135
-                    'desc'   => __( 'Image Width', 'lasso' ),
1136
-                    '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' )
1135
+                    'desc'   => __('Image Width', 'lasso'),
1136
+                    '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')
1137 1137
                 ),
1138 1138
                 'imgheight'    => array(
1139 1139
                     'type'  => 'text_small',
1140 1140
                     'default'  => '',
1141
-                    'desc'   => __( 'Image Height', 'lasso' ),
1142
-                    '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' )
1141
+                    'desc'   => __('Image Height', 'lasso'),
1142
+                    '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')
1143 1143
                 ),	
1144 1144
                 'linkoption'    => array(
1145 1145
                     'type'  => 'select',
1146 1146
                     'values'  => array(						
1147 1147
                         array(
1148 1148
                             'value' => 'none',
1149
-                            'name' => __( 'None', 'aesop-core' )
1149
+                            'name' => __('None', 'aesop-core')
1150 1150
                         ),
1151 1151
                         array(
1152 1152
                             'value' => 'img',
1153
-                            'name' => __( 'Image', 'aesop-core' )
1153
+                            'name' => __('Image', 'aesop-core')
1154 1154
                         ),
1155 1155
                         array(
1156 1156
                             'value' => 'url',
1157
-                            'name' => __( 'URL', 'aesop-core' )
1157
+                            'name' => __('URL', 'aesop-core')
1158 1158
                         ),
1159 1159
                     ),
1160 1160
                     'default'  => 'none',
1161
-                    'desc'   => __( 'Link', 'lasso' ),
1162
-                    'tip'  => __( 'Click leads to:', 'lasso' )
1161
+                    'desc'   => __('Link', 'lasso'),
1162
+                    'tip'  => __('Click leads to:', 'lasso')
1163 1163
                 ),				
1164 1164
                 
1165 1165
                 'link'    => array(
1166 1166
                     'type'  => 'text',
1167 1167
                     'default'  => '',
1168
-                    'desc'   => __( 'URL Link', 'lasso' ),
1169
-                    'tip'  => __( 'URL link', 'lasso' )
1168
+                    'desc'   => __('URL Link', 'lasso'),
1169
+                    'tip'  => __('URL link', 'lasso')
1170 1170
                 ),
1171 1171
                 'alt'    => array(
1172 1172
                     'type'  => 'text',
1173 1173
                     'default'  => '',
1174
-                    'desc'   => __( 'Image ALT', 'lasso' ),
1175
-                    'tip'  => __( 'ALT tag used for the image. Primarily used for SEO purposes.', 'lasso' )
1174
+                    'desc'   => __('Image ALT', 'lasso'),
1175
+                    'tip'  => __('ALT tag used for the image. Primarily used for SEO purposes.', 'lasso')
1176 1176
                 ),
1177 1177
                 
1178 1178
                 'caption'    => array(
1179 1179
                     'type'  => 'text_area',
1180 1180
                     'default'  => '',
1181
-                    'desc'   => __( 'Caption', 'lasso' ),
1182
-                    'tip'  => __( 'Optional caption for the image.', 'lasso' )
1181
+                    'desc'   => __('Caption', 'lasso'),
1182
+                    'tip'  => __('Optional caption for the image.', 'lasso')
1183 1183
                 ),
1184 1184
                 
1185 1185
 
1186 1186
             ),
1187
-            'desc'     => __( 'An image.', 'aesop-core' ),
1187
+            'desc'     => __('An image.', 'aesop-core'),
1188 1188
             'codes'    => '<script>	            
1189 1189
 						jQuery(document).ready(function($){
1190 1190
                             function linkSetting(l){								
@@ -1208,63 +1208,63 @@  discard block
 block discarded – undo
1208 1208
         )
1209 1209
     );
1210 1210
 
1211
-    return array_merge( $shortcodes, $custom );
1211
+    return array_merge($shortcodes, $custom);
1212 1212
 }
1213 1213
 
1214
-function add_wpimg_block_options( $shortcodes ) {
1214
+function add_wpimg_block_options($shortcodes) {
1215 1215
     $custom = array(
1216 1216
         'wpimg-block'    => array(
1217
-            'name'     => __( 'Image', 'lasso' ),
1217
+            'name'     => __('Image', 'lasso'),
1218 1218
             'type'     => 'single',
1219 1219
             'atts'     => array(
1220 1220
                 'img'    => array(
1221 1221
                     'type'  => 'media_upload',
1222 1222
                     'default'  => '',
1223
-                    'desc'   => __( 'Image URL', 'lasso' ),
1224
-                    'tip'  => __( 'URL for the image. Click <em>Select Media</em> to open the WordPress Media Library.', 'aesop-core' )
1223
+                    'desc'   => __('Image URL', 'lasso'),
1224
+                    'tip'  => __('URL for the image. Click <em>Select Media</em> to open the WordPress Media Library.', 'aesop-core')
1225 1225
                 ),
1226 1226
                 'align'    => array(
1227 1227
                     'type'  => 'select',
1228 1228
                     'values'  => array(						
1229 1229
                         array(
1230 1230
                             'value' => 'center',
1231
-                            'name' => __( 'Center', 'aesop-core' )
1231
+                            'name' => __('Center', 'aesop-core')
1232 1232
                         ),
1233 1233
                         array(
1234 1234
                             'value' => 'left',
1235
-                            'name' => __( 'Left', 'aesop-core' )
1235
+                            'name' => __('Left', 'aesop-core')
1236 1236
                         ),
1237 1237
                         array(
1238 1238
                             'value' => 'right',
1239
-                            'name' => __( 'Right', 'aesop-core' )
1239
+                            'name' => __('Right', 'aesop-core')
1240 1240
                         ),
1241 1241
                     ),
1242 1242
                     'default'  => 'center',
1243
-                    'desc'   => __( 'Alignment', 'lasso' ),
1243
+                    'desc'   => __('Alignment', 'lasso'),
1244 1244
                     'tip'=>''
1245 1245
                 ),		
1246 1246
                 'alt'    => array(
1247 1247
                     'type'  => 'text',
1248 1248
                     'default'  => '',
1249
-                    'desc'   => __( 'Image ALT', 'lasso' ),
1250
-                    'tip'  => __( 'ALT tag used for the image. Primarily used for SEO purposes.', 'lasso' )
1249
+                    'desc'   => __('Image ALT', 'lasso'),
1250
+                    'tip'  => __('ALT tag used for the image. Primarily used for SEO purposes.', 'lasso')
1251 1251
                 ),
1252 1252
                 'caption'    => array(
1253 1253
                     'type'  => 'text',
1254 1254
                     'default'  => '',
1255
-                    'desc'   => __( 'Caption', 'lasso' ),
1256
-                    'tip'  => __( 'Optional caption for the image.', 'lasso' )
1255
+                    'desc'   => __('Caption', 'lasso'),
1256
+                    'tip'  => __('Optional caption for the image.', 'lasso')
1257 1257
                 ),
1258 1258
                 'link'    => array(
1259 1259
                     'type'  => 'text',
1260 1260
                     'default'  => '',
1261
-                    'desc'   => __( 'Link URL', 'lasso' ),
1262
-                    'tip'  => __( 'Optional URL to link.', 'lasso' )
1261
+                    'desc'   => __('Link URL', 'lasso'),
1262
+                    'tip'  => __('Optional URL to link.', 'lasso')
1263 1263
                 ),
1264 1264
                
1265 1265
 
1266 1266
             ),
1267
-            'desc'     => __( 'A WP Image Block.', 'aesop-core' ),
1267
+            'desc'     => __('A WP Image Block.', 'aesop-core'),
1268 1268
             'codes'    => '<script>	            
1269 1269
 						jQuery(document).ready(function($){
1270 1270
                             
@@ -1273,7 +1273,7 @@  discard block
 block discarded – undo
1273 1273
         )
1274 1274
     );
1275 1275
 
1276
-    return array_merge( $shortcodes, $custom );
1276
+    return array_merge($shortcodes, $custom);
1277 1277
 }
1278 1278
 
1279 1279
 /**
@@ -1293,14 +1293,14 @@  discard block
 block discarded – undo
1293 1293
 				<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
1294 1294
 				<div id="lasso--hide" style="display:none;" class="lasso--post-form">
1295 1295
 					<i class="lasso-icon lasso-icon-move"></i>
1296
-					<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>
1296
+					<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>
1297 1297
 					<div class="lasso--slider_wrap">
1298 1298
 						<div id="lasso--slider"></div>
1299 1299
 					</div>
1300 1300
 					<ul id="lasso--revision-list"></ul>
1301 1301
 					<div class="lasso--btn-group lasso--btn-group-small">
1302
-						<a href="#" class="lasso--btn-secondary" id="lasso--close-modal"><?php _e( 'Cancel', 'lasso' );?></a>
1303
-						<a href="#" class="lasso--btn-primary" id="lasso--select-revision"><?php _e( 'Select', 'lasso' );?></a>
1302
+						<a href="#" class="lasso--btn-secondary" id="lasso--close-modal"><?php _e('Cancel', 'lasso'); ?></a>
1303
+						<a href="#" class="lasso--btn-primary" id="lasso--select-revision"><?php _e('Select', 'lasso'); ?></a>
1304 1304
 					</div>
1305 1305
 				</div>
1306 1306
 
@@ -1323,7 +1323,7 @@  discard block
 block discarded – undo
1323 1323
     // Normalize into a six character long hex string
1324 1324
     $hex = str_replace('#', '', $hex);
1325 1325
     if (strlen($hex) == 3) {
1326
-        $hex = str_repeat(substr($hex,0,1), 2).str_repeat(substr($hex,1,1), 2).str_repeat(substr($hex,2,1), 2);
1326
+        $hex = str_repeat(substr($hex, 0, 1), 2).str_repeat(substr($hex, 1, 1), 2).str_repeat(substr($hex, 2, 1), 2);
1327 1327
     }
1328 1328
 
1329 1329
     // Split into three parts: R, G and B
@@ -1332,7 +1332,7 @@  discard block
 block discarded – undo
1332 1332
 
1333 1333
     foreach ($color_parts as $color) {
1334 1334
         $color   = hexdec($color); // Convert to decimal
1335
-        $color   = max(0,min(255,$color + $steps)); // Adjust color
1335
+        $color   = max(0, min(255, $color + $steps)); // Adjust color
1336 1336
         $return .= str_pad(dechex($color), 2, '0', STR_PAD_LEFT); // Make two char hex code
1337 1337
     }
1338 1338
 
Please login to merge, or discard this patch.
public/includes/helpers.php 1 patch
Spacing   +91 added lines, -91 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,.code-block');
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,24 +194,24 @@  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) {
197
+function lasso_get_post_objects($postid, $taxonomy) {
198 198
 
199
-	if ( empty( $postid ) )
199
+	if (empty($postid))
200 200
 		$postid = get_the_ID();
201 201
 
202
-    if ('category' == $taxonomy)  {
203
-        $objects = get_the_category( $postid );
204
-    } else if ('tag' == $taxonomy)  {
205
-        $objects = get_the_tags( $postid );
202
+    if ('category' == $taxonomy) {
203
+        $objects = get_the_category($postid);
204
+    } else if ('tag' == $taxonomy) {
205
+        $objects = get_the_tags($postid);
206 206
     } else {
207
-        $objects = get_the_terms( $postid, $taxonomy );
207
+        $objects = get_the_terms($postid, $taxonomy);
208 208
     }
209 209
 
210
-	if ( empty( $objects) )
210
+	if (empty($objects))
211 211
 		return;
212 212
 
213 213
 	$out = '';
214
-	foreach( $objects as $object ) {
214
+	foreach ($objects as $object) {
215 215
 		$out .= $object->name.',';
216 216
 	}
217 217
 
@@ -225,24 +225,24 @@  discard block
 block discarded – undo
225 225
  *	@since 0.9.3
226 226
  *	@return array all categoiries
227 227
 */
228
-function lasso_get_objects( $taxonomy = 'category' ) {
228
+function lasso_get_objects($taxonomy = 'category') {
229 229
 
230
-    if ('category' == $taxonomy)  {
230
+    if ('category' == $taxonomy) {
231 231
         $objects = get_categories(array('hide_empty' => 0));
232
-    } else if ('tag' == $taxonomy)  {
232
+    } else if ('tag' == $taxonomy) {
233 233
         $objects = get_tags(array('hide_empty' => 0));
234 234
     } else {
235
-        $objects = get_terms( array(
235
+        $objects = get_terms(array(
236 236
             'taxonomy' => $taxonomy,
237 237
             'hide_empty' => false,
238 238
         ));
239 239
     }
240 240
 	
241
-	if ( empty( $objects) )
241
+	if (empty($objects))
242 242
 		return;
243 243
 
244 244
 	$out = "";
245
-	foreach( $objects as $object ) {
245
+	foreach ($objects as $object) {
246 246
 		$out .= $object->name.',';
247 247
 	}
248 248
 
@@ -257,11 +257,11 @@  discard block
 block discarded – undo
257 257
  * @since 0.9.4
258 258
  */
259 259
 function lasso_post_types_names() {
260
-	$post_types = get_post_types( array(
260
+	$post_types = get_post_types(array(
261 261
 		'public' => true,
262
-	), 'objects' );
263
-	$post_types = array_combine( array_keys( $post_types ), wp_list_pluck( $post_types, 'label' ) );
264
-    unset( $post_types[ 'attachment' ] );
262
+	), 'objects');
263
+	$post_types = array_combine(array_keys($post_types), wp_list_pluck($post_types, 'label'));
264
+    unset($post_types['attachment']);
265 265
 
266 266
 	/**
267 267
 	 * Set which post types are allowed
@@ -270,14 +270,14 @@  discard block
 block discarded – undo
270 270
 	 *
271 271
 	 * @param array $allowed_post_types Array of names (not labels) of allowed post types. Must be registered.
272 272
 	 */
273
-	$allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor', array( 'post', 'page') );
274
-	$allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
273
+	$allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', array('post', 'page'));
274
+	$allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
275 275
 	if (!current_user_can('edit_pages')) {
276
-		$allowed_post_types = array_diff($allowed_post_types,array('page'));
276
+		$allowed_post_types = array_diff($allowed_post_types, array('page'));
277 277
 	}
278
-	foreach( $post_types as $name => $label ) {
279
-		if ( ! in_array( $name, $allowed_post_types ) ) {
280
-			unset( $post_types[ $name ] );
278
+	foreach ($post_types as $name => $label) {
279
+		if (!in_array($name, $allowed_post_types)) {
280
+			unset($post_types[$name]);
281 281
 		}
282 282
 	}
283 283
 	return $post_types;
@@ -285,10 +285,10 @@  discard block
 block discarded – undo
285 285
 
286 286
 
287 287
 function lasso_post_types() {
288
-	$post_types = get_post_types( array(
288
+	$post_types = get_post_types(array(
289 289
 		'public' => true,
290
-	), 'names' );
291
-    unset( $post_types[ 'attachment' ] );
290
+	), 'names');
291
+    unset($post_types['attachment']);
292 292
 
293 293
 	/**
294 294
 	 * Set which post types are allowed
@@ -297,11 +297,11 @@  discard block
 block discarded – undo
297 297
 	 *
298 298
 	 * @param array $allowed_post_types Array of names (not labels) of allowed post types. Must be registered.
299 299
 	 */
300
-	$allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor', array( 'post') );
301
-	$allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
302
-	foreach( $post_types as $name => $label ) {
303
-		if ( ! in_array( $name, $allowed_post_types ) ) {
304
-			unset( $post_types[ $name ] );
300
+	$allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', array('post'));
301
+	$allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
302
+	foreach ($post_types as $name => $label) {
303
+		if (!in_array($name, $allowed_post_types)) {
304
+			unset($post_types[$name]);
305 305
 		}
306 306
 	}
307 307
 	return $post_types;
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
 	global $wp_post_types;
312 312
 	$post_types = lasso_post_types();
313 313
 	$rest_base = array();
314
-	foreach ( $post_types as $post_type) {
314
+	foreach ($post_types as $post_type) {
315 315
 		$rest_base[$post_type] = $wp_post_types[$post_type]->rest_base;
316 316
 	}
317 317
     
@@ -329,22 +329,22 @@  discard block
 block discarded – undo
329 329
 *	@uses lasso_modal_addons()
330 330
 *	@since 0.9.4
331 331
 */
332
-function lasso_modal_addons_content( $tab = '', $type ){
332
+function lasso_modal_addons_content($tab = '', $type) {
333 333
 
334
-	$name = lasso_clean_string( $tab['name'] );
334
+	$name = lasso_clean_string($tab['name']);
335 335
 
336
-	if ( 'tab' == $type ) {
336
+	if ('tab' == $type) {
337 337
 
338
-		$out = sprintf( '<li data-addon-name="%s">%s</li>', $name, $tab['name'] );
338
+		$out = sprintf('<li data-addon-name="%s">%s</li>', $name, $tab['name']);
339 339
 
340
-	} else if ( 'content' == $type ){
340
+	} else if ('content' == $type) {
341 341
 
342
-		$content = isset( $tab['content'] ) && is_callable( $tab['content'] ) ? call_user_func( $tab['content'] ) : false;
343
-		$options = isset( $tab['options'] ) && is_callable( $tab['options'] ) ? call_user_func( $tab['options'] ) : false;
342
+		$content = isset($tab['content']) && is_callable($tab['content']) ? call_user_func($tab['content']) : false;
343
+		$options = isset($tab['options']) && is_callable($tab['options']) ? call_user_func($tab['options']) : false;
344 344
 
345
-		$out = sprintf( '<div class="lasso--modal__content not-visible" data-addon-content="%s">
345
+		$out = sprintf('<div class="lasso--modal__content not-visible" data-addon-content="%s">
346 346
 			%s%s
347
-			</div>', $name, $content, lasso_option_form( $name, $options ) );
347
+			</div>', $name, $content, lasso_option_form($name, $options));
348 348
 
349 349
 	}
350 350
 
@@ -359,12 +359,12 @@  discard block
 block discarded – undo
359 359
 *
360 360
 * @return void|string
361 361
 */
362
-function lasso_clean_string( $string = '' ) {
362
+function lasso_clean_string($string = '') {
363 363
 
364
-	if ( empty( $string ) )
364
+	if (empty($string))
365 365
 		return;
366 366
 
367
-	return sanitize_text_field( strtolower( preg_replace('/[\s_]/', '-', $string ) ) );
367
+	return sanitize_text_field(strtolower(preg_replace('/[\s_]/', '-', $string)));
368 368
 }
369 369
 
370 370
 /**
@@ -377,13 +377,13 @@  discard block
 block discarded – undo
377 377
  *
378 378
  * @return void|string
379 379
  */
380
-function lasso_unclean_string( $string = '' ) {
380
+function lasso_unclean_string($string = '') {
381 381
 
382
-	if ( empty( $string ) ) {
382
+	if (empty($string)) {
383 383
 		return;
384 384
 	}
385 385
 
386
-	return sanitize_text_field( strtolower( str_replace( '-', '_', $string ) ) );
386
+	return sanitize_text_field(strtolower(str_replace('-', '_', $string)));
387 387
 }
388 388
 
389 389
 
@@ -398,40 +398,40 @@  discard block
 block discarded – undo
398 398
  * @param unknown $postid int the id of the post object to check against
399 399
  * @since 0.9.9.7 added filter 'lasso_user_can_filter'
400 400
  */
401
-if ( !function_exists( 'lasso_user_can' ) ):
402
-	function lasso_user_can( $action = '', $postid = 0 ) {
401
+if (!function_exists('lasso_user_can')):
402
+	function lasso_user_can($action = '', $postid = 0) {
403 403
         $result = false;
404
-		if ( empty( $action ) )
404
+		if (empty($action))
405 405
 			$action = 'edit_posts';
406 406
 
407
-		if ( empty( $postid ) && $action != 'edit_posts' && $action != 'publish_posts' && $action != 'delete_posts')
407
+		if (empty($postid) && $action != 'edit_posts' && $action != 'publish_posts' && $action != 'delete_posts')
408 408
 			$postid = get_the_ID();
409 409
 
410
-		if ( is_user_logged_in() && current_user_can( $action, $postid ) ) {
410
+		if (is_user_logged_in() && current_user_can($action, $postid)) {
411 411
 			// check against post types:
412
-			$allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor', array( 'post', 'page') );
412
+			$allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', array('post', 'page'));
413 413
 			
414 414
 			if (!current_user_can('edit_pages')) {
415
-				$allowed_post_types = array_diff($allowed_post_types,array('page'));
415
+				$allowed_post_types = array_diff($allowed_post_types, array('page'));
416 416
 			}
417 417
 			
418 418
             if (!empty($allowed_post_types) && !empty($postid)) {
419
-				$type = get_post_type( $postid );
420
-                $allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
419
+				$type = get_post_type($postid);
420
+                $allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
421 421
 				
422
-                if ( in_array( $type, $allowed_post_types ) ) {
423
-				   $result =  true;
422
+                if (in_array($type, $allowed_post_types)) {
423
+				   $result = true;
424 424
 			    }
425 425
             } else {
426 426
                 //we are not checking against a post, return true
427
-				$result =  true;
427
+				$result = true;
428 428
         	}
429 429
 		} else {
430 430
 			$result = false;
431 431
 		}
432 432
 		//if ( function_exists( 'is_gutenberg_page' ) && has_blocks() ) return false;
433 433
 		
434
-		return apply_filters( 'lasso_user_can_filter', $result,  $action, $postid);
434
+		return apply_filters('lasso_user_can_filter', $result, $action, $postid);
435 435
 	}
436 436
 endif;
437 437
 
@@ -440,25 +440,25 @@  discard block
 block discarded – undo
440 440
 *
441 441
 *	@since 0.9.5
442 442
 */
443
-if ( !function_exists('lasso_editor_empty_results') ):
443
+if (!function_exists('lasso_editor_empty_results')):
444 444
 
445
-	function lasso_editor_empty_results( $type = 'posts' ){
445
+	function lasso_editor_empty_results($type = 'posts') {
446 446
 
447
-		if ( 'posts' == $type ) {
447
+		if ('posts' == $type) {
448 448
 
449
-			$string = apply_filters('lasso_empty_state_message', __('No posts to show', 'lasso') );
449
+			$string = apply_filters('lasso_empty_state_message', __('No posts to show', 'lasso'));
450 450
 			$icon = 'lasso-icon-file-text2';
451 451
 			$button = false;
452 452
 
453
-		} elseif ( 'revision' == $type ) {
453
+		} elseif ('revision' == $type) {
454 454
 
455
-			$string = apply_filters('lasso_empty_state_message', __('No revisions found', 'lasso') );
455
+			$string = apply_filters('lasso_empty_state_message', __('No revisions found', 'lasso'));
456 456
 			$icon = 'lasso-icon-history';
457
-			$button = sprintf('<a href="#" class="lasso--btn-secondary" id="lasso--close-modal">%s</a>', __('Close','lasso') );
457
+			$button = sprintf('<a href="#" class="lasso--btn-secondary" id="lasso--close-modal">%s</a>', __('Close', 'lasso'));
458 458
 
459 459
 		}
460 460
 
461
-		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 );
461
+		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);
462 462
 	}
463 463
 
464 464
 endif;
Please login to merge, or discard this patch.