Completed
Push — master ( dd8fb7...d4b7b2 )
by
unknown
03:01
created
public/includes/assets.php 1 patch
Spacing   +83 added lines, -83 removed lines patch added patch discarded remove patch
@@ -10,21 +10,21 @@  discard block
 block discarded – undo
10 10
 
11 11
 class assets {
12 12
 
13
-	public function __construct(){
13
+	public function __construct() {
14 14
 
15
-		add_action('wp_enqueue_scripts', array($this,'scripts'));
15
+		add_action('wp_enqueue_scripts', array($this, 'scripts'));
16 16
 	}
17 17
 
18
-	public function scripts(){
18
+	public function scripts() {
19 19
 
20 20
 	
21
-		if ( lasso_user_can('edit_posts')) {
21
+		if (lasso_user_can('edit_posts')) {
22 22
 
23 23
 			wp_enqueue_style('lasso-style', LASSO_URL.'/public/assets/css/lasso.css', LASSO_VERSION, true);
24 24
 
25 25
             //don't load autocomplete if it's a stockholm theme
26
-			$themename  	= wp_get_theme()->get('Name');
27
-			if ($themename !='Stockholm' ) {
26
+			$themename = wp_get_theme()->get('Name');
27
+			if ($themename != 'Stockholm') {
28 28
 				wp_enqueue_script('jquery-ui-autocomplete');
29 29
 			}
30 30
 			wp_enqueue_script('jquery-ui-draggable');
@@ -37,27 +37,27 @@  discard block
 block discarded – undo
37 37
 			// url for json api
38 38
 			$home_url = function_exists('json_get_url_prefix') ? json_get_url_prefix() : false;
39 39
 
40
-			$article_object 	= lasso_editor_get_option('article_class','lasso_editor');
40
+			$article_object 	= lasso_editor_get_option('article_class', 'lasso_editor');
41 41
 
42
-			$article_object 	= empty( $article_object ) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object;
42
+			$article_object 	= empty($article_object) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object;
43 43
 
44
-			$featImgClass 		= lasso_editor_get_option('featimg_class','lasso_editor');
45
-			if (empty( $featImgClass )) {
44
+			$featImgClass = lasso_editor_get_option('featimg_class', 'lasso_editor');
45
+			if (empty($featImgClass)) {
46 46
 				$featImgClass = lasso_get_supported_theme_featured_image_class();
47 47
 			}
48
-			$titleClass 		= lasso_editor_get_option('title_class','lasso_editor');
49
-			if (empty( $titleClass )) {
48
+			$titleClass = lasso_editor_get_option('title_class', 'lasso_editor');
49
+			if (empty($titleClass)) {
50 50
 				$titleClass = lasso_get_supported_theme_title_class();
51 51
 			}
52
-			$toolbar_headings  	= lasso_editor_get_option('toolbar_headings', 'lasso_editor');
53
-			$toolbar_headings_h4  	= lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
52
+			$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
53
+			$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
54 54
 			$objectsNoSave  	= lasso_editor_get_option('dont_save', 'lasso_editor');
55
-			$objectsNonEditable  	= lasso_editor_get_option('non_editable', 'lasso_editor');
55
+			$objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor');
56 56
 			$disableRESTSave = lasso_editor_get_option('save_using_rest_disabled', 'lasso_editor');
57
-			$save_to_post_disabled  = lasso_editor_get_option( 'post_save_disabled', 'lasso_editor' );
57
+			$save_to_post_disabled = lasso_editor_get_option('post_save_disabled', 'lasso_editor');
58 58
 			
59
-			$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor','b');
60
-			$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor','i');
59
+			$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor', 'b');
60
+			$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor', 'i');
61 61
 
62 62
 			
63 63
 			//text alignement
@@ -71,8 +71,8 @@  discard block
 block discarded – undo
71 71
 			
72 72
 			if ($show_color) {
73 73
 				//color picker
74
-				wp_enqueue_style( 'wp-color-picker' );
75
-				wp_enqueue_script( 'iris', admin_url( 'js/iris.min.js' ), array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), false, 1 );
74
+				wp_enqueue_style('wp-color-picker');
75
+				wp_enqueue_script('iris', admin_url('js/iris.min.js'), array('jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch'), false, 1);
76 76
 			}
77 77
 			
78 78
 			// click to insert components, not drag and drop
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 			
82 82
 			// custom fields
83 83
 			
84
-			$custom_fields = apply_filters( 'editus_custom_fields', null ); //array('testFieldName' => '#field1');
84
+			$custom_fields = apply_filters('editus_custom_fields', null); //array('testFieldName' => '#field1');
85 85
 
86 86
 
87 87
 
@@ -92,48 +92,48 @@  discard block
 block discarded – undo
92 92
             $delta = time() - $post_date;
93 93
 
94 94
 			$strings = array(
95
-				'save' 				=> __('Save','lasso'),
96
-				'saving' 			=> __('Saving...','lasso'),
97
-				'saved'				=> __('Saved!','lasso'),
98
-				'adding' 			=> __('Adding...','lasso'),
99
-				'added'				=> __('Added!','lasso'),
100
-				'loading' 			=> __('Loading...','lasso'),
101
-				'loadMore'			=> __('Load More','lasso'),
102
-				'close'			=> __('Close','lasso'),
103
-				'noPostsFound'		=> __('No more posts found','lasso'),
104
-				'fetchFail'	    	=> __('Fetching failed.','lasso'),
105
-				'galleryCreated' 	=> __('Gallery Created!','lasso'),
106
-				'galleryUpdated' 	=> __('Gallery Updated!','lasso'),
107
-				'justWrite'			=> __('Just write...','lasso'),
108
-				'chooseImage'		=> __('Choose an image','lasso'),
109
-				'updateImage'		=> __('Update Image','lasso'),
110
-				'insertImage'		=> __('Insert Image','lasso'),
111
-				'selectImage'		=> __('Select Image','lasso'),
112
-				'removeFeatImg'     => __('Remove featured image?','lasso'),
113
-				'updateSelectedImg' => __('Update Selected Image','lasso'),
114
-				'chooseImages'		=> __('Choose images','lasso'),
115
-				'editImage'			=> __('Edit Image','lasso'),
116
-				'addImages'			=> __('Add Images','lasso'),
117
-				'addNewGallery'		=> __('Add New Gallery','lasso'),
118
-				'selectGallery'		=> __('Select Lasso Gallery Image','lasso'),
119
-				'useSelectedImages' => __('Use Selected Images','lasso'),
120
-				'publishPost'		=> __('Publish Post?','lasso'),
121
-				'publishYes'		=> __('Yes, publish it!','lasso'),
122
-				'deletePost'		=> __('Trash Post?','lasso'),
123
-				'deleteYes'			=> __('Yes, trash it!','lasso'),
124
-				'warning'			=> __('Oh snap!','laso'),
125
-				'cancelText'		=> __('O.K. got it!','lasso'),
126
-				'missingClass'		=> __('It looks like we are either missing the Article CSS class, or it is configured incorrectly. Editus will not function correctly without this CSS class.','lasso'),
95
+				'save' 				=> __('Save', 'lasso'),
96
+				'saving' 			=> __('Saving...', 'lasso'),
97
+				'saved'				=> __('Saved!', 'lasso'),
98
+				'adding' 			=> __('Adding...', 'lasso'),
99
+				'added'				=> __('Added!', 'lasso'),
100
+				'loading' 			=> __('Loading...', 'lasso'),
101
+				'loadMore'			=> __('Load More', 'lasso'),
102
+				'close'			=> __('Close', 'lasso'),
103
+				'noPostsFound'		=> __('No more posts found', 'lasso'),
104
+				'fetchFail'	    	=> __('Fetching failed.', 'lasso'),
105
+				'galleryCreated' 	=> __('Gallery Created!', 'lasso'),
106
+				'galleryUpdated' 	=> __('Gallery Updated!', 'lasso'),
107
+				'justWrite'			=> __('Just write...', 'lasso'),
108
+				'chooseImage'		=> __('Choose an image', 'lasso'),
109
+				'updateImage'		=> __('Update Image', 'lasso'),
110
+				'insertImage'		=> __('Insert Image', 'lasso'),
111
+				'selectImage'		=> __('Select Image', 'lasso'),
112
+				'removeFeatImg'     => __('Remove featured image?', 'lasso'),
113
+				'updateSelectedImg' => __('Update Selected Image', 'lasso'),
114
+				'chooseImages'		=> __('Choose images', 'lasso'),
115
+				'editImage'			=> __('Edit Image', 'lasso'),
116
+				'addImages'			=> __('Add Images', 'lasso'),
117
+				'addNewGallery'		=> __('Add New Gallery', 'lasso'),
118
+				'selectGallery'		=> __('Select Lasso Gallery Image', 'lasso'),
119
+				'useSelectedImages' => __('Use Selected Images', 'lasso'),
120
+				'publishPost'		=> __('Publish Post?', 'lasso'),
121
+				'publishYes'		=> __('Yes, publish it!', 'lasso'),
122
+				'deletePost'		=> __('Trash Post?', 'lasso'),
123
+				'deleteYes'			=> __('Yes, trash it!', 'lasso'),
124
+				'warning'			=> __('Oh snap!', 'laso'),
125
+				'cancelText'		=> __('O.K. got it!', 'lasso'),
126
+				'missingClass'		=> __('It looks like we are either missing the Article CSS class, or it is configured incorrectly. Editus will not function correctly without this CSS class.', 'lasso'),
127 127
 				'missingConfirm'	=> __('Update Settings', 'lasso'),
128
-				'helperText'		=> __('one more letter','lasso'),
128
+				'helperText'		=> __('one more letter', 'lasso'),
129 129
 				'editingBackup'  	=> __('You are currently editing a backup copy of this post.'),
130 130
 			);
131 131
 
132
-			$api_url = trailingslashit( home_url() ) . 'lasso-internal-api';
132
+			$api_url = trailingslashit(home_url()).'lasso-internal-api';
133 133
 
134 134
 			$gallery_class = new gallery();
135 135
 			$gallery_nonce_action = $gallery_class->nonce_action;
136
-			$gallery_nonce = wp_create_nonce( $gallery_nonce_action );
136
+			$gallery_nonce = wp_create_nonce($gallery_nonce_action);
137 137
 			
138 138
 			
139 139
             if ($allow_change_date) {
@@ -148,13 +148,13 @@  discard block
 block discarded – undo
148 148
 			  
149 149
 			if (function_exists('rest_url')) {
150 150
 				//$rest_root = esc_url_raw( rest_url());
151
-				$rest_nonce = wp_create_nonce( 'wp_rest' );
152
-				$settings = array( 'root' => $rest_root, 'nonce' => $rest_nonce );
153
-				wp_enqueue_script( 'wp-api', '', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
154
-				wp_localize_script( 'wp-api', 'wpApiSettings', $settings );
155
-				wp_localize_script( 'wp-api', 'WP_API_Settings', $settings );
151
+				$rest_nonce = wp_create_nonce('wp_rest');
152
+				$settings = array('root' => $rest_root, 'nonce' => $rest_nonce);
153
+				wp_enqueue_script('wp-api', '', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true);
154
+				wp_localize_script('wp-api', 'wpApiSettings', $settings);
155
+				wp_localize_script('wp-api', 'WP_API_Settings', $settings);
156 156
 				
157
-				if ( class_exists( 'WP_REST_Controller' )) {
157
+				if (class_exists('WP_REST_Controller')) {
158 158
 					// we are using REST API V2
159 159
 					$using_restapiv2 = true;
160 160
 				}
@@ -162,8 +162,8 @@  discard block
 block discarded – undo
162 162
 
163 163
 			// localized objects
164 164
 			$objects = array(
165
-				'ajaxurl' 			=> esc_url( $api_url ),
166
-				'ajaxurl2' 			=> esc_url( admin_url( 'admin-ajax.php' )),
165
+				'ajaxurl' 			=> esc_url($api_url),
166
+				'ajaxurl2' 			=> esc_url(admin_url('admin-ajax.php')),
167 167
 				'rest_root'         => $rest_root,
168 168
 				'rest_nonce'        => $rest_nonce,
169 169
 				'editor' 			=> 'lasso--content', // ID of editable content (without #) DONT CHANGE
@@ -171,13 +171,13 @@  discard block
 block discarded – undo
171 171
 				'featImgClass'		=> $featImgClass,
172 172
 				'titleClass'		=> $titleClass,
173 173
 				'strings'			=> $strings,
174
-				'settingsLink'		=> function_exists('is_multisite') && is_multisite() ? network_admin_url( 'settings.php?page=lasso-editor' ) : admin_url( 'admin.php?page=lasso-editor-settings' ),
175
-				'post_status'		=> get_post_status( $postid ),
174
+				'settingsLink'		=> function_exists('is_multisite') && is_multisite() ? network_admin_url('settings.php?page=lasso-editor') : admin_url('admin.php?page=lasso-editor-settings'),
175
+				'post_status'		=> get_post_status($postid),
176 176
 				'postid'			=> $postid,
177 177
 				'permalink'			=> $permalink,
178 178
 				'edit_others_pages'	=> current_user_can('edit_others_pages') ? true : false,
179 179
 				'edit_others_posts'	=> current_user_can('edit_others_posts') ? true : false,
180
-				'userCanEdit'		=> current_user_can('edit_post', $postid ),
180
+				'userCanEdit'		=> current_user_can('edit_post', $postid),
181 181
 				'can_publish_posts'	=> current_user_can('publish_posts'),
182 182
 				'can_publish_pages'	=> current_user_can('publish_pages'),
183 183
 				'author'			=> is_user_logged_in() ? get_current_user_ID() : false,
@@ -212,26 +212,26 @@  discard block
 block discarded – undo
212 212
 				'postTags'    		=> lasso_get_objects('tag'),
213 213
 				'noResultsDiv'		=> lasso_editor_empty_results(),
214 214
 				'noRevisionsDiv'	=> lasso_editor_empty_results('revision'),
215
-				'mapTileProvider'   => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider( $postid ) : false,
216
-				'mapLocations'		=> get_post_meta( $postid, 'ase_map_component_locations' ),
217
-				'mapStart'			=> get_post_meta( $postid, 'ase_map_component_start_point', true ),
218
-				'mapZoom'			=> get_post_meta( $postid, 'ase_map_component_zoom', true ),
215
+				'mapTileProvider'   => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider($postid) : false,
216
+				'mapLocations'		=> get_post_meta($postid, 'ase_map_component_locations'),
217
+				'mapStart'			=> get_post_meta($postid, 'ase_map_component_start_point', true),
218
+				'mapZoom'			=> get_post_meta($postid, 'ase_map_component_zoom', true),
219 219
 				'revisionModal' 	=> lasso_editor_revision_modal(),
220 220
 				'isMobile'          => wp_is_mobile(),
221
-				'enableAutoSave'    => lasso_editor_get_option( 'enable_autosave', 'lasso_editor' ),
221
+				'enableAutoSave'    => lasso_editor_get_option('enable_autosave', 'lasso_editor'),
222 222
 				'showColor'         => $show_color,
223 223
 				'showAlignment'     => $show_align,
224 224
 				'showIgnoredItems'  => lasso_editor_get_option('show_ignored_items', 'lasso_editor'),
225 225
 				'restapi2'          => $using_restapiv2,
226 226
 				'saveusingrest'     => $using_restapiv2 && !$disableRESTSave,
227
-				'newObjectContent'  => apply_filters( 'lasso_new_object_content', __( 'Once upon a time...','lasso') ),
227
+				'newObjectContent'  => apply_filters('lasso_new_object_content', __('Once upon a time...', 'lasso')),
228 228
 				'disableSavePost'   => $save_to_post_disabled,
229 229
 				'boldTag'           => $bold_tag,
230 230
 				'iTag'           	=> $i_tag,
231 231
 				'customFields'      => $custom_fields,
232
-				'clickToInsert'     => ($insert_comp_ui !='drag'),
233
-				'buttonOnEmptyP'     => ($insert_comp_ui =='mediumcom'),      // auto show a button to insert components on an empty paragraph           
234
-				'skipToEdit'        =>( $delta < 10 ) // if it's a new post, skip to edit mode
232
+				'clickToInsert'     => ($insert_comp_ui != 'drag'),
233
+				'buttonOnEmptyP'     => ($insert_comp_ui == 'mediumcom'), // auto show a button to insert components on an empty paragraph           
234
+				'skipToEdit'        =>($delta < 10) // if it's a new post, skip to edit mode
235 235
 			);
236 236
 
237 237
 
@@ -240,9 +240,9 @@  discard block
 block discarded – undo
240 240
 			
241 241
 			if (!$using_restapiv2) {
242 242
                // enqueue REST API V1
243
-			   wp_enqueue_script( 'wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
244
-			   $settings = array( 'root' => home_url( $home_url ), 'nonce' => wp_create_nonce( 'wp_json' ) );
245
-			   wp_localize_script( 'wp-api-js', 'WP_API_Settings', $settings );
243
+			   wp_enqueue_script('wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true);
244
+			   $settings = array('root' => home_url($home_url), 'nonce' => wp_create_nonce('wp_json'));
245
+			   wp_localize_script('wp-api-js', 'WP_API_Settings', $settings);
246 246
 			}
247 247
 			
248 248
 			if ($allow_change_date) {
@@ -251,13 +251,13 @@  discard block
 block discarded – undo
251 251
 				wp_enqueue_style('jquery-ui');
252 252
 			}
253 253
 
254
-			$postfix = ( defined( 'SCRIPT_DEBUG' ) && true === SCRIPT_DEBUG ) ? '' : '.min';
254
+			$postfix = (defined('SCRIPT_DEBUG') && true === SCRIPT_DEBUG) ? '' : '.min';
255 255
 			if ($show_color) {
256
-				wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api','iris'), LASSO_VERSION, true);
256
+				wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api', 'iris'), LASSO_VERSION, true);
257 257
 			} else {
258
-			    wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
258
+			    wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
259 259
 			}
260
-			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects ) );
260
+			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects));
261 261
 
262 262
 
263 263
 		}
Please login to merge, or discard this patch.
public/includes/lasso.php 1 patch
Spacing   +82 added lines, -82 removed lines patch added patch discarded remove patch
@@ -52,16 +52,16 @@  discard block
 block discarded – undo
52 52
 		require_once LASSO_DIR.'/public/includes/wrap-shortcodes.php';
53 53
 
54 54
 		// Activate plugin when new blog is added
55
-		add_action( 'wpmu_new_blog', array( $this, 'activate_new_site' ) );
55
+		add_action('wpmu_new_blog', array($this, 'activate_new_site'));
56 56
 
57 57
 		// Load plugin text domain
58
-		add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
58
+		add_action('init', array($this, 'load_plugin_textdomain'));
59 59
 		
60
-		add_action( 'wp_ajax_get_aesop_component',     array( $this, 'get_aesop_component' ) );
61
-		add_action( 'wp_ajax_editus_do_shortcode',     array( $this, 'editus_do_shortcode' ) );
62
-		add_action( 'wp_ajax_editus_lock_post',     array( $this, 'editus_lock_post' ) );
63
-		add_action( 'wp_ajax_editus_hide_tour',     array( $this, 'editus_hide_tour' ) );
64
-		add_action( 'wp_ajax_editus_set_post_setting',     array( $this, 'editus_set_post_setting' ) );
60
+		add_action('wp_ajax_get_aesop_component', array($this, 'get_aesop_component'));
61
+		add_action('wp_ajax_editus_do_shortcode', array($this, 'editus_do_shortcode'));
62
+		add_action('wp_ajax_editus_lock_post', array($this, 'editus_lock_post'));
63
+		add_action('wp_ajax_editus_hide_tour', array($this, 'editus_hide_tour'));
64
+		add_action('wp_ajax_editus_set_post_setting', array($this, 'editus_set_post_setting'));
65 65
 
66 66
 		// enable saving custom fields through REST API
67 67
 		self::enable_metasave('post');
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 	public static function get_instance() {
93 93
 
94 94
 		// If the single instance hasn't been set, set it now.
95
-		if ( null == self::$instance ) {
95
+		if (null == self::$instance) {
96 96
 			self::$instance = new self;
97 97
 		}
98 98
 
@@ -109,18 +109,18 @@  discard block
 block discarded – undo
109 109
 	 *                                       WPMU is disabled or plugin is
110 110
 	 *                                       activated on an individual blog.
111 111
 	 */
112
-	public static function activate( $network_wide ) {
112
+	public static function activate($network_wide) {
113 113
 
114
-		if ( function_exists( 'is_multisite' ) && is_multisite() ) {
114
+		if (function_exists('is_multisite') && is_multisite()) {
115 115
 
116
-			if ( $network_wide  ) {
116
+			if ($network_wide) {
117 117
 
118 118
 				// Get all blog ids
119 119
 				$blog_ids = self::get_blog_ids();
120 120
 
121
-				foreach ( $blog_ids as $blog_id ) {
121
+				foreach ($blog_ids as $blog_id) {
122 122
 
123
-					switch_to_blog( $blog_id );
123
+					switch_to_blog($blog_id);
124 124
 					self::single_activate();
125 125
 				}
126 126
 
@@ -146,18 +146,18 @@  discard block
 block discarded – undo
146 146
 	 *                                       WPMU is disabled or plugin is
147 147
 	 *                                       deactivated on an individual blog.
148 148
 	 */
149
-	public static function deactivate( $network_wide ) {
149
+	public static function deactivate($network_wide) {
150 150
 
151
-		if ( function_exists( 'is_multisite' ) && is_multisite() ) {
151
+		if (function_exists('is_multisite') && is_multisite()) {
152 152
 
153
-			if ( $network_wide ) {
153
+			if ($network_wide) {
154 154
 
155 155
 				// Get all blog ids
156 156
 				$blog_ids = self::get_blog_ids();
157 157
 
158
-				foreach ( $blog_ids as $blog_id ) {
158
+				foreach ($blog_ids as $blog_id) {
159 159
 
160
-					switch_to_blog( $blog_id );
160
+					switch_to_blog($blog_id);
161 161
 					self::single_deactivate();
162 162
 
163 163
 				}
@@ -181,13 +181,13 @@  discard block
 block discarded – undo
181 181
 	 *
182 182
 	 * @param int     $blog_id ID of the new blog.
183 183
 	 */
184
-	public function activate_new_site( $blog_id ) {
184
+	public function activate_new_site($blog_id) {
185 185
 
186
-		if ( 1 !== did_action( 'wpmu_new_blog' ) ) {
186
+		if (1 !== did_action('wpmu_new_blog')) {
187 187
 			return;
188 188
 		}
189 189
 
190
-		switch_to_blog( $blog_id );
190
+		switch_to_blog($blog_id);
191 191
 		self::single_activate();
192 192
 		restore_current_blog();
193 193
 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 			WHERE archived = '0' AND spam = '0'
213 213
 			AND deleted = '0'";
214 214
 
215
-		return $wpdb->get_col( $sql );
215
+		return $wpdb->get_col($sql);
216 216
 
217 217
 	}
218 218
 
@@ -223,18 +223,18 @@  discard block
 block discarded – undo
223 223
 	 */
224 224
 	private static function single_activate() {
225 225
 
226
-		$curr_version = get_option( 'lasso_version' );
226
+		$curr_version = get_option('lasso_version');
227 227
 
228 228
 		// update upgraded from
229
-		if ( $curr_version ) {
230
-			update_option( 'lasso_updated_from', $curr_version );
229
+		if ($curr_version) {
230
+			update_option('lasso_updated_from', $curr_version);
231 231
 		}
232 232
 
233 233
 		// update lasso version option
234
-		update_option( 'lasso_version', LASSO_VERSION );
234
+		update_option('lasso_version', LASSO_VERSION);
235 235
 
236 236
 		// set transietn for activation welcome
237
-		set_transient( '_lasso_welcome_redirect', true, 30 );
237
+		set_transient('_lasso_welcome_redirect', true, 30);
238 238
 
239 239
 
240 240
 	}
@@ -256,15 +256,15 @@  discard block
 block discarded – undo
256 256
 	public function load_plugin_textdomain() {
257 257
 
258 258
 		$domain = $this->plugin_slug;
259
-		$locale = apply_filters( 'plugin_locale', get_locale(), $domain );
259
+		$locale = apply_filters('plugin_locale', get_locale(), $domain);
260 260
 
261
-		$out = load_textdomain( $domain, trailingslashit( LASSO_DIR ). 'languages/' . $domain . '-' . $locale . '.mo' );
261
+		$out = load_textdomain($domain, trailingslashit(LASSO_DIR).'languages/'.$domain.'-'.$locale.'.mo');
262 262
 	}
263 263
 	
264 264
     // new ajax function to lock post for editing
265 265
 	public function editus_lock_post()
266 266
 	{
267
-		$post_id= $_POST["postid"];
267
+		$post_id = $_POST["postid"];
268 268
 		$locked = wp_check_post_lock($post_id);
269 269
 		
270 270
 		if (!$locked) {
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 			echo "true";
273 273
 		} else {
274 274
 			$user_info = get_userdata($locked);
275
-			echo "Post opened by ".$user_info->first_name .  " " . $user_info->last_name;
275
+			echo "Post opened by ".$user_info->first_name." ".$user_info->last_name;
276 276
 		}
277 277
 		exit;
278 278
 	}
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 	{
283 283
 		$user_id = get_current_user_ID();
284 284
 				
285
-		update_user_meta( $user_id, 'lasso_hide_tour', true );
285
+		update_user_meta($user_id, 'lasso_hide_tour', true);
286 286
 		exit;
287 287
 	}
288 288
 	
@@ -293,14 +293,14 @@  discard block
 block discarded – undo
293 293
 		$data = array();
294 294
 		parse_str($_POST['data'], $data);
295 295
 		
296
-		if (!wp_verify_nonce( $data[ 'nonce' ], 'lasso-update-post-settings' )) {
296
+		if (!wp_verify_nonce($data['nonce'], 'lasso-update-post-settings')) {
297 297
 			wp_send_json_error();
298 298
 			exit;
299 299
 		}
300 300
 		
301
-		$status = isset( $data['status'] ) ? $data['status'] : false;
302
-		$postid = isset( $data['postid'] ) ? $data['postid'] : false;
303
-		$slug   = isset( $data['story_slug'] ) ? $data['story_slug'] : false;
301
+		$status = isset($data['status']) ? $data['status'] : false;
302
+		$postid = isset($data['postid']) ? $data['postid'] : false;
303
+		$slug   = isset($data['story_slug']) ? $data['story_slug'] : false;
304 304
 	
305 305
 
306 306
 		$args = array(
@@ -311,33 +311,33 @@  discard block
 block discarded – undo
311 311
 		
312 312
 		
313 313
 
314
-		wp_update_post( apply_filters( 'lasso_object_status_update_args', $args ) );
314
+		wp_update_post(apply_filters('lasso_object_status_update_args', $args));
315 315
 		
316 316
 		// update categories
317
-		$cats  = isset( $data['story_cats'] ) ? $data['story_cats'] : false;
317
+		$cats = isset($data['story_cats']) ? $data['story_cats'] : false;
318 318
 		
319
-		self::set_post_terms( $postid, $cats, 'category' );
319
+		self::set_post_terms($postid, $cats, 'category');
320 320
 		
321 321
 		// update tags
322
-		$tags = isset( $data['story_tags'] ) ? $data['story_tags'] : false;
323
-		self::set_post_terms( $postid, $tags, 'post_tag' );
322
+		$tags = isset($data['story_tags']) ? $data['story_tags'] : false;
323
+		self::set_post_terms($postid, $tags, 'post_tag');
324 324
 		
325 325
 		//update date
326
-		$date  = isset( $data['post_date'] ) ? $data['post_date'] : false;
327
-		self::set_date( $postid, $date );
326
+		$date = isset($data['post_date']) ? $data['post_date'] : false;
327
+		self::set_date($postid, $date);
328 328
 		
329
-		do_action( 'lasso_post_updated', $postid, $slug, $status, get_current_user_ID() );
329
+		do_action('lasso_post_updated', $postid, $slug, $status, get_current_user_ID());
330 330
 		wp_send_json_success();
331 331
 		exit;
332 332
 	}
333 333
 	
334 334
 	public static function enable_metasave($type)
335 335
 	{
336
-		register_rest_field( $type, 'metadata', array(
337
-			'get_callback' => function ( $data ) {
338
-				return get_post_meta( $data['id']);//, '', '' );
336
+		register_rest_field($type, 'metadata', array(
337
+			'get_callback' => function($data) {
338
+				return get_post_meta($data['id']); //, '', '' );
339 339
 			}, 
340
-			'update_callback' => function( $data, $post ) {
340
+			'update_callback' => function($data, $post) {
341 341
 				foreach ($data as $key => $value) {
342 342
 					update_post_meta($post->ID, $key, $value);
343 343
 				}
@@ -349,13 +349,13 @@  discard block
 block discarded – undo
349 349
 	public function editus_do_shortcode()
350 350
 	{
351 351
 		
352
-		$code= $_POST["code"];
352
+		$code = $_POST["code"];
353 353
 		$code = str_replace('\"', '"', $code);
354 354
 		
355
-		$code_wrapped = lasso_wrap_shortcodes( $code);
356
-		$out =  do_shortcode($code);
355
+		$code_wrapped = lasso_wrap_shortcodes($code);
356
+		$out = do_shortcode($code);
357 357
 		if ($out != '') {
358
-			$out =  do_shortcode($code_wrapped);
358
+			$out = do_shortcode($code_wrapped);
359 359
 			echo $out;
360 360
 			exit;
361 361
 		}
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
 		/** @var \WP_Embed $wp_embed */
366 366
 		global $wp_embed;
367 367
 		$wp_embed->post_ID = $_POST["ID"];
368
-		$out =$wp_embed->run_shortcode( $code_wrapped );
368
+		$out = $wp_embed->run_shortcode($code_wrapped);
369 369
 		
370 370
 		echo $out;
371 371
 		exit;
@@ -375,53 +375,53 @@  discard block
 block discarded – undo
375 375
 	{
376 376
 		
377 377
 		
378
-		$code= $_POST["code"];
378
+		$code = $_POST["code"];
379 379
 		$atts = array(
380 380
 		 );
381 381
 		foreach ($_POST as $key => $value) {
382
-			if ($key !="code" && $key !="action") {
382
+			if ($key != "code" && $key != "action") {
383 383
 			    //$shortcode = $shortcode.$key.'="'.$value.'" ';
384 384
 				$atts[$key] = $value;
385 385
 			}
386 386
 		}
387 387
 		if ($code == "aesop_video") {
388
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-video.php');
388
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-video.php');
389 389
 		    echo aesop_video_shortcode($atts);
390 390
 		}
391 391
 		else if ($code == "aesop_image") {
392
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php');
392
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php');
393 393
 		    echo aesop_image_shortcode($atts);
394 394
 		}
395 395
 		else if ($code == "aesop_quote") {
396
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php');
396
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php');
397 397
 		    echo aesop_quote_shortcode($atts);
398 398
 		}
399 399
 		else if ($code == "aesop_parallax") {
400
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php');
400
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php');
401 401
 		    echo aesop_parallax_shortcode($atts);
402 402
 		}
403 403
 		else if ($code == "aesop_character") {
404
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php');
404
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php');
405 405
 		    echo aesop_character_shortcode($atts);
406 406
 		}
407 407
 		else if ($code == "aesop_collection") {
408
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php');
408
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php');
409 409
 		    echo aesop_collection_shortcode($atts);
410 410
 		}
411 411
 		else if ($code == "aesop_chapter") {
412
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php');
412
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php');
413 413
 		    echo aesop_chapter_shortcode($atts);
414 414
 		}
415 415
 		else if ($code == "aesop_content") {
416
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php');
416
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php');
417 417
 		    echo aesop_content_shortcode($atts, $atts['content_data']);
418 418
 		}
419 419
 		else if ($code == "aesop_gallery") {
420
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
421
-		    echo do_shortcode( '[aesop_gallery id="'.$atts["id"].'"]');
420
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
421
+		    echo do_shortcode('[aesop_gallery id="'.$atts["id"].'"]');
422 422
 		}
423 423
 		else if ($code == "aesop_audio") {
424
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-audio.php');
424
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-audio.php');
425 425
 		    echo aesop_audio_shortcode($atts);
426 426
 		}
427 427
 		else {
@@ -437,17 +437,17 @@  discard block
 block discarded – undo
437 437
 		
438 438
 		exit; 
439 439
 	}
440
-	public function set_post_terms( $postid, $value, $taxonomy ) {
441
-		if( $value ) {
442
-			$value = explode( ',', $value );
443
-			$allow_new_category = lasso_editor_get_option( 'allow_new_category', 'lasso_editor' );
440
+	public function set_post_terms($postid, $value, $taxonomy) {
441
+		if ($value) {
442
+			$value = explode(',', $value);
443
+			$allow_new_category = lasso_editor_get_option('allow_new_category', 'lasso_editor');
444 444
 			
445
-			if ($taxonomy =='category') {
445
+			if ($taxonomy == 'category') {
446 446
                 // convert from names to category ids
447 447
 				$cats = array();
448 448
 				foreach ($value as $cat) {
449 449
 					$cat_id = get_cat_ID($cat);
450
-					if ($cat_id !=0) {
450
+					if ($cat_id != 0) {
451 451
 						$cats [] = $cat_id;
452 452
 					} else if ($allow_new_category) {
453 453
 					    $cats [] = wp_create_category($cat);
@@ -456,27 +456,27 @@  discard block
 block discarded – undo
456 456
 				$value = $cats;
457 457
 			}
458 458
 	
459
-			$result = wp_set_object_terms( $postid, $value, $taxonomy );
459
+			$result = wp_set_object_terms($postid, $value, $taxonomy);
460 460
 		}
461
-		else  {
461
+		else {
462 462
 			//remove all terms from post
463
-			$result = wp_set_object_terms( $postid, null, $taxonomy );
463
+			$result = wp_set_object_terms($postid, null, $taxonomy);
464 464
 		}
465 465
 
466
-		if ( ! is_wp_error( $result ) ) {
466
+		if (!is_wp_error($result)) {
467 467
 			return true;
468
-		}else{
468
+		} else {
469 469
 			return false;
470 470
 		}
471 471
 	}
472 472
 	
473
-	public function set_date( $postid, $value) {
474
-		if( $value ) {
473
+	public function set_date($postid, $value) {
474
+		if ($value) {
475 475
             wp_update_post(
476
-				array (
476
+				array(
477 477
 					'ID'            => $postid, // ID of the post to update
478
-					'post_date'     => date( 'Y-m-d H:i:s',  strtotime($value) ),
479
-					'post_date_gmt'     => gmdate( 'Y-m-d H:i:s',  strtotime($value) ),
478
+					'post_date'     => date('Y-m-d H:i:s', strtotime($value)),
479
+					'post_date_gmt'     => gmdate('Y-m-d H:i:s', strtotime($value)),
480 480
 				)
481 481
 			);
482 482
 		}
Please login to merge, or discard this patch.
admin/includes/menus/settings.php 1 patch
Spacing   +122 added lines, -122 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,37 +86,37 @@  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' );
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
-		$allow_change_date = lasso_editor_get_option( 'allow_change_date', 'lasso_editor' );
100
-		$allow_new_category = lasso_editor_get_option( 'allow_new_category', 'lasso_editor' );
101
-		$shortcodify_disabled  = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
102
-		$enable_autosave  = lasso_editor_get_option( 'enable_autosave', 'lasso_editor' );
103
-
104
-		$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
105
-		$toolbar_headings_h4      = lasso_editor_get_option( 'toolbar_headings_h4', 'lasso_editor' );
106
-		$toolbar_show_color      = lasso_editor_get_option( 'toolbar_show_color', 'lasso_editor' );
107
-		$toolbar_show_alignment  = lasso_editor_get_option( 'toolbar_show_alignment', '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
+
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
+		$allow_change_date = lasso_editor_get_option('allow_change_date', 'lasso_editor');
100
+		$allow_new_category = lasso_editor_get_option('allow_new_category', 'lasso_editor');
101
+		$shortcodify_disabled  = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor');
102
+		$enable_autosave = lasso_editor_get_option('enable_autosave', 'lasso_editor');
103
+
104
+		$toolbar_headings      = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
105
+		$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
106
+		$toolbar_show_color      = lasso_editor_get_option('toolbar_show_color', 'lasso_editor');
107
+		$toolbar_show_alignment  = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor');
108 108
 		
109
-		$objectsNoSave  	= lasso_editor_get_option('dont_save', 'lasso_editor');
110
-		$objectsNonEditable  	= lasso_editor_get_option('non_editable', 'lasso_editor');
109
+		$objectsNoSave = lasso_editor_get_option('dont_save', 'lasso_editor');
110
+		$objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor');
111 111
 		$disable_tour = lasso_editor_get_option('disable_tour', 'lasso_editor');
112 112
 		$show_ignored_items = lasso_editor_get_option('show_ignored_items', 'lasso_editor');
113 113
 		$save_using_rest_disabled = lasso_editor_get_option('save_using_rest_disabled', 'lasso_editor');
114 114
 		
115
-		$default_post_types = apply_filters( 'lasso_allowed_post_types', array( 'post', 'page'));
116
-		$allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor',  $default_post_types);
115
+		$default_post_types = apply_filters('lasso_allowed_post_types', array('post', 'page'));
116
+		$allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', $default_post_types);
117 117
 		
118
-		$bold_tag = lasso_editor_get_option( 'bold_tag', 'lasso_editor',  "b");
119
-		$i_tag = lasso_editor_get_option( 'i_tag', 'lasso_editor',  "i");
118
+		$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor', "b");
119
+		$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor', "i");
120 120
 		
121 121
 		$insert_comp_ui = lasso_editor_get_option('insert_comp_ui', 'lasso_editor');
122 122
 		if (!$insert_comp_ui) {
@@ -126,31 +126,31 @@  discard block
 block discarded – undo
126 126
 ?>
127 127
 		<div class="wrap">
128 128
 
129
-	    	<h2><?php _e( 'Editus Settings', 'lasso' );?></h2>
129
+	    	<h2><?php _e('Editus Settings', 'lasso'); ?></h2>
130 130
 
131 131
 			<form id="lasso-editor-settings-form" class="lasso--form-settings" method="post" enctype="multipart/form-data">
132 132
 
133
-				<?php do_action('lasso_settings_before');?>
133
+				<?php do_action('lasso_settings_before'); ?>
134 134
 				
135 135
 				
136 136
 				
137
-				<h3><?php _e( 'Enable for:', 'lasso' );?></h3>
137
+				<h3><?php _e('Enable for:', 'lasso'); ?></h3>
138 138
 				<div class="lasso-editor-settings--option-wrap">
139 139
 					<div class="lasso-editor-settings--option-inner">
140 140
 						
141
-						<span class="lasso--setting-description"><?php _e( 'Enable Editus for the following post types.', 'lasso' );?></span>
141
+						<span class="lasso--setting-description"><?php _e('Enable Editus for the following post types.', 'lasso'); ?></span>
142 142
 						<?php
143 143
 						$args = array(
144 144
 							'public'   => true
145 145
 						);
146 146
 						 
147
-						$allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
148
-						$post_types = get_post_types( $args, 'objects' );
147
+						$allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
148
+						$post_types = get_post_types($args, 'objects');
149 149
 						 
150
-						foreach ( $post_types  as $post_type ) {
150
+						foreach ($post_types  as $post_type) {
151 151
 						   if ($post_type->name == 'attachment') continue;
152
-						   $checked ="";
153
-						   if (  in_array( $post_type->name, $allowed_post_types )  ) {
152
+						   $checked = "";
153
+						   if (in_array($post_type->name, $allowed_post_types)) {
154 154
 								$checked = 'checked="checked"';
155 155
 						   }
156 156
 						   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>';
@@ -160,77 +160,77 @@  discard block
 block discarded – undo
160 160
 				</div>
161 161
 				
162 162
 
163
-				<h3><?php _e( 'Internal Settings', 'lasso' );?></h3>
163
+				<h3><?php _e('Internal Settings', 'lasso'); ?></h3>
164 164
 				<div class="lasso-editor-settings--option-wrap">
165 165
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
166
-						<label><?php _e( 'Article Class', 'lasso' );?></label>
167
-						<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>
168
-						<input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr( $article_object );?>" placeholder=".entry-content">
166
+						<label><?php _e('Article Class', 'lasso'); ?></label>
167
+						<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>
168
+						<input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr($article_object); ?>" placeholder=".entry-content">
169 169
 					</div>
170 170
 				
171 171
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
172
-						<label><?php _e( 'Featured Image Class', 'lasso' );?></label>
173
-						<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>
174
-						<input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr( $featImgClass );?>" placeholder=".entry-content">
172
+						<label><?php _e('Featured Image Class', 'lasso'); ?></label>
173
+						<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>
174
+						<input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr($featImgClass); ?>" placeholder=".entry-content">
175 175
 					</div>
176 176
 				
177 177
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
178
-						<label><?php _e( 'Article Title Class', 'lasso' );?></label>
179
-						<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>
180
-						<input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr( $titleClass );?>" placeholder=".entry-content">
178
+						<label><?php _e('Article Title Class', 'lasso'); ?></label>
179
+						<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>
180
+						<input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr($titleClass); ?>" placeholder=".entry-content">
181 181
 					</div>
182 182
 				
183 183
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
184
-						<label><?php _e( 'Ignored Items to Save', 'lasso' );?></label>
185
-						<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>
186
-						<textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNoSave );?></textarea>
184
+						<label><?php _e('Ignored Items to Save', 'lasso'); ?></label>
185
+						<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>
186
+						<textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNoSave); ?></textarea>
187 187
 					</div>
188 188
 				
189 189
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
190
-						<label><?php _e( 'Read Only Items', 'lasso' );?></label>
191
-						<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>
192
-						<textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNonEditable );?></textarea>
190
+						<label><?php _e('Read Only Items', 'lasso'); ?></label>
191
+						<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>
192
+						<textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNonEditable); ?></textarea>
193 193
 					</div>
194 194
 				
195 195
 					<div class="lasso-editor-settings--option-inner" >
196
-						<input type="checkbox" class="checkbox" name="lasso_editor[show_ignored_items]" id="lasso_editor[show_ignored_items]" <?php echo checked( $show_ignored_items, 'on' );?> >
197
-						<label for="lasso_editor[show_ignored_items]"> <?php _e( 'Show Ignored Items', 'lasso' );?></label>
198
-						<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>
196
+						<input type="checkbox" class="checkbox" name="lasso_editor[show_ignored_items]" id="lasso_editor[show_ignored_items]" <?php echo checked($show_ignored_items, 'on'); ?> >
197
+						<label for="lasso_editor[show_ignored_items]"> <?php _e('Show Ignored Items', 'lasso'); ?></label>
198
+						<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>
199 199
 					</div>
200 200
 				</div>
201 201
 
202
-				<h3><?php _e( 'Editor UI', 'lasso' );?></h3>
202
+				<h3><?php _e('Editor UI', 'lasso'); ?></h3>
203 203
 				<div class="lasso-editor-settings--option-wrap">
204 204
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
205
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked( $toolbar_headings, 'on' );?> >
206
-						<label for="lasso_editor[toolbar_headings]"><?php _e( 'Enable H2 and H3 Buttons', 'lasso' );?></label>
207
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set H2 and H3 settings.', 'lasso' );?></span>
205
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked($toolbar_headings, 'on'); ?> >
206
+						<label for="lasso_editor[toolbar_headings]"><?php _e('Enable H2 and H3 Buttons', 'lasso'); ?></label>
207
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set H2 and H3 settings.', 'lasso'); ?></span>
208 208
 
209 209
 					</div>
210 210
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
211
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings_h4]" id="lasso_editor[toolbar_headings_h4]" <?php echo checked( $toolbar_headings_h4, 'on' );?> >
212
-						<label for="lasso_editor[toolbar_headings_h4]"><?php _e( 'Enable H4/H5/H6 Buttons', 'lasso' );?></label>
213
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set H4/H5/H6 settings.', 'lasso' );?></span>
211
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings_h4]" id="lasso_editor[toolbar_headings_h4]" <?php echo checked($toolbar_headings_h4, 'on'); ?> >
212
+						<label for="lasso_editor[toolbar_headings_h4]"><?php _e('Enable H4/H5/H6 Buttons', 'lasso'); ?></label>
213
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set H4/H5/H6 settings.', 'lasso'); ?></span>
214 214
 
215 215
 					</div>
216 216
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
217
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked( $toolbar_show_color, 'on' );?> >
218
-						<label for="lasso_editor[toolbar_show_color]"><?php _e( 'Enable Text Color Buttons', 'lasso' );?></label>
219
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set text colors.', 'lasso' );?></span>
217
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked($toolbar_show_color, 'on'); ?> >
218
+						<label for="lasso_editor[toolbar_show_color]"><?php _e('Enable Text Color Buttons', 'lasso'); ?></label>
219
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set text colors.', 'lasso'); ?></span>
220 220
 
221 221
 					</div>
222 222
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
223
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked( $toolbar_show_alignment, 'on' );?> >
224
-						<label for="lasso_editor[toolbar_show_alignment]"><?php _e( 'Enable Text Align Buttons', 'lasso' );?></label>
225
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set text alignment.', 'lasso' );?></span>
223
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked($toolbar_show_alignment, 'on'); ?> >
224
+						<label for="lasso_editor[toolbar_show_alignment]"><?php _e('Enable Text Align Buttons', 'lasso'); ?></label>
225
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set text alignment.', 'lasso'); ?></span>
226 226
 
227 227
 					</div>
228 228
 					<div class="lasso-editor-settings--option-inner">
229
-					    <label for="lasso_editor[insert_comp_ui]"> <?php _e( 'Insert Component UI', 'lasso' );?></label>
230
-						<span class="lasso--setting-description"><?php _e( 'UI mechanism to insert components', 'lasso' );?></span>
231
-					    <input type="radio" name="lasso_editor[insert_comp_ui]" value='drag' <?php echo checked( $insert_comp_ui, 'drag' );?>> <?php _e( 'Drag and Drop', 'lasso' );?>
232
-						<input type="radio" name="lasso_editor[insert_comp_ui]" value="click" <?php echo checked( $insert_comp_ui, 'click' );?>> <?php _e( 'Click', 'lasso' );?>
233
-						<input type="radio" name="lasso_editor[insert_comp_ui]" value="mediumcom" <?php echo checked( $insert_comp_ui, 'mediumcom' );?>> <?php _e( 'Auto Button on Empty Paragraph', 'lasso' );?>
229
+					    <label for="lasso_editor[insert_comp_ui]"> <?php _e('Insert Component UI', 'lasso'); ?></label>
230
+						<span class="lasso--setting-description"><?php _e('UI mechanism to insert components', 'lasso'); ?></span>
231
+					    <input type="radio" name="lasso_editor[insert_comp_ui]" value='drag' <?php echo checked($insert_comp_ui, 'drag'); ?>> <?php _e('Drag and Drop', 'lasso'); ?>
232
+						<input type="radio" name="lasso_editor[insert_comp_ui]" value="click" <?php echo checked($insert_comp_ui, 'click'); ?>> <?php _e('Click', 'lasso'); ?>
233
+						<input type="radio" name="lasso_editor[insert_comp_ui]" value="mediumcom" <?php echo checked($insert_comp_ui, 'mediumcom'); ?>> <?php _e('Auto Button on Empty Paragraph', 'lasso'); ?>
234 234
 					</div>
235 235
 				</div>
236 236
 				
@@ -238,82 +238,82 @@  discard block
 block discarded – undo
238 238
 				
239 239
 				
240 240
 
241
-				<h3><?php _e( 'Post Settings UI', 'lasso' );?></h3>
241
+				<h3><?php _e('Post Settings UI', 'lasso'); ?></h3>
242 242
 				<div class="lasso-editor-settings--option-wrap"  >
243 243
 					<div class="lasso-editor-settings--option-inner" style="border:none">
244
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked( $post_settings_disabled, 'on' );?> >
245
-						<label for="lasso_editor[post_settings_disabled]"> <?php _e( 'Disable Post Settings', 'lasso' );?></label>
246
-						<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>
244
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked($post_settings_disabled, 'on'); ?> >
245
+						<label for="lasso_editor[post_settings_disabled]"> <?php _e('Disable Post Settings', 'lasso'); ?></label>
246
+						<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>
247 247
 					</div>
248 248
 					
249 249
 					<div class="lasso-editor-settings--option-inner" style="border:none">
250
-						<input type="checkbox" class="checkbox" name="lasso_editor[allow_change_date]" id="lasso_editor[allow_change_date]" <?php echo checked( $allow_change_date, 'on' );?> >
251
-						<label for="lasso_editor[allow_change_date]"> <?php _e( 'Allow Changing Post Date', 'lasso' );?></label>
252
-						<span class="lasso--setting-description"><?php _e( 'Add the date selector to change the post\'s date to the Post Setting dialog', 'lasso' );?></span>
250
+						<input type="checkbox" class="checkbox" name="lasso_editor[allow_change_date]" id="lasso_editor[allow_change_date]" <?php echo checked($allow_change_date, 'on'); ?> >
251
+						<label for="lasso_editor[allow_change_date]"> <?php _e('Allow Changing Post Date', 'lasso'); ?></label>
252
+						<span class="lasso--setting-description"><?php _e('Add the date selector to change the post\'s date to the Post Setting dialog', 'lasso'); ?></span>
253 253
 					</div>
254 254
 					
255 255
 					<div class="lasso-editor-settings--option-inner" style="border:none">
256
-						<input type="checkbox" class="checkbox" name="lasso_editor[allow_new_category]" id="lasso_editor[allow_new_category]" <?php echo checked( $allow_new_category, 'on' );?> >
257
-						<label for="lasso_editor[allow_new_category]"> <?php _e( 'Allow Adding New Category', 'lasso' );?></label>
258
-						<span class="lasso--setting-description"><?php _e( 'Add the user to create new, previously non-existing categories for posts.', 'lasso' );?></span>
256
+						<input type="checkbox" class="checkbox" name="lasso_editor[allow_new_category]" id="lasso_editor[allow_new_category]" <?php echo checked($allow_new_category, 'on'); ?> >
257
+						<label for="lasso_editor[allow_new_category]"> <?php _e('Allow Adding New Category', 'lasso'); ?></label>
258
+						<span class="lasso--setting-description"><?php _e('Add the user to create new, previously non-existing categories for posts.', 'lasso'); ?></span>
259 259
 					</div>
260 260
 				
261 261
 					<div class="lasso-editor-settings--option-inner" >
262
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked( $post_new_disabled, 'on' );?> >
263
-						<label for="lasso_editor[post_adding_disabled]"><?php _e( 'Disable Post Adding', 'lasso' );?></label>
264
-						<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>
262
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked($post_new_disabled, 'on'); ?> >
263
+						<label for="lasso_editor[post_adding_disabled]"><?php _e('Disable Post Adding', 'lasso'); ?></label>
264
+						<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>
265 265
 					</div>
266 266
 					
267 267
 
268 268
 				</div>
269 269
 				
270
-				<h3><?php _e( 'Misc', 'lasso' );?></h3>
270
+				<h3><?php _e('Misc', 'lasso'); ?></h3>
271 271
 				<div class="lasso-editor-settings--option-wrap">
272 272
 					<div class="lasso-editor-settings--option-inner" style="border:none">
273
-						<input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked( $disable_tour, 'on' );?> >
274
-						<label for="lasso_editor[disable_tour]"> <?php _e( 'Do Not Show Tour Dialog', 'lasso' );?></label>
275
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable the tour dialog box for all users.', 'lasso' );?></span>
273
+						<input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked($disable_tour, 'on'); ?> >
274
+						<label for="lasso_editor[disable_tour]"> <?php _e('Do Not Show Tour Dialog', 'lasso'); ?></label>
275
+						<span class="lasso--setting-description"><?php _e('Check this box to disable the tour dialog box for all users.', 'lasso'); ?></span>
276 276
 					</div>
277 277
 
278 278
 					<div class="lasso-editor-settings--option-inner" style="border:none">
279
-					    <label for="lasso_editor[bold_tag]"> <?php _e( '"Bold" Tag', 'lasso' );?></label>
280
-						<span class="lasso--setting-description"><?php _e( 'Choose the HTML tag used for the "Bold" style.', 'lasso' );?></span>
281
-					    <input type="radio" name="lasso_editor[bold_tag]" value='b' <?php echo checked( $bold_tag, 'b' );?>> b
282
-						<input type="radio" name="lasso_editor[bold_tag]" value="strong" <?php echo checked( $bold_tag, 'strong' );?>> strong
279
+					    <label for="lasso_editor[bold_tag]"> <?php _e('"Bold" Tag', 'lasso'); ?></label>
280
+						<span class="lasso--setting-description"><?php _e('Choose the HTML tag used for the "Bold" style.', 'lasso'); ?></span>
281
+					    <input type="radio" name="lasso_editor[bold_tag]" value='b' <?php echo checked($bold_tag, 'b'); ?>> b
282
+						<input type="radio" name="lasso_editor[bold_tag]" value="strong" <?php echo checked($bold_tag, 'strong'); ?>> strong
283 283
 					</div>
284 284
 					<div class="lasso-editor-settings--option-inner" >
285
-					    <label for="lasso_editor[i_tag]"> <?php _e( '"Italic" Tag', 'lasso' );?></label>
286
-						<span class="lasso--setting-description"><?php _e( 'Choose the HTML tag used for the "Italic" style.', 'lasso' );?></span>
287
-					    <input type="radio" name="lasso_editor[i_tag]" value='i' <?php echo checked( $i_tag, 'i' );?>> i
288
-						<input type="radio" name="lasso_editor[i_tag]" value="em" <?php echo checked( $i_tag, 'em' );?>> em
285
+					    <label for="lasso_editor[i_tag]"> <?php _e('"Italic" Tag', 'lasso'); ?></label>
286
+						<span class="lasso--setting-description"><?php _e('Choose the HTML tag used for the "Italic" style.', 'lasso'); ?></span>
287
+					    <input type="radio" name="lasso_editor[i_tag]" value='i' <?php echo checked($i_tag, 'i'); ?>> i
288
+						<input type="radio" name="lasso_editor[i_tag]" value="em" <?php echo checked($i_tag, 'em'); ?>> em
289 289
 					</div>
290 290
 				</div>
291 291
 
292
-				<h3><?php _e( 'Advanced', 'lasso' );?></h3>
292
+				<h3><?php _e('Advanced', 'lasso'); ?></h3>
293 293
 				<div class="lasso-editor-settings--option-wrap ">
294 294
 					<div class="lasso-editor-settings--option-inner" style="border:none">
295
-						<input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked( $shortcodify_disabled, 'on' );?> >
296
-						<label for="lasso_editor[shortcodify_disabled]"><?php _e( 'Disable Aesop Component Conversion', 'lasso' );?></label>
297
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso' );?></span>
295
+						<input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked($shortcodify_disabled, 'on'); ?> >
296
+						<label for="lasso_editor[shortcodify_disabled]"><?php _e('Disable Aesop Component Conversion', 'lasso'); ?></label>
297
+						<span class="lasso--setting-description"><?php _e('Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso'); ?></span>
298 298
 					</div>
299 299
 				
300 300
 					<div class="lasso-editor-settings--option-inner" style="border:none">
301
-						<input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked( $enable_autosave, 'on' );?> >
302
-						<label for="lasso_editor[enable_autosave]"><?php _e( 'Enable Auto Save', 'lasso' );?></label>
303
-						<span class="lasso--setting-description"><?php _e( 'Check this box to enable auto save.', 'lasso' );?></span>
301
+						<input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked($enable_autosave, 'on'); ?> >
302
+						<label for="lasso_editor[enable_autosave]"><?php _e('Enable Auto Save', 'lasso'); ?></label>
303
+						<span class="lasso--setting-description"><?php _e('Check this box to enable auto save.', 'lasso'); ?></span>
304 304
 					</div>
305 305
 				
306 306
 					<div class="lasso-editor-settings--option-inner" style="border:none">
307
-						<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' );?> >
308
-						<label for="lasso_editor[post_save_disabled]"><?php _e( 'Disable Post Saving', 'lasso' );?></label>
309
-						<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>
307
+						<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'); ?> >
308
+						<label for="lasso_editor[post_save_disabled]"><?php _e('Disable Post Saving', 'lasso'); ?></label>
309
+						<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>
310 310
 
311 311
 					</div>
312 312
 				
313 313
 					<div class="lasso-editor-settings--option-inner">
314
-						<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' );?> >
315
-						<label for="lasso_editor[save_using_rest_disabled]"><?php _e( "Don't Use REST API to Save", 'lasso' );?></label>
316
-						<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>
314
+						<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'); ?> >
315
+						<label for="lasso_editor[save_using_rest_disabled]"><?php _e("Don't Use REST API to Save", 'lasso'); ?></label>
316
+						<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>
317 317
 
318 318
 					</div>
319 319
 				</div>
@@ -323,11 +323,11 @@  discard block
 block discarded – undo
323 323
 
324 324
 				<div class="lasso-editor-settings--submit">
325 325
 				    <input type="hidden" name="action" value="lasso-editor-settings" />
326
-				    <input type="submit" class="button-primary" value="<?php esc_attr_e( 'Save Settings', 'lasso' );?>" />
327
-					<?php wp_nonce_field( 'nonce', 'lasso_editor_settings' ); ?>
326
+				    <input type="submit" class="button-primary" value="<?php esc_attr_e('Save Settings', 'lasso'); ?>" />
327
+					<?php wp_nonce_field('nonce', 'lasso_editor_settings'); ?>
328 328
 				</div>
329 329
 				
330
-				<?php do_action('lasso_settings_after');?>
330
+				<?php do_action('lasso_settings_after'); ?>
331 331
 			</form>
332 332
 
333 333
 		</div><?php
Please login to merge, or discard this patch.