Completed
Push — master ( 27d4be...a5d566 )
by
unknown
01:46
created
admin/includes/menus/license.php 1 patch
Spacing   +57 added lines, -57 removed lines patch added patch discarded remove patch
@@ -6,28 +6,28 @@  discard block
 block discarded – undo
6 6
 
7 7
 	function __construct() {
8 8
 
9
-		define( 'LASSO_STORE_ITEM_NAME', 'lasso' );
10
-		define( 'LASSO_STORE_URL', 'https://edituswp.com' );
11
-
12
-		add_action( 'admin_init',  array( $this, 'plugin_updater' ), 0 );
13
-		add_action( 'admin_menu',  array( $this, 'license_menu' ) );
14
-		add_action( 'network_admin_menu',  array( $this, 'license_menu' ) ); // CHANGED Added hook.
15
-		add_action( 'admin_init',  array( $this, 'register_option' ) );
16
-		add_action( 'admin_init',  array( $this, 'activate_license' ) );
17
-		add_action( 'admin_init',  array( $this, 'deactivate_license' ) );
9
+		define('LASSO_STORE_ITEM_NAME', 'lasso');
10
+		define('LASSO_STORE_URL', 'https://edituswp.com');
11
+
12
+		add_action('admin_init', array($this, 'plugin_updater'), 0);
13
+		add_action('admin_menu', array($this, 'license_menu'));
14
+		add_action('network_admin_menu', array($this, 'license_menu')); // CHANGED Added hook.
15
+		add_action('admin_init', array($this, 'register_option'));
16
+		add_action('admin_init', array($this, 'activate_license'));
17
+		add_action('admin_init', array($this, 'deactivate_license'));
18 18
 	}
19 19
 
20 20
 	function plugin_updater() {
21 21
 
22 22
 		// retrieve our license key from the DB
23
-		$license_key = trim( get_option( 'lasso_license_key' ) );
23
+		$license_key = trim(get_option('lasso_license_key'));
24 24
 
25 25
 		// setup the updater
26
-		$edd_updater = new \EDD_SL_Plugin_Updater( LASSO_STORE_URL , LASSO_FILE, array(
26
+		$edd_updater = new \EDD_SL_Plugin_Updater(LASSO_STORE_URL, LASSO_FILE, array(
27 27
 				'version'  => LASSO_VERSION,
28 28
 				'license'  => $license_key,
29 29
 				'item_name' => LASSO_STORE_ITEM_NAME,
30
-				'author'  => __( 'Aesopinteractive LLC', 'lasso' )
30
+				'author'  => __('Aesopinteractive LLC', 'lasso')
31 31
 			)
32 32
 		);
33 33
 
@@ -35,51 +35,51 @@  discard block
 block discarded – undo
35 35
 	function license_menu() {
36 36
 
37 37
 		// CHANGED Removed condition.
38
-		add_submenu_page( 'lasso-editor', __( 'License Key', 'lasso' ), __( 'License', 'lasso' ), 'manage_options', 'lasso-license', array( $this, 'license_page' ) );
38
+		add_submenu_page('lasso-editor', __('License Key', 'lasso'), __('License', 'lasso'), 'manage_options', 'lasso-license', array($this, 'license_page'));
39 39
 
40 40
 	}
41 41
 	function license_page() {
42
-		$license  = get_option( 'lasso_license_key' );
43
-		$status  = get_option( 'lasso_license_status' );
42
+		$license = get_option('lasso_license_key');
43
+		$status = get_option('lasso_license_status');
44 44
 
45 45
 ?>
46 46
 		<div class="wrap">
47
-			<h2><?php _e( 'Editus License', 'lasso' ); ?></h2>
48
-			<p><?php _e( 'Input the license key you recieved with your purchase to ensure your version of Editus stays updated.', 'lasso' );?></p>
47
+			<h2><?php _e('Editus License', 'lasso'); ?></h2>
48
+			<p><?php _e('Input the license key you recieved with your purchase to ensure your version of Editus stays updated.', 'lasso'); ?></p>
49 49
 			<form class="lasso--form-settings" method="post" action="options.php">
50 50
 
51
-				<?php settings_fields( 'lasso_license' ); ?>
51
+				<?php settings_fields('lasso_license'); ?>
52 52
 
53 53
 				<table class="form-table">
54 54
 					<tbody>
55 55
 						<tr valign="top">
56 56
 							<th scope="row" valign="top">
57
-								<?php _e( 'License Key', 'lasso' ); ?>
57
+								<?php _e('License Key', 'lasso'); ?>
58 58
 							</th>
59 59
 							<td>
60
-								<input id="lasso_license_key" name="lasso_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $license ); ?>" />
60
+								<input id="lasso_license_key" name="lasso_license_key" type="text" class="regular-text" value="<?php esc_attr_e($license); ?>" />
61 61
 							</td>
62 62
 						</tr>
63
-						<?php if ( false !== $license ) { ?>
63
+						<?php if (false !== $license) { ?>
64 64
 							<tr valign="top">
65 65
 								<th scope="row" valign="top">
66
-									<?php _e( 'Activate License', 'lasso' ); ?>
66
+									<?php _e('Activate License', 'lasso'); ?>
67 67
 								</th>
68 68
 								<td>
69
-									<?php if ( $status !== false && $status == 'valid' ) { ?>
70
-										<span style="color:green;"><?php _e( 'active' ); ?></span>
71
-										<?php wp_nonce_field( 'lasso_license_nonce', 'lasso_license_nonce' ); ?>
72
-										<input type="submit" class="button-secondary" name="edd_license_deactivate" value="<?php esc_attr_e( 'Deactivate License', 'lasso' ); ?>"/>
69
+									<?php if ($status !== false && $status == 'valid') { ?>
70
+										<span style="color:green;"><?php _e('active'); ?></span>
71
+										<?php wp_nonce_field('lasso_license_nonce', 'lasso_license_nonce'); ?>
72
+										<input type="submit" class="button-secondary" name="edd_license_deactivate" value="<?php esc_attr_e('Deactivate License', 'lasso'); ?>"/>
73 73
 									<?php } else {
74
-				wp_nonce_field( 'lasso_license_nonce', 'lasso_license_nonce' ); ?>
75
-										<input type="submit" class="button-secondary" name="edd_license_activate" value="<?php esc_attr_e( 'Activate License', 'lasso' ); ?>"/>
74
+				wp_nonce_field('lasso_license_nonce', 'lasso_license_nonce'); ?>
75
+										<input type="submit" class="button-secondary" name="edd_license_activate" value="<?php esc_attr_e('Activate License', 'lasso'); ?>"/>
76 76
 									<?php } ?>
77 77
 								</td>
78 78
 							</tr>
79 79
 						<?php } ?>
80 80
 					</tbody>
81 81
 				</table>
82
-				<?php submit_button( 'Save License' ); ?>
82
+				<?php submit_button('Save License'); ?>
83 83
 
84 84
 			</form>
85 85
 		<?php
@@ -88,14 +88,14 @@  discard block
 block discarded – undo
88 88
 	// register option
89 89
 	function register_option() {
90 90
 
91
-		register_setting( 'lasso_license', 'lasso_license_key', array( $this, 'sanitize_license' ) );
91
+		register_setting('lasso_license', 'lasso_license_key', array($this, 'sanitize_license'));
92 92
 	}
93 93
 
94 94
 	// santize
95
-	function sanitize_license( $new ) {
96
-		$old = get_option( 'lasso_license_key' );
97
-		if ( $old && $old != $new ) {
98
-			delete_option( 'lasso_license_status' ); // new license has been entered, so must reactivate
95
+	function sanitize_license($new) {
96
+		$old = get_option('lasso_license_key');
97
+		if ($old && $old != $new) {
98
+			delete_option('lasso_license_status'); // new license has been entered, so must reactivate
99 99
 		}
100 100
 		return $new;
101 101
 	}
@@ -104,36 +104,36 @@  discard block
 block discarded – undo
104 104
 	function activate_license() {
105 105
 
106 106
 		// listen for our activate button to be clicked
107
-		if ( isset( $_POST['edd_license_activate'] ) ) {
107
+		if (isset($_POST['edd_license_activate'])) {
108 108
 
109 109
 			// run a quick security check
110
-			if ( ! check_admin_referer( 'lasso_license_nonce', 'lasso_license_nonce' ) )
110
+			if (!check_admin_referer('lasso_license_nonce', 'lasso_license_nonce'))
111 111
 				return; // get out if we didn't click the Activate button
112 112
 
113 113
 			// retrieve the license from the database
114
-			$license = trim( get_option( 'lasso_license_key' ) );
114
+			$license = trim(get_option('lasso_license_key'));
115 115
 
116 116
 			// data to send in our API request
117 117
 			$api_params = array(
118 118
 				'edd_action'=> 'activate_license',
119 119
 				'license'  => $license,
120
-				'item_name' => urlencode( LASSO_STORE_ITEM_NAME ), // the name of our product in EDD
120
+				'item_name' => urlencode(LASSO_STORE_ITEM_NAME), // the name of our product in EDD
121 121
 				'url'       => home_url()
122 122
 			);
123 123
 
124 124
 			// Call the custom API.
125
-			$response = wp_remote_post( LASSO_STORE_URL, array( 'body' => $api_params, 'timeout' => 15, 'sslverify' => false ) );
125
+			$response = wp_remote_post(LASSO_STORE_URL, array('body' => $api_params, 'timeout' => 15, 'sslverify' => false));
126 126
 
127 127
 			// make sure the response came back okay
128
-			if ( is_wp_error( $response ) )
128
+			if (is_wp_error($response))
129 129
 				return false;
130 130
 
131 131
 			// decode the license data
132
-			$license_data = json_decode( wp_remote_retrieve_body( $response ) );
132
+			$license_data = json_decode(wp_remote_retrieve_body($response));
133 133
 
134 134
 			// $license_data->license will be either "valid" or "invalid"
135 135
 
136
-			update_option( 'lasso_license_status', $license_data->license );
136
+			update_option('lasso_license_status', $license_data->license);
137 137
 
138 138
 		}
139 139
 	}
@@ -141,37 +141,37 @@  discard block
 block discarded – undo
141 141
 	function deactivate_license() {
142 142
 
143 143
 		// listen for our activate button to be clicked
144
-		if ( isset( $_POST['edd_license_deactivate'] ) ) {
144
+		if (isset($_POST['edd_license_deactivate'])) {
145 145
 
146 146
 			// run a quick security check
147
-			if ( ! check_admin_referer( 'lasso_license_nonce', 'lasso_license_nonce' ) )
147
+			if (!check_admin_referer('lasso_license_nonce', 'lasso_license_nonce'))
148 148
 				return; // get out if we didn't click the Activate button
149 149
 
150 150
 			// retrieve the license from the database
151
-			$license = trim( get_option( 'lasso_license_key' ) );
151
+			$license = trim(get_option('lasso_license_key'));
152 152
 
153 153
 
154 154
 			// data to send in our API request
155 155
 			$api_params = array(
156 156
 				'edd_action'=> 'deactivate_license',
157 157
 				'license'  => $license,
158
-				'item_name' => urlencode( LASSO_STORE_ITEM_NAME ), // the name of our product in EDD
158
+				'item_name' => urlencode(LASSO_STORE_ITEM_NAME), // the name of our product in EDD
159 159
 				'url'       => home_url()
160 160
 			);
161 161
 
162 162
 			// Call the custom API.
163
-			$response = wp_remote_post( LASSO_STORE_URL, array( 'body' => $api_params, 'timeout' => 15, 'sslverify' => false ) );
163
+			$response = wp_remote_post(LASSO_STORE_URL, array('body' => $api_params, 'timeout' => 15, 'sslverify' => false));
164 164
 
165 165
 			// make sure the response came back okay
166
-			if ( is_wp_error( $response ) )
166
+			if (is_wp_error($response))
167 167
 				return false;
168 168
 
169 169
 			// decode the license data
170
-			$license_data = json_decode( wp_remote_retrieve_body( $response ) );
170
+			$license_data = json_decode(wp_remote_retrieve_body($response));
171 171
 
172 172
 			// $license_data->license will be either "deactivated" or "failed"
173
-			if ( $license_data->license == 'deactivated' )
174
-				delete_option( 'lasso_license_status' );
173
+			if ($license_data->license == 'deactivated')
174
+				delete_option('lasso_license_status');
175 175
 
176 176
 		}
177 177
 	}
@@ -181,24 +181,24 @@  discard block
 block discarded – undo
181 181
 
182 182
 		global $wp_version;
183 183
 
184
-		$license = trim( get_option( 'lasso_license_key' ) );
184
+		$license = trim(get_option('lasso_license_key'));
185 185
 
186 186
 		$api_params = array(
187 187
 			'edd_action' => 'check_license',
188 188
 			'license' => $license,
189
-			'item_name' => urlencode( LASSO_STORE_ITEM_NAME ),
189
+			'item_name' => urlencode(LASSO_STORE_ITEM_NAME),
190 190
 			'url'       => home_url()
191 191
 		);
192 192
 
193 193
 		// Call the custom API.
194
-		$response = wp_remote_post( LASSO_STORE_URL, array( 'body' => $api_params, 'timeout' => 15, 'sslverify' => false ) );
194
+		$response = wp_remote_post(LASSO_STORE_URL, array('body' => $api_params, 'timeout' => 15, 'sslverify' => false));
195 195
 
196
-		if ( is_wp_error( $response ) )
196
+		if (is_wp_error($response))
197 197
 			return false;
198 198
 
199
-		$license_data = json_decode( wp_remote_retrieve_body( $response ) );
199
+		$license_data = json_decode(wp_remote_retrieve_body($response));
200 200
 
201
-		if ( $license_data->license == 'valid' ) {
201
+		if ($license_data->license == 'valid') {
202 202
 			echo 'valid'; exit;
203 203
 			// this license is still valid
204 204
 		} else {
Please login to merge, or discard this patch.
includes/process/gallery.php 1 patch
Spacing   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -29,15 +29,15 @@  discard block
 block discarded – undo
29 29
 	 *
30 30
 	 * @return array Key "markup" has the HTML.
31 31
 	 */
32
-	public function swap( $data ) {
32
+	public function swap($data) {
33 33
 
34 34
 
35
-		$id = $data[ 'gallery_id' ];
36
-		if ( is_null( $id ) ) {
35
+		$id = $data['gallery_id'];
36
+		if (is_null($id)) {
37 37
 			$id = false;
38 38
 		}
39 39
 
40
-		$markup = sprintf( '<div contenteditable="false" class="lasso--empty-component aesop-component aesop-gallery-component" data-component-type="gallery" data-id="%s">%s</div>', $id, __( 'Save and refresh to view gallery.','lasso' ) );
40
+		$markup = sprintf('<div contenteditable="false" class="lasso--empty-component aesop-component aesop-gallery-component" data-component-type="gallery" data-id="%s">%s</div>', $id, __('Save and refresh to view gallery.', 'lasso'));
41 41
 
42 42
 		return array(
43 43
 			'gallery' => $markup
@@ -54,49 +54,49 @@  discard block
 block discarded – undo
54 54
 	 *
55 55
 	 * @return array|bool On success an array containing "message" or on failure false.
56 56
 	 */
57
-	public function create( $data ) {
57
+	public function create($data) {
58 58
 
59 59
 		//@todo adapt auth callbacks to work with args.
60
-		if (  ! lasso_user_can( 'publish_posts' ) ) {
60
+		if (!lasso_user_can('publish_posts')) {
61 61
 			return false;
62 62
 
63 63
 		}
64 64
 
65
-		$gallery_ids = isset( $data['gallery_ids'] ) ? $data['gallery_ids'] : false;
65
+		$gallery_ids = isset($data['gallery_ids']) ? $data['gallery_ids'] : false;
66 66
 
67 67
 		// bail if no gallery ids
68
-		if ( empty( $gallery_ids ) ) {
68
+		if (empty($gallery_ids)) {
69 69
 			return false;
70 70
 		}
71 71
 
72
-		$postid   		 = isset( $data['postid'] ) ? (int) $data['postid'] : false;
73
-		$type   		 = isset( $data['gallery_type'] ) ? $data['gallery_type'] : false;
74
-		$edgallerytitle	 = isset( $data['edgallerytitle'] ) ? $data['edgallerytitle'] : $postid.'-'.rand();
72
+		$postid = isset($data['postid']) ? (int) $data['postid'] : false;
73
+		$type = isset($data['gallery_type']) ? $data['gallery_type'] : false;
74
+		$edgallerytitle = isset($data['edgallerytitle']) ? $data['edgallerytitle'] : $postid.'-'.rand();
75 75
 
76 76
 		// insert a new gallery
77 77
 		$args = array(
78
-			'post_title'    => $edgallerytitle ,
78
+			'post_title'    => $edgallerytitle,
79 79
 			'post_status'   => 'publish',
80 80
 			'post_type'     => 'ai_galleries'
81 81
 		);
82 82
 
83
-		$postid = wp_insert_post( apply_filters( 'lasso_insert_gallery_args', $args ) );
83
+		$postid = wp_insert_post(apply_filters('lasso_insert_gallery_args', $args));
84 84
 
85 85
 		// update gallery ids
86
-		if ( $gallery_ids ) {
86
+		if ($gallery_ids) {
87 87
 
88
-			update_post_meta( $postid, '_ase_gallery_images', $gallery_ids );
88
+			update_post_meta($postid, '_ase_gallery_images', $gallery_ids);
89 89
 
90 90
 		}
91 91
 
92 92
 		// update the gallery type
93
-		if ( !empty( $type ) ) {
93
+		if (!empty($type)) {
94 94
 
95
-			update_post_meta( $postid, 'aesop_gallery_type', $type );
95
+			update_post_meta($postid, 'aesop_gallery_type', $type);
96 96
 
97 97
 		}
98 98
 
99
-		do_action( 'lasso_gallery_published', $postid, $gallery_ids, get_current_user_ID() );
99
+		do_action('lasso_gallery_published', $postid, $gallery_ids, get_current_user_ID());
100 100
 
101 101
 		return array(
102 102
 			'message' => 'gallery-created',
@@ -114,20 +114,20 @@  discard block
 block discarded – undo
114 114
 	 *
115 115
 	 * @return array "message" key has the message.
116 116
 	 */
117
-	public function update( $data ) {
118
-
119
-		$options      = isset( $data['fields'] ) ? $data['fields'] : false;
120
-		$postid   	  = !empty( $options ) ? (int) $options['id'] : false;
121
-		$gallery_ids  = isset( $data['gallery_ids'] ) ? $data['gallery_ids'] : false;
122
-		if ( ! empty( $data ) && $data[ 'gallery_type' ] ) {
123
-			$type = $data[ 'gallery_type' ];
124
-		}elseif ( ! empty( $options ) && $options[ 'galleryType' ] ) {
125
-			$type = $options[ 'galleryType' ];
126
-		}else{
117
+	public function update($data) {
118
+
119
+		$options      = isset($data['fields']) ? $data['fields'] : false;
120
+		$postid = !empty($options) ? (int) $options['id'] : false;
121
+		$gallery_ids  = isset($data['gallery_ids']) ? $data['gallery_ids'] : false;
122
+		if (!empty($data) && $data['gallery_type']) {
123
+			$type = $data['gallery_type'];
124
+		}elseif (!empty($options) && $options['galleryType']) {
125
+			$type = $options['galleryType'];
126
+		} else {
127 127
 			$type = false;
128 128
 		}
129 129
 
130
-		save_gallery::save_gallery_options( $postid, $gallery_ids, $options, $type );
130
+		save_gallery::save_gallery_options($postid, $gallery_ids, $options, $type);
131 131
 
132 132
 		return array(
133 133
 			'message' => 'gallery-updated'
@@ -145,25 +145,25 @@  discard block
 block discarded – undo
145 145
 	 *
146 146
 	 * @return bool
147 147
 	 */
148
-	public function get_images( $data ) {
148
+	public function get_images($data) {
149 149
 
150 150
 		//check caps
151
-		if ( !current_user_can( 'edit_posts' ) ) {
151
+		if (!current_user_can('edit_posts')) {
152 152
 			return false;
153 153
 		}
154 154
 
155 155
 		// bail if no id specified like on new galleries
156
-		if ( is_null( $data['post_id'] ) || empty( $data['post_id'] ) ) {
156
+		if (is_null($data['post_id']) || empty($data['post_id'])) {
157 157
 			return false;
158 158
 		}
159 159
 
160
-		$postid  = isset( $data['post_id'] ) ? $data['post_id'] : false;
160
+		$postid = isset($data['post_id']) ? $data['post_id'] : false;
161 161
 
162 162
 		// fetch image ids from cache
163
-		$image_ids  = get_post_meta( $postid, '_ase_gallery_images', true );
163
+		$image_ids = get_post_meta($postid, '_ase_gallery_images', true);
164 164
 
165 165
 		// send ids to return images
166
-		return self::get_the_images( $image_ids );
166
+		return self::get_the_images($image_ids);
167 167
 
168 168
 	}
169 169
 
@@ -173,32 +173,32 @@  discard block
 block discarded – undo
173 173
 	 * @param $image_ids array array of image ids
174 174
 	 * @since 0.1
175 175
 	 */
176
-	private function get_the_images( $image_ids = '' ) {
176
+	private function get_the_images($image_ids = '') {
177 177
 
178
-		if ( empty( $image_ids ) )
178
+		if (empty($image_ids))
179 179
 			return;
180 180
 
181
-		$image_ids  = array_map( 'intval', explode( ',', $image_ids ) );
181
+		$image_ids = array_map('intval', explode(',', $image_ids));
182 182
 
183 183
 		$out[] = '<ul id="ase-gallery-images">';
184 184
 
185
-		if ( !empty( $image_ids ) ):
185
+		if (!empty($image_ids)):
186 186
 
187
-			foreach ( $image_ids as $image_id ) {
187
+			foreach ($image_ids as $image_id) {
188 188
 
189
-				$image    =  wp_get_attachment_image_src( $image_id, 'thumbnail', false );
189
+				$image = wp_get_attachment_image_src($image_id, 'thumbnail', false);
190 190
 
191
-				$out[] = sprintf( '
191
+				$out[] = sprintf('
192 192
 		        <li id="%1s" class="ase-gallery-image">
193 193
 		        	<i class="dashicons dashicons-no-alt" title="%2s"></i>
194 194
 		        	<i class="dashicons dashicons-edit" title="%3s"></i>
195 195
 		           	<img src="%4s">
196 196
 		        </li>
197 197
 		       ',
198
-					absint( $image_id ),
199
-					__( 'Delete From Gallery', 'lasso' ),
200
-					__( 'Edit Image Caption', 'lasso' ),
201
-					esc_url( $image[0] )
198
+					absint($image_id),
199
+					__('Delete From Gallery', 'lasso'),
200
+					__('Edit Image Caption', 'lasso'),
201
+					esc_url($image[0])
202 202
 				);
203 203
 
204 204
 			}
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 
208 208
 		$out[] = '</ul>';
209 209
 
210
-		return array( 'html' => implode( '', $out ) );
210
+		return array('html' => implode('', $out));
211 211
 
212 212
 	}
213 213
 
@@ -219,13 +219,13 @@  discard block
 block discarded – undo
219 219
 	 *
220 220
 	 * @return array Array of keys to pull from $data per action and their sanitization callback
221 221
 	 */
222
-	public static function params(){
223
-		$params[ 'process_gallery_swap' ] = array(
222
+	public static function params() {
223
+		$params['process_gallery_swap'] = array(
224 224
 			'gallery_id' => 'absint',
225 225
 
226 226
 		);
227 227
 
228
-		$params[ 'process_gallery_create' ] = array(
228
+		$params['process_gallery_create'] = array(
229 229
 			'postid'   => 'absint',
230 230
 			'content'   => 'wp_kses_post',
231 231
 			'edgallerytitle' =>'sanitize_text_field',
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 
238 238
 		);
239 239
 
240
-		$params[ 'process_gallery_update' ] = array(
240
+		$params['process_gallery_update'] = array(
241 241
 			'postid'        => 'absint',
242 242
 			'gallery_ids'   => 'lasso_sanitize_data',
243 243
 			'fields'        => 'lasso_sanitize_data',
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 			)
248 248
 		);
249 249
 
250
-		$params[ 'process_gallery_get_images' ] = array(
250
+		$params['process_gallery_get_images'] = array(
251 251
 			'post_id'       => 'absint'
252 252
 		);
253 253
 
@@ -263,19 +263,19 @@  discard block
 block discarded – undo
263 263
 	 * @return array Array of additional functions to use to authorize action.
264 264
 	 */
265 265
 	public static function auth_callbacks() {
266
-		$params[ 'process_gallery_swap' ] = array(
266
+		$params['process_gallery_swap'] = array(
267 267
 			'lasso_user_can'
268 268
 		);
269 269
 
270
-		$params[ 'process_gallery_create' ] = array(
270
+		$params['process_gallery_create'] = array(
271 271
 			'is_user_logged_in'
272 272
 		);
273 273
 
274
-		$params[ 'process_gallery_update' ] = array(
274
+		$params['process_gallery_update'] = array(
275 275
 			'lasso_user_can'
276 276
 		);
277 277
 
278
-		$params[ 'process_gallery_get_images' ] = array();
278
+		$params['process_gallery_get_images'] = array();
279 279
 
280 280
 		return $params;
281 281
 
Please login to merge, or discard this patch.
includes/save_gallery.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -12,65 +12,65 @@
 block discarded – undo
12 12
 	/**
13 13
 	 * Update an existing galleries options
14 14
 	 */
15
-	public static function save_gallery_options( $postid, $gallery_ids, $options, $type = false ) {
15
+	public static function save_gallery_options($postid, $gallery_ids, $options, $type = false) {
16 16
 
17 17
 		// gallery width
18
-		$gallery_width = isset( $options['width'] ) ? $options['width'] : false;
18
+		$gallery_width = isset($options['width']) ? $options['width'] : false;
19 19
 
20 20
 		// gallery grid item width
21
-		$item_width = isset( $options['itemwidth'] ) ? $options['itemwidth'] : false;
21
+		$item_width = isset($options['itemwidth']) ? $options['itemwidth'] : false;
22 22
 
23 23
 		// caption
24
-		$caption = isset( $options['caption'] ) ? $options['caption'] : false;
24
+		$caption = isset($options['caption']) ? $options['caption'] : false;
25 25
 
26 26
 		// gallery transition
27
-		$transition = isset( $options['transition'] ) ? $options['transition'] : false;
27
+		$transition = isset($options['transition']) ? $options['transition'] : false;
28 28
 
29 29
 		// gallery transition speed
30
-		$transitionSpeed = isset( $options['speed'] ) ? $options['speed'] : false;
30
+		$transitionSpeed = isset($options['speed']) ? $options['speed'] : false;
31 31
 
32 32
 		// gallery hide thumbs
33
-		$hideThumbs = isset( $options['hideThumbs'] ) ? $options['hideThumbs'] : false;
33
+		$hideThumbs = isset($options['hideThumbs']) ? $options['hideThumbs'] : false;
34 34
 
35 35
 		// photoset layout hardwired to on for now
36
-		$psLayout = isset( $options['pslayout'] ) ? $options['pslayout'] : false;
36
+		$psLayout = isset($options['pslayout']) ? $options['pslayout'] : false;
37 37
 
38 38
 		// photoset layout
39
-		$psLightbox = 'on';//isset( $options['pslightbox'] ) ? $options['pslightbox'] : false;
39
+		$psLightbox = 'on'; //isset( $options['pslightbox'] ) ? $options['pslightbox'] : false;
40 40
 		
41 41
 		// hero gallery height
42
-		$gallery_height = isset( $options['height'] ) ? $options['height'] : false;
42
+		$gallery_height = isset($options['height']) ? $options['height'] : false;
43 43
 
44 44
 		// update gallery ids
45
-		if ( !empty( $gallery_ids ) ) {
45
+		if (!empty($gallery_ids)) {
46 46
 
47
-			update_post_meta( $postid, '_ase_gallery_images', $gallery_ids );
47
+			update_post_meta($postid, '_ase_gallery_images', $gallery_ids);
48 48
 
49 49
 		}
50 50
 
51
-		update_post_meta( $postid, 'aesop_gallery_type', sanitize_text_field( trim( $type ) ) );
51
+		update_post_meta($postid, 'aesop_gallery_type', sanitize_text_field(trim($type)));
52 52
 
53
-		update_post_meta( $postid, 'aesop_gallery_width', sanitize_text_field( trim( $gallery_width ) ) );
53
+		update_post_meta($postid, 'aesop_gallery_width', sanitize_text_field(trim($gallery_width)));
54 54
 
55
-		update_post_meta( $postid, 'aesop_grid_gallery_width', sanitize_text_field( trim( $item_width ) ) );
55
+		update_post_meta($postid, 'aesop_grid_gallery_width', sanitize_text_field(trim($item_width)));
56 56
 
57
-		update_post_meta( $postid, 'aesop_gallery_caption', sanitize_text_field( trim( $caption ) ) );
57
+		update_post_meta($postid, 'aesop_gallery_caption', sanitize_text_field(trim($caption)));
58 58
 
59
-		update_post_meta( $postid, 'aesop_thumb_gallery_transition', sanitize_text_field( trim( $transition ) ) );
59
+		update_post_meta($postid, 'aesop_thumb_gallery_transition', sanitize_text_field(trim($transition)));
60 60
 
61
-		update_post_meta( $postid, 'aesop_thumb_gallery_transition_speed', absint( trim( $transitionSpeed ) ) );
61
+		update_post_meta($postid, 'aesop_thumb_gallery_transition_speed', absint(trim($transitionSpeed)));
62 62
 
63
-		update_post_meta( $postid, 'aesop_thumb_gallery_hide_thumbs', sanitize_text_field( trim( $hideThumbs ) ) );
63
+		update_post_meta($postid, 'aesop_thumb_gallery_hide_thumbs', sanitize_text_field(trim($hideThumbs)));
64 64
 
65
-		update_post_meta( $postid, 'aesop_photoset_gallery_layout', sanitize_text_field( trim( $psLayout ) ) );
65
+		update_post_meta($postid, 'aesop_photoset_gallery_layout', sanitize_text_field(trim($psLayout)));
66 66
 
67
-		update_post_meta( $postid, 'aesop_photoset_gallery_lightbox', sanitize_text_field( trim( $psLightbox ) ) );
67
+		update_post_meta($postid, 'aesop_photoset_gallery_lightbox', sanitize_text_field(trim($psLightbox)));
68 68
 		
69
-		update_post_meta( $postid, 'aesop_hero_gallery_height', sanitize_text_field( trim( $gallery_height ) ) );
69
+		update_post_meta($postid, 'aesop_hero_gallery_height', sanitize_text_field(trim($gallery_height)));
70 70
 		
71 71
 		//hardwired for now
72 72
 		
73
-		update_post_meta( $postid, 'aesop_hero_gallery_transition_speed', 300 );
73
+		update_post_meta($postid, 'aesop_hero_gallery_transition_speed', 300);
74 74
 
75 75
 	}
76 76
 
Please login to merge, or discard this patch.
public/includes/editor-modules--gallery.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -11,12 +11,12 @@  discard block
 block discarded – undo
11 11
 
12 12
 	ob_start();
13 13
 
14
-	if ( $galleries ) { ?>
14
+	if ($galleries) { ?>
15 15
 	
16
-		<?php if ( lasso_user_can( 'publish_posts' ) ): ?>
16
+		<?php if (lasso_user_can('publish_posts')): ?>
17 17
 			<div class="ase-gallery-opts ase-gallery-opts--create-gallery" style="display:inline !important; postion:relative !important;left:12px !important">
18 18
 				<div class="ase-gallery-opts--single lasso-option">
19
-				<a href="#" class="editor-btn-secondary" id="lasso--gallery__create"><?php _e( 'Create gallery', 'lasso' );?></a>
19
+				<a href="#" class="editor-btn-secondary" id="lasso--gallery__create"><?php _e('Create gallery', 'lasso'); ?></a>
20 20
 				</div>
21 21
 			</div>
22 22
 		<?php endif; ?>
@@ -24,11 +24,11 @@  discard block
 block discarded – undo
24 24
 		<div class="ase-gallery-opts ase-gallery-opts--edit-gallery" >
25 25
 			<div class="ase-gallery-opts--single lasso-option">
26 26
 
27
-				<label><?php _e( 'Manage Images', 'lasso' );?>
28
-					<a href="#" id="ase-gallery-add-image" class="lasso-editor-tiny-btn" title="<?php esc_attr_e( 'Add Images', 'lasso' );?>"><i class="lasso-icon-pencil"></i></a>
27
+				<label><?php _e('Manage Images', 'lasso'); ?>
28
+					<a href="#" id="ase-gallery-add-image" class="lasso-editor-tiny-btn" title="<?php esc_attr_e('Add Images', 'lasso'); ?>"><i class="lasso-icon-pencil"></i></a>
29 29
 
30 30
 				</label>
31
-				<small class="lasso-option-desc"><?php _e( 'Rearrange or edit the images in this gallery.', 'lasso' );?></small>
31
+				<small class="lasso-option-desc"><?php _e('Rearrange or edit the images in this gallery.', 'lasso'); ?></small>
32 32
 
33 33
 				<div id="lasso--gallery__images"><span class="lasso-icon-spinner6"></span></div>
34 34
 
@@ -38,22 +38,22 @@  discard block
 block discarded – undo
38 38
 
39 39
 	<?php }
40 40
 
41
-	if ( lasso_user_can( 'publish_posts' ) ): ?>
41
+	if (lasso_user_can('publish_posts')): ?>
42 42
 
43 43
 		<div class="ase-gallery-opts ase-gallery-opts--create-gallery" >
44 44
 
45 45
 			<div class="ase-gallery-opts--single lasso-option">
46 46
 
47
-				<label><?php _e( 'Create a Gallery', 'lasso' );?></label>
47
+				<label><?php _e('Create a Gallery', 'lasso'); ?></label>
48 48
 				<small class="lasso-option-desc">Gallery Name:</small>
49 49
                 <input type="text" id="lasso--gallery__galleryname" value="New Gallery"><br>
50 50
 				
51
-				<small class="lasso-option-desc"><?php _e( 'Select images to create a gallery.', 'lasso' );?></small>
52
-				<a href="#" class="editor-btn-secondary" id="lasso--gallery__selectImages"><?php _e( 'Select Images', 'lasso' );?></a>
51
+				<small class="lasso-option-desc"><?php _e('Select images to create a gallery.', 'lasso'); ?></small>
52
+				<a href="#" class="editor-btn-secondary" id="lasso--gallery__selectImages"><?php _e('Select Images', 'lasso'); ?></a>
53 53
 
54 54
 				<div id="ase-gallery-images"></div>
55 55
 
56
-				<a style="display:none;" class="editor-btn-secondary" data-post-title="<?php echo esc_attr( strtolower( the_title_attribute() ) );?>" id="lasso--gallery__save" href="#"><?php _e( 'Create Gallery', 'lasso' );?></a>
56
+				<a style="display:none;" class="editor-btn-secondary" data-post-title="<?php echo esc_attr(strtolower(the_title_attribute())); ?>" id="lasso--gallery__save" href="#"><?php _e('Create Gallery', 'lasso'); ?></a>
57 57
 
58 58
 			</div>
59 59
 
@@ -64,14 +64,14 @@  discard block
 block discarded – undo
64 64
 	<!-- Gallery Layout/Type Chooser -->
65 65
 	<div class="ase-gallery-opts ase-gallery-opts--type" >
66 66
 		<div data-option="gallery-type" class="ase-gallery-opts--single lasso-option">
67
-			<label><?php _e( 'Gallery Type', 'lasso' );?></label>
68
-			<small class="lasso-option-desc"><?php _e( 'Select the type of gallery.', 'lasso' );?></small>
67
+			<label><?php _e('Gallery Type', 'lasso'); ?></label>
68
+			<small class="lasso-option-desc"><?php _e('Select the type of gallery.', 'lasso'); ?></small>
69 69
 			<fieldset>
70
-	      		<label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="grid"><?php _e( 'Grid', 'lasso' );?></label>
71
-	        	<label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="thumbnail"><?php _e( 'Thumbnail', 'lasso' );?></label>
70
+	      		<label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="grid"><?php _e('Grid', 'lasso'); ?></label>
71
+	        	<label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="thumbnail"><?php _e('Thumbnail', 'lasso'); ?></label>
72 72
 				<label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="sequence">Sequence</label>
73
-				<label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="photoset"><?php _e( 'Photoset', 'lasso' );?></label>
74
-				<label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="stacked"><?php _e( 'Parallax', 'lasso' );?></label>
73
+				<label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="photoset"><?php _e('Photoset', 'lasso'); ?></label>
74
+				<label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="stacked"><?php _e('Parallax', 'lasso'); ?></label>
75 75
 				<label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="hero">Hero</label>
76 76
 			</fieldset>
77 77
 		</div>
@@ -81,8 +81,8 @@  discard block
 block discarded – undo
81 81
 	<div class="ase-gallery-opts ase-gallery-opts--grid" style="display:none;">
82 82
 
83 83
 		<div data-option="itemwidth" class="ase-gallery-opts--single lasso-option">
84
-			<label for="lasso_grid_gallery_width"><?php _e( 'Grid Item Width', 'lasso' );?></label>
85
-			<small class="lasso-option-desc"><?php _e( 'Adjust the width of the individual grid items, only if using Grid gallery style. Default is 400.', 'lasso' );?></small>
84
+			<label for="lasso_grid_gallery_width"><?php _e('Grid Item Width', 'lasso'); ?></label>
85
+			<small class="lasso-option-desc"><?php _e('Adjust the width of the individual grid items, only if using Grid gallery style. Default is 400.', 'lasso'); ?></small>
86 86
 			<input type="text_small" class="lasso-generator-attr" name="lasso_grid_gallery_width" value="">
87 87
 		</div>
88 88
 
@@ -92,24 +92,24 @@  discard block
 block discarded – undo
92 92
 	<div class="ase-gallery-opts ase-gallery-opts--thumb" style="display:none;">
93 93
 
94 94
 		<div data-option="transition" class="ase-gallery-opts--single lasso-option">
95
-			<label for="lasso_thumb_gallery_transition"><?php _e( 'Gallery Transition', 'lasso' );?></label>
96
-			<small class="lasso-option-desc"><?php _e( 'Adjust the transition effect for the Thumbnail gallery. Default is slide.', 'lasso' );?></small>
95
+			<label for="lasso_thumb_gallery_transition"><?php _e('Gallery Transition', 'lasso'); ?></label>
96
+			<small class="lasso-option-desc"><?php _e('Adjust the transition effect for the Thumbnail gallery. Default is slide.', 'lasso'); ?></small>
97 97
 		   	<select name="lasso_thumb_gallery_transition" class="lasso-generator-attr">
98
-		      <option value="crossfade"><?php _e( 'Fade', 'lasso' );?></option>
99
-		      <option value="slide"><?php _e( 'Slide', 'lasso' );?></option>
100
-		      <option value="dissolve"><?php _e( 'Dissolve', 'lasso' );?></option>
98
+		      <option value="crossfade"><?php _e('Fade', 'lasso'); ?></option>
99
+		      <option value="slide"><?php _e('Slide', 'lasso'); ?></option>
100
+		      <option value="dissolve"><?php _e('Dissolve', 'lasso'); ?></option>
101 101
 		    </select>
102 102
 		</div>
103 103
 
104 104
 		<div data-option="speed" class="ase-gallery-opts--single lasso-option">
105
-			<label for="lasso_thumb_gallery_transition_speed"><?php _e( 'Gallery Transition Speed', 'lasso' );?></label>
106
-			<small class="lasso-option-desc"><?php _e( 'Activate slideshow by setting a speed for the transition.5000 = 5 seconds.', 'lasso' );?></small>
105
+			<label for="lasso_thumb_gallery_transition_speed"><?php _e('Gallery Transition Speed', 'lasso'); ?></label>
106
+			<small class="lasso-option-desc"><?php _e('Activate slideshow by setting a speed for the transition.5000 = 5 seconds.', 'lasso'); ?></small>
107 107
 			<input type="text" class="lasso-generator-attr" name="lasso_thumb_gallery_transition_speed" value="">
108 108
 		</div>
109 109
 
110 110
 		<div data-option="hide-thumbs" class="ase-gallery-opts--single lasso-option">
111 111
 			<input class="lasso-generator-attr" type="checkbox" name="lasso_thumb_gallery_hide_thumbs">
112
-			<label for="lasso_thumb_gallery_hide_thumbs"><?php _e( 'Hide Gallery Thumbnails', 'lasso' );?></label>
112
+			<label for="lasso_thumb_gallery_hide_thumbs"><?php _e('Hide Gallery Thumbnails', 'lasso'); ?></label>
113 113
 		</div>
114 114
 
115 115
 	</div>
@@ -118,8 +118,8 @@  discard block
 block discarded – undo
118 118
 	<div class="ase-gallery-opts ase-gallery-opts--photoset" style="display:none;">
119 119
 
120 120
 		<div data-option="pslayout" class="ase-gallery-opts--single lasso-option">
121
-			<label for="lasso-photoset-gallery-layout"><?php _e( 'Gallery Layout', 'lasso' );?></label>
122
-			<small class="lasso-option-desc"><?php _e( 'Let\'s say you have 4 images in this gallery. If you enter 121 you will have one image on the top row, two images on the second row, and one image on the third row.', 'lasso' );?></small>
121
+			<label for="lasso-photoset-gallery-layout"><?php _e('Gallery Layout', 'lasso'); ?></label>
122
+			<small class="lasso-option-desc"><?php _e('Let\'s say you have 4 images in this gallery. If you enter 121 you will have one image on the top row, two images on the second row, and one image on the third row.', 'lasso'); ?></small>
123 123
 			<input type="text" class="lasso-generator-attr" name="lasso_photoset_gallery_layout" value="">
124 124
 		</div>
125 125
 
@@ -134,8 +134,8 @@  discard block
 block discarded – undo
134 134
 	<div class="ase-gallery-opts ase-gallery-opts--hero" style="display:none;">
135 135
 
136 136
 		<div data-option="height" class="ase-gallery-opts--single lasso-option">
137
-			<label for="lasso_gallery_height"><?php _e( 'Main Gallery Height', 'lasso' );?></label>
138
-			<small class="lasso-option-desc"><?php _e( 'Adjust the overall height of the gallery. Acceptable values include 500px or 50% etc.', 'lasso' );?></small>
137
+			<label for="lasso_gallery_height"><?php _e('Main Gallery Height', 'lasso'); ?></label>
138
+			<small class="lasso-option-desc"><?php _e('Adjust the overall height of the gallery. Acceptable values include 500px or 50% etc.', 'lasso'); ?></small>
139 139
 			<input type="text_small" class="lasso-generator-attr" name="lasso_gallery_height" value="">
140 140
 		</div>
141 141
 
@@ -145,13 +145,13 @@  discard block
 block discarded – undo
145 145
 	<div class="ase-gallery-opts ase-gallery-opts--global">
146 146
 
147 147
 		<div data-option="width" class="ase-gallery-opts--single lasso-option">
148
-			<label for="lasso_gallery_width"><?php _e( 'Main Gallery Width', 'lasso' );?></label>
149
-			<small class="lasso-option-desc"><?php _e( 'Adjust the overall width of the gallery. Acceptable values include 500px or 50% etc.', 'lasso' );?></small>
148
+			<label for="lasso_gallery_width"><?php _e('Main Gallery Width', 'lasso'); ?></label>
149
+			<small class="lasso-option-desc"><?php _e('Adjust the overall width of the gallery. Acceptable values include 500px or 50% etc.', 'lasso'); ?></small>
150 150
 			<input type="text_small" class="lasso-generator-attr" name="lasso_gallery_width" value="">
151 151
 		</div>
152 152
 		<div data-option="caption" class="ase-gallery-opts--single lasso-option">
153
-			<label for="lasso_gallery_caption"><?php _e( 'Gallery Caption', 'lasso' );?></label>
154
-			<small class="lasso-option-desc"><?php _e( 'Add an optional caption for the gallery.', 'lasso' );?></small>
153
+			<label for="lasso_gallery_caption"><?php _e('Gallery Caption', 'lasso'); ?></label>
154
+			<small class="lasso-option-desc"><?php _e('Add an optional caption for the gallery.', 'lasso'); ?></small>
155 155
 			<textarea name="lasso_gallery_caption" class="lasso-generator-attr"></textarea>
156 156
 		</div>
157 157
 
Please login to merge, or discard this patch.
includes/process/save.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -19,27 +19,27 @@  discard block
 block discarded – undo
19 19
 	 *
20 20
 	 * @return bool Always returns true.
21 21
 	 */
22
-	public function content( $data ) {
22
+	public function content($data) {
23 23
 
24 24
 		$save_to_post_disabled = $this->save_to_post_disables();
25 25
 
26
-		$postid = (int) $data[ 'post_id' ];
27
-		$content = $this->replace_rendered_shortcodes( $data[ 'content' ] );
28
-		$content = $this->remove_comments( $content );
26
+		$postid = (int) $data['post_id'];
27
+		$content = $this->replace_rendered_shortcodes($data['content']);
28
+		$content = $this->remove_comments($content);
29 29
 
30
-		if ( 'off' == $save_to_post_disabled || empty( $save_to_post_disabled ) ) {
30
+		if ('off' == $save_to_post_disabled || empty($save_to_post_disabled)) {
31 31
 
32 32
 			$args = array(
33 33
 				'ID'           => (int) $postid,
34 34
 				'post_content' => $content
35 35
 			);
36 36
 
37
-			wp_update_post( apply_filters( 'lasso_object_save_args', $args ) );
37
+			wp_update_post(apply_filters('lasso_object_save_args', $args));
38 38
 
39 39
 		}
40 40
 
41 41
 		// run save action
42
-		do_action( 'lasso_post_saved', $postid, $content, get_current_user_ID() );
42
+		do_action('lasso_post_saved', $postid, $content, get_current_user_ID());
43 43
 
44 44
 		return true;
45 45
 
@@ -54,25 +54,25 @@  discard block
 block discarded – undo
54 54
 	 *
55 55
 	 * @return bool Always returns true.
56 56
 	 */
57
-	public function publish_content( $data ) {
57
+	public function publish_content($data) {
58 58
 		$save_to_post_disabled = $this->save_to_post_disables();
59 59
 
60
-		$postid = (int) $data[ 'post_id' ];
61
-		$content = $this->replace_rendered_shortcodes( $data[ 'content' ] );
62
-		$content = $this->remove_comments( $content );
60
+		$postid = (int) $data['post_id'];
61
+		$content = $this->replace_rendered_shortcodes($data['content']);
62
+		$content = $this->remove_comments($content);
63 63
 
64
-		if ( 'off' == $save_to_post_disabled || empty( $save_to_post_disabled ) ) {
64
+		if ('off' == $save_to_post_disabled || empty($save_to_post_disabled)) {
65 65
 
66
-			$args = array (
66
+			$args = array(
67 67
 				'ID'           	=> $postid,
68 68
 				'post_content' 	=> $content,
69 69
 				'post_status' 	=> 'publish'
70 70
 			);
71
-			wp_update_post( apply_filters( 'lasso_object_publish_args', $args ) );
71
+			wp_update_post(apply_filters('lasso_object_publish_args', $args));
72 72
 
73 73
 		}
74 74
 
75
-		do_action( 'lasso_post_published', $postid, $content, get_current_user_ID() );
75
+		do_action('lasso_post_published', $postid, $content, get_current_user_ID());
76 76
 
77 77
 		return true;
78 78
 
@@ -85,13 +85,13 @@  discard block
 block discarded – undo
85 85
 	 *
86 86
 	 * @return array Array of keys to pull from $_POST per action and their sanitization callback
87 87
 	 */
88
-	public static function params(){
89
-		$params[ 'process_save_content' ] = array(
88
+	public static function params() {
89
+		$params['process_save_content'] = array(
90 90
 			'post_id' => 'absint',
91 91
 			'content' => 'wp_kses_post'
92 92
 		);
93 93
 
94
-		$params[ 'process_save_publish_content' ] = array(
94
+		$params['process_save_publish_content'] = array(
95 95
 			'post_id' => 'absint',
96 96
 			'content' => 'wp_kses_post'
97 97
 		);
@@ -107,11 +107,11 @@  discard block
 block discarded – undo
107 107
 	 * @return array Array of additional functions to use to authorize action.
108 108
 	 */
109 109
 	public static function auth_callbacks() {
110
-		$params[ 'process_save_content' ] = array(
110
+		$params['process_save_content'] = array(
111 111
 			'lasso_user_can'
112 112
 		);
113 113
 
114
-		$params[ 'process_save_publish_content' ] = array();
114
+		$params['process_save_publish_content'] = array();
115 115
 
116 116
 		return $params;
117 117
 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 	 * @return bool
128 128
 	 */
129 129
 	protected function save_to_post_disables() {
130
-		$save_to_post_disabled = lasso_editor_get_option( 'post_save_disabled', 'lasso_editor' );
130
+		$save_to_post_disabled = lasso_editor_get_option('post_save_disabled', 'lasso_editor');
131 131
 
132 132
 		return $save_to_post_disabled;
133 133
 
@@ -144,15 +144,15 @@  discard block
 block discarded – undo
144 144
 	 *
145 145
 	 * @return string
146 146
 	 */
147
-	protected function replace_rendered_shortcodes( $content ) {
147
+	protected function replace_rendered_shortcodes($content) {
148 148
 		//debug line
149 149
         //file_put_contents(WP_PLUGIN_DIR."/file1.txt", $content);
150 150
 		
151 151
 
152
-		if ( false === strpos( $content, '--EDITUS_OTHER_SHORTCODE_START|' ) ) {
152
+		if (false === strpos($content, '--EDITUS_OTHER_SHORTCODE_START|')) {
153 153
 			return $content;
154 154
 		}
155
-		$content = htmlspecialchars_decode ($content);
155
+		$content = htmlspecialchars_decode($content);
156 156
 
157 157
 		$content = preg_replace(
158 158
 			'/<!--EDITUS_OTHER_SHORTCODE_START\|\[(.*?)\]-->(.*?)<!--EDITUS_OTHER_SHORTCODE_END-->/s',
Please login to merge, or discard this patch.
public/includes/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,34 +23,34 @@  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
 				<div class="lasso--modal__inner">
40 40
 
41
-					<?php echo self::tour_slides();?>
41
+					<?php echo self::tour_slides(); ?>
42 42
 
43 43
 					<div class="lasso--postsettings__footer">
44 44
 
45 45
 						<div class="lasso--postsettings__option">
46 46
 							<label for="hide_tour" class="checkbox-control checkbox">
47
-					        	<input type="checkbox" id="hide_tour" name="hide_tour" <?php checked( $tour_hidden, 1 ); ?>>
47
+					        	<input type="checkbox" id="hide_tour" name="hide_tour" <?php checked($tour_hidden, 1); ?>>
48 48
 					        	<span class="control-indicator"></span>
49
-								<?php _e('Don\'t show this again','lasso');?>
49
+								<?php _e('Don\'t show this again', 'lasso'); ?>
50 50
 					        </label>
51 51
 						</div>
52 52
 
53
-						<input type="submit" value="<?php _e( 'Okay, got it!', 'lasso' );?>" data-nonce="<?php echo $nonce;?>" >
53
+						<input type="submit" value="<?php _e('Okay, got it!', 'lasso'); ?>" data-nonce="<?php echo $nonce; ?>" >
54 54
 					</div>
55 55
 
56 56
 				</div>
@@ -74,20 +74,20 @@  discard block
 block discarded – undo
74 74
 			<?php
75 75
 
76 76
 			$out = '<ul><li>';
77
-			$out .= sprintf( '<img src="%s">', LASSO_URL.'/public/assets/img/s-1.jpg' );
78
-			$out .= '<p>'.__('Access posts by clicking the list icon. Create a new post by clicking the new post icon.','lasso').'</p>';
77
+			$out .= sprintf('<img src="%s">', LASSO_URL.'/public/assets/img/s-1.jpg');
78
+			$out .= '<p>'.__('Access posts by clicking the list icon. Create a new post by clicking the new post icon.', 'lasso').'</p>';
79 79
 			$out .= '</li><li>';
80
-			$out .= sprintf( '<img src="%s">', LASSO_URL.'/public/assets/img/s-2.jpg' );
81
-			$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>';
80
+			$out .= sprintf('<img src="%s">', LASSO_URL.'/public/assets/img/s-2.jpg');
81
+			$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>';
82 82
 			$out .= '</li><li>';
83
-			$out .= sprintf( '<img src="%s">', LASSO_URL.'/public/assets/img/s-3.jpg' );
84
-			$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>';
83
+			$out .= sprintf('<img src="%s">', LASSO_URL.'/public/assets/img/s-3.jpg');
84
+			$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>';
85 85
 			$out .= '</li><li>';
86
-			$out .= sprintf( '<img src="%s">', LASSO_URL.'/public/assets/img/s-4.jpg' );
87
-			$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>';
86
+			$out .= sprintf('<img src="%s">', LASSO_URL.'/public/assets/img/s-4.jpg');
87
+			$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>';
88 88
 			$out .= '</li></ul>';
89 89
 
90
-			echo apply_filters( 'lasso_tour_slides', $out );
90
+			echo apply_filters('lasso_tour_slides', $out);
91 91
 
92 92
 		?></div><?php
93 93
 
Please login to merge, or discard this patch.
includes/process/update_object.php 1 patch
Spacing   +26 added lines, -26 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,20 +43,20 @@  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
 
59
-		do_action( 'lasso_post_updated', $postid, $slug, $status, get_current_user_ID() );
59
+		do_action('lasso_post_updated', $postid, $slug, $status, get_current_user_ID());
60 60
 
61 61
 		return true;
62 62
 
@@ -70,8 +70,8 @@  discard block
 block discarded – undo
70 70
 	 *
71 71
 	 * @return array Array of keys to pull from $_POST per action and their sanitization callback
72 72
 	 */
73
-	public static function params(){
74
-		$params[ 'process_update_object_post' ] = array(
73
+	public static function params() {
74
+		$params['process_update_object_post'] = array(
75 75
 			'postid' => 'absint',
76 76
 			'status' => 'strip_tags',
77 77
 			'story_slug' => array(
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 	 * @return array Array of additional functions to use to authorize action.
102 102
 	 */
103 103
 	public static function auth_callbacks() {
104
-		$params[ 'process_update_object_post' ] = array(
104
+		$params['process_update_object_post'] = array(
105 105
 			'lasso_user_can'
106 106
 		);
107 107
 
@@ -123,14 +123,14 @@  discard block
 block discarded – undo
123 123
 	 *
124 124
 	 *  @return bool True if update was successful, false if not.
125 125
 	 */
126
-	public function set_post_terms( $postid, $value, $taxonomy ) {
127
-		if( $value ) {
126
+	public function set_post_terms($postid, $value, $taxonomy) {
127
+		if ($value) {
128 128
 			// first check if multiple, make array if so.
129
-			if ( self::has_multiple_objects( $value ) ) {	
130
-				$value = explode( ',', $value );
129
+			if (self::has_multiple_objects($value)) {	
130
+				$value = explode(',', $value);
131 131
 			}
132 132
 			
133
-			if ($taxonomy =='category') {
133
+			if ($taxonomy == 'category') {
134 134
                 // convert from names to category ids
135 135
 				$cats = array();
136 136
 				if (is_array($value)) {
@@ -143,17 +143,17 @@  discard block
 block discarded – undo
143 143
 				}
144 144
 			}
145 145
 	
146
-			$result = wp_set_object_terms( $postid, $value, $taxonomy );
146
+			$result = wp_set_object_terms($postid, $value, $taxonomy);
147 147
 		}
148
-		else  {
148
+		else {
149 149
 			//remove all terms from post
150
-			$result = wp_set_object_terms( $postid, null, $taxonomy );
150
+			$result = wp_set_object_terms($postid, null, $taxonomy);
151 151
 
152 152
 		}
153 153
 
154
-		if ( ! is_wp_error( $result ) ) {
154
+		if (!is_wp_error($result)) {
155 155
 			return true;
156
-		}else{
156
+		} else {
157 157
 			return false;
158 158
 		}
159 159
 
@@ -168,9 +168,9 @@  discard block
 block discarded – undo
168 168
 	 *  @return   bool               True if there are multiple terms; otherwise, false.
169 169
 	 *	@since   0.9.3
170 170
 	 */
171
-	public function has_multiple_objects( $value ) {
171
+	public function has_multiple_objects($value) {
172 172
 
173
-		return 0 < strpos( $value, ',' );
173
+		return 0 < strpos($value, ',');
174 174
 
175 175
 	}
176 176
 
Please login to merge, or discard this patch.
public/includes/option-engine.php 1 patch
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 *	Get an array of addon data for the settings modal
44 44
 *	@since 0.9.4
45 45
 */
46
-function lasso_get_modal_tabs(){
46
+function lasso_get_modal_tabs() {
47 47
 
48 48
 	$tabs = array();
49 49
 
@@ -60,36 +60,36 @@  discard block
 block discarded – undo
60 60
 *	@uses lasso_modal_addons_content()
61 61
 *	@since 0.9.4
62 62
 */
63
-function lasso_modal_addons( $type = 'tab' ){
63
+function lasso_modal_addons($type = 'tab') {
64 64
 
65 65
 	$tabs = lasso_get_modal_tabs();
66 66
 	$out = '';
67 67
 
68
-	if ( $tabs ):
68
+	if ($tabs):
69 69
 
70
-		if ( 'tab' == $type ) {
70
+		if ('tab' == $type) {
71 71
 
72 72
 			$out = '<ul class="lasso--modal__tabs">';
73 73
 
74 74
 				$out .= '<li class="active-tab" data-addon-name="core">Editus</li>';
75 75
 
76
-				foreach ( $tabs as $tab ) {
76
+				foreach ($tabs as $tab) {
77 77
 
78
-					if ( isset( $tab ) ) {
78
+					if (isset($tab)) {
79 79
 
80
-						$out .= lasso_modal_addons_content( $tab, $type );
80
+						$out .= lasso_modal_addons_content($tab, $type);
81 81
 					}
82 82
 				}
83 83
 
84 84
 			$out .= '</ul>';
85 85
 
86
-		} elseif ( 'content' == $type ) {
86
+		} elseif ('content' == $type) {
87 87
 
88 88
 
89
-			foreach ( $tabs as $tab ) {
89
+			foreach ($tabs as $tab) {
90 90
 
91
-				if ( isset( $tab ) ) {
92
-					$out .= lasso_modal_addons_content( $tab , $type );
91
+				if (isset($tab)) {
92
+					$out .= lasso_modal_addons_content($tab, $type);
93 93
 				}
94 94
 			}
95 95
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
 	endif;
99 99
 
100
-	return !empty( $out ) ? $out : false;
100
+	return !empty($out) ? $out : false;
101 101
 }
102 102
 
103 103
 /**
@@ -117,26 +117,26 @@  discard block
 block discarded – undo
117 117
 *	@since 0.9.5
118 118
 *	@subpackage lasso_modal_addons_content
119 119
 */
120
-function lasso_option_form( $name = '', $options = array() ){
120
+function lasso_option_form($name = '', $options = array()) {
121 121
 
122 122
 	ob_start();
123 123
 
124
-	if ( empty( $name ) || empty( $options ) || !is_array( $options ) )
124
+	if (empty($name) || empty($options) || !is_array($options))
125 125
 		return;
126 126
 
127 127
 	$nonce = wp_create_nonce('lasso-process-post-meta');
128
-	$key   = sprintf('_lasso_%s_settings', $name );
128
+	$key   = sprintf('_lasso_%s_settings', $name);
129 129
 
130
-	$out = sprintf('<form id="lasso--post-form" class="lasso--post-form">' );
130
+	$out = sprintf('<form id="lasso--post-form" class="lasso--post-form">');
131 131
 
132
-		$out .= lasso_option_fields( $name, $options );
133
-		$out .='<div class="form--bottom">';
134
-			$out .='<input type="submit" value="Save">';
135
-			$out .='<input type="hidden" name="tab_name" value="'.$key.'">';
136
-			$out .='<input type="hidden" name="post_id" value="'.get_the_ID().'">';
137
-			$out .='<input type="hidden" name="nonce" value="'.$nonce.'">';
138
-			$out .='<input type="hidden" name="action" value="process_meta_update">';
139
-		$out .='</div>';
132
+		$out .= lasso_option_fields($name, $options);
133
+		$out .= '<div class="form--bottom">';
134
+			$out .= '<input type="submit" value="Save">';
135
+			$out .= '<input type="hidden" name="tab_name" value="'.$key.'">';
136
+			$out .= '<input type="hidden" name="post_id" value="'.get_the_ID().'">';
137
+			$out .= '<input type="hidden" name="nonce" value="'.$nonce.'">';
138
+			$out .= '<input type="hidden" name="action" value="process_meta_update">';
139
+		$out .= '</div>';
140 140
 
141 141
 	$out .= '</form>';
142 142
 
@@ -154,28 +154,28 @@  discard block
 block discarded – undo
154 154
 *	@since 0.9.5
155 155
 *	@subpackage lasso_modal_addons_content
156 156
 */
157
-function lasso_option_fields( $name = '', $options = array() ){
157
+function lasso_option_fields($name = '', $options = array()) {
158 158
 
159
-	$out 	= '';
159
+	$out = '';
160 160
 	$before = '<div class="lasso--postsettings__option">';
161 161
 	$after 	= '</div>';
162 162
 
163
-	if ( empty( $name ) || empty( $options ) )
163
+	if (empty($name) || empty($options))
164 164
 		return;
165 165
 
166
-	foreach ( (array) $options as $option ) {
166
+	foreach ((array) $options as $option) {
167 167
 
168
-		$type = isset( $option['type'] ) ? $option['type'] : 'text';
168
+		$type = isset($option['type']) ? $option['type'] : 'text';
169 169
 
170
-		switch ( $type ) {
170
+		switch ($type) {
171 171
 			case 'text':
172
-				$out .= sprintf('%s%s%s', $before, lasso_option_engine_option( $name, $option,'text' ), $after );
172
+				$out .= sprintf('%s%s%s', $before, lasso_option_engine_option($name, $option, 'text'), $after);
173 173
 				break;
174 174
 			case 'textarea':
175
-				$out .= sprintf('%s%s%s', $before, lasso_option_engine_option( $name, $option,'textarea' ), $after );
175
+				$out .= sprintf('%s%s%s', $before, lasso_option_engine_option($name, $option, 'textarea'), $after);
176 176
 				break;
177 177
 			case 'checkbox':
178
-				$out .= sprintf('%s%s%s', $before, lasso_option_engine_option( $name, $option,'checkbox' ), $after );
178
+				$out .= sprintf('%s%s%s', $before, lasso_option_engine_option($name, $option, 'checkbox'), $after);
179 179
 				break;
180 180
 		}
181 181
 
@@ -193,27 +193,27 @@  discard block
 block discarded – undo
193 193
 *	@param $type string text, textarea, checkbox, color
194 194
 *	@since 5.0
195 195
 */
196
-function lasso_option_engine_option( $name = '', $option = '', $type = '') {
196
+function lasso_option_engine_option($name = '', $option = '', $type = '') {
197 197
 
198
-	if ( empty( $type ) || empty( $option ) )
198
+	if (empty($type) || empty($option))
199 199
 		return;
200 200
 
201
-	$id = isset( $option['id'] ) ? $option['id'] : false;
202
-	$id = $id ? lasso_clean_string( $id ) : false;
201
+	$id = isset($option['id']) ? $option['id'] : false;
202
+	$id = $id ? lasso_clean_string($id) : false;
203 203
 
204
-	$desc = isset( $option['desc'] ) ? $option['desc'] : false;
204
+	$desc = isset($option['desc']) ? $option['desc'] : false;
205 205
 
206
-	$value = get_post_meta( get_the_id(), $option[ 'id' ], true );
206
+	$value = get_post_meta(get_the_id(), $option['id'], true);
207 207
 
208
-	switch ( $type ) {
208
+	switch ($type) {
209 209
 		case 'text':
210
-			$out = sprintf('<label for="lasso--post-option-%s">%s</label><input id="lasso--post-option-%s" name="%s" type="text" value="%s">',$id, esc_html( $desc ), $id, $id, $value );
210
+			$out = sprintf('<label for="lasso--post-option-%s">%s</label><input id="lasso--post-option-%s" name="%s" type="text" value="%s">', $id, esc_html($desc), $id, $id, $value);
211 211
 			break;
212 212
 		case 'textarea':
213
-			$out = sprintf('<label for="lasso--post-option-%s">%s</label><textarea id="lasso--post-option-%s" name="%s">%s</textarea>',$id, esc_html( $desc ), $id, $id, $value );
213
+			$out = sprintf('<label for="lasso--post-option-%s">%s</label><textarea id="lasso--post-option-%s" name="%s">%s</textarea>', $id, esc_html($desc), $id, $id, $value);
214 214
 			break;
215 215
 		case 'checkbox':
216
-			$out = sprintf('<label for="lasso--post-option-%s" class="checkbox-control checkbox"><input id="lasso--post-option-%s" type="checkbox" name="%s" class="checkbox"><span class="control-indicator"></span>%s',$id, $id, $id ,esc_html( $desc ) );
216
+			$out = sprintf('<label for="lasso--post-option-%s" class="checkbox-control checkbox"><input id="lasso--post-option-%s" type="checkbox" name="%s" class="checkbox"><span class="control-indicator"></span>%s', $id, $id, $id, esc_html($desc));
217 217
 			break;
218 218
 	}
219 219
 
Please login to merge, or discard this patch.
admin/includes/menus/settings.php 1 patch
Spacing   +107 added lines, -107 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();
@@ -86,64 +86,64 @@  discard block
 block discarded – undo
86 86
 	 */
87 87
 	function lasso_editor_settings_form() {
88 88
 
89
-		if ( !is_user_logged_in() )
89
+		if (!is_user_logged_in())
90 90
 			return;
91 91
 
92
-		$article_object   = lasso_editor_get_option( 'article_class', 'lasso_editor' );
93
-		$featImgClass    = lasso_editor_get_option( 'featimg_class', 'lasso_editor' );
94
-		$titleClass    = lasso_editor_get_option( 'title_class', 'lasso_editor' );
92
+		$article_object = lasso_editor_get_option('article_class', 'lasso_editor');
93
+		$featImgClass = lasso_editor_get_option('featimg_class', 'lasso_editor');
94
+		$titleClass = lasso_editor_get_option('title_class', 'lasso_editor');
95 95
 
96
-		$post_new_disabled   = lasso_editor_get_option( 'post_adding_disabled', 'lasso_editor' );
97
-		$save_to_post_disabled  = lasso_editor_get_option( 'post_save_disabled', 'lasso_editor' );
98
-		$post_settings_disabled = lasso_editor_get_option( 'post_settings_disabled', 'lasso_editor' );
99
-		$shortcodify_disabled  = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
100
-		$enable_autosave  = lasso_editor_get_option( 'enable_autosave', 'lasso_editor' );
96
+		$post_new_disabled = lasso_editor_get_option('post_adding_disabled', 'lasso_editor');
97
+		$save_to_post_disabled  = lasso_editor_get_option('post_save_disabled', 'lasso_editor');
98
+		$post_settings_disabled = lasso_editor_get_option('post_settings_disabled', 'lasso_editor');
99
+		$shortcodify_disabled  = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor');
100
+		$enable_autosave = lasso_editor_get_option('enable_autosave', 'lasso_editor');
101 101
 
102
-		$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
103
-		$toolbar_headings_h4      = lasso_editor_get_option( 'toolbar_headings_h4', 'lasso_editor' );
104
-		$toolbar_show_color      = lasso_editor_get_option( 'toolbar_show_color', 'lasso_editor' );
105
-		$toolbar_show_alignment  = lasso_editor_get_option( 'toolbar_show_alignment', 'lasso_editor' );
102
+		$toolbar_headings      = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
103
+		$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
104
+		$toolbar_show_color      = lasso_editor_get_option('toolbar_show_color', 'lasso_editor');
105
+		$toolbar_show_alignment  = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor');
106 106
 		
107
-		$objectsNoSave  	= lasso_editor_get_option('dont_save', 'lasso_editor');
108
-		$objectsNonEditable  	= lasso_editor_get_option('non_editable', 'lasso_editor');
107
+		$objectsNoSave = lasso_editor_get_option('dont_save', 'lasso_editor');
108
+		$objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor');
109 109
 		$disable_tour = lasso_editor_get_option('disable_tour', 'lasso_editor');
110 110
 		$show_ignored_items = lasso_editor_get_option('show_ignored_items', 'lasso_editor');
111 111
 		$save_using_rest_disabled = lasso_editor_get_option('save_using_rest_disabled', 'lasso_editor');
112 112
 		
113
-		$default_post_types = apply_filters( 'lasso_allowed_post_types', array( 'post', 'page'));
114
-		$allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor',  $default_post_types);
113
+		$default_post_types = apply_filters('lasso_allowed_post_types', array('post', 'page'));
114
+		$allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', $default_post_types);
115 115
 		
116
-		$bold_tag = lasso_editor_get_option( 'bold_tag', 'lasso_editor',  "b");
117
-		$i_tag = lasso_editor_get_option( 'i_tag', 'lasso_editor',  "i");
116
+		$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor', "b");
117
+		$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor', "i");
118 118
 
119 119
 ?>
120 120
 		<div class="wrap">
121 121
 
122
-	    	<h2><?php _e( 'Editus Settings', 'lasso' );?></h2>
122
+	    	<h2><?php _e('Editus Settings', 'lasso'); ?></h2>
123 123
 
124 124
 			<form id="lasso-editor-settings-form" class="lasso--form-settings" method="post" enctype="multipart/form-data">
125 125
 
126
-				<?php do_action('lasso_settings_before');?>
126
+				<?php do_action('lasso_settings_before'); ?>
127 127
 				
128 128
 				
129 129
 				
130
-				<h3><?php _e( 'Enable for:', 'lasso' );?></h3>
130
+				<h3><?php _e('Enable for:', 'lasso'); ?></h3>
131 131
 				<div class="lasso-editor-settings--option-wrap">
132 132
 					<div class="lasso-editor-settings--option-inner">
133 133
 						
134
-						<span class="lasso--setting-description"><?php _e( 'Enable Editus for the following post types.', 'lasso' );?></span>
134
+						<span class="lasso--setting-description"><?php _e('Enable Editus for the following post types.', 'lasso'); ?></span>
135 135
 						<?php
136 136
 						$args = array(
137 137
 							'public'   => true
138 138
 						);
139 139
 						 
140
-						$allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
141
-						$post_types = get_post_types( $args, 'objects' );
140
+						$allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
141
+						$post_types = get_post_types($args, 'objects');
142 142
 						 
143
-						foreach ( $post_types  as $post_type ) {
143
+						foreach ($post_types  as $post_type) {
144 144
 						   if ($post_type->name == 'attachment') continue;
145
-						   $checked ="";
146
-						   if (  in_array( $post_type->name, $allowed_post_types )  ) {
145
+						   $checked = "";
146
+						   if (in_array($post_type->name, $allowed_post_types)) {
147 147
 								$checked = 'checked="checked"';
148 148
 						   }
149 149
 						   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>';
@@ -153,69 +153,69 @@  discard block
 block discarded – undo
153 153
 				</div>
154 154
 				
155 155
 
156
-				<h3><?php _e( 'Internal Settings', 'lasso' );?></h3>
156
+				<h3><?php _e('Internal Settings', 'lasso'); ?></h3>
157 157
 				<div class="lasso-editor-settings--option-wrap">
158 158
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
159
-						<label><?php _e( 'Article Class', 'lasso' );?></label>
160
-						<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>
161
-						<input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr( $article_object );?>" placeholder=".entry-content">
159
+						<label><?php _e('Article Class', 'lasso'); ?></label>
160
+						<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>
161
+						<input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr($article_object); ?>" placeholder=".entry-content">
162 162
 					</div>
163 163
 				
164 164
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
165
-						<label><?php _e( 'Featured Image Class', 'lasso' );?></label>
166
-						<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>
167
-						<input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr( $featImgClass );?>" placeholder=".entry-content">
165
+						<label><?php _e('Featured Image Class', 'lasso'); ?></label>
166
+						<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>
167
+						<input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr($featImgClass); ?>" placeholder=".entry-content">
168 168
 					</div>
169 169
 				
170 170
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
171
-						<label><?php _e( 'Article Title Class', 'lasso' );?></label>
172
-						<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>
173
-						<input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr( $titleClass );?>" placeholder=".entry-content">
171
+						<label><?php _e('Article Title Class', 'lasso'); ?></label>
172
+						<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>
173
+						<input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr($titleClass); ?>" placeholder=".entry-content">
174 174
 					</div>
175 175
 				
176 176
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
177
-						<label><?php _e( 'Ignored Items to Save', 'lasso' );?></label>
178
-						<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>
179
-						<textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNoSave );?></textarea>
177
+						<label><?php _e('Ignored Items to Save', 'lasso'); ?></label>
178
+						<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>
179
+						<textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNoSave); ?></textarea>
180 180
 					</div>
181 181
 				
182 182
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
183
-						<label><?php _e( 'Read Only Items', 'lasso' );?></label>
184
-						<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>
185
-						<textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNonEditable );?></textarea>
183
+						<label><?php _e('Read Only Items', 'lasso'); ?></label>
184
+						<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>
185
+						<textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNonEditable); ?></textarea>
186 186
 					</div>
187 187
 				
188 188
 					<div class="lasso-editor-settings--option-inner" >
189
-						<input type="checkbox" class="checkbox" name="lasso_editor[show_ignored_items]" id="lasso_editor[show_ignored_items]" <?php echo checked( $show_ignored_items, 'on' );?> >
190
-						<label for="lasso_editor[show_ignored_items]"> <?php _e( 'Show Ignored Items', 'lasso' );?></label>
191
-						<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>
189
+						<input type="checkbox" class="checkbox" name="lasso_editor[show_ignored_items]" id="lasso_editor[show_ignored_items]" <?php echo checked($show_ignored_items, 'on'); ?> >
190
+						<label for="lasso_editor[show_ignored_items]"> <?php _e('Show Ignored Items', 'lasso'); ?></label>
191
+						<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>
192 192
 					</div>
193 193
 				</div>
194 194
 
195
-				<h3><?php _e( 'Editor UI', 'lasso' );?></h3>
195
+				<h3><?php _e('Editor UI', 'lasso'); ?></h3>
196 196
 				<div class="lasso-editor-settings--option-wrap">
197 197
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
198
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked( $toolbar_headings, 'on' );?> >
199
-						<label for="lasso_editor[toolbar_headings]"><?php _e( 'Enable H2 and H3 Buttons', 'lasso' );?></label>
200
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set H2 and H3 settings.', 'lasso' );?></span>
198
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked($toolbar_headings, 'on'); ?> >
199
+						<label for="lasso_editor[toolbar_headings]"><?php _e('Enable H2 and H3 Buttons', 'lasso'); ?></label>
200
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set H2 and H3 settings.', 'lasso'); ?></span>
201 201
 
202 202
 					</div>
203 203
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
204
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings_h4]" id="lasso_editor[toolbar_headings_h4]" <?php echo checked( $toolbar_headings_h4, 'on' );?> >
205
-						<label for="lasso_editor[toolbar_headings_h4]"><?php _e( 'Enable H4/H5/H6 Buttons', 'lasso' );?></label>
206
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set H4/H5/H6 settings.', 'lasso' );?></span>
204
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings_h4]" id="lasso_editor[toolbar_headings_h4]" <?php echo checked($toolbar_headings_h4, 'on'); ?> >
205
+						<label for="lasso_editor[toolbar_headings_h4]"><?php _e('Enable H4/H5/H6 Buttons', 'lasso'); ?></label>
206
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set H4/H5/H6 settings.', 'lasso'); ?></span>
207 207
 
208 208
 					</div>
209 209
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
210
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked( $toolbar_show_color, 'on' );?> >
211
-						<label for="lasso_editor[toolbar_show_color]"><?php _e( 'Enable Text Color Buttons', 'lasso' );?></label>
212
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set text colors.', 'lasso' );?></span>
210
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked($toolbar_show_color, 'on'); ?> >
211
+						<label for="lasso_editor[toolbar_show_color]"><?php _e('Enable Text Color Buttons', 'lasso'); ?></label>
212
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set text colors.', 'lasso'); ?></span>
213 213
 
214 214
 					</div>
215 215
 					<div class="lasso-editor-settings--option-inner">
216
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked( $toolbar_show_alignment, 'on' );?> >
217
-						<label for="lasso_editor[toolbar_show_alignment]"><?php _e( 'Enable Text Align Buttons', 'lasso' );?></label>
218
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set text alignment.', 'lasso' );?></span>
216
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked($toolbar_show_alignment, 'on'); ?> >
217
+						<label for="lasso_editor[toolbar_show_alignment]"><?php _e('Enable Text Align Buttons', 'lasso'); ?></label>
218
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set text alignment.', 'lasso'); ?></span>
219 219
 
220 220
 					</div>
221 221
 				</div>
@@ -224,68 +224,68 @@  discard block
 block discarded – undo
224 224
 				
225 225
 				
226 226
 
227
-				<h3><?php _e( 'Post Settings UI', 'lasso' );?></h3>
227
+				<h3><?php _e('Post Settings UI', 'lasso'); ?></h3>
228 228
 				<div class="lasso-editor-settings--option-wrap"  >
229 229
 					<div class="lasso-editor-settings--option-inner" style="border:none">
230
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked( $post_settings_disabled, 'on' );?> >
231
-						<label for="lasso_editor[post_settings_disabled]"> <?php _e( 'Disable Post Settings', 'lasso' );?></label>
232
-						<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>
230
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked($post_settings_disabled, 'on'); ?> >
231
+						<label for="lasso_editor[post_settings_disabled]"> <?php _e('Disable Post Settings', 'lasso'); ?></label>
232
+						<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>
233 233
 					</div>
234 234
 				
235 235
 					<div class="lasso-editor-settings--option-inner" >
236
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked( $post_new_disabled, 'on' );?> >
237
-						<label for="lasso_editor[post_adding_disabled]"><?php _e( 'Disable Post Adding', 'lasso' );?></label>
238
-						<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>
236
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked($post_new_disabled, 'on'); ?> >
237
+						<label for="lasso_editor[post_adding_disabled]"><?php _e('Disable Post Adding', 'lasso'); ?></label>
238
+						<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>
239 239
 					</div>
240 240
 				</div>
241 241
 				
242
-				<h3><?php _e( 'Misc', 'lasso' );?></h3>
242
+				<h3><?php _e('Misc', 'lasso'); ?></h3>
243 243
 				<div class="lasso-editor-settings--option-wrap">
244 244
 					<div class="lasso-editor-settings--option-inner" style="border:none">
245
-						<input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked( $disable_tour, 'on' );?> >
246
-						<label for="lasso_editor[disable_tour]"> <?php _e( 'Do Not Show Tour Dialog', 'lasso' );?></label>
247
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable the tour dialog box for all users.', 'lasso' );?></span>
245
+						<input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked($disable_tour, 'on'); ?> >
246
+						<label for="lasso_editor[disable_tour]"> <?php _e('Do Not Show Tour Dialog', 'lasso'); ?></label>
247
+						<span class="lasso--setting-description"><?php _e('Check this box to disable the tour dialog box for all users.', 'lasso'); ?></span>
248 248
 					</div>
249 249
 
250 250
 					<div class="lasso-editor-settings--option-inner" >
251
-					    <label for="lasso_editor[bold_tag]"> <?php _e( '"Bold" Tag', 'lasso' );?></label>
252
-						<span class="lasso--setting-description"><?php _e( 'Choose the HTML tag used for the "Bold" style.', 'lasso' );?></span>
253
-					    <input type="radio" name="lasso_editor[bold_tag]" value='b' <?php echo checked( $bold_tag, 'b' );?>> b
254
-						<input type="radio" name="lasso_editor[bold_tag]" value="strong" <?php echo checked( $bold_tag, 'strong' );?>> strong
251
+					    <label for="lasso_editor[bold_tag]"> <?php _e('"Bold" Tag', 'lasso'); ?></label>
252
+						<span class="lasso--setting-description"><?php _e('Choose the HTML tag used for the "Bold" style.', 'lasso'); ?></span>
253
+					    <input type="radio" name="lasso_editor[bold_tag]" value='b' <?php echo checked($bold_tag, 'b'); ?>> b
254
+						<input type="radio" name="lasso_editor[bold_tag]" value="strong" <?php echo checked($bold_tag, 'strong'); ?>> strong
255 255
 					</div>
256 256
 					<div class="lasso-editor-settings--option-inner" >
257
-					    <label for="lasso_editor[i_tag]"> <?php _e( '"Italic" Tag', 'lasso' );?></label>
258
-						<span class="lasso--setting-description"><?php _e( 'Choose the HTML tag used for the "Italic" style.', 'lasso' );?></span>
259
-					    <input type="radio" name="lasso_editor[i_tag]" value='i' <?php echo checked( $i_tag, 'i' );?>> i
260
-						<input type="radio" name="lasso_editor[i_tag]" value="em" <?php echo checked( $i_tag, 'em' );?>> em
257
+					    <label for="lasso_editor[i_tag]"> <?php _e('"Italic" Tag', 'lasso'); ?></label>
258
+						<span class="lasso--setting-description"><?php _e('Choose the HTML tag used for the "Italic" style.', 'lasso'); ?></span>
259
+					    <input type="radio" name="lasso_editor[i_tag]" value='i' <?php echo checked($i_tag, 'i'); ?>> i
260
+						<input type="radio" name="lasso_editor[i_tag]" value="em" <?php echo checked($i_tag, 'em'); ?>> em
261 261
 					</div>
262 262
 				</div>
263 263
 
264
-				<h3><?php _e( 'Advanced', 'lasso' );?></h3>
264
+				<h3><?php _e('Advanced', 'lasso'); ?></h3>
265 265
 				<div class="lasso-editor-settings--option-wrap ">
266 266
 					<div class="lasso-editor-settings--option-inner" style="border:none">
267
-						<input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked( $shortcodify_disabled, 'on' );?> >
268
-						<label for="lasso_editor[shortcodify_disabled]"><?php _e( 'Disable Aesop Component Conversion', 'lasso' );?></label>
269
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso' );?></span>
267
+						<input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked($shortcodify_disabled, 'on'); ?> >
268
+						<label for="lasso_editor[shortcodify_disabled]"><?php _e('Disable Aesop Component Conversion', 'lasso'); ?></label>
269
+						<span class="lasso--setting-description"><?php _e('Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso'); ?></span>
270 270
 					</div>
271 271
 				
272 272
 					<div class="lasso-editor-settings--option-inner" style="border:none">
273
-						<input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked( $enable_autosave, 'on' );?> >
274
-						<label for="lasso_editor[enable_autosave]"><?php _e( 'Enable Auto Save', 'lasso' );?></label>
275
-						<span class="lasso--setting-description"><?php _e( 'Check this box to enable auto save.', 'lasso' );?></span>
273
+						<input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked($enable_autosave, 'on'); ?> >
274
+						<label for="lasso_editor[enable_autosave]"><?php _e('Enable Auto Save', 'lasso'); ?></label>
275
+						<span class="lasso--setting-description"><?php _e('Check this box to enable auto save.', 'lasso'); ?></span>
276 276
 					</div>
277 277
 				
278 278
 					<div class="lasso-editor-settings--option-inner" style="border:none">
279
-						<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' );?> >
280
-						<label for="lasso_editor[post_save_disabled]"><?php _e( 'Disable Post Saving', 'lasso' );?></label>
281
-						<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>
279
+						<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'); ?> >
280
+						<label for="lasso_editor[post_save_disabled]"><?php _e('Disable Post Saving', 'lasso'); ?></label>
281
+						<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>
282 282
 
283 283
 					</div>
284 284
 				
285 285
 					<div class="lasso-editor-settings--option-inner">
286
-						<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' );?> >
287
-						<label for="lasso_editor[save_using_rest_disabled]"><?php _e( "Don't Use REST API to Save", 'lasso' );?></label>
288
-						<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>
286
+						<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'); ?> >
287
+						<label for="lasso_editor[save_using_rest_disabled]"><?php _e("Don't Use REST API to Save", 'lasso'); ?></label>
288
+						<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>
289 289
 
290 290
 					</div>
291 291
 				</div>
@@ -295,11 +295,11 @@  discard block
 block discarded – undo
295 295
 
296 296
 				<div class="lasso-editor-settings--submit">
297 297
 				    <input type="hidden" name="action" value="lasso-editor-settings" />
298
-				    <input type="submit" class="button-primary" value="<?php esc_attr_e( 'Save Settings', 'lasso' );?>" />
299
-					<?php wp_nonce_field( 'nonce', 'lasso_editor_settings' ); ?>
298
+				    <input type="submit" class="button-primary" value="<?php esc_attr_e('Save Settings', 'lasso'); ?>" />
299
+					<?php wp_nonce_field('nonce', 'lasso_editor_settings'); ?>
300 300
 				</div>
301 301
 				
302
-				<?php do_action('lasso_settings_after');?>
302
+				<?php do_action('lasso_settings_after'); ?>
303 303
 			</form>
304 304
 
305 305
 		</div><?php
Please login to merge, or discard this patch.