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