Completed
Push — master ( 9aed0a...23281d )
by
unknown
02:09
created
public/includes/wrap-shortcodes.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@  discard block
 block discarded – undo
6 6
 
7 7
 
8 8
  
9
-if ( lasso_user_can( 'edit_posts' ) && ! is_admin() ) {
10
-	add_filter( 'the_content', 'lasso_wrap_shortcodes', 9 );
9
+if (lasso_user_can('edit_posts') && !is_admin()) {
10
+	add_filter('the_content', 'lasso_wrap_shortcodes', 9);
11 11
 }
12 12
 
13 13
 /**
@@ -20,33 +20,33 @@  discard block
 block discarded – undo
20 20
  *
21 21
  * @return string
22 22
  */
23
-function lasso_wrap_shortcodes( $content ) {
23
+function lasso_wrap_shortcodes($content) {
24 24
 	global $shortcode_tags;
25 25
 
26
-	if ( false === strpos( $content, '[' ) ) {
26
+	if (false === strpos($content, '[')) {
27 27
 		return $content;
28 28
 	}
29 29
 
30
-	if ( empty( $shortcode_tags ) || ! is_array( $shortcode_tags ) ) {
30
+	if (empty($shortcode_tags) || !is_array($shortcode_tags)) {
31 31
 		return $content;
32 32
 	}
33 33
 
34
-	$tagnames  = array_keys( $shortcode_tags );
35
-	$tagregexp = join( '|', array_map( 'preg_quote', $tagnames ) );
34
+	$tagnames  = array_keys($shortcode_tags);
35
+	$tagregexp = join('|', array_map('preg_quote', $tagnames));
36 36
 	$pattern   = "/\\[($tagregexp)/s";
37 37
 
38
-	if ( 0 === preg_match( $pattern, $content ) ) {
38
+	if (0 === preg_match($pattern, $content)) {
39 39
 		// Avoids parsing HTML when there are no shortcodes or embeds anyway.
40 40
 		return $content;
41 41
 	}
42 42
 
43
-	$content = do_shortcodes_in_html_tags( $content, true ,$tagnames);
43
+	$content = do_shortcodes_in_html_tags($content, true, $tagnames);
44 44
 
45 45
 	$pattern = get_shortcode_regex();
46
-	$content = preg_replace_callback( "/$pattern/s", 'lasso_wrap_shortcode_tag', $content );
46
+	$content = preg_replace_callback("/$pattern/s", 'lasso_wrap_shortcode_tag', $content);
47 47
 
48 48
 	// Always restore square braces so we don't break things like <!--[if IE ]>
49
-	$content = unescape_invalid_shortcodes( $content );
49
+	$content = unescape_invalid_shortcodes($content);
50 50
 
51 51
 	return $content;
52 52
 }
@@ -60,33 +60,33 @@  discard block
 block discarded – undo
60 60
  *
61 61
  * @return string
62 62
  */
63
-function lasso_wrap_shortcode_tag( $m ) {
63
+function lasso_wrap_shortcode_tag($m) {
64 64
 	// allow [[foo]] syntax for escaping a tag
65
-	if ( $m[1] == '[' && $m[6] == ']' ) {
66
-		return substr( $m[0], 1, - 1 );
65
+	if ($m[1] == '[' && $m[6] == ']') {
66
+		return substr($m[0], 1, - 1);
67 67
 	}
68
-	$exception_arr1 = array('aesop_gallery_pop','aesop_character_carousel');
69
-	$exception_arr2 = array('su_box', 'su_note', 'su_document', 'su_spoiler','av_textblock','av_toggle_container','av_toggle');
70
-	$exception_arr2 = apply_filters('lasso_wrap_shortcode_exceptions',$exception_arr2);
68
+	$exception_arr1 = array('aesop_gallery_pop', 'aesop_character_carousel');
69
+	$exception_arr2 = array('su_box', 'su_note', 'su_document', 'su_spoiler', 'av_textblock', 'av_toggle_container', 'av_toggle');
70
+	$exception_arr2 = apply_filters('lasso_wrap_shortcode_exceptions', $exception_arr2);
71 71
 
72
-	if ( strpos( $m[2],'aesop_'  ) === 0 ) {
72
+	if (strpos($m[2], 'aesop_') === 0) {
73 73
 		// check against the exceptions
74
-		if (strpos_arr($m[2],$exception_arr1)===false) {
74
+		if (strpos_arr($m[2], $exception_arr1) === false) {
75 75
 		    return $m[0];
76 76
 		}
77 77
 	}
78
-	if (strpos_arr($m[2],$exception_arr2)!==false) {
78
+	if (strpos_arr($m[2], $exception_arr2) !== false) {
79 79
 		return $m[0];
80 80
 	}
81 81
 
82
-	return '<!--EDITUS_OTHER_SHORTCODE_START|[' . $m[0] . ']-->' . $m[0] . '<!--EDITUS_OTHER_SHORTCODE_END-->';
82
+	return '<!--EDITUS_OTHER_SHORTCODE_START|['.$m[0].']-->'.$m[0].'<!--EDITUS_OTHER_SHORTCODE_END-->';
83 83
 }
84 84
 
85 85
 /* a helper function */
86 86
 function strpos_arr($haystack, $needle) {
87
-    if(!is_array($needle)) $needle = array($needle);
88
-    foreach($needle as $what) {
89
-        if(($pos = strpos($haystack, $what))!==false) return $pos;
87
+    if (!is_array($needle)) $needle = array($needle);
88
+    foreach ($needle as $what) {
89
+        if (($pos = strpos($haystack, $what)) !== false) return $pos;
90 90
     }
91 91
     return false;
92 92
 }
93 93
\ No newline at end of file
Please login to merge, or discard this patch.
includes/process/update_object.php 1 patch
Spacing   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
 use lasso\internal_api\api_action;
11 11
 
12
-class update_object implements api_action{
12
+class update_object implements api_action {
13 13
 
14 14
 	/**
15 15
 	 * The nonce action for this request.
@@ -29,11 +29,11 @@  discard block
 block discarded – undo
29 29
 	 *
30 30
 	 * @return bool Always returns true.
31 31
 	 */
32
-	public function post( $data ) {
32
+	public function post($data) {
33 33
 
34
-		$status = isset( $data['status'] ) ? $data['status'] : false;
35
-		$postid = isset( $data['postid'] ) ? $data['postid'] : false;
36
-		$slug   = isset( $data['story_slug'] ) ? $data['story_slug'] : false;
34
+		$status = isset($data['status']) ? $data['status'] : false;
35
+		$postid = isset($data['postid']) ? $data['postid'] : false;
36
+		$slug   = isset($data['story_slug']) ? $data['story_slug'] : false;
37 37
 
38 38
 
39 39
 
@@ -43,28 +43,28 @@  discard block
 block discarded – undo
43 43
 			'post_status' 	=> $status
44 44
 		);
45 45
 
46
-		wp_update_post( apply_filters( 'lasso_object_status_update_args', $args ) );
46
+		wp_update_post(apply_filters('lasso_object_status_update_args', $args));
47 47
 
48 48
 
49 49
 		// update categories
50
-		$cats  = isset( $data['story_cats'] ) ? $data['story_cats'] : false;
51
-		self::set_post_terms( $postid, $cats, 'category' );
50
+		$cats = isset($data['story_cats']) ? $data['story_cats'] : false;
51
+		self::set_post_terms($postid, $cats, 'category');
52 52
 
53 53
 
54 54
 		// update tags
55
-		$tags = isset( $data['story_tags'] ) ? $data['story_tags'] : false;
56
-		self::set_post_terms( $postid, $tags, 'post_tag' );
55
+		$tags = isset($data['story_tags']) ? $data['story_tags'] : false;
56
+		self::set_post_terms($postid, $tags, 'post_tag');
57 57
 		
58 58
 		// update custom taxonomy
59
-		$taxs  = isset( $data['story_custom_taxonomy'] ) ? $data['story_custom_taxonomy'] : false;
60
-		self::set_custom_taxonomy( $postid, $taxs );
59
+		$taxs = isset($data['story_custom_taxonomy']) ? $data['story_custom_taxonomy'] : false;
60
+		self::set_custom_taxonomy($postid, $taxs);
61 61
 		
62 62
 		//update date
63
-		$date  = isset( $data['post_date'] ) ? $data['post_date'] : false;
64
-		self::set_date( $postid, $date );
63
+		$date = isset($data['post_date']) ? $data['post_date'] : false;
64
+		self::set_date($postid, $date);
65 65
 
66 66
 
67
-		do_action( 'lasso_post_updated', $postid, $slug, $status, get_current_user_ID() );
67
+		do_action('lasso_post_updated', $postid, $slug, $status, get_current_user_ID());
68 68
 
69 69
 		return true;
70 70
 
@@ -78,8 +78,8 @@  discard block
 block discarded – undo
78 78
 	 *
79 79
 	 * @return array Array of keys to pull from $_POST per action and their sanitization callback
80 80
 	 */
81
-	public static function params(){
82
-		$params[ 'process_update_object_post' ] = array(
81
+	public static function params() {
82
+		$params['process_update_object_post'] = array(
83 83
 			'postid' => 'absint',
84 84
 			'status' => 'strip_tags',
85 85
 			'story_slug' => array(
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 	 * @return array Array of additional functions to use to authorize action.
118 118
 	 */
119 119
 	public static function auth_callbacks() {
120
-		$params[ 'process_update_object_post' ] = array(
120
+		$params['process_update_object_post'] = array(
121 121
 			'lasso_user_can'
122 122
 		);
123 123
 
@@ -139,14 +139,14 @@  discard block
 block discarded – undo
139 139
 	 *
140 140
 	 *  @return bool True if update was successful, false if not.
141 141
 	 */
142
-	public function set_post_terms( $postid, $value, $taxonomy ) {
143
-		if( $value ) {
142
+	public function set_post_terms($postid, $value, $taxonomy) {
143
+		if ($value) {
144 144
 			// first check if multiple, make array if so.
145
-			if ( self::has_multiple_objects( $value ) ) {	
146
-				$value = explode( ',', $value );
145
+			if (self::has_multiple_objects($value)) {	
146
+				$value = explode(',', $value);
147 147
 			}
148 148
 			
149
-			if ($taxonomy =='category') {
149
+			if ($taxonomy == 'category') {
150 150
                 // convert from names to category ids
151 151
 				$cats = array();
152 152
 				if (is_array($value)) {
@@ -159,17 +159,17 @@  discard block
 block discarded – undo
159 159
 				}
160 160
 			}
161 161
 	
162
-			$result = wp_set_object_terms( $postid, $value, $taxonomy );
162
+			$result = wp_set_object_terms($postid, $value, $taxonomy);
163 163
 		}
164
-		else  {
164
+		else {
165 165
 			//remove all terms from post
166
-			$result = wp_set_object_terms( $postid, null, $taxonomy );
166
+			$result = wp_set_object_terms($postid, null, $taxonomy);
167 167
 
168 168
 		}
169 169
 
170
-		if ( ! is_wp_error( $result ) ) {
170
+		if (!is_wp_error($result)) {
171 171
 			return true;
172
-		}else{
172
+		} else {
173 173
 			return false;
174 174
 		}
175 175
 	}
@@ -184,12 +184,12 @@  discard block
 block discarded – undo
184 184
 	 *
185 185
 	 *  @return bool True if update was successful, false if not.
186 186
 	 */
187
-	public function set_custom_taxonomy( $postid, $value) {
187
+	public function set_custom_taxonomy($postid, $value) {
188 188
 		
189
-		if( $value ) {
189
+		if ($value) {
190 190
 			// first check if multiple, make array if so.
191
-			if ( self::has_multiple_objects( $value ) ) {	
192
-				$value = explode( ',', $value );
191
+			if (self::has_multiple_objects($value)) {	
192
+				$value = explode(',', $value);
193 193
 			}
194 194
 						
195 195
             // Deleting first array item
@@ -201,24 +201,24 @@  discard block
 block discarded – undo
201 201
 			$value = $cats;
202 202
 			
203 203
 	
204
-			$result = wp_set_object_terms( $postid, $cats, $taxonomy );
205
-			if ( ! is_wp_error( $result ) ) {
204
+			$result = wp_set_object_terms($postid, $cats, $taxonomy);
205
+			if (!is_wp_error($result)) {
206 206
 				return true;
207
-			}else{
207
+			} else {
208 208
 				return false;
209 209
 			}
210 210
 		}
211 211
 	}
212 212
 	
213
-	public function set_date( $postid, $value) {
213
+	public function set_date($postid, $value) {
214 214
 		
215
-		if( $value ) {
215
+		if ($value) {
216 216
 			$time = current_time('mysql');
217 217
             wp_update_post(
218
-				array (
218
+				array(
219 219
 					'ID'            => $postid, // ID of the post to update
220
-					'post_date'     => date( 'Y-m-d H:i:s',  strtotime($value) ),
221
-					'post_date_gmt'     => gmdate( 'Y-m-d H:i:s',  strtotime($value) ),
220
+					'post_date'     => date('Y-m-d H:i:s', strtotime($value)),
221
+					'post_date_gmt'     => gmdate('Y-m-d H:i:s', strtotime($value)),
222 222
 				)
223 223
 			);
224 224
 		}
@@ -232,9 +232,9 @@  discard block
 block discarded – undo
232 232
 	 *  @return   bool               True if there are multiple terms; otherwise, false.
233 233
 	 *	@since   0.9.3
234 234
 	 */
235
-	public function has_multiple_objects( $value ) {
235
+	public function has_multiple_objects($value) {
236 236
 
237
-		return 0 < strpos( $value, ',' );
237
+		return 0 < strpos($value, ',');
238 238
 
239 239
 	}
240 240
 
Please login to merge, or discard this patch.
public/includes/tour.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 
14 14
 	    $disable_tour = lasso_editor_get_option('disable_tour', 'lasso_editor');
15 15
 		if (!$disable_tour) {
16
-		    add_action( 'wp_footer',       array( $this, 'draw_tour' ) );
16
+		    add_action('wp_footer', array($this, 'draw_tour'));
17 17
 		}
18 18
 	}
19 19
 
@@ -23,19 +23,19 @@  discard block
 block discarded – undo
23 23
 	*/
24 24
 	public function draw_tour() {
25 25
 
26
-		$tour_hidden = get_user_meta( get_current_user_ID(), 'lasso_hide_tour', true );
26
+		$tour_hidden = get_user_meta(get_current_user_ID(), 'lasso_hide_tour', true);
27 27
 
28
-		if ( lasso_user_can() && !$tour_hidden ) {
28
+		if (lasso_user_can() && !$tour_hidden) {
29 29
 
30 30
 			global $post;
31 31
 
32
-			$nonce = wp_create_nonce( 'lasso-editor-tour' );
32
+			$nonce = wp_create_nonce('lasso-editor-tour');
33 33
 
34 34
 			// let users add custom css classes
35
-			$custom_classes = apply_filters( 'lasso_modal_tour_classes', '' );
35
+			$custom_classes = apply_filters('lasso_modal_tour_classes', '');
36 36
 
37 37
 			?>
38
-			<div id="lasso--tour__modal" class="lasso--modal lasso--tour__modal lasso--modal__checkbox <?php echo sanitize_html_class( $custom_classes );?>">
38
+			<div id="lasso--tour__modal" class="lasso--modal lasso--tour__modal lasso--modal__checkbox <?php echo sanitize_html_class($custom_classes); ?>">
39 39
 			    <script>
40 40
 				(function( $ ) {
41 41
 					$(document).ready(function(){
@@ -56,19 +56,19 @@  discard block
 block discarded – undo
56 56
 				</script>
57 57
 				<div class="lasso--modal__inner">
58 58
 
59
-					<?php echo self::tour_slides();?>
59
+					<?php echo self::tour_slides(); ?>
60 60
 
61 61
 					<div class="lasso--postsettings__footer">
62 62
 
63 63
 						<div class="lasso--postsettings__option">
64 64
 							<label for="hide_tour" class="checkbox-control checkbox">
65
-					        	<input type="checkbox" id="hide_tour" name="hide_tour" <?php checked( $tour_hidden, 1 ); ?>>
65
+					        	<input type="checkbox" id="hide_tour" name="hide_tour" <?php checked($tour_hidden, 1); ?>>
66 66
 					        	<span class="control-indicator"></span>
67
-								<?php _e('Don\'t show this again','lasso');?>
67
+								<?php _e('Don\'t show this again', 'lasso'); ?>
68 68
 					        </label>
69 69
 						</div>
70 70
 
71
-						<input id ="editus_tour_submit" type="submit" value="<?php _e( 'Okay, got it!', 'lasso' );?>" data-nonce="<?php echo $nonce;?>" >
71
+						<input id ="editus_tour_submit" type="submit" value="<?php _e('Okay, got it!', 'lasso'); ?>" data-nonce="<?php echo $nonce; ?>" >
72 72
 					</div>
73 73
 
74 74
 				</div>
@@ -92,20 +92,20 @@  discard block
 block discarded – undo
92 92
 			<?php
93 93
 
94 94
 			$out = '<ul><li>';
95
-			$out .= sprintf( '<img src="%s">', LASSO_URL.'/public/assets/img/s-1.jpg' );
96
-			$out .= '<p>'.__('Access posts by clicking the list icon. Create a new post by clicking the new post icon.','lasso').'</p>';
95
+			$out .= sprintf('<img src="%s">', LASSO_URL.'/public/assets/img/s-1.jpg');
96
+			$out .= '<p>'.__('Access posts by clicking the list icon. Create a new post by clicking the new post icon.', 'lasso').'</p>';
97 97
 			$out .= '</li><li>';
98
-			$out .= sprintf( '<img src="%s">', LASSO_URL.'/public/assets/img/s-2.jpg' );
99
-			$out .= '<p>'.__('While on a single post, edit by clicking the Pen icon. Access post settings with the settings icon. Press escape to exit any modal.','lasso').'</p>';
98
+			$out .= sprintf('<img src="%s">', LASSO_URL.'/public/assets/img/s-2.jpg');
99
+			$out .= '<p>'.__('While on a single post, edit by clicking the Pen icon. Access post settings with the settings icon. Press escape to exit any modal.', 'lasso').'</p>';
100 100
 			$out .= '</li><li>';
101
-			$out .= sprintf( '<img src="%s">', LASSO_URL.'/public/assets/img/s-3.jpg' );
102
-			$out .= '<p>'.__('Highlight a piece of text, and click on a formatting option to style it. Click the Disk icon or CMD-S to save. Click the orange "X" button to exit the editor.','lasso').'</p>';
101
+			$out .= sprintf('<img src="%s">', LASSO_URL.'/public/assets/img/s-3.jpg');
102
+			$out .= '<p>'.__('Highlight a piece of text, and click on a formatting option to style it. Click the Disk icon or CMD-S to save. Click the orange "X" button to exit the editor.', 'lasso').'</p>';
103 103
 			$out .= '</li><li>';
104
-			$out .= sprintf( '<img src="%s">', LASSO_URL.'/public/assets/img/s-4.jpg' );
105
-			$out .= '<p>'.__('Story components can be added by clicking the plus icon, and dragging any component from the component tray into the story.','lasso').'</p>';
104
+			$out .= sprintf('<img src="%s">', LASSO_URL.'/public/assets/img/s-4.jpg');
105
+			$out .= '<p>'.__('Story components can be added by clicking the plus icon, and dragging any component from the component tray into the story.', 'lasso').'</p>';
106 106
 			$out .= '</li></ul>';
107 107
 
108
-			echo apply_filters( 'lasso_tour_slides', $out );
108
+			echo apply_filters('lasso_tour_slides', $out);
109 109
 
110 110
 		?></div><?php
111 111
 
Please login to merge, or discard this patch.
includes/process/new_object.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -28,26 +28,26 @@  discard block
 block discarded – undo
28 28
 	 *
29 29
 	 * @since 1.0
30 30
 	 */
31
-	public function post( $data ) {
31
+	public function post($data) {
32 32
 
33
-		$title  = $data[ 'story_title' ];
33
+		$title  = $data['story_title'];
34 34
 
35
-		$object = is_null( $data[ 'object'] ) ? false : $data[ 'object' ];
35
+		$object = is_null($data['object']) ? false : $data['object'];
36 36
 
37 37
 		// insert a new post
38 38
 		$args = array(
39 39
 			'post_title'    => $title,
40 40
 			'post_status'   => 'draft',
41 41
 			'post_type'    	=> $object,
42
-			'post_content'  => apply_filters( 'lasso_new_object_content', '<p>'.__( 'Once upon a time...','lasso').'</p>' )
42
+			'post_content'  => apply_filters('lasso_new_object_content', '<p>'.__('Once upon a time...', 'lasso').'</p>')
43 43
 		);
44 44
 
45
-		$postid = wp_insert_post( apply_filters( 'lasso_insert_object_args', $args ) );
45
+		$postid = wp_insert_post(apply_filters('lasso_insert_object_args', $args));
46 46
 
47
-		do_action( 'lasso_new_object', $postid, $object, $title, get_current_user_ID() );
47
+		do_action('lasso_new_object', $postid, $object, $title, get_current_user_ID());
48 48
 
49 49
 		return array(
50
-			'postlink' => get_permalink( $postid )
50
+			'postlink' => get_permalink($postid)
51 51
 		);
52 52
 
53 53
 	}
@@ -60,8 +60,8 @@  discard block
 block discarded – undo
60 60
 	 * @return array Array of keys to pull from $_POST per action and their sanitization callback
61 61
 	 */
62 62
 	public static function params() {
63
-		$params[ 'process_new_object_post' ] = array(
64
-			'story_title' => array( 'wp_strip_all_tags', 'trim' ),
63
+		$params['process_new_object_post'] = array(
64
+			'story_title' => array('wp_strip_all_tags', 'trim'),
65 65
 			'object' => 'trim'
66 66
 		);
67 67
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 	 * @return array Array of additional functions to use to authorize action.
78 78
 	 */
79 79
 	public static function auth_callbacks() {
80
-		$params[ 'process_new_object_post' ] = array();
80
+		$params['process_new_object_post'] = array();
81 81
 
82 82
 		return $params;
83 83
 
Please login to merge, or discard this patch.
admin/includes/load_admin.php 1 patch
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -43,23 +43,23 @@  discard block
 block discarded – undo
43 43
 		$plugin = lasso::get_instance();
44 44
 		$this->plugin_slug = $plugin->get_plugin_slug();
45 45
 
46
-		add_action( 'admin_head',  			array( $this, 'admin_assets' ) );
47
-		add_action( 'admin_notices', 		array( $this, 'license_nag' ) );
48
-		add_action( 'admin_head', 			array( $this, 'dismiss_nag' ) );
49
-		add_filter( 'plugin_row_meta',    	array( $this, 'plugin_meta' ), 10, 2 );
46
+		add_action('admin_head', array($this, 'admin_assets'));
47
+		add_action('admin_notices', array($this, 'license_nag'));
48
+		add_action('admin_head', array($this, 'dismiss_nag'));
49
+		add_filter('plugin_row_meta', array($this, 'plugin_meta'), 10, 2);
50 50
 
51
-		if ( !class_exists( 'EDD_SL_Plugin_Updater' ) ) {
51
+		if (!class_exists('EDD_SL_Plugin_Updater')) {
52 52
 			include LASSO_DIR.'admin/includes/EDD_SL_Plugin_Updater.php';
53 53
 		}
54 54
 
55
-		if ( !class_exists( 'TGM_Plugin_Activation' ) ) {
55
+		if (!class_exists('TGM_Plugin_Activation')) {
56 56
 			include LASSO_DIR.'admin/includes/class-tgm-plugin-activation.php';
57 57
 		}
58 58
 
59 59
 		new menus\welcome();
60 60
 		new menus\settings();
61 61
 
62
-		if ( !defined( 'LASSO_AGENCY_MODE' ) ) {
62
+		if (!defined('LASSO_AGENCY_MODE')) {
63 63
 			new menus\license();
64 64
 		}
65 65
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 	public static function get_instance() {
76 76
 
77 77
 		// If the single instance hasn't been set, set it now.
78
-		if ( null == self::$instance ) {
78
+		if (null == self::$instance) {
79 79
 			self::$instance = new self;
80 80
 		}
81 81
 
@@ -97,13 +97,13 @@  discard block
 block discarded – undo
97 97
 			'dashboard_page_lasso-welcome-screen'
98 98
 		);
99 99
 
100
-		foreach ( $pages as $page ) {
100
+		foreach ($pages as $page) {
101 101
 			wp_enqueue_media();
102
-            wp_enqueue_style( 'wp-color-picker');
103
-            wp_enqueue_script( 'wp-color-picker');
102
+            wp_enqueue_style('wp-color-picker');
103
+            wp_enqueue_script('wp-color-picker');
104 104
 		
105
-			wp_enqueue_script( 'lasso-editor-settings-script', LASSO_URL.'/admin/assets/js/lasso-editor-settings.js', array( 'jquery','wp-color-picker' ), LASSO_VERSION, true );
106
-			wp_enqueue_style( 'lasso-editor-settings-style', LASSO_URL.'/admin/assets/css/lasso-editor-settings.css', LASSO_VERSION );
105
+			wp_enqueue_script('lasso-editor-settings-script', LASSO_URL.'/admin/assets/js/lasso-editor-settings.js', array('jquery', 'wp-color-picker'), LASSO_VERSION, true);
106
+			wp_enqueue_style('lasso-editor-settings-style', LASSO_URL.'/admin/assets/css/lasso-editor-settings.css', LASSO_VERSION);
107 107
 		}
108 108
 	}
109 109
 
@@ -116,15 +116,15 @@  discard block
 block discarded – undo
116 116
 	 *
117 117
 	 * @return array new array of links for our plugin listing on plugins.php
118 118
 	 */
119
-	public function plugin_meta( $links, $file ) {
119
+	public function plugin_meta($links, $file) {
120 120
 
121
-		if ( strpos( $file, 'lasso.php' ) !== false && !defined( 'LASSO_AGENCY_MODE' ) ) {
121
+		if (strpos($file, 'lasso.php') !== false && !defined('LASSO_AGENCY_MODE')) {
122 122
 
123 123
 			$new_links = array(
124 124
 				'<a href="http://edituswp.com/help" target="_blank">Help</a>'
125 125
 			);
126 126
 
127
-			$links = array_merge( $links, $new_links );
127
+			$links = array_merge($links, $new_links);
128 128
 		}
129 129
 
130 130
 		return $links;
@@ -136,35 +136,35 @@  discard block
 block discarded – undo
136 136
 	*	@since 0.9.7
137 137
 	*	@todo make dismissible
138 138
 	*/
139
-	public function license_nag(){
139
+	public function license_nag() {
140 140
 
141
-		$screen 	= get_current_screen();
142
-		$welcome    = 'toplevel_page_lasso-editor' == $screen->id;
143
-		$license  	= get_option( 'lasso_license_key' );
144
-		$status   	= get_option( 'lasso_license_status' );
141
+		$screen = get_current_screen();
142
+		$welcome = 'toplevel_page_lasso-editor' == $screen->id;
143
+		$license  	= get_option('lasso_license_key');
144
+		$status   	= get_option('lasso_license_status');
145 145
 
146
-		$message_empty    = apply_filters('lasso_empty_license_message','Your license key for support and automatic updates for Editus is missing!');
147
-		$message_invalid  = apply_filters('lasso_invalid_license_message','Oh snap! It looks like your Editus license key is invalid. Might check here to see if its been added correctly.');
148
-		$message_inactive  = apply_filters('lasso_inactive_license_message','It looks like your license key has not yet been activated.');
146
+		$message_empty    = apply_filters('lasso_empty_license_message', 'Your license key for support and automatic updates for Editus is missing!');
147
+		$message_invalid  = apply_filters('lasso_invalid_license_message', 'Oh snap! It looks like your Editus license key is invalid. Might check here to see if its been added correctly.');
148
+		$message_inactive = apply_filters('lasso_inactive_license_message', 'It looks like your license key has not yet been activated.');
149 149
 
150
-		$license_link 	  = sprintf('<a href="%s">Update License</a>', esc_url( add_query_arg( array( 'page' => 'lasso-license' ), admin_url('admin.php') ) ) );
151
-		$dismiss_link     = sprintf('<a style="text-decoration:none;" href="%s" id="lasso-dismiss-notice" class="notice-dismiss"><span class="screen-reader-text">%s</span></a>', esc_url( add_query_arg( 'lasso-notice', 'dismiss' ) ), __('Dismiss this notice.','lasso') );
150
+		$license_link = sprintf('<a href="%s">Update License</a>', esc_url(add_query_arg(array('page' => 'lasso-license'), admin_url('admin.php'))));
151
+		$dismiss_link     = sprintf('<a style="text-decoration:none;" href="%s" id="lasso-dismiss-notice" class="notice-dismiss"><span class="screen-reader-text">%s</span></a>', esc_url(add_query_arg('lasso-notice', 'dismiss')), __('Dismiss this notice.', 'lasso'));
152 152
 
153
-		$not_hidden       = get_user_meta( get_current_user_ID(), 'lasso_license_nag_dismissed', true );
153
+		$not_hidden       = get_user_meta(get_current_user_ID(), 'lasso_license_nag_dismissed', true);
154 154
 
155
-		if ( current_user_can('manage_options') && !$welcome && !defined( 'LASSO_AGENCY_MODE') && !$not_hidden ) {
155
+		if (current_user_can('manage_options') && !$welcome && !defined('LASSO_AGENCY_MODE') && !$not_hidden) {
156 156
 
157
-			if ( empty( $license ) ) {
157
+			if (empty($license)) {
158 158
 
159
-        		printf('<div class="lasso-notice error" style="position:relative;"><p>%s %s</p>%s</div>', $message_empty, $license_link, $dismiss_link );
159
+        		printf('<div class="lasso-notice error" style="position:relative;"><p>%s %s</p>%s</div>', $message_empty, $license_link, $dismiss_link);
160 160
 
161
-        	} else if ( 'invalid' == $status ){ // license key entered wrong or something
161
+        	} else if ('invalid' == $status) { // license key entered wrong or something
162 162
 
163
-				printf('<div class="lasso-notice error" style="position:relative;"><p>%s %s</p>%s</div>', $message_invalid, $license_link , $dismiss_link );
163
+				printf('<div class="lasso-notice error" style="position:relative;"><p>%s %s</p>%s</div>', $message_invalid, $license_link, $dismiss_link);
164 164
 
165
-        	} else if ( empty( $status ) ){ // license key saved but not activated
165
+        	} else if (empty($status)) { // license key saved but not activated
166 166
 
167
-				printf('<div class="lasso-notice error" style="position:relative;"><p>%s %s</p>%s</div>', $message_inactive, $license_link, $dismiss_link );
167
+				printf('<div class="lasso-notice error" style="position:relative;"><p>%s %s</p>%s</div>', $message_inactive, $license_link, $dismiss_link);
168 168
 
169 169
         	}
170 170
 		}
@@ -178,8 +178,8 @@  discard block
 block discarded – undo
178 178
 	*/
179 179
 	public function dismiss_nag() {
180 180
 
181
-		if ( isset( $_GET['lasso-notice'] ) && 'dismiss' == $_GET['lasso-notice'] && current_user_can('manage_options') ) {
182
-			update_user_meta( get_current_user_id(), 'lasso_license_nag_dismissed', 1 );
181
+		if (isset($_GET['lasso-notice']) && 'dismiss' == $_GET['lasso-notice'] && current_user_can('manage_options')) {
182
+			update_user_meta(get_current_user_id(), 'lasso_license_nag_dismissed', 1);
183 183
 		}
184 184
 	}
185 185
 }
Please login to merge, or discard this patch.
internal-api/auth.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -52,28 +52,28 @@  discard block
 block discarded – undo
52 52
 	 * @param string $method The name of the callback method.
53 53
 
54 54
 	 */
55
-	public function __construct( $action, $callback_class) {
56
-		if ( ! is_object( $callback_class ) ) {
55
+	public function __construct($action, $callback_class) {
56
+		if (!is_object($callback_class)) {
57 57
 			$this->callback_instance = new $callback_class;
58
-		}else{
58
+		} else {
59 59
 			$this->callback_instance = $callback_class;
60 60
 		}
61 61
 
62
-		if ( $this->check_nonce() ) {
63
-			if ( is_object( $this->callback_instance ) && $this->if_implements() ) {
64
-				if ( $this->other_auth_checks( $action ) ) {
62
+		if ($this->check_nonce()) {
63
+			if (is_object($this->callback_instance) && $this->if_implements()) {
64
+				if ($this->other_auth_checks($action)) {
65 65
 					$this->status_code = 200;
66 66
 				} else {
67
-					$this->error_message = __( 'Unauthorized action', 'lasso' );
67
+					$this->error_message = __('Unauthorized action', 'lasso');
68 68
 					$this->status_code   = 401;
69 69
 				}
70 70
 			} else {
71
-				$this->error_message = __( 'All callback classes used for processing the Editus Internal API must implement the lasso\internal_api\api_action interface.', 'lasso' );
71
+				$this->error_message = __('All callback classes used for processing the Editus Internal API must implement the lasso\internal_api\api_action interface.', 'lasso');
72 72
 				$this->status_code   = 401;
73 73
 			}
74 74
 		} else {
75 75
 			$this->status_code   = 401;
76
-			$this->error_message = __( 'Nonce invalid', 'lasso' );
76
+			$this->error_message = __('Nonce invalid', 'lasso');
77 77
 		}
78 78
 
79 79
 	}
@@ -89,20 +89,20 @@  discard block
 block discarded – undo
89 89
 	 *
90 90
 	 * @return bool True if auth checks were all postive.
91 91
 	 */
92
-	protected function other_auth_checks( $action ) {
92
+	protected function other_auth_checks($action) {
93 93
 		$auth_callbacks = $this->callback_instance->auth_callbacks();
94 94
 
95
-		if ( is_array( $auth_callbacks ) && isset( $auth_callbacks[ $action ] ) && is_array( $auth_callbacks[ $action ] ) ) {
96
-			$checks = $auth_callbacks[ $action ];
97
-			if ( is_array( $checks ) ) {
98
-				foreach ( $checks as $check ) {
99
-					if ( is_array( $check ) ) {
100
-						$check = call_user_func( array( $check[0], $check[1] ) );
95
+		if (is_array($auth_callbacks) && isset($auth_callbacks[$action]) && is_array($auth_callbacks[$action])) {
96
+			$checks = $auth_callbacks[$action];
97
+			if (is_array($checks)) {
98
+				foreach ($checks as $check) {
99
+					if (is_array($check)) {
100
+						$check = call_user_func(array($check[0], $check[1]));
101 101
 					} else {
102
-						$check = call_user_func( $check );
102
+						$check = call_user_func($check);
103 103
 					}
104 104
 
105
-					if ( false === $check ) {
105
+					if (false === $check) {
106 106
 						return false;
107 107
 
108 108
 					}
@@ -127,8 +127,8 @@  discard block
 block discarded – undo
127 127
 	 */
128 128
 	protected function if_implements() {
129 129
 
130
-		$implements = class_implements( $this->callback_instance );
131
-		if ( is_array( $implements ) && in_array( 'lasso\internal_api\api_action', $implements ) ) {
130
+		$implements = class_implements($this->callback_instance);
131
+		if (is_array($implements) && in_array('lasso\internal_api\api_action', $implements)) {
132 132
 			return true;
133 133
 
134 134
 		}
@@ -147,13 +147,13 @@  discard block
 block discarded – undo
147 147
 	 * @return bool
148 148
 	 */
149 149
 	protected function check_nonce() {
150
-		if ( isset( $this->callback_instance->nonce_action ) ) {
150
+		if (isset($this->callback_instance->nonce_action)) {
151 151
 			$nonce = $this->callback_instance->nonce_action;
152
-		}else{
152
+		} else {
153 153
 			$nonce = 'lasso_editor';
154 154
 		}
155 155
 
156
-		return wp_verify_nonce( $_POST[ 'nonce' ], $nonce );
156
+		return wp_verify_nonce($_POST['nonce'], $nonce);
157 157
 
158 158
 	}
159 159
 
Please login to merge, or discard this patch.
internal-api/route.php 1 patch
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -24,35 +24,35 @@  discard block
 block discarded – undo
24 24
 		global $wp_query;
25 25
 
26 26
 		//get action, and if set, possibly act
27
-		$action = $wp_query->get( 'action' );
28
-		if ( $action && strpos( $_SERVER['REQUEST_URI'], 'lasso-internal-api' ) ) {
27
+		$action = $wp_query->get('action');
28
+		if ($action && strpos($_SERVER['REQUEST_URI'], 'lasso-internal-api')) {
29 29
 
30
-			$response = __( 'Editus API Error.', 'lasso' );
30
+			$response = __('Editus API Error.', 'lasso');
31 31
 			$code = 400;
32 32
 
33 33
 			//see if have a nonce. Will verify it in auth class.
34
-			if ( isset( $_POST[ 'nonce' ] ) ) {
34
+			if (isset($_POST['nonce'])) {
35 35
 
36
-				$callback = self::find_callback( strip_tags( $action ) );
37
-				if ( is_int( $callback )  ) {
36
+				$callback = self::find_callback(strip_tags($action));
37
+				if (is_int($callback)) {
38 38
 					$code = $callback;
39
-				}elseif( ! class_exists( $callback['class'] ) ) {
39
+				}elseif (!class_exists($callback['class'])) {
40 40
 					$code = 415;
41
-				}else {
42
-					$action = str_replace( '-', '_', $action );
41
+				} else {
42
+					$action = str_replace('-', '_', $action);
43 43
 					$callback_instance = new $callback['class'];
44
-					$auth              = self::auth( $action, $callback_instance, $callback['method'] );
45
-					if ( 200 == $auth->status_code && is_array( $callback ) ) {
44
+					$auth              = self::auth($action, $callback_instance, $callback['method']);
45
+					if (200 == $auth->status_code && is_array($callback)) {
46 46
 						$code = 200;
47
-						$data = new find_data( $callback_instance, $action );
48
-						if ( is_array( $data->data ) && ! empty( $data->data ) ) {
49
-							$response = self::route( $action, $callback_instance, $callback['method'], $data->data );
47
+						$data = new find_data($callback_instance, $action);
48
+						if (is_array($data->data) && !empty($data->data)) {
49
+							$response = self::route($action, $callback_instance, $callback['method'], $data->data);
50 50
 						} else {
51 51
 							$code = 500;
52 52
 						}
53 53
 
54 54
 					} else {
55
-						if ( isset( $auth->error_message ) && is_string( $auth->error_message ) ) {
55
+						if (isset($auth->error_message) && is_string($auth->error_message)) {
56 56
 							$response = $auth->error_message;
57 57
 						}
58 58
 
@@ -61,12 +61,12 @@  discard block
 block discarded – undo
61 61
 
62 62
 				}
63 63
 
64
-			}else{
64
+			} else {
65 65
 				$code = 401;
66
-				$response = __( 'Nonce not set.', 'lasso' );
66
+				$response = __('Nonce not set.', 'lasso');
67 67
 			}
68 68
 
69
-			self::respond( $response, $code );
69
+			self::respond($response, $code);
70 70
 
71 71
 		}
72 72
 
@@ -85,8 +85,8 @@  discard block
 block discarded – undo
85 85
 	 *
86 86
 	 * @return \lasso\internal_api\auth
87 87
 	 */
88
-	protected static function auth( $action, $callback ) {
89
-		return new auth( $action, $callback );
88
+	protected static function auth($action, $callback) {
89
+		return new auth($action, $callback);
90 90
 
91 91
 	}
92 92
 
@@ -99,15 +99,15 @@  discard block
 block discarded – undo
99 99
 	 *
100 100
 	 * @return array
101 101
 	 */
102
-	protected static function find_callback( $action ) {
103
-		if ( $action ) {
104
-			$parts = explode( '_', $action );
102
+	protected static function find_callback($action) {
103
+		if ($action) {
104
+			$parts = explode('_', $action);
105 105
 
106
-			if ( isset( $parts[0] ) && isset( $parts[1] ) && isset( $parts[2] ) ) {
107
-				$class     = str_replace( '-', '_', $parts[1] );
106
+			if (isset($parts[0]) && isset($parts[1]) && isset($parts[2])) {
107
+				$class     = str_replace('-', '_', $parts[1]);
108 108
 
109 109
 				$class = "\\lasso\\{$parts[0]}\\{$class}";
110
-				$callback  = str_replace( '-', '_', $parts[2] );
110
+				$callback  = str_replace('-', '_', $parts[2]);
111 111
 
112 112
 				return array(
113 113
 					'class'  => $class,
@@ -136,9 +136,9 @@  discard block
 block discarded – undo
136 136
 	 *
137 137
 	 * @return mixed
138 138
 	 */
139
-	protected static function route( $action, $callback, $method, $data ) {
140
-		if (  method_exists( $callback, $method ) ) {
141
-			$response = call_user_func( array( $callback, $method ), $data  );
139
+	protected static function route($action, $callback, $method, $data) {
140
+		if (method_exists($callback, $method)) {
141
+			$response = call_user_func(array($callback, $method), $data);
142 142
 
143 143
 			return $response;
144 144
 
@@ -156,29 +156,29 @@  discard block
 block discarded – undo
156 156
 	 * @param array|string $response The response message to send.
157 157
 	 * @param bool|int $code Response code or bool. If is bool, response code will be 200 or 401
158 158
 	 */
159
-	protected static function respond( $response, $code ) {
160
-		if ( true === $code ) {
159
+	protected static function respond($response, $code) {
160
+		if (true === $code) {
161 161
 			$code = 200;
162 162
 		}
163 163
 
164
-		if ( false == $code ) {
164
+		if (false == $code) {
165 165
 			$code = 401;
166 166
 		}
167 167
 
168
-		if ( is_string( $response ) ) {
168
+		if (is_string($response)) {
169 169
 			$data[] = $response;
170
-		}elseif( is_array( $response ) ) {
170
+		}elseif (is_array($response)) {
171 171
 			$data = $response;
172
-		}else{
172
+		} else {
173 173
 			$data[] = $code;
174 174
 		}
175 175
 
176
-		status_header( $code );
176
+		status_header($code);
177 177
 		nocache_headers();
178
-		if ( 200 == $code ) {
179
-			wp_send_json_success( $data );
180
-		}else{
181
-			wp_send_json_error( $data );
178
+		if (200 == $code) {
179
+			wp_send_json_success($data);
180
+		} else {
181
+			wp_send_json_error($data);
182 182
 		}
183 183
 
184 184
 	}
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 	 */
201 201
 	public static function init() {
202 202
 
203
-		if ( ! self::$instance ) {
203
+		if (!self::$instance) {
204 204
 			self::$instance = new self;
205 205
 		}
206 206
 
Please login to merge, or discard this patch.
public/includes/helpers.php 1 patch
Spacing   +84 added lines, -84 removed lines patch added patch discarded remove patch
@@ -12,24 +12,24 @@  discard block
 block discarded – undo
12 12
  * @return the option value
13 13
  * @since 1.0
14 14
  */
15
-if( !function_exists('lasso_editor_get_option')):
16
-	function lasso_editor_get_option( $option, $section, $default = '' ) {
15
+if (!function_exists('lasso_editor_get_option')):
16
+	function lasso_editor_get_option($option, $section, $default = '') {
17 17
 
18
-		if ( empty( $option ) )
18
+		if (empty($option))
19 19
 			return;
20 20
 
21
-		if ( function_exists( 'is_multisite' ) && is_multisite() ) {
21
+		if (function_exists('is_multisite') && is_multisite()) {
22 22
 
23
-			$options = get_site_option( $section );
23
+			$options = get_site_option($section);
24 24
 
25 25
 		} else {
26 26
 
27
-			$options = get_option( $section );
27
+			$options = get_option($section);
28 28
 		}
29 29
 		
30
-		$options = apply_filters( 'editus_filter_options', $options );
30
+		$options = apply_filters('editus_filter_options', $options);
31 31
 
32
-		if ( isset( $options[$option] ) ) {
32
+		if (isset($options[$option])) {
33 33
 			return $options[$option];
34 34
 		}
35 35
 
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
  */
45 45
 function lasso_editor_galleries_exist() {
46 46
 
47
-	$q = new wp_query( array( 'post_type' => 'ai_galleries', 'post_status' => 'publish' ) );
47
+	$q = new wp_query(array('post_type' => 'ai_galleries', 'post_status' => 'publish'));
48 48
 
49
-	if ( $q->have_posts() )
49
+	if ($q->have_posts())
50 50
 		return true;
51 51
 	else
52 52
 		return false;
@@ -61,9 +61,9 @@  discard block
 block discarded – undo
61 61
 function lasso_get_supported_theme_class() {
62 62
 
63 63
 	$name  	= wp_get_theme()->get('Name');
64
-	$slug  	= lasso_clean_string( $name );
64
+	$slug  	= lasso_clean_string($name);
65 65
 
66
-	switch ( $slug ) {
66
+	switch ($slug) {
67 67
 		case 'aesop-story-theme': // aesop
68 68
 			$out = '.aesop-entry-content';
69 69
 			break;
@@ -112,16 +112,16 @@  discard block
 block discarded – undo
112 112
 
113 113
 	}
114 114
 
115
-	return apply_filters('lasso_content_class', !empty( $out ) ? $out : false);
115
+	return apply_filters('lasso_content_class', !empty($out) ? $out : false);
116 116
 	//return !empty( $out ) ? $out : false;
117 117
 }
118 118
 
119 119
 function lasso_get_supported_theme_title_class() {
120 120
 
121 121
 	$name  	= wp_get_theme()->get('Name');
122
-	$slug  	= lasso_clean_string( $name );
122
+	$slug  	= lasso_clean_string($name);
123 123
 
124
-	switch ( $slug ) {
124
+	switch ($slug) {
125 125
 
126 126
 		case 'aesop-story-theme': // aesop
127 127
 			$out = '.aesop-entry-title';
@@ -149,16 +149,16 @@  discard block
 block discarded – undo
149 149
 			break;
150 150
 	}
151 151
 
152
-	return apply_filters('lasso_title_class', !empty( $out ) ? $out : false);
152
+	return apply_filters('lasso_title_class', !empty($out) ? $out : false);
153 153
 }
154 154
 
155 155
 //since 0.9.9.6
156 156
 function lasso_get_supported_theme_featured_image_class() {
157 157
 
158 158
 	$name  	= wp_get_theme()->get('Name');
159
-	$slug  	= lasso_clean_string( $name );
159
+	$slug  	= lasso_clean_string($name);
160 160
 
161
-	return apply_filters('lasso_featured_image_class', !empty( $out ) ? $out : false);
161
+	return apply_filters('lasso_featured_image_class', !empty($out) ? $out : false);
162 162
 }
163 163
 
164 164
 
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 *	@since 0.8.7
170 170
 *	@return string of comma separated classes
171 171
 */
172
-function lasso_supported_no_save(){
172
+function lasso_supported_no_save() {
173 173
 
174 174
 	return apply_filters('lasso_dont_save', '.lasso--ignore,.sharedaddy,.us_wrapper,.meta,.edit-link,.ssba,.addtoany_share_save_container,.mashsb-container,.heateor_sss_sharing_container,.nc_socialPanel,.jp-relatedposts,.fb-comments,.adsbygoogle,.swp_social_panel');
175 175
 }
@@ -183,8 +183,8 @@  discard block
 block discarded – undo
183 183
  *
184 184
  * @return array|mixed|object|string|void
185 185
  */
186
-function lasso_sanitize_data( $data ) {
187
-	return \lasso\sanatize::do_sanitize( $data );
186
+function lasso_sanitize_data($data) {
187
+	return \lasso\sanatize::do_sanitize($data);
188 188
 
189 189
 }
190 190
 
@@ -194,18 +194,18 @@  discard block
 block discarded – undo
194 194
  *	@since 0.9.3
195 195
  *	@return string of comma delimited category slugs
196 196
 */
197
-function lasso_get_post_objects( $postid = '', $taxonomy = 'category') {
197
+function lasso_get_post_objects($postid = '', $taxonomy = 'category') {
198 198
 
199
-	if ( empty( $postid ) )
199
+	if (empty($postid))
200 200
 		$postid = get_the_ID();
201 201
 
202
-	$objects = 'category' == $taxonomy ? get_the_category( $postid ) : get_the_tags( $postid );
202
+	$objects = 'category' == $taxonomy ? get_the_category($postid) : get_the_tags($postid);
203 203
 
204
-	if ( empty( $objects) )
204
+	if (empty($objects))
205 205
 		return;
206 206
 
207 207
 	$out = '';
208
-	foreach( $objects as $object ) {
208
+	foreach ($objects as $object) {
209 209
 		//$out .= $object->slug.', ';
210 210
 		$out .= $object->name.',';
211 211
 	}
@@ -220,15 +220,15 @@  discard block
 block discarded – undo
220 220
  *	@since 0.9.3
221 221
  *	@return array all categoiries
222 222
 */
223
-function lasso_get_objects( $taxonomy = 'category' ) {
223
+function lasso_get_objects($taxonomy = 'category') {
224 224
 
225 225
 	$objects = 'category' == $taxonomy ? get_categories(array('hide_empty' => 0)) : get_tags(array('hide_empty' => 0));
226 226
 
227
-	if ( empty( $objects) )
227
+	if (empty($objects))
228 228
 		return;
229 229
 
230 230
 	$out = "";
231
-	foreach( $objects as $object ) {
231
+	foreach ($objects as $object) {
232 232
 		$out .= $object->name.',';
233 233
 	}
234 234
 
@@ -243,11 +243,11 @@  discard block
 block discarded – undo
243 243
  * @since 0.9.4
244 244
  */
245 245
 function lasso_post_types_names() {
246
-	$post_types = get_post_types( array(
246
+	$post_types = get_post_types(array(
247 247
 		'public' => true,
248
-	), 'objects' );
249
-	$post_types = array_combine( array_keys( $post_types ), wp_list_pluck( $post_types, 'label' ) );
250
-    unset( $post_types[ 'attachment' ] );
248
+	), 'objects');
249
+	$post_types = array_combine(array_keys($post_types), wp_list_pluck($post_types, 'label'));
250
+    unset($post_types['attachment']);
251 251
 
252 252
 	/**
253 253
 	 * Set which post types are allowed
@@ -256,14 +256,14 @@  discard block
 block discarded – undo
256 256
 	 *
257 257
 	 * @param array $allowed_post_types Array of names (not labels) of allowed post types. Must be registered.
258 258
 	 */
259
-	$allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor', array( 'post', 'page') );
260
-	$allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
259
+	$allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', array('post', 'page'));
260
+	$allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
261 261
 	if (!current_user_can('edit_pages')) {
262
-		$allowed_post_types = array_diff($allowed_post_types,array('page'));
262
+		$allowed_post_types = array_diff($allowed_post_types, array('page'));
263 263
 	}
264
-	foreach( $post_types as $name => $label ) {
265
-		if ( ! in_array( $name, $allowed_post_types ) ) {
266
-			unset( $post_types[ $name ] );
264
+	foreach ($post_types as $name => $label) {
265
+		if (!in_array($name, $allowed_post_types)) {
266
+			unset($post_types[$name]);
267 267
 		}
268 268
 	}
269 269
 	return $post_types;
@@ -271,10 +271,10 @@  discard block
 block discarded – undo
271 271
 
272 272
 
273 273
 function lasso_post_types() {
274
-	$post_types = get_post_types( array(
274
+	$post_types = get_post_types(array(
275 275
 		'public' => true,
276
-	), 'names' );
277
-    unset( $post_types[ 'attachment' ] );
276
+	), 'names');
277
+    unset($post_types['attachment']);
278 278
 
279 279
 	/**
280 280
 	 * Set which post types are allowed
@@ -283,11 +283,11 @@  discard block
 block discarded – undo
283 283
 	 *
284 284
 	 * @param array $allowed_post_types Array of names (not labels) of allowed post types. Must be registered.
285 285
 	 */
286
-	$allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor', array( 'post') );
287
-	$allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
288
-	foreach( $post_types as $name => $label ) {
289
-		if ( ! in_array( $name, $allowed_post_types ) ) {
290
-			unset( $post_types[ $name ] );
286
+	$allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', array('post'));
287
+	$allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
288
+	foreach ($post_types as $name => $label) {
289
+		if (!in_array($name, $allowed_post_types)) {
290
+			unset($post_types[$name]);
291 291
 		}
292 292
 	}
293 293
 	return $post_types;
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 	global $wp_post_types;
298 298
 	$post_types = lasso_post_types();
299 299
 	$rest_base = array();
300
-	foreach ( $post_types as $post_type) {
300
+	foreach ($post_types as $post_type) {
301 301
 		$rest_base[$post_type] = $wp_post_types[$post_type]->rest_base;
302 302
 	}
303 303
     
@@ -315,22 +315,22 @@  discard block
 block discarded – undo
315 315
 *	@uses lasso_modal_addons()
316 316
 *	@since 0.9.4
317 317
 */
318
-function lasso_modal_addons_content( $tab = '', $type ){
318
+function lasso_modal_addons_content($tab = '', $type) {
319 319
 
320
-	$name = lasso_clean_string( $tab['name'] );
320
+	$name = lasso_clean_string($tab['name']);
321 321
 
322
-	if ( 'tab' == $type ) {
322
+	if ('tab' == $type) {
323 323
 
324
-		$out = sprintf( '<li data-addon-name="%s">%s</li>', $name, $tab['name'] );
324
+		$out = sprintf('<li data-addon-name="%s">%s</li>', $name, $tab['name']);
325 325
 
326
-	} else if ( 'content' == $type ){
326
+	} else if ('content' == $type) {
327 327
 
328
-		$content = isset( $tab['content'] ) && is_callable( $tab['content'] ) ? call_user_func( $tab['content'] ) : false;
329
-		$options = isset( $tab['options'] ) && is_callable( $tab['options'] ) ? call_user_func( $tab['options'] ) : false;
328
+		$content = isset($tab['content']) && is_callable($tab['content']) ? call_user_func($tab['content']) : false;
329
+		$options = isset($tab['options']) && is_callable($tab['options']) ? call_user_func($tab['options']) : false;
330 330
 
331
-		$out = sprintf( '<div class="lasso--modal__content not-visible" data-addon-content="%s">
331
+		$out = sprintf('<div class="lasso--modal__content not-visible" data-addon-content="%s">
332 332
 			%s%s
333
-			</div>', $name, $content, lasso_option_form( $name, $options ) );
333
+			</div>', $name, $content, lasso_option_form($name, $options));
334 334
 
335 335
 	}
336 336
 
@@ -345,12 +345,12 @@  discard block
 block discarded – undo
345 345
 *
346 346
 * @return void|string
347 347
 */
348
-function lasso_clean_string( $string = '' ) {
348
+function lasso_clean_string($string = '') {
349 349
 
350
-	if ( empty( $string ) )
350
+	if (empty($string))
351 351
 		return;
352 352
 
353
-	return sanitize_text_field( strtolower( preg_replace('/[\s_]/', '-', $string ) ) );
353
+	return sanitize_text_field(strtolower(preg_replace('/[\s_]/', '-', $string)));
354 354
 }
355 355
 
356 356
 /**
@@ -363,13 +363,13 @@  discard block
 block discarded – undo
363 363
  *
364 364
  * @return void|string
365 365
  */
366
-function lasso_unclean_string( $string = '' ) {
366
+function lasso_unclean_string($string = '') {
367 367
 
368
-	if ( empty( $string ) ) {
368
+	if (empty($string)) {
369 369
 		return;
370 370
 	}
371 371
 
372
-	return sanitize_text_field( strtolower( str_replace( '-', '_', $string ) ) );
372
+	return sanitize_text_field(strtolower(str_replace('-', '_', $string)));
373 373
 }
374 374
 
375 375
 
@@ -384,40 +384,40 @@  discard block
 block discarded – undo
384 384
  * @param unknown $postid int the id of the post object to check against
385 385
  * @since 0.9.9.7 added filter 'lasso_user_can_filter'
386 386
  */
387
-if ( !function_exists( 'lasso_user_can' ) ):
388
-	function lasso_user_can( $action = '', $postid = 0 ) {
387
+if (!function_exists('lasso_user_can')):
388
+	function lasso_user_can($action = '', $postid = 0) {
389 389
         $result = false;
390
-		if ( empty( $action ) )
390
+		if (empty($action))
391 391
 			$action = 'edit_posts';
392 392
 
393
-		if ( empty( $postid ) && $action != 'edit_posts' && $action != 'publish_posts' && $action != 'delete_posts')
393
+		if (empty($postid) && $action != 'edit_posts' && $action != 'publish_posts' && $action != 'delete_posts')
394 394
 			$postid = get_the_ID();
395 395
 
396
-		if ( is_user_logged_in() && current_user_can( $action, $postid ) ) {
396
+		if (is_user_logged_in() && current_user_can($action, $postid)) {
397 397
 			// check against post types:
398
-			$allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor', array( 'post', 'page') );
398
+			$allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', array('post', 'page'));
399 399
 			
400 400
 			if (!current_user_can('edit_pages')) {
401
-				$allowed_post_types = array_diff($allowed_post_types,array('page'));
401
+				$allowed_post_types = array_diff($allowed_post_types, array('page'));
402 402
 			}
403 403
 			
404 404
             if (!empty($allowed_post_types) && !empty($postid)) {
405
-				$type = get_post_type( $postid );
406
-                $allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
405
+				$type = get_post_type($postid);
406
+                $allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
407 407
 				
408
-                if ( in_array( $type, $allowed_post_types ) ) {
409
-				   $result =  true;
408
+                if (in_array($type, $allowed_post_types)) {
409
+				   $result = true;
410 410
 			    }
411 411
             } else {
412 412
                 //we are not checking against a post, return true
413
-				$result =  true;
413
+				$result = true;
414 414
         	}
415 415
 		} else {
416 416
 			$result = false;
417 417
 		}
418 418
 		//if ( function_exists( 'is_gutenberg_page' ) && has_blocks() ) return false;
419 419
 		
420
-		return apply_filters( 'lasso_user_can_filter', $result,  $action, $postid);
420
+		return apply_filters('lasso_user_can_filter', $result, $action, $postid);
421 421
 	}
422 422
 endif;
423 423
 
@@ -426,25 +426,25 @@  discard block
 block discarded – undo
426 426
 *
427 427
 *	@since 0.9.5
428 428
 */
429
-if ( !function_exists('lasso_editor_empty_results') ):
429
+if (!function_exists('lasso_editor_empty_results')):
430 430
 
431
-	function lasso_editor_empty_results( $type = 'posts' ){
431
+	function lasso_editor_empty_results($type = 'posts') {
432 432
 
433
-		if ( 'posts' == $type ) {
433
+		if ('posts' == $type) {
434 434
 
435
-			$string = apply_filters('lasso_empty_state_message', __('No posts to show', 'lasso') );
435
+			$string = apply_filters('lasso_empty_state_message', __('No posts to show', 'lasso'));
436 436
 			$icon = 'lasso-icon-file-text2';
437 437
 			$button = false;
438 438
 
439
-		} elseif ( 'revision' == $type ) {
439
+		} elseif ('revision' == $type) {
440 440
 
441
-			$string = apply_filters('lasso_empty_state_message', __('No revisions found', 'lasso') );
441
+			$string = apply_filters('lasso_empty_state_message', __('No revisions found', 'lasso'));
442 442
 			$icon = 'lasso-icon-history';
443
-			$button = sprintf('<a href="#" class="lasso--btn-secondary" id="lasso--close-modal">%s</a>', __('Close','lasso') );
443
+			$button = sprintf('<a href="#" class="lasso--btn-secondary" id="lasso--close-modal">%s</a>', __('Close', 'lasso'));
444 444
 
445 445
 		}
446 446
 
447
-		return sprintf('<div id="lasso--empty-state" class="lasso--empty-state"><i class="lasso--empty-state-icon lasso-icon %s"></i><p>%s</p>%s</div>', $icon, $string, $button );
447
+		return sprintf('<div id="lasso--empty-state" class="lasso--empty-state"><i class="lasso--empty-state-icon lasso-icon %s"></i><p>%s</p>%s</div>', $icon, $string, $button);
448 448
 	}
449 449
 
450 450
 endif;
Please login to merge, or discard this patch.
admin/includes/menus/settings.php 1 patch
Spacing   +149 added lines, -149 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,41 +95,41 @@  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_list      = lasso_editor_get_option( 'toolbar_list', 'lasso_editor' );
118
-		$toolbar_show_color      = lasso_editor_get_option( 'toolbar_show_color', 'lasso_editor' );
119
-		$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_list = lasso_editor_get_option('toolbar_list', 'lasso_editor');
118
+		$toolbar_show_color      = lasso_editor_get_option('toolbar_show_color', 'lasso_editor');
119
+		$toolbar_show_alignment  = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor');
120 120
 		
121
-		$objectsNoSave  	= lasso_editor_get_option('dont_save', 'lasso_editor');
122
-		$objectsNonEditable  	= lasso_editor_get_option('non_editable', 'lasso_editor');
121
+		$objectsNoSave = lasso_editor_get_option('dont_save', 'lasso_editor');
122
+		$objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor');
123 123
 		$disable_tour = lasso_editor_get_option('disable_tour', 'lasso_editor');
124 124
 		$show_ignored_items = lasso_editor_get_option('show_ignored_items', 'lasso_editor');
125 125
 		$save_using_rest_disabled = lasso_editor_get_option('save_using_rest_disabled', 'lasso_editor');
126 126
 		
127
-		$default_post_types = apply_filters( 'lasso_allowed_post_types', array( 'post', 'page'));
128
-		$allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor',  $default_post_types);
127
+		$default_post_types = apply_filters('lasso_allowed_post_types', array('post', 'page'));
128
+		$allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', $default_post_types);
129 129
 		
130 130
 		$links_editable = lasso_editor_get_option('links_editable', 'lasso_editor', false);
131
-		$bold_tag = lasso_editor_get_option( 'bold_tag', 'lasso_editor',  "b");
132
-		$i_tag = lasso_editor_get_option( 'i_tag', 'lasso_editor',  "i");
131
+		$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor', "b");
132
+		$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor', "i");
133 133
 		
134 134
 		// do we support pending status
135 135
 		$no_pending_status = lasso_editor_get_option('no_pending_status', 'lasso_editor');
@@ -144,31 +144,31 @@  discard block
 block discarded – undo
144 144
 ?>
145 145
 		<div class="wrap">
146 146
 
147
-	    	<h2><?php _e( 'Editus Settings', 'lasso' );?></h2>
147
+	    	<h2><?php _e('Editus Settings', 'lasso'); ?></h2>
148 148
 
149 149
 			<form id="lasso-editor-settings-form" class="lasso--form-settings" method="post" enctype="multipart/form-data">
150 150
 
151
-				<?php do_action('lasso_settings_before');?>
151
+				<?php do_action('lasso_settings_before'); ?>
152 152
 				
153 153
 				
154 154
 				
155
-				<h3><?php _e( 'Enable for:', 'lasso' );?></h3>
155
+				<h3><?php _e('Enable for:', 'lasso'); ?></h3>
156 156
 				<div class="lasso-editor-settings--option-wrap">
157 157
 					<div class="lasso-editor-settings--option-inner">
158 158
 						
159
-						<span class="lasso--setting-description"><?php _e( 'Enable Editus for the following post types.', 'lasso' );?></span>
159
+						<span class="lasso--setting-description"><?php _e('Enable Editus for the following post types.', 'lasso'); ?></span>
160 160
 						<?php
161 161
 						$args = array(
162 162
 							'public'   => true
163 163
 						);
164 164
 						 
165
-						$allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
166
-						$post_types = get_post_types( $args, 'objects' );
165
+						$allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
166
+						$post_types = get_post_types($args, 'objects');
167 167
 						 
168
-						foreach ( $post_types  as $post_type ) {
168
+						foreach ($post_types  as $post_type) {
169 169
 						   if ($post_type->name == 'attachment') continue;
170
-						   $checked ="";
171
-						   if (  in_array( $post_type->name, $allowed_post_types )  ) {
170
+						   $checked = "";
171
+						   if (in_array($post_type->name, $allowed_post_types)) {
172 172
 								$checked = 'checked="checked"';
173 173
 						   }
174 174
 						   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>';
@@ -178,111 +178,111 @@  discard block
 block discarded – undo
178 178
 				</div>
179 179
 				
180 180
 
181
-				<h3><?php _e( 'Internal Settings', 'lasso' );?></h3>
181
+				<h3><?php _e('Internal Settings', 'lasso'); ?></h3>
182 182
 				<div class="lasso-editor-settings--option-wrap">
183 183
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
184
-						<label><?php _e( 'Article Class', 'lasso' );?></label>
185
-						<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>
186
-						<input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr( $article_object );?>" placeholder=".entry-content">
184
+						<label><?php _e('Article Class', 'lasso'); ?></label>
185
+						<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>
186
+						<input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr($article_object); ?>" placeholder=".entry-content">
187 187
 					</div>
188 188
 				
189 189
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
190
-						<label><?php _e( 'Featured Image Class', 'lasso' );?></label>
191
-						<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>
192
-						<input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr( $featImgClass );?>" placeholder=".entry-content">
190
+						<label><?php _e('Featured Image Class', 'lasso'); ?></label>
191
+						<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>
192
+						<input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr($featImgClass); ?>" placeholder=".entry-content">
193 193
 					</div>
194 194
 				
195 195
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
196
-						<label><?php _e( 'Article Title Class', 'lasso' );?></label>
197
-						<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>
198
-						<input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr( $titleClass );?>" placeholder=".entry-content">
196
+						<label><?php _e('Article Title Class', 'lasso'); ?></label>
197
+						<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>
198
+						<input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr($titleClass); ?>" placeholder=".entry-content">
199 199
 					</div>
200 200
 				
201 201
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
202
-						<label><?php _e( 'Ignored Items to Save', 'lasso' );?></label>
203
-						<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>
204
-						<textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNoSave );?></textarea>
202
+						<label><?php _e('Ignored Items to Save', 'lasso'); ?></label>
203
+						<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>
204
+						<textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNoSave); ?></textarea>
205 205
 					</div>
206 206
 				
207 207
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
208
-						<label><?php _e( 'Read Only Items', 'lasso' );?></label>
209
-						<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>
210
-						<textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNonEditable );?></textarea>
208
+						<label><?php _e('Read Only Items', 'lasso'); ?></label>
209
+						<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>
210
+						<textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNonEditable); ?></textarea>
211 211
 					</div>
212 212
 				
213 213
 					<div class="lasso-editor-settings--option-inner" >
214
-						<input type="checkbox" class="checkbox" name="lasso_editor[show_ignored_items]" id="lasso_editor[show_ignored_items]" <?php echo checked( $show_ignored_items, 'on' );?> >
215
-						<label for="lasso_editor[show_ignored_items]"> <?php _e( 'Show Ignored Items', 'lasso' );?></label>
216
-						<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
+						<input type="checkbox" class="checkbox" name="lasso_editor[show_ignored_items]" id="lasso_editor[show_ignored_items]" <?php echo checked($show_ignored_items, 'on'); ?> >
215
+						<label for="lasso_editor[show_ignored_items]"> <?php _e('Show Ignored Items', 'lasso'); ?></label>
216
+						<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>
217 217
 					</div>
218 218
 				</div>
219 219
 
220
-				<h3><?php _e( 'Editor UI', 'lasso' );?></h3>
220
+				<h3><?php _e('Editor UI', 'lasso'); ?></h3>
221 221
 				<div class="lasso-editor-settings--option-wrap">
222 222
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
223
-						<input type="checkbox" class="checkbox" name="lasso_editor[use_old_ui]" id="lasso_editor_use_old_ui" <?php echo checked( $use_old_ui, 'on' );?> >
224
-						<label for="lasso_editor[use_old_ui]"><?php _e( 'Use the Old Toolbar', 'lasso' );?></label>
225
-						<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
+						<input type="checkbox" class="checkbox" name="lasso_editor[use_old_ui]" id="lasso_editor_use_old_ui" <?php echo checked($use_old_ui, 'on'); ?> >
224
+						<label for="lasso_editor[use_old_ui]"><?php _e('Use the Old Toolbar', 'lasso'); ?></label>
225
+						<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>
226 226
 					</div>
227 227
 				    <div id="lasso-editor-settings--colors">
228 228
 					<?php
229
-					self::create_section_for_color_picker('button-color1', _e( 'Editor Bar Color Top', 'lasso' ), '#0000ff');
230
-					self::create_section_for_color_picker('button-color2', _e( 'Editor Bar Color Bottom', 'lasso' ), '#000030');
231
-					self::create_section_for_color_picker('dialog-color', _e( 'Dialog Color', 'lasso' ), '#000055');
232
-					self::create_section_for_color_picker('text-color', _e( 'Icon/Text Color', 'lasso' ), '#ffffff');
229
+					self::create_section_for_color_picker('button-color1', _e('Editor Bar Color Top', 'lasso'), '#0000ff');
230
+					self::create_section_for_color_picker('button-color2', _e('Editor Bar Color Bottom', 'lasso'), '#000030');
231
+					self::create_section_for_color_picker('dialog-color', _e('Dialog Color', 'lasso'), '#000055');
232
+					self::create_section_for_color_picker('text-color', _e('Icon/Text Color', 'lasso'), '#ffffff');
233 233
 					?>
234
-					<button type="button" id="lasso-editor-settings--default-colors" ><?php _e( 'Default Colors', 'lasso' );?></button>
234
+					<button type="button" id="lasso-editor-settings--default-colors" ><?php _e('Default Colors', 'lasso'); ?></button>
235 235
 				    <div style="height:50px;"></div>
236 236
 					</div>
237 237
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
238
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked( $toolbar_headings, 'on' );?> >
239
-						<label for="lasso_editor[toolbar_headings]"><?php _e( 'Enable H2 and H3 Buttons', 'lasso' );?></label>
240
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set H2 and H3 settings.', 'lasso' );?></span>
238
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked($toolbar_headings, 'on'); ?> >
239
+						<label for="lasso_editor[toolbar_headings]"><?php _e('Enable H2 and H3 Buttons', 'lasso'); ?></label>
240
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set H2 and H3 settings.', 'lasso'); ?></span>
241 241
 
242 242
 					</div>
243 243
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
244
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings_h4]" id="lasso_editor[toolbar_headings_h4]" <?php echo checked( $toolbar_headings_h4, 'on' );?> >
245
-						<label for="lasso_editor[toolbar_headings_h4]"><?php _e( 'Enable H4/H5/H6 Buttons', 'lasso' );?></label>
246
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set H4/H5/H6 settings.', 'lasso' );?></span>
244
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings_h4]" id="lasso_editor[toolbar_headings_h4]" <?php echo checked($toolbar_headings_h4, 'on'); ?> >
245
+						<label for="lasso_editor[toolbar_headings_h4]"><?php _e('Enable H4/H5/H6 Buttons', 'lasso'); ?></label>
246
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set H4/H5/H6 settings.', 'lasso'); ?></span>
247 247
 
248 248
 					</div>
249 249
 					
250 250
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
251
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_list]" id="lasso_editor[toolbar_list]" <?php echo checked( $toolbar_list, 'on' );?> >
252
-						<label for="lasso_editor[toolbar_list]"><?php _e( 'Enable OL/UL Buttons', 'lasso' );?></label>
253
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to create Ordered and Unordered Lists from text selection.', 'lasso' );?></span>
251
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_list]" id="lasso_editor[toolbar_list]" <?php echo checked($toolbar_list, 'on'); ?> >
252
+						<label for="lasso_editor[toolbar_list]"><?php _e('Enable OL/UL Buttons', 'lasso'); ?></label>
253
+						<span class="lasso--setting-description"><?php _e('Show the buttons to create Ordered and Unordered Lists from text selection.', 'lasso'); ?></span>
254 254
 					</div>
255 255
 					
256 256
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
257
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked( $toolbar_show_color, 'on' );?> >
258
-						<label for="lasso_editor[toolbar_show_color]"><?php _e( 'Enable Text Color Buttons', 'lasso' );?></label>
259
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set text colors.', 'lasso' );?></span>
257
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked($toolbar_show_color, 'on'); ?> >
258
+						<label for="lasso_editor[toolbar_show_color]"><?php _e('Enable Text Color Buttons', 'lasso'); ?></label>
259
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set text colors.', 'lasso'); ?></span>
260 260
 
261 261
 					</div>
262 262
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
263
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked( $toolbar_show_alignment, 'on' );?> >
264
-						<label for="lasso_editor[toolbar_show_alignment]"><?php _e( 'Enable Text Align Buttons', 'lasso' );?></label>
265
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set text alignment.', 'lasso' );?></span>
263
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked($toolbar_show_alignment, 'on'); ?> >
264
+						<label for="lasso_editor[toolbar_show_alignment]"><?php _e('Enable Text Align Buttons', 'lasso'); ?></label>
265
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set text alignment.', 'lasso'); ?></span>
266 266
 
267 267
 					</div>
268 268
 					
269 269
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
270
-						<input type="checkbox" class="checkbox" name="lasso_editor[links_editable]" id="lasso_editor[links_editable]" <?php echo checked( $links_editable, 'on' );?> >
271
-						<label for="lasso_editor[links_editable]"><?php _e( 'Make links editable under the Editing Mode', 'lasso' );?></label>
272
-						<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>
270
+						<input type="checkbox" class="checkbox" name="lasso_editor[links_editable]" id="lasso_editor[links_editable]" <?php echo checked($links_editable, 'on'); ?> >
271
+						<label for="lasso_editor[links_editable]"><?php _e('Make links editable under the Editing Mode', 'lasso'); ?></label>
272
+						<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>
273 273
 
274 274
 					</div>
275 275
 					<div class="lasso-editor-settings--option-inner">
276
-					    <label for="lasso_editor[insert_comp_ui]"> <?php _e( 'Insert Component UI', 'lasso' );?></label>
277
-						<span class="lasso--setting-description"><?php _e( 'UI mechanism to insert components', 'lasso' );?></span>
276
+					    <label for="lasso_editor[insert_comp_ui]"> <?php _e('Insert Component UI', 'lasso'); ?></label>
277
+						<span class="lasso--setting-description"><?php _e('UI mechanism to insert components', 'lasso'); ?></span>
278 278
 						<div class="lasso-editor-settings--option-inner" style="border:none;">
279
-					       <input type="radio" name="lasso_editor[insert_comp_ui]" value='drag' <?php echo checked( $insert_comp_ui, 'drag' );?>> <?php _e( 'Drag and Drop', 'lasso' );?>
279
+					       <input type="radio" name="lasso_editor[insert_comp_ui]" value='drag' <?php echo checked($insert_comp_ui, 'drag'); ?>> <?php _e('Drag and Drop', 'lasso'); ?>
280 280
 						</div>
281 281
 						<div class="lasso-editor-settings--option-inner" style="border:none;">
282
-						<input type="radio" name="lasso_editor[insert_comp_ui]" value="click" <?php echo checked( $insert_comp_ui, 'click' );?>> <?php _e( 'Click', 'lasso' );?>
282
+						<input type="radio" name="lasso_editor[insert_comp_ui]" value="click" <?php echo checked($insert_comp_ui, 'click'); ?>> <?php _e('Click', 'lasso'); ?>
283 283
 						</div>
284 284
 						<div class="lasso-editor-settings--option-inner" style="border:none;">
285
-						<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' );?>
285
+						<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'); ?>
286 286
 						</div>
287 287
 					</div>
288 288
 				</div>
@@ -291,101 +291,101 @@  discard block
 block discarded – undo
291 291
 				
292 292
 				
293 293
 
294
-				<h3><?php _e( 'Post Settings UI', 'lasso' );?></h3>
294
+				<h3><?php _e('Post Settings UI', 'lasso'); ?></h3>
295 295
 				<div class="lasso-editor-settings--option-wrap"  >
296 296
 					<div class="lasso-editor-settings--option-inner" style="border:none">
297
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked( $post_settings_disabled, 'on' );?> >
298
-						<label for="lasso_editor[post_settings_disabled]"> <?php _e( 'Disable Post Settings', 'lasso' );?></label>
299
-						<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>
297
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked($post_settings_disabled, 'on'); ?> >
298
+						<label for="lasso_editor[post_settings_disabled]"> <?php _e('Disable Post Settings', 'lasso'); ?></label>
299
+						<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>
300 300
 					</div>
301 301
 					
302 302
 					<div class="lasso-editor-settings--option-inner" style="border:none">
303
-						<input type="checkbox" class="checkbox" name="lasso_editor[allow_change_date]" id="lasso_editor[allow_change_date]" <?php echo checked( $allow_change_date, 'on' );?> >
304
-						<label for="lasso_editor[allow_change_date]"> <?php _e( 'Allow Changing Post Date', 'lasso' );?></label>
305
-						<span class="lasso--setting-description"><?php _e( 'Add the date selector to change the post\'s date to the Post Setting dialog', 'lasso' );?></span>
303
+						<input type="checkbox" class="checkbox" name="lasso_editor[allow_change_date]" id="lasso_editor[allow_change_date]" <?php echo checked($allow_change_date, 'on'); ?> >
304
+						<label for="lasso_editor[allow_change_date]"> <?php _e('Allow Changing Post Date', 'lasso'); ?></label>
305
+						<span class="lasso--setting-description"><?php _e('Add the date selector to change the post\'s date to the Post Setting dialog', 'lasso'); ?></span>
306 306
 					</div>
307 307
 					
308 308
 					<div class="lasso-editor-settings--option-inner" style="border:none">
309
-						<input type="checkbox" class="checkbox" name="lasso_editor[allow_new_category]" id="lasso_editor[allow_new_category]" <?php echo checked( $allow_new_category, 'on' );?> >
310
-						<label for="lasso_editor[allow_new_category]"> <?php _e( 'Allow Adding New Category', 'lasso' );?></label>
311
-						<span class="lasso--setting-description"><?php _e( 'Add the user to create new, previously non-existing categories for posts.', 'lasso' );?></span>
309
+						<input type="checkbox" class="checkbox" name="lasso_editor[allow_new_category]" id="lasso_editor[allow_new_category]" <?php echo checked($allow_new_category, 'on'); ?> >
310
+						<label for="lasso_editor[allow_new_category]"> <?php _e('Allow Adding New Category', 'lasso'); ?></label>
311
+						<span class="lasso--setting-description"><?php _e('Add the user to create new, previously non-existing categories for posts.', 'lasso'); ?></span>
312 312
 					</div>
313 313
 					
314 314
 					<div class="lasso-editor-settings--option-inner" style="border:none">
315
-						<input type="checkbox" class="checkbox" name="lasso_editor[no_pending_status]" id="lasso_editor[no_pending_status]" <?php echo checked( $no_pending_status, 'on' );?> >
316
-						<label for="lasso_editor[no_pending_status]"> <?php _e( 'Do Not Allow "Pending" Status', 'lasso' );?></label>
317
-						<span class="lasso--setting-description"><?php _e( 'Remove the Option to Set the Status to Pending.', 'lasso' );?></span>
315
+						<input type="checkbox" class="checkbox" name="lasso_editor[no_pending_status]" id="lasso_editor[no_pending_status]" <?php echo checked($no_pending_status, 'on'); ?> >
316
+						<label for="lasso_editor[no_pending_status]"> <?php _e('Do Not Allow "Pending" Status', 'lasso'); ?></label>
317
+						<span class="lasso--setting-description"><?php _e('Remove the Option to Set the Status to Pending.', 'lasso'); ?></span>
318 318
 					</div>
319 319
 					
320 320
 					<div class="lasso-editor-settings--option-inner" style="border:none">
321
-						<input type="checkbox" class="checkbox" name="lasso_editor[no_url_setting]" id="lasso_editor[no_slug_setting]" <?php echo checked( $no_url_setting, 'on' );?> >
322
-						<label for="lasso_editor[no_url_setting]"> <?php _e( 'Remove POST URL Option', 'lasso' );?></label>
323
-						<span class="lasso--setting-description"><?php _e( 'Remove the Option to Set the URL for the Post.', 'lasso' );?></span>
321
+						<input type="checkbox" class="checkbox" name="lasso_editor[no_url_setting]" id="lasso_editor[no_slug_setting]" <?php echo checked($no_url_setting, 'on'); ?> >
322
+						<label for="lasso_editor[no_url_setting]"> <?php _e('Remove POST URL Option', 'lasso'); ?></label>
323
+						<span class="lasso--setting-description"><?php _e('Remove the Option to Set the URL for the Post.', 'lasso'); ?></span>
324 324
 					</div>
325 325
 				
326 326
 					<div class="lasso-editor-settings--option-inner" >
327
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked( $post_new_disabled, 'on' );?> >
328
-						<label for="lasso_editor[post_adding_disabled]"><?php _e( 'Disable Post Adding', 'lasso' );?></label>
329
-						<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>
327
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked($post_new_disabled, 'on'); ?> >
328
+						<label for="lasso_editor[post_adding_disabled]"><?php _e('Disable Post Adding', 'lasso'); ?></label>
329
+						<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>
330 330
 					</div>
331 331
 					
332 332
 
333 333
 				</div>
334 334
 				
335
-				<h3><?php _e( 'Misc', 'lasso' );?></h3>
335
+				<h3><?php _e('Misc', 'lasso'); ?></h3>
336 336
 				<div class="lasso-editor-settings--option-wrap">
337 337
 					<div class="lasso-editor-settings--option-inner" style="border:none">
338
-						<input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked( $disable_tour, 'on' );?> >
339
-						<label for="lasso_editor[disable_tour]"> <?php _e( 'Do Not Show Tour Dialog', 'lasso' );?></label>
340
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable the tour dialog box for all users.', 'lasso' );?></span>
338
+						<input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked($disable_tour, 'on'); ?> >
339
+						<label for="lasso_editor[disable_tour]"> <?php _e('Do Not Show Tour Dialog', 'lasso'); ?></label>
340
+						<span class="lasso--setting-description"><?php _e('Check this box to disable the tour dialog box for all users.', 'lasso'); ?></span>
341 341
 					</div>
342 342
 
343 343
 					<div class="lasso-editor-settings--option-inner" style="border:none">
344
-					    <label for="lasso_editor[bold_tag]"> <?php _e( '"Bold" Tag', 'lasso' );?></label>
345
-						<span class="lasso--setting-description"><?php _e( 'Choose the HTML tag used for the "Bold" style.', 'lasso' );?></span>
346
-					    <input type="radio" name="lasso_editor[bold_tag]" value='b' <?php echo checked( $bold_tag, 'b' );?>> b
347
-						<input type="radio" name="lasso_editor[bold_tag]" value="strong" <?php echo checked( $bold_tag, 'strong' );?>> strong
344
+					    <label for="lasso_editor[bold_tag]"> <?php _e('"Bold" Tag', 'lasso'); ?></label>
345
+						<span class="lasso--setting-description"><?php _e('Choose the HTML tag used for the "Bold" style.', 'lasso'); ?></span>
346
+					    <input type="radio" name="lasso_editor[bold_tag]" value='b' <?php echo checked($bold_tag, 'b'); ?>> b
347
+						<input type="radio" name="lasso_editor[bold_tag]" value="strong" <?php echo checked($bold_tag, 'strong'); ?>> strong
348 348
 					</div>
349 349
 					<div class="lasso-editor-settings--option-inner" >
350
-					    <label for="lasso_editor[i_tag]"> <?php _e( '"Italic" Tag', 'lasso' );?></label>
351
-						<span class="lasso--setting-description"><?php _e( 'Choose the HTML tag used for the "Italic" style.', 'lasso' );?></span>
352
-					    <input type="radio" name="lasso_editor[i_tag]" value='i' <?php echo checked( $i_tag, 'i' );?>> i
353
-						<input type="radio" name="lasso_editor[i_tag]" value="em" <?php echo checked( $i_tag, 'em' );?>> em
350
+					    <label for="lasso_editor[i_tag]"> <?php _e('"Italic" Tag', 'lasso'); ?></label>
351
+						<span class="lasso--setting-description"><?php _e('Choose the HTML tag used for the "Italic" style.', 'lasso'); ?></span>
352
+					    <input type="radio" name="lasso_editor[i_tag]" value='i' <?php echo checked($i_tag, 'i'); ?>> i
353
+						<input type="radio" name="lasso_editor[i_tag]" value="em" <?php echo checked($i_tag, 'em'); ?>> em
354 354
 					</div>
355 355
 				</div>
356 356
 
357
-				<h3><?php _e( 'Advanced', 'lasso' );?></h3>
357
+				<h3><?php _e('Advanced', 'lasso'); ?></h3>
358 358
 				<div class="lasso-editor-settings--option-wrap ">
359 359
 					<div class="lasso-editor-settings--option-inner" style="border:none">
360
-						<input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked( $shortcodify_disabled, 'on' );?> >
361
-						<label for="lasso_editor[shortcodify_disabled]"><?php _e( 'Disable Aesop Component Conversion', 'lasso' );?></label>
362
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso' );?></span>
360
+						<input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked($shortcodify_disabled, 'on'); ?> >
361
+						<label for="lasso_editor[shortcodify_disabled]"><?php _e('Disable Aesop Component Conversion', 'lasso'); ?></label>
362
+						<span class="lasso--setting-description"><?php _e('Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso'); ?></span>
363 363
 					</div>
364 364
 				
365 365
 					<div class="lasso-editor-settings--option-inner" style="border:none">
366
-						<input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked( $enable_autosave, 'on' );?> >
367
-						<label for="lasso_editor[enable_autosave]"><?php _e( 'Enable Auto Save', 'lasso' );?></label>
368
-						<span class="lasso--setting-description"><?php _e( 'Check this box to enable auto save.', 'lasso' );?></span>
366
+						<input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked($enable_autosave, 'on'); ?> >
367
+						<label for="lasso_editor[enable_autosave]"><?php _e('Enable Auto Save', 'lasso'); ?></label>
368
+						<span class="lasso--setting-description"><?php _e('Check this box to enable auto save.', 'lasso'); ?></span>
369 369
 					</div>
370 370
 				
371 371
 					<div class="lasso-editor-settings--option-inner" style="border:none">
372
-						<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' );?> >
373
-						<label for="lasso_editor[post_save_disabled]"><?php _e( 'Disable Post Saving', 'lasso' );?></label>
374
-						<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>
372
+						<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'); ?> >
373
+						<label for="lasso_editor[post_save_disabled]"><?php _e('Disable Post Saving', 'lasso'); ?></label>
374
+						<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>
375 375
 
376 376
 					</div>
377 377
 					
378 378
 					<div class="lasso-editor-settings--option-inner" style="border:none">
379
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_edit_disabled]" id="lasso_editor[post_edit_disabled]" <?php echo checked( $edit_post_disabled, 'on' );?> >
380
-						<label for="lasso_editor[post_edit_disabled]"><?php _e( 'Disable Post Editing', 'lasso' );?></label>
381
-						<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>
379
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_edit_disabled]" id="lasso_editor[post_edit_disabled]" <?php echo checked($edit_post_disabled, 'on'); ?> >
380
+						<label for="lasso_editor[post_edit_disabled]"><?php _e('Disable Post Editing', 'lasso'); ?></label>
381
+						<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>
382 382
 
383 383
 					</div>
384 384
 				
385 385
 					<div class="lasso-editor-settings--option-inner">
386
-						<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' );?> >
387
-						<label for="lasso_editor[save_using_rest_disabled]"><?php _e( "Don't Use REST API to Save", 'lasso' );?></label>
388
-						<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>
386
+						<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'); ?> >
387
+						<label for="lasso_editor[save_using_rest_disabled]"><?php _e("Don't Use REST API to Save", 'lasso'); ?></label>
388
+						<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>
389 389
 
390 390
 					</div>
391 391
 				</div>
@@ -395,11 +395,11 @@  discard block
 block discarded – undo
395 395
 
396 396
 				<div class="lasso-editor-settings--submit">
397 397
 				    <input type="hidden" name="action" value="lasso-editor-settings" />
398
-				    <input type="submit" class="button-primary" value="<?php esc_attr_e( 'Save Settings', 'lasso' );?>" />
399
-					<?php wp_nonce_field( 'nonce', 'lasso_editor_settings' ); ?>
398
+				    <input type="submit" class="button-primary" value="<?php esc_attr_e('Save Settings', 'lasso'); ?>" />
399
+					<?php wp_nonce_field('nonce', 'lasso_editor_settings'); ?>
400 400
 				</div>
401 401
 				
402
-				<?php do_action('lasso_settings_after');?>
402
+				<?php do_action('lasso_settings_after'); ?>
403 403
 			</form>
404 404
 
405 405
 		</div><?php
Please login to merge, or discard this patch.