Completed
Push — master ( 324b21...97e5ed )
by
unknown
01:55
created
public/includes/assets.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 			$postid 			= get_the_ID();
69 69
 			
70 70
 			$post_date = get_the_time('U', $postid);
71
-            $delta = time() - $post_date;
71
+			$delta = time() - $post_date;
72 72
 
73 73
 			$strings = array(
74 74
 				'save' 				=> __('Save','lasso'),
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 			
194 194
 			
195 195
 			if (!$using_restapiv2) {
196
-               // enqueue REST API V1
196
+			   // enqueue REST API V1
197 197
 			   wp_enqueue_script( 'wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
198 198
 			   $settings = array( 'root' => home_url( $home_url ), 'nonce' => wp_create_nonce( 'wp_json' ) );
199 199
 			   wp_localize_script( 'wp-api-js', 'WP_API_Settings', $settings );
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 			if ($show_color) {
204 204
 				wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'iris'), LASSO_VERSION, true);
205 205
 			} else {
206
-			    wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery'), LASSO_VERSION, true);
206
+				wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery'), LASSO_VERSION, true);
207 207
 			}
208 208
 			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects ) );
209 209
 
Please login to merge, or discard this patch.
Spacing   +77 added lines, -77 removed lines patch added patch discarded remove patch
@@ -10,15 +10,15 @@  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
 
@@ -33,25 +33,25 @@  discard block
 block discarded – undo
33 33
 			// url for json api
34 34
 			$home_url = function_exists('json_get_url_prefix') ? json_get_url_prefix() : false;
35 35
 
36
-			$article_object 	= lasso_editor_get_option('article_class','lasso_editor');
36
+			$article_object 	= lasso_editor_get_option('article_class', 'lasso_editor');
37 37
 
38
-			$article_object 	= empty( $article_object ) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object;
38
+			$article_object 	= empty($article_object) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object;
39 39
 
40
-			$featImgClass 		= lasso_editor_get_option('featimg_class','lasso_editor');
41
-			if (empty( $featImgClass )) {
40
+			$featImgClass = lasso_editor_get_option('featimg_class', 'lasso_editor');
41
+			if (empty($featImgClass)) {
42 42
 				$featImgClass = lasso_get_supported_theme_featured_image_class();
43 43
 			}
44
-			$titleClass 		= lasso_editor_get_option('title_class','lasso_editor');
45
-			if (empty( $titleClass )) {
44
+			$titleClass = lasso_editor_get_option('title_class', 'lasso_editor');
45
+			if (empty($titleClass)) {
46 46
 				$titleClass = lasso_get_supported_theme_title_class();
47 47
 			}
48
-			$toolbar_headings  	= lasso_editor_get_option('toolbar_headings', 'lasso_editor');
49
-			$toolbar_headings_h4  	= lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
48
+			$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
49
+			$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
50 50
 			$objectsNoSave  	= lasso_editor_get_option('dont_save', 'lasso_editor');
51
-			$objectsNonEditable  	= lasso_editor_get_option('non_editable', 'lasso_editor');
51
+			$objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor');
52 52
 			$disableRESTSave = lasso_editor_get_option('save_using_rest_disabled', 'lasso_editor');
53 53
 			
54
-			$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor','b');
54
+			$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor', 'b');
55 55
 
56 56
 			
57 57
 			//text alignement
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
 			
63 63
 			if ($show_color) {
64 64
 				//color picker
65
-				wp_enqueue_style( 'wp-color-picker' );
66
-				wp_enqueue_script( 'iris', admin_url( 'js/iris.min.js' ), array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), false, 1 );
65
+				wp_enqueue_style('wp-color-picker');
66
+				wp_enqueue_script('iris', admin_url('js/iris.min.js'), array('jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch'), false, 1);
67 67
 			}
68 68
 
69 69
 
@@ -75,59 +75,59 @@  discard block
 block discarded – undo
75 75
             $delta = time() - $post_date;
76 76
 
77 77
 			$strings = array(
78
-				'save' 				=> __('Save','lasso'),
79
-				'saving' 			=> __('Saving...','lasso'),
80
-				'saved'				=> __('Saved!','lasso'),
81
-				'adding' 			=> __('Adding...','lasso'),
82
-				'added'				=> __('Added!','lasso'),
83
-				'loading' 			=> __('Loading...','lasso'),
84
-				'loadMore'			=> __('Load More','lasso'),
85
-				'noPostsFound'		=> __('No more posts found','lasso'),
86
-				'fetchFail'	    	=> __('Fetching failed.','lasso'),
87
-				'galleryCreated' 	=> __('Gallery Created!','lasso'),
88
-				'galleryUpdated' 	=> __('Gallery Updated!','lasso'),
89
-				'justWrite'			=> __('Just write...','lasso'),
90
-				'chooseImage'		=> __('Choose an image','lasso'),
91
-				'updateImage'		=> __('Update Image','lasso'),
92
-				'insertImage'		=> __('Insert Image','lasso'),
93
-				'selectImage'		=> __('Select Image','lasso'),
94
-				'removeFeatImg'     => __('Remove featured image?','lasso'),
95
-				'updateSelectedImg' => __('Update Selected Image','lasso'),
96
-				'chooseImages'		=> __('Choose images','lasso'),
97
-				'editImage'			=> __('Edit Image','lasso'),
98
-				'addImages'			=> __('Add Images','lasso'),
99
-				'addNewGallery'		=> __('Add New Gallery','lasso'),
100
-				'selectGallery'		=> __('Select Lasso Gallery Image','lasso'),
101
-				'useSelectedImages' => __('Use Selected Images','lasso'),
102
-				'publishPost'		=> __('Publish Post?','lasso'),
103
-				'publishYes'		=> __('Yes, publish it!','lasso'),
104
-				'deletePost'		=> __('Trash Post?','lasso'),
105
-				'deleteYes'			=> __('Yes, trash it!','lasso'),
106
-				'warning'			=> __('Oh snap!','laso'),
107
-				'cancelText'		=> __('O.K. got it!','lasso'),
108
-				'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'),
78
+				'save' 				=> __('Save', 'lasso'),
79
+				'saving' 			=> __('Saving...', 'lasso'),
80
+				'saved'				=> __('Saved!', 'lasso'),
81
+				'adding' 			=> __('Adding...', 'lasso'),
82
+				'added'				=> __('Added!', 'lasso'),
83
+				'loading' 			=> __('Loading...', 'lasso'),
84
+				'loadMore'			=> __('Load More', 'lasso'),
85
+				'noPostsFound'		=> __('No more posts found', 'lasso'),
86
+				'fetchFail'	    	=> __('Fetching failed.', 'lasso'),
87
+				'galleryCreated' 	=> __('Gallery Created!', 'lasso'),
88
+				'galleryUpdated' 	=> __('Gallery Updated!', 'lasso'),
89
+				'justWrite'			=> __('Just write...', 'lasso'),
90
+				'chooseImage'		=> __('Choose an image', 'lasso'),
91
+				'updateImage'		=> __('Update Image', 'lasso'),
92
+				'insertImage'		=> __('Insert Image', 'lasso'),
93
+				'selectImage'		=> __('Select Image', 'lasso'),
94
+				'removeFeatImg'     => __('Remove featured image?', 'lasso'),
95
+				'updateSelectedImg' => __('Update Selected Image', 'lasso'),
96
+				'chooseImages'		=> __('Choose images', 'lasso'),
97
+				'editImage'			=> __('Edit Image', 'lasso'),
98
+				'addImages'			=> __('Add Images', 'lasso'),
99
+				'addNewGallery'		=> __('Add New Gallery', 'lasso'),
100
+				'selectGallery'		=> __('Select Lasso Gallery Image', 'lasso'),
101
+				'useSelectedImages' => __('Use Selected Images', 'lasso'),
102
+				'publishPost'		=> __('Publish Post?', 'lasso'),
103
+				'publishYes'		=> __('Yes, publish it!', 'lasso'),
104
+				'deletePost'		=> __('Trash Post?', 'lasso'),
105
+				'deleteYes'			=> __('Yes, trash it!', 'lasso'),
106
+				'warning'			=> __('Oh snap!', 'laso'),
107
+				'cancelText'		=> __('O.K. got it!', 'lasso'),
108
+				'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'),
109 109
 				'missingConfirm'	=> __('Update Settings', 'lasso'),
110
-				'helperText'		=> __('one more letter','lasso'),
110
+				'helperText'		=> __('one more letter', 'lasso'),
111 111
 				'editingBackup'  	=> __('You are currently editing a backup copy of this post.'),
112 112
 			);
113 113
 
114
-			$api_url = trailingslashit( home_url() ) . 'lasso-internal-api';
114
+			$api_url = trailingslashit(home_url()).'lasso-internal-api';
115 115
 
116 116
 			$gallery_class = new gallery();
117 117
 			$gallery_nonce_action = $gallery_class->nonce_action;
118
-			$gallery_nonce = wp_create_nonce( $gallery_nonce_action );
118
+			$gallery_nonce = wp_create_nonce($gallery_nonce_action);
119 119
 			$rest_nonce = '';
120
-			$rest_root =''; 
120
+			$rest_root = ''; 
121 121
 			if (function_exists('rest_url')) {
122
-				$rest_root = esc_url_raw( rest_url());
123
-				$rest_nonce = wp_create_nonce( 'wp_rest' );
124
-				$settings = array( 'root' => $rest_root, 'nonce' => $rest_nonce );
122
+				$rest_root = esc_url_raw(rest_url());
123
+				$rest_nonce = wp_create_nonce('wp_rest');
124
+				$settings = array('root' => $rest_root, 'nonce' => $rest_nonce);
125 125
 				//wp_enqueue_script( 'wp-api' );
126
-				wp_enqueue_script( 'wp-api', '', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
127
-				wp_localize_script( 'wp-api', 'wpApiSettings', $settings );
128
-				wp_localize_script( 'wp-api', 'WP_API_Settings', $settings );
126
+				wp_enqueue_script('wp-api', '', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true);
127
+				wp_localize_script('wp-api', 'wpApiSettings', $settings);
128
+				wp_localize_script('wp-api', 'WP_API_Settings', $settings);
129 129
 				
130
-				if ( class_exists( 'WP_REST_Controller' )) {
130
+				if (class_exists('WP_REST_Controller')) {
131 131
 					// we are using REST API V2
132 132
 					$using_restapiv2 = true;
133 133
 				}
@@ -135,8 +135,8 @@  discard block
 block discarded – undo
135 135
 
136 136
 			// localized objects
137 137
 			$objects = array(
138
-				'ajaxurl' 			=> esc_url( $api_url ),
139
-				'ajaxurl2' 			=> esc_url( admin_url( 'admin-ajax.php' )),
138
+				'ajaxurl' 			=> esc_url($api_url),
139
+				'ajaxurl2' 			=> esc_url(admin_url('admin-ajax.php')),
140 140
 				'rest_root'         => $rest_root,
141 141
 				'rest_nonce'        => $rest_nonce,
142 142
 				'editor' 			=> 'lasso--content', // ID of editable content (without #) DONT CHANGE
@@ -144,13 +144,13 @@  discard block
 block discarded – undo
144 144
 				'featImgClass'		=> $featImgClass,
145 145
 				'titleClass'		=> $titleClass,
146 146
 				'strings'			=> $strings,
147
-				'settingsLink'		=> function_exists('is_multisite') && is_multisite() ? network_admin_url( 'settings.php?page=lasso-editor' ) : admin_url( 'admin.php?page=lasso-editor-settings' ),
148
-				'post_status'		=> get_post_status( $postid ),
147
+				'settingsLink'		=> function_exists('is_multisite') && is_multisite() ? network_admin_url('settings.php?page=lasso-editor') : admin_url('admin.php?page=lasso-editor-settings'),
148
+				'post_status'		=> get_post_status($postid),
149 149
 				'postid'			=> $postid,
150 150
 				'permalink'			=> get_permalink(),
151 151
 				'edit_others_pages'	=> current_user_can('edit_others_pages') ? true : false,
152 152
 				'edit_others_posts'	=> current_user_can('edit_others_posts') ? true : false,
153
-				'userCanEdit'		=> current_user_can('edit_post', $postid ),
153
+				'userCanEdit'		=> current_user_can('edit_post', $postid),
154 154
 				'can_publish_posts'	=> current_user_can('publish_posts'),
155 155
 				'can_publish_pages'	=> current_user_can('publish_pages'),
156 156
 				'author'			=> is_user_logged_in() ? get_current_user_ID() : false,
@@ -185,21 +185,21 @@  discard block
 block discarded – undo
185 185
 				'postTags'    		=> lasso_get_objects('tag'),
186 186
 				'noResultsDiv'		=> lasso_editor_empty_results(),
187 187
 				'noRevisionsDiv'	=> lasso_editor_empty_results('revision'),
188
-				'mapTileProvider'   => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider( $postid ) : false,
189
-				'mapLocations'		=> get_post_meta( $postid, 'ase_map_component_locations' ),
190
-				'mapStart'			=> get_post_meta( $postid, 'ase_map_component_start_point', true ),
191
-				'mapZoom'			=> get_post_meta( $postid, 'ase_map_component_zoom', true ),
188
+				'mapTileProvider'   => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider($postid) : false,
189
+				'mapLocations'		=> get_post_meta($postid, 'ase_map_component_locations'),
190
+				'mapStart'			=> get_post_meta($postid, 'ase_map_component_start_point', true),
191
+				'mapZoom'			=> get_post_meta($postid, 'ase_map_component_zoom', true),
192 192
 				'revisionModal' 	=> lasso_editor_revision_modal(),
193 193
 				'isMobile'          => wp_is_mobile(),
194
-				'enableAutoSave'    => lasso_editor_get_option( 'enable_autosave', 'lasso_editor' ),
194
+				'enableAutoSave'    => lasso_editor_get_option('enable_autosave', 'lasso_editor'),
195 195
 				'showColor'         => $show_color,
196 196
 				'showAlignment'     => $show_align,
197 197
 				'showIgnoredItems'  => lasso_editor_get_option('show_ignored_items', 'lasso_editor'),
198 198
 				'restapi2'          => $using_restapiv2,
199 199
 				'saveusingrest'     => $using_restapiv2 && !$disableRESTSave,
200
-				'newObjectContent'  => apply_filters( 'lasso_new_object_content', __( 'Once upon a time...','lasso') ),
200
+				'newObjectContent'  => apply_filters('lasso_new_object_content', __('Once upon a time...', 'lasso')),
201 201
 				'boldTag'           => $bold_tag,
202
-				'skipToEdit'        =>( $delta < 30 ) // if it's a new post, skip to edit mode
202
+				'skipToEdit'        =>($delta < 30) // if it's a new post, skip to edit mode
203 203
 			);
204 204
 
205 205
 
@@ -208,18 +208,18 @@  discard block
 block discarded – undo
208 208
 			
209 209
 			if (!$using_restapiv2) {
210 210
                // enqueue REST API V1
211
-			   wp_enqueue_script( 'wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
212
-			   $settings = array( 'root' => home_url( $home_url ), 'nonce' => wp_create_nonce( 'wp_json' ) );
213
-			   wp_localize_script( 'wp-api-js', 'WP_API_Settings', $settings );
211
+			   wp_enqueue_script('wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true);
212
+			   $settings = array('root' => home_url($home_url), 'nonce' => wp_create_nonce('wp_json'));
213
+			   wp_localize_script('wp-api-js', 'WP_API_Settings', $settings);
214 214
 			}
215 215
 
216
-			$postfix = ( defined( 'SCRIPT_DEBUG' ) && true === SCRIPT_DEBUG ) ? '' : '.min';
216
+			$postfix = (defined('SCRIPT_DEBUG') && true === SCRIPT_DEBUG) ? '' : '.min';
217 217
 			if ($show_color) {
218
-				wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'iris'), LASSO_VERSION, true);
218
+				wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery', 'iris'), LASSO_VERSION, true);
219 219
 			} else {
220
-			    wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery'), LASSO_VERSION, true);
220
+			    wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery'), LASSO_VERSION, true);
221 221
 			}
222
-			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects ) );
222
+			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects));
223 223
 
224 224
 
225 225
 		}
Please login to merge, or discard this patch.
includes/process/save.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -163,6 +163,9 @@
 block discarded – undo
163 163
 		return $content;
164 164
 	}
165 165
 	
166
+	/**
167
+	 * @param string $content
168
+	 */
166 169
 	protected function remove_comments($content) {
167 170
 		return preg_replace('/<!--(.*)-->/Uis', '', $content);
168 171
 	}
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@
 block discarded – undo
146 146
 	 */
147 147
 	protected function replace_rendered_shortcodes( $content ) {
148 148
 		//debug line
149
-        //file_put_contents(WP_PLUGIN_DIR."/file1.txt", $content);
149
+		//file_put_contents(WP_PLUGIN_DIR."/file1.txt", $content);
150 150
 		
151 151
 
152 152
 		if ( false === strpos( $content, '--EDITUS_OTHER_SHORTCODE_START|' ) ) {
Please login to merge, or discard this 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/editor-modules.php 3 patches
Braces   +32 added lines, -20 removed lines patch added patch discarded remove patch
@@ -107,8 +107,9 @@  discard block
 block discarded – undo
107 107
 
108 108
 	ob_start();
109 109
 
110
-	if ( !lasso_user_can() )
111
-		return;
110
+	if ( !lasso_user_can() ) {
111
+			return;
112
+	}
112 113
 
113 114
 	// let users add custom css classes
114 115
 	$custom_classes = apply_filters( 'lasso_sidebar_classes', '' );
@@ -131,8 +132,9 @@  discard block
 block discarded – undo
131 132
 
132 133
 	ob_start();
133 134
 
134
-	if ( !lasso_user_can() )
135
-		return;
135
+	if ( !lasso_user_can() ) {
136
+			return;
137
+	}
136 138
 	
137 139
 	$is_mobile = wp_is_mobile();
138 140
 
@@ -199,8 +201,11 @@  discard block
 block discarded – undo
199 201
 						<?php if ( class_exists ('Aesop_GalleryPop') ) { ?>
200 202
 						     <li data-type="gallery" title="<?php esc_attr_e( 'Gallery Pop', 'lasso' );?>"  class="lasso-toolbar--component__gallerypop"></li>
201 203
 						<?php }?>
202
-					<?php else: ?>
203
-						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );?>" class="image lasso-toolbar--component__image"></li>
204
+					<?php else {
205
+	: ?>
206
+						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );
207
+}
208
+?>" class="image lasso-toolbar--component__image"></li>
204 209
 						<li data-type="wpquote" title="<?php esc_attr_e( 'WordPress Quote', 'lasso' );?>" class="quote lasso-toolbar--component__quote"></li>
205 210
 						<!--li data-type="wpvideo" title="<?php esc_attr_e( 'WordPress Video', 'lasso' );?>" class="video lasso-toolbar--component__video"></li-->
206 211
 					<?php endif; ?>
@@ -255,8 +260,9 @@  discard block
 block discarded – undo
255 260
 
256 261
 	ob_start();
257 262
 
258
-	if ( !lasso_user_can() )
259
-		return;
263
+	if ( !lasso_user_can() ) {
264
+			return;
265
+	}
260 266
 
261 267
 	// let users add custom css classes
262 268
 	$custom_classes = apply_filters( 'lasso_component_classes', '' );
@@ -282,8 +288,9 @@  discard block
 block discarded – undo
282 288
 
283 289
 	ob_start();
284 290
 
285
-	if ( !lasso_user_can() )
286
-		return;
291
+	if ( !lasso_user_can() ) {
292
+			return;
293
+	}
287 294
 
288 295
 	// has post thumbnail
289 296
 	$has_thumbnail = has_post_thumbnail( get_the_ID() ) ? 'class="lasso--featImg--has-thumb"' : false;
@@ -311,8 +318,9 @@  discard block
 block discarded – undo
311 318
 
312 319
 	ob_start();
313 320
 
314
-	if ( !lasso_user_can() )
315
-		return;
321
+	if ( !lasso_user_can() ) {
322
+			return;
323
+	}
316 324
 
317 325
 	global $post;
318 326
 
@@ -442,8 +450,9 @@  discard block
 block discarded – undo
442 450
 
443 451
 	ob_start();
444 452
 
445
-	if ( !lasso_user_can('edit_posts') )
446
-		return;
453
+	if ( !lasso_user_can('edit_posts') ) {
454
+			return;
455
+	}
447 456
 
448 457
 	$status = get_post_status( get_the_ID() );
449 458
 
@@ -572,8 +581,9 @@  discard block
 block discarded – undo
572 581
 
573 582
 	ob_start();
574 583
 
575
-	if ( !lasso_user_can() )
576
-		return;
584
+	if ( !lasso_user_can() ) {
585
+			return;
586
+	}
577 587
 
578 588
 	// let users add custom css classes
579 589
 	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
@@ -593,8 +603,9 @@  discard block
 block discarded – undo
593 603
 
594 604
 	ob_start();
595 605
 
596
-	if ( !lasso_user_can() )
597
-		return;
606
+	if ( !lasso_user_can() ) {
607
+			return;
608
+	}
598 609
 
599 610
 	// let users add custom css classes
600 611
 	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
@@ -665,8 +676,9 @@  discard block
 block discarded – undo
665 676
 
666 677
 	$blob = array();
667 678
 
668
-	if ( empty( $codes ) )
669
-		return;
679
+	if ( empty( $codes ) ) {
680
+			return;
681
+	}
670 682
 
671 683
 	foreach ( $codes as $slug => $shortcode ) {
672 684
 		$return = '';
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 	$toolbar_class  = $toolbar_headings ? 'toolbar-extended' : false;
151 151
 	
152 152
 	// mobile styles
153
-    $mobile_class = $is_mobile ? 'lasso-mobile' : false;
153
+	$mobile_class = $is_mobile ? 'lasso-mobile' : false;
154 154
 	$mobile_style =$is_mobile ? 'style="bottom:0px;"' : null;
155 155
 	
156 156
 	//show color
@@ -529,8 +529,8 @@  discard block
 block discarded – undo
529 529
 	global $post;
530 530
 	
531 531
 	global $wp_post_types;
532
-    $labels = &$wp_post_types['post']->labels;
533
-    $labels->name = 'Articles';
532
+	$labels = &$wp_post_types['post']->labels;
533
+	$labels->name = 'Articles';
534 534
 
535 535
 	ob_start();
536 536
 
Please login to merge, or discard this patch.
Spacing   +221 added lines, -221 removed lines patch added patch discarded remove patch
@@ -12,32 +12,32 @@  discard block
 block discarded – undo
12 12
  *
13 13
  * @since 1.0
14 14
  */
15
-add_action( 'wp_footer', 'lasso_editor_controls' );
15
+add_action('wp_footer', 'lasso_editor_controls');
16 16
 function lasso_editor_controls() {
17 17
 
18 18
 	global $post;
19 19
 
20
-	if ( lasso_user_can('edit_posts') ) {
20
+	if (lasso_user_can('edit_posts')) {
21 21
 
22
-		$status = get_post_status( get_the_ID() );
22
+		$status = get_post_status(get_the_ID());
23 23
 
24 24
 		// let users add custom css classes
25
-		$custom_classes = apply_filters( 'lasso_control_classes', '' );
25
+		$custom_classes = apply_filters('lasso_control_classes', '');
26 26
 
27 27
 		$post_access_class   = '';
28
-		$post_new_disabled   = lasso_editor_get_option( 'post_adding_disabled', 'lasso_editor' );
29
-		$post_settings_disabled = lasso_editor_get_option( 'post_settings_disabled', 'lasso_editor' );
30
-		$shortcodify_disabled = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
28
+		$post_new_disabled   = lasso_editor_get_option('post_adding_disabled', 'lasso_editor');
29
+		$post_settings_disabled = lasso_editor_get_option('post_settings_disabled', 'lasso_editor');
30
+		$shortcodify_disabled = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor');
31 31
 
32 32
 
33 33
 		// CSS class if adding new post objects is disabled
34
-		if ( 'on' == $post_new_disabled ) { $post_access_class = 'lasso--post-new-disabled'; }
34
+		if ('on' == $post_new_disabled) { $post_access_class = 'lasso--post-new-disabled'; }
35 35
 
36 36
 		// CSS class if adjust settings is disabled
37
-		if ( 'on' == $post_settings_disabled ) { $post_access_class = 'lasso--post-settings-disabled'; }
37
+		if ('on' == $post_settings_disabled) { $post_access_class = 'lasso--post-settings-disabled'; }
38 38
 
39 39
 		// CSS class if adding new post objects AND settings are disabled
40
-		if ( 'on' == $post_new_disabled && 'on' == $post_settings_disabled ) { $post_access_class = 'lasso--post-all-disabled'; }
40
+		if ('on' == $post_new_disabled && 'on' == $post_settings_disabled) { $post_access_class = 'lasso--post-all-disabled'; }
41 41
 
42 42
 		// CSS class if shortcodify or (Aesop Shortcode Conversion) is disabled
43 43
 		$sc_saving_class = 'on' == $shortcodify_disabled ? 'shortcodify-disabled' : 'shortcodify-enabled';
@@ -49,44 +49,44 @@  discard block
 block discarded – undo
49 49
 		$mobile_style = $is_mobile ? 'style="bottom:0px;"' : null;
50 50
 		
51 51
 
52
-		?><div id="lasso--controls" class="lasso-post-status--<?php echo sanitize_html_class( $status );?> <?php echo sanitize_html_class( $custom_classes );?>" data-post-id="<?php echo get_the_ID();?>" >
52
+		?><div id="lasso--controls" class="lasso-post-status--<?php echo sanitize_html_class($status); ?> <?php echo sanitize_html_class($custom_classes); ?>" data-post-id="<?php echo get_the_ID(); ?>" >
53 53
 
54
-			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class;?> "  <?php echo $mobile_style ?> >
54
+			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class; ?> "  <?php echo $mobile_style ?> >
55 55
 
56
-				<?php do_action( 'lasso_editor_controls_before' );
56
+				<?php do_action('lasso_editor_controls_before');
57 57
 
58
-				if ( $is_capable ) { ?>
58
+				if ($is_capable) { ?>
59 59
 
60
-					<li id="lasso--edit" title="<?php esc_attr_e( 'Edit Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
60
+					<li id="lasso--edit" title="<?php esc_attr_e('Edit Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
61 61
 
62
-					<?php if ( 'off' == $post_settings_disabled || empty( $post_settings_disabled ) ) { ?>
63
-						<li id="lasso--post-settings" title="<?php esc_attr_e( 'Post Settings', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
62
+					<?php if ('off' == $post_settings_disabled || empty($post_settings_disabled)) { ?>
63
+						<li id="lasso--post-settings" title="<?php esc_attr_e('Post Settings', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
64 64
 					<?php }
65 65
 
66 66
 				} ?>
67 67
 
68
-				<li id="lasso--post-all" title="<?php esc_attr_e( 'All Posts', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
68
+				<li id="lasso--post-all" title="<?php esc_attr_e('All Posts', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
69 69
 
70
-				<?php if ( $is_capable && wp_revisions_enabled( $post ) ) { ?>
71
-					<li id="lasso--post-revisions" title="<?php esc_attr_e( 'Revisions', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
70
+				<?php if ($is_capable && wp_revisions_enabled($post)) { ?>
71
+					<li id="lasso--post-revisions" title="<?php esc_attr_e('Revisions', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
72 72
 				<?php } ?>
73 73
 
74
-				<?php if ( ( 'off' == $post_new_disabled || empty( $post_new_disabled ) && lasso_user_can('publish_posts') ) ) { ?>
75
-					<li id="lasso--post-new" title="<?php esc_attr_e( 'Add Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
74
+				<?php if (('off' == $post_new_disabled || empty($post_new_disabled) && lasso_user_can('publish_posts'))) { ?>
75
+					<li id="lasso--post-new" title="<?php esc_attr_e('Add Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
76 76
 				<?php } ?>
77 77
 
78
-				<?php do_action( 'lasso_editor_controls_after' );?>
78
+				<?php do_action('lasso_editor_controls_after'); ?>
79 79
 
80 80
 			</ul>
81 81
 
82
-			<?php if ( is_singular() && !$is_mobile ) { ?>
82
+			<?php if (is_singular() && !$is_mobile) { ?>
83 83
 
84
-				<div class="lasso--controls__right" data-posttype="<?php echo get_post_type( get_the_ID() );?>" data-status="<?php echo $status;?>">
84
+				<div class="lasso--controls__right" data-posttype="<?php echo get_post_type(get_the_ID()); ?>" data-status="<?php echo $status; ?>">
85 85
 
86
-					<a href="#" title="<?php esc_attr_e( 'Save Post', 'lasso' );?>" id="lasso--save" class="lasso-save-post lasso--button <?php echo $sc_saving_class;?>"></a>
86
+					<a href="#" title="<?php esc_attr_e('Save Post', 'lasso'); ?>" id="lasso--save" class="lasso-save-post lasso--button <?php echo $sc_saving_class; ?>"></a>
87 87
 
88
-					<?php if ( 'draft' == $status && ( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') )  ) { ?>
89
-						<a href="#" title="<?php esc_attr_e( 'Publish Post', 'lasso' );?>" id="lasso--publish" class="lasso-publish-post lasso--button <?php echo $sc_saving_class;?>"></a>
88
+					<?php if ('draft' == $status && (lasso_user_can('publish_posts') || lasso_user_can('publish_pages'))) { ?>
89
+						<a href="#" title="<?php esc_attr_e('Publish Post', 'lasso'); ?>" id="lasso--publish" class="lasso-publish-post lasso--button <?php echo $sc_saving_class; ?>"></a>
90 90
 					<?php } ?>
91 91
 
92 92
 				</div>
@@ -109,13 +109,13 @@  discard block
 block discarded – undo
109 109
 
110 110
 	ob_start();
111 111
 
112
-	if ( !lasso_user_can() )
112
+	if (!lasso_user_can())
113 113
 		return;
114 114
 
115 115
 	// let users add custom css classes
116
-	$custom_classes = apply_filters( 'lasso_sidebar_classes', '' );
116
+	$custom_classes = apply_filters('lasso_sidebar_classes', '');
117 117
 	?>
118
-	<div id="lasso--sidebar" class="<?php echo sanitize_html_class( $custom_classes );?>" >
118
+	<div id="lasso--sidebar" class="<?php echo sanitize_html_class($custom_classes); ?>" >
119 119
 		<div class="lasso--sidebar__inner">
120 120
 			<div id="lasso--component__settings"></div>
121 121
 		</div>
@@ -133,26 +133,26 @@  discard block
 block discarded – undo
133 133
 
134 134
 	ob_start();
135 135
 
136
-	if ( !lasso_user_can() )
136
+	if (!lasso_user_can())
137 137
 		return;
138 138
 	
139 139
 	$is_mobile = wp_is_mobile();
140 140
 
141 141
 	// check for lasso story engine and add a class doniting this
142
-	$ase_status = class_exists( 'Aesop_Core' ) || defined( 'LASSO_CUSTOM' ) ? 'ase-active' : 'ase-not-active';
142
+	$ase_status = class_exists('Aesop_Core') || defined('LASSO_CUSTOM') ? 'ase-active' : 'ase-not-active';
143 143
 
144 144
 	// let users add custom css classes
145
-	$custom_classes = apply_filters( 'lasso_toolbar_classes', '' );
145
+	$custom_classes = apply_filters('lasso_toolbar_classes', '');
146 146
 
147 147
 	// are toolbar headings enabled
148
-	$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
149
-	$toolbar_headings_h4      = lasso_editor_get_option( 'toolbar_headings_h4', 'lasso_editor' );
148
+	$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
149
+	$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
150 150
 
151
-	$toolbar_class  = $toolbar_headings ? 'toolbar-extended' : false;
151
+	$toolbar_class = $toolbar_headings ? 'toolbar-extended' : false;
152 152
 	
153 153
 	// mobile styles
154 154
     $mobile_class = $is_mobile ? 'lasso-mobile' : false;
155
-	$mobile_style =$is_mobile ? 'style="bottom:0px;"' : null;
155
+	$mobile_style = $is_mobile ? 'style="bottom:0px;"' : null;
156 156
 	
157 157
 	//show color
158 158
 	$show_color = lasso_editor_get_option('toolbar_show_color', 'lasso_editor');
@@ -160,99 +160,99 @@  discard block
 block discarded – undo
160 160
 	//show alignment
161 161
 	$show_align = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor');
162 162
 	
163
-	$status = get_post_status( get_the_ID() );
163
+	$status = get_post_status(get_the_ID());
164 164
 
165 165
 
166 166
 	?>
167
-	<div class="lasso--toolbar_wrap lasso-editor-controls--wrap <?php echo $toolbar_class.' '.$mobile_class.' '.$ase_status.' '.sanitize_html_class( $custom_classes );?>" <?php echo $mobile_style ?>>
168
-		<ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"';}?>>
169
-			<?php do_action( 'lasso_toolbar_components_before' );?>
170
-		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e( 'Bold', 'lasso' );?>"></li>
171
-		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e( 'Underline', 'lasso' );?>"></li>
172
-		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e( 'Italicize', 'lasso' );?>"></li>
173
-		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e( 'Strikethrough', 'lasso' );?>"></li>
174
-		    <?php if ( $toolbar_headings ): ?>
175
-		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>"></li>
176
-		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>"></li>
167
+	<div class="lasso--toolbar_wrap lasso-editor-controls--wrap <?php echo $toolbar_class.' '.$mobile_class.' '.$ase_status.' '.sanitize_html_class($custom_classes); ?>" <?php echo $mobile_style ?>>
168
+		<ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"'; }?>>
169
+			<?php do_action('lasso_toolbar_components_before'); ?>
170
+		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e('Bold', 'lasso'); ?>"></li>
171
+		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e('Underline', 'lasso'); ?>"></li>
172
+		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e('Italicize', 'lasso'); ?>"></li>
173
+		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e('Strikethrough', 'lasso'); ?>"></li>
174
+		    <?php if ($toolbar_headings): ?>
175
+		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>"></li>
176
+		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>"></li>
177 177
 			<?php endif; ?>
178
-			<?php if ( $toolbar_headings_h4 ): ?>
179
-		    <li id="lasso-toolbar--h4" title="<?php esc_attr_e( 'H4 Heading', 'lasso' );?>"></li>
180
-		    <li id="lasso-toolbar--h5" title="<?php esc_attr_e( 'H5 Heading', 'lasso' );?>"></li>
181
-			<li id="lasso-toolbar--h6" title="<?php esc_attr_e( 'H6 Heading', 'lasso' );?>"></li>
178
+			<?php if ($toolbar_headings_h4): ?>
179
+		    <li id="lasso-toolbar--h4" title="<?php esc_attr_e('H4 Heading', 'lasso'); ?>"></li>
180
+		    <li id="lasso-toolbar--h5" title="<?php esc_attr_e('H5 Heading', 'lasso'); ?>"></li>
181
+			<li id="lasso-toolbar--h6" title="<?php esc_attr_e('H6 Heading', 'lasso'); ?>"></li>
182 182
 			<?php endif; ?>
183 183
 			
184
-			<?php if ( $show_color ): ?>
185
-		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e( 'Set Text Color', 'lasso' );?>"></li>
186
-		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e( 'Choose Color', 'lasso' );?>"></li>
184
+			<?php if ($show_color): ?>
185
+		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e('Set Text Color', 'lasso'); ?>"></li>
186
+		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e('Choose Color', 'lasso'); ?>"></li>
187 187
 			<?php endif; ?>
188 188
 					
189
-		    <li id="lasso-toolbar--components" title="<?php esc_attr_e( 'Insert Component', 'lasso' );?>">
189
+		    <li id="lasso-toolbar--components" title="<?php esc_attr_e('Insert Component', 'lasso'); ?>">
190 190
 			    <ul id="lasso-toolbar--components__list" style="display:none;">
191
-			    	<?php if ( 'ase-active' == $ase_status ): ?>
192
-						<li data-type="image" title="<?php esc_attr_e( 'Image', 'lasso' );?>" class="lasso-toolbar--component__image"></li>
193
-						<li data-type="character" title="<?php esc_attr_e( 'Character', 'lasso' );?>" class="lasso-toolbar--component__character"></li>
194
-						<li data-type="quote" title="<?php esc_attr_e( 'Quote', 'lasso' );?>"  class="lasso-toolbar--component__quote"></li>
195
-						<li data-type="content" title="<?php esc_attr_e( 'Content', 'lasso' );?>"  class="lasso-toolbar--component__content"></li>
196
-						<li data-type="chapter" title="<?php esc_attr_e( 'Chapter', 'lasso' );?>"  class="lasso-toolbar--component__chapter"></li>
197
-						<li data-type="parallax" title="<?php esc_attr_e( 'Parallax', 'lasso' );?>"  class="lasso-toolbar--component__parallax"></li>
198
-						<li data-type="audio" title="<?php esc_attr_e( 'Audio', 'lasso' );?>"  class="lasso-toolbar--component__audio"></li>
199
-						<li data-type="video" title="<?php esc_attr_e( 'Video', 'lasso' );?>"  class="lasso-toolbar--component__video"></li>
200
-						<li data-type="map" title="<?php esc_attr_e( 'Map', 'lasso' );?>"  class="lasso-toolbar--component__map"></li>
201
-						<li data-type="timeline_stop" title="<?php esc_attr_e( 'Timeline', 'lasso' );?>"  class="lasso-toolbar--component__timeline"></li>
202
-						<li data-type="document" title="<?php esc_attr_e( 'Document', 'lasso' );?>"  class="lasso-toolbar--component__document"></li>
203
-						<li data-type="collection" title="<?php esc_attr_e( 'Collection', 'lasso' );?>"  class="lasso-toolbar--component__collection"></li>
204
-						<li data-type="gallery" title="<?php esc_attr_e( 'Gallery', 'lasso' );?>"  class="lasso-toolbar--component__gallery"></li>
205
-						<?php if ( class_exists ('Aesop_GalleryPop') ) { ?>
206
-						     <li data-type="gallery" title="<?php esc_attr_e( 'Gallery Pop', 'lasso' );?>"  class="lasso-toolbar--component__gallerypop"></li>
191
+			    	<?php if ('ase-active' == $ase_status): ?>
192
+						<li data-type="image" title="<?php esc_attr_e('Image', 'lasso'); ?>" class="lasso-toolbar--component__image"></li>
193
+						<li data-type="character" title="<?php esc_attr_e('Character', 'lasso'); ?>" class="lasso-toolbar--component__character"></li>
194
+						<li data-type="quote" title="<?php esc_attr_e('Quote', 'lasso'); ?>"  class="lasso-toolbar--component__quote"></li>
195
+						<li data-type="content" title="<?php esc_attr_e('Content', 'lasso'); ?>"  class="lasso-toolbar--component__content"></li>
196
+						<li data-type="chapter" title="<?php esc_attr_e('Chapter', 'lasso'); ?>"  class="lasso-toolbar--component__chapter"></li>
197
+						<li data-type="parallax" title="<?php esc_attr_e('Parallax', 'lasso'); ?>"  class="lasso-toolbar--component__parallax"></li>
198
+						<li data-type="audio" title="<?php esc_attr_e('Audio', 'lasso'); ?>"  class="lasso-toolbar--component__audio"></li>
199
+						<li data-type="video" title="<?php esc_attr_e('Video', 'lasso'); ?>"  class="lasso-toolbar--component__video"></li>
200
+						<li data-type="map" title="<?php esc_attr_e('Map', 'lasso'); ?>"  class="lasso-toolbar--component__map"></li>
201
+						<li data-type="timeline_stop" title="<?php esc_attr_e('Timeline', 'lasso'); ?>"  class="lasso-toolbar--component__timeline"></li>
202
+						<li data-type="document" title="<?php esc_attr_e('Document', 'lasso'); ?>"  class="lasso-toolbar--component__document"></li>
203
+						<li data-type="collection" title="<?php esc_attr_e('Collection', 'lasso'); ?>"  class="lasso-toolbar--component__collection"></li>
204
+						<li data-type="gallery" title="<?php esc_attr_e('Gallery', 'lasso'); ?>"  class="lasso-toolbar--component__gallery"></li>
205
+						<?php if (class_exists('Aesop_GalleryPop')) { ?>
206
+						     <li data-type="gallery" title="<?php esc_attr_e('Gallery Pop', 'lasso'); ?>"  class="lasso-toolbar--component__gallerypop"></li>
207 207
 						<?php }?>
208 208
 					<?php else: ?>
209
-						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );?>" class="image lasso-toolbar--component__image"></li>
210
-						<li data-type="wpquote" title="<?php esc_attr_e( 'WordPress Quote', 'lasso' );?>" class="quote lasso-toolbar--component__quote"></li>
211
-						<!--li data-type="wpvideo" title="<?php esc_attr_e( 'WordPress Video', 'lasso' );?>" class="video lasso-toolbar--component__video"></li-->
209
+						<li data-type="wpimg" title="<?php esc_attr_e('WordPress Image', 'lasso'); ?>" class="image lasso-toolbar--component__image"></li>
210
+						<li data-type="wpquote" title="<?php esc_attr_e('WordPress Quote', 'lasso'); ?>" class="quote lasso-toolbar--component__quote"></li>
211
+						<!--li data-type="wpvideo" title="<?php esc_attr_e('WordPress Video', 'lasso'); ?>" class="video lasso-toolbar--component__video"></li-->
212 212
 					<?php endif; ?>
213
-					<?php do_action( 'lasso_toolbar_components' );?>
213
+					<?php do_action('lasso_toolbar_components'); ?>
214 214
 			    </ul>
215 215
 			</li>
216
-			<li id="lasso-toolbar--link" title="<?php esc_attr_e( 'Anchor Link', 'lasso' );?>">
216
+			<li id="lasso-toolbar--link" title="<?php esc_attr_e('Anchor Link', 'lasso'); ?>">
217 217
 		    	<div id="lasso-toolbar--link__wrap" <?php echo $mobile_style ?> >
218
-		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'http://url.com', 'lasso' );?>"></div>
219
-		    		<a href="#" title="<?php esc_attr_e( 'Create Link', 'lasso' );?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
218
+		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e('http://url.com', 'lasso'); ?>"></div>
219
+		    		<a href="#" title="<?php esc_attr_e('Create Link', 'lasso'); ?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
220 220
 					<input class="styled-checkbox" type="checkbox" id="aesop-toolbar--link_newtab" checked/>
221 221
                     <label for="aesop-toolbar--link_newtab">Open in Another Tab</label>
222 222
 		    	</div>
223 223
 		    </li>
224
-		    <?php do_action( 'lasso_toolbar_components_after' );?>
225
-		    <li id="lasso-toolbar--html" title="<?php esc_attr_e( 'Insert HTML', 'lasso' );?>">
224
+		    <?php do_action('lasso_toolbar_components_after'); ?>
225
+		    <li id="lasso-toolbar--html" title="<?php esc_attr_e('Insert HTML', 'lasso'); ?>">
226 226
 		    	<div id="lasso-toolbar--html__wrap" <?php echo $mobile_style ?>>
227
-		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?>"></div>
227
+		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?>"></div>
228 228
 		    		<div id="lasso-toolbar--html__footer">
229 229
 		    			<ul class="lasso-toolbar--html-snips">
230
-		    				<?php if ( !$toolbar_headings ): ?>
231
-		    				<li id="lasso-html--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>">
232
-		    				<li id="lasso-html--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>">
230
+		    				<?php if (!$toolbar_headings): ?>
231
+		    				<li id="lasso-html--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>">
232
+		    				<li id="lasso-html--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>">
233 233
 		    				<?php endif; ?>
234
-		    				<li id="lasso-html--ul" title="<?php esc_attr_e( 'Unordered List', 'lasso' );?>">
235
-		    				<li id="lasso-html--ol" title="<?php esc_attr_e( 'Ordered List', 'lasso' );?>">
234
+		    				<li id="lasso-html--ul" title="<?php esc_attr_e('Unordered List', 'lasso'); ?>">
235
+		    				<li id="lasso-html--ol" title="<?php esc_attr_e('Ordered List', 'lasso'); ?>">
236 236
 		    			</ul>
237
-		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e( 'Cancel', 'lasso' );?></a>
238
-		    			<a href="#" title="<?php esc_attr_e( 'Insert HTML', 'lasso' );?>" class="lasso-toolbar--html__control" id="lasso-toolbar--html__insert" ><?php _e( 'Insert', 'lasso' );?></a>
237
+		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e('Cancel', 'lasso'); ?></a>
238
+		    			<a href="#" title="<?php esc_attr_e('Insert HTML', 'lasso'); ?>" class="lasso-toolbar--html__control" id="lasso-toolbar--html__insert" ><?php _e('Insert', 'lasso'); ?></a>
239 239
 		    		</div>
240 240
 		    	</div>
241 241
 		    </li>
242
-			<?php if ( $show_align ): ?>
243
-		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e( 'Text Left Align', 'lasso' );?>"></li>
244
-		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e( 'Text Center Align', 'lasso' );?>"></li>
245
-			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e( 'Text Right Align', 'lasso' );?>"></li>
242
+			<?php if ($show_align): ?>
243
+		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e('Text Left Align', 'lasso'); ?>"></li>
244
+		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e('Text Center Align', 'lasso'); ?>"></li>
245
+			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e('Text Right Align', 'lasso'); ?>"></li>
246 246
 			<?php endif; ?>
247 247
 		</ul>
248
-		<?php if ( is_singular() && $is_mobile ) { ?>
248
+		<?php if (is_singular() && $is_mobile) { ?>
249 249
 
250
-				<div class="lasso--controls__right" data-posttype="<?php echo get_post_type( get_the_ID() );?>" data-status="<?php echo $status;?>" style="position:static;bottom:0px;right;0px;left:auto;">
250
+				<div class="lasso--controls__right" data-posttype="<?php echo get_post_type(get_the_ID()); ?>" data-status="<?php echo $status; ?>" style="position:static;bottom:0px;right;0px;left:auto;">
251 251
 
252
-					<a href="#" title="<?php esc_attr_e( 'Save Post', 'lasso' );?>" id="lasso--save" class="lasso-save-post lasso--button <?php echo $sc_saving_class;?>"></a>
252
+					<a href="#" title="<?php esc_attr_e('Save Post', 'lasso'); ?>" id="lasso--save" class="lasso-save-post lasso--button <?php echo $sc_saving_class; ?>"></a>
253 253
 
254
-					<?php if ( 'draft' == $status && ( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') )  ) { ?>
255
-						<a href="#" title="<?php esc_attr_e( 'Publish Post', 'lasso' );?>" id="lasso--publish" class="lasso-publish-post lasso--button <?php echo $sc_saving_class;?>"></a>
254
+					<?php if ('draft' == $status && (lasso_user_can('publish_posts') || lasso_user_can('publish_pages'))) { ?>
255
+						<a href="#" title="<?php esc_attr_e('Publish Post', 'lasso'); ?>" id="lasso--publish" class="lasso-publish-post lasso--button <?php echo $sc_saving_class; ?>"></a>
256 256
 					<?php } ?>
257 257
 
258 258
 				</div>
@@ -270,22 +270,22 @@  discard block
 block discarded – undo
270 270
  */
271 271
 function lasso_editor_settings_toolbar() {
272 272
 
273
-	$delete_nonce = wp_create_nonce( 'lasso-delete-nonce' );
273
+	$delete_nonce = wp_create_nonce('lasso-delete-nonce');
274 274
 
275 275
 	ob_start();
276 276
 
277
-	if ( !lasso_user_can() )
277
+	if (!lasso_user_can())
278 278
 		return;
279 279
 
280 280
 	// let users add custom css classes
281
-	$custom_classes = apply_filters( 'lasso_component_classes', '' );
281
+	$custom_classes = apply_filters('lasso_component_classes', '');
282 282
 
283 283
 	?>
284
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
285
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
286
-		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
287
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
288
-		<li class="lasso-delete" data-postid="<?php echo get_the_ID();?>" data-nonce="<?php echo $delete_nonce;?>" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
284
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
285
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
286
+		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
287
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
288
+		<li class="lasso-delete" data-postid="<?php echo get_the_ID(); ?>" data-nonce="<?php echo $delete_nonce; ?>" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
289 289
 	</ul>
290 290
 
291 291
 	<?php return ob_get_clean();
@@ -301,17 +301,17 @@  discard block
 block discarded – undo
301 301
 
302 302
 	ob_start();
303 303
 
304
-	if ( !lasso_user_can() )
304
+	if (!lasso_user_can())
305 305
 		return;
306 306
 
307 307
 	// has post thumbnail
308
-	$has_thumbnail = has_post_thumbnail( get_the_ID() ) ? 'class="lasso--featImg--has-thumb"' : false;
308
+	$has_thumbnail = has_post_thumbnail(get_the_ID()) ? 'class="lasso--featImg--has-thumb"' : false;
309 309
 
310 310
 	?>
311
-	<ul id="lasso--featImgControls" <?php echo $has_thumbnail;?>>
312
-		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e( 'Replace Image', 'lasso' );?>" href="#"><i class="lasso-icon-image"></i></a></li>
313
-		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e( 'Delete Image', 'lasso' );?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
314
-		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e( 'save', 'lasso' );?></a></li>
311
+	<ul id="lasso--featImgControls" <?php echo $has_thumbnail; ?>>
312
+		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e('Replace Image', 'lasso'); ?>" href="#"><i class="lasso-icon-image"></i></a></li>
313
+		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e('Delete Image', 'lasso'); ?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
314
+		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e('save', 'lasso'); ?></a></li>
315 315
 	</ul>
316 316
 
317 317
 	<?php return ob_get_clean();
@@ -330,55 +330,55 @@  discard block
 block discarded – undo
330 330
 
331 331
 	ob_start();
332 332
 
333
-	if ( !lasso_user_can() )
333
+	if (!lasso_user_can())
334 334
 		return;
335 335
 
336 336
 	global $post;
337 337
 
338 338
 	$postid = get_the_ID();
339 339
 
340
-	$status = get_post_status( $postid );
341
-	$nonce = wp_create_nonce( 'lasso-update-post-settings' );
340
+	$status = get_post_status($postid);
341
+	$nonce = wp_create_nonce('lasso-update-post-settings');
342 342
 
343 343
 	// let users add custom css classes
344
-	$custom_classes = apply_filters( 'lasso_modal_settings_classes', '' );
344
+	$custom_classes = apply_filters('lasso_modal_settings_classes', '');
345 345
 
346 346
 	// objects categories
347
-	$categories 		= lasso_get_post_objects( $postid, 'category' );
348
-	$tags 				= lasso_get_post_objects( $postid, 'tag' );
347
+	$categories = lasso_get_post_objects($postid, 'category');
348
+	$tags = lasso_get_post_objects($postid, 'tag');
349 349
 
350 350
 	// modal tabs
351
-	$tabs  				= lasso_modal_addons('tab');
352
-	$content 			= lasso_modal_addons('content');
351
+	$tabs = lasso_modal_addons('tab');
352
+	$content = lasso_modal_addons('content');
353 353
 
354 354
 	// are we singular
355
-	$is_singular 		= is_singular();
355
+	$is_singular = is_singular();
356 356
 	$is_singular_class 	= $is_singular ? 'lasso--postsettings__2col' : 'lasso--postsettings__1col';
357 357
 	$has_thumb_class    = has_post_thumbnail() ? 'has-thumbnail' : 'no-thumbnail';
358 358
 	$theme_supports     = current_theme_supports('post-thumbnails');
359
-	$default_image 		= LASSO_URL.'/admin/assets/img/empty-img.png';
359
+	$default_image = LASSO_URL.'/admin/assets/img/empty-img.png';
360 360
 
361 361
 ?>
362
-	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>">
362
+	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>">
363 363
 		<div class="lasso--modal__inner">
364 364
 
365
-			<?php if( $tabs ) { echo $tabs; } ?>
365
+			<?php if ($tabs) { echo $tabs; } ?>
366 366
 
367 367
 			<div class="lasso--modal__content modal__content--core visible" data-addon-content="core">
368
-				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class;?>" >
368
+				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class; ?>" >
369 369
 
370
-					<?php if ( $is_singular && $theme_supports ) : ?>
370
+					<?php if ($is_singular && $theme_supports) : ?>
371 371
 					<div class="lasso--postsettings__left">
372
-						<label><?php _e( 'Featured Image', 'lasso' );?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e( 'Change the featured image for this post.', 'lasso' );?>"><i class="lasso-icon-help"></i></span></label>
373
-						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url( $default_image );?>">
372
+						<label><?php _e('Featured Image', 'lasso'); ?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e('Change the featured image for this post.', 'lasso'); ?>"><i class="lasso-icon-help"></i></span></label>
373
+						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url($default_image); ?>">
374 374
 
375 375
 							<div id="lasso--post-thumb__controls" class="lasso--post-thumb__controls">
376
-								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image','lasso');?>" class="dashicons dashicons-edit"></i>
377
-								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image','lasso');?>" class="dashicons dashicons-no-alt"></i>
376
+								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image', 'lasso'); ?>" class="dashicons dashicons-edit"></i>
377
+								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image', 'lasso'); ?>" class="dashicons dashicons-no-alt"></i>
378 378
 								<i id="lasso--save-status" class="lasso-icon lasso-icon-spinner6 not-visible"></i>
379 379
 							</div>
380 380
 
381
-							<?php echo has_post_thumbnail() ? get_the_post_thumbnail( $post->ID, 'medium' ) : '<img src="'.$default_image.'">'; ?>
381
+							<?php echo has_post_thumbnail() ? get_the_post_thumbnail($post->ID, 'medium') : '<img src="'.$default_image.'">'; ?>
382 382
 
383 383
 						</div>
384 384
 						<div id="lasso--featImgSave"><a href="#" class="not-visible">Save</a></div>
@@ -388,12 +388,12 @@  discard block
 block discarded – undo
388 388
 
389 389
 					<div class="lasso--postsettings__right">
390 390
 
391
-						<?php if( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') ): ?>
391
+						<?php if (lasso_user_can('publish_posts') || lasso_user_can('publish_pages')): ?>
392 392
 						<div class="lasso--postsettings__option story-status-option">
393
-							<label><?php _e( 'Status', 'lasso' );?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e( 'Change the status of the post to draft or publish.', 'lasso' );?>"><i class="lasso-icon-help"></i></span></label>
394
-							<ul class="story-status story-status-<?php echo sanitize_html_class( $status );?>">
395
-								<li id="lasso--status-draft"><?php _e( 'Draft', 'lasso' );?></li>
396
-								<li id="lasso--status-publish"><?php _e( 'Publish', 'lasso' );?></li>
393
+							<label><?php _e('Status', 'lasso'); ?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e('Change the status of the post to draft or publish.', 'lasso'); ?>"><i class="lasso-icon-help"></i></span></label>
394
+							<ul class="story-status story-status-<?php echo sanitize_html_class($status); ?>">
395
+								<li id="lasso--status-draft"><?php _e('Draft', 'lasso'); ?></li>
396
+								<li id="lasso--status-publish"><?php _e('Publish', 'lasso'); ?></li>
397 397
 							</ul>
398 398
 							<div class="lasso--slider_wrap">
399 399
 								<div id="lasso--slider"></div>
@@ -401,10 +401,10 @@  discard block
 block discarded – undo
401 401
 						</div>
402 402
 						<?php endif; ?>
403 403
 
404
-						<?php if ( 'publish' == $status ): ?>
404
+						<?php if ('publish' == $status): ?>
405 405
 						<div class="lasso--postsettings__option story-slug-option">
406
-							<label><?php _e( 'Post URL', 'lasso' );?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e( 'Change the URL (slug) of this post.', 'lasso' );?>"><i class="lasso-icon-help"></i></span></label>
407
-							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset( $post ) ? esc_attr( $post->post_name ) : false;?>">
406
+							<label><?php _e('Post URL', 'lasso'); ?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e('Change the URL (slug) of this post.', 'lasso'); ?>"><i class="lasso-icon-help"></i></span></label>
407
+							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset($post) ? esc_attr($post->post_name) : false; ?>">
408 408
 						</div>
409 409
 						<?php endif; ?>
410 410
 
@@ -413,13 +413,13 @@  discard block
 block discarded – undo
413 413
 					<div class="lasso--postsettings__middle">
414 414
 
415 415
 						<div class="lasso--postsettings__option story-categories-option">
416
-							<label style="width:120px;"><?php _e( 'Categories', 'lasso' );?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e( 'Type a category name and press enter.', 'lasso' );?>"><i class="lasso-icon-help"></i></span></label>
417
-							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories;?>">
416
+							<label style="width:120px;"><?php _e('Categories', 'lasso'); ?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e('Type a category name and press enter.', 'lasso'); ?>"><i class="lasso-icon-help"></i></span></label>
417
+							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories; ?>">
418 418
 						</div>
419 419
 
420 420
 						<div class="lasso--postsettings__option story-tags-option">
421
-							<label><?php _e( 'Tags', 'lasso' );?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e( 'Type a tag name and press enter.', 'lasso' );?>"><i class="lasso-icon-help"></i></span></label>
422
-							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags;?>">
421
+							<label><?php _e('Tags', 'lasso'); ?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e('Type a tag name and press enter.', 'lasso'); ?>"><i class="lasso-icon-help"></i></span></label>
422
+							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags; ?>">
423 423
 						</div>
424 424
 
425 425
 					</div>
@@ -440,23 +440,23 @@  discard block
 block discarded – undo
440 440
 					?>
441 441
 					<!--/div-->
442 442
 
443
-					<?php do_action( 'lasso_modal_post_form' ); // action ?>
443
+					<?php do_action('lasso_modal_post_form'); // action ?>
444 444
 
445 445
 					<div class="lasso--postsettings__footer" >
446
-						<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
446
+						<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
447 447
 						<input type="hidden" name="status" value="">
448 448
 						<input type="hidden" name="categories" value="">
449
-						<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
449
+						<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
450 450
 						<input type="hidden" name="action" value="process_update-object_post">
451
-						<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
452
-						<?php do_action( 'lasso_modal_post_form_footer' ); // action ?>
453
-						<input type="submit" value="<?php esc_attr_e( 'Save', 'lasso' );?>">
451
+						<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
452
+						<?php do_action('lasso_modal_post_form_footer'); // action ?>
453
+						<input type="submit" value="<?php esc_attr_e('Save', 'lasso'); ?>">
454 454
 					</div>
455 455
 
456 456
 				</form>
457 457
 			</div>
458 458
 
459
-			<?php if( $tabs ) { echo $content; } ?>
459
+			<?php if ($tabs) { echo $content; } ?>
460 460
 
461 461
 		</div>
462 462
 
@@ -477,45 +477,45 @@  discard block
 block discarded – undo
477 477
 
478 478
 	ob_start();
479 479
 
480
-	if ( !lasso_user_can('edit_posts') )
480
+	if (!lasso_user_can('edit_posts'))
481 481
 		return;
482 482
 
483
-	$status = get_post_status( get_the_ID() );
483
+	$status = get_post_status(get_the_ID());
484 484
 
485
-	$nonce = wp_create_nonce( 'lasso-editor-new-post' );
485
+	$nonce = wp_create_nonce('lasso-editor-new-post');
486 486
 
487 487
 	// let users add custom css classes
488
-	$custom_classes = apply_filters( 'lasso_modal_post_classes', '' );
488
+	$custom_classes = apply_filters('lasso_modal_post_classes', '');
489 489
 
490 490
 	// return the post type
491
-	$type = get_post_type( get_the_ID() );
491
+	$type = get_post_type(get_the_ID());
492 492
 
493 493
 	$mobile_style = "";
494 494
 	if (wp_is_mobile()) {
495 495
 		$mobile_style = 'style="top:140px !important;"';
496 496
 	}
497 497
 	?>
498
-	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" <?php echo $mobile_style;?>">
498
+	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" <?php echo $mobile_style; ?>">
499 499
 		<div class="lasso--modal__inner lasso--hasnewform">
500 500
 
501 501
 			<form id="lasso--postnew__form" enctype="multipart/form-data" class="lasso--post-form">
502 502
 
503 503
 				<div class="lasso--postsettings__option story-slug-option lasso--last-option">
504
-					<label><?php esc_attr_e( 'New <span>post</span> title', 'lasso' );?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e( 'Specify title for new post, then save to edit.', 'lasso' );?>"><i class="lasso-icon-help"></i></span></label>
505
-					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e( 'Grump Wizards Make Toxic Brew', 'lasso' );?>">
504
+					<label><?php esc_attr_e('New <span>post</span> title', 'lasso'); ?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e('Specify title for new post, then save to edit.', 'lasso'); ?>"><i class="lasso-icon-help"></i></span></label>
505
+					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e('Grump Wizards Make Toxic Brew', 'lasso'); ?>">
506 506
 						<div class="lasso--select-wrap" style="width:90px">
507 507
 						<select id="lasso--select-type" name="story_type">
508 508
 
509 509
 							<?php
510 510
 								$types = lasso_post_types();
511 511
 
512
-								if ( !empty( $types ) ) {
512
+								if (!empty($types)) {
513 513
 
514
-									foreach( $types as $type ) {
514
+									foreach ($types as $type) {
515 515
 
516
-										$type = preg_replace( '/s\b/','', $type );
516
+										$type = preg_replace('/s\b/', '', $type);
517 517
 
518
-										printf( '<option value="%s">%s</option>', lcfirst( esc_attr( $type ) ) , ucfirst( esc_attr( $type ) ) );
518
+										printf('<option value="%s">%s</option>', lcfirst(esc_attr($type)), ucfirst(esc_attr($type)));
519 519
 									}
520 520
 
521 521
 								}
@@ -525,12 +525,12 @@  discard block
 block discarded – undo
525 525
 					</div>
526 526
 				</div>
527 527
 
528
-				<div class="lasso--postsettings__footer" style="<?php if (!wp_is_mobile()) {echo 'display:none;';} ?>">
529
-					<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
528
+				<div class="lasso--postsettings__footer" style="<?php if (!wp_is_mobile()) {echo 'display:none;'; } ?>">
529
+					<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
530 530
 					<input type="hidden" name="action" value="process_new-object_post">
531 531
 					<input type="hidden" name="object" value="post">
532
-					<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
533
-					<input type="submit" value="<?php esc_attr_e( 'Create', 'lasso' );?>">
532
+					<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
533
+					<input type="submit" value="<?php esc_attr_e('Create', 'lasso'); ?>">
534 534
 				</div>
535 535
 
536 536
 			</form>
@@ -558,18 +558,18 @@  discard block
 block discarded – undo
558 558
 	ob_start();
559 559
 
560 560
 	// post status
561
-	$status = get_post_status( get_the_ID() );
561
+	$status = get_post_status(get_the_ID());
562 562
 
563 563
 	// let users add custom css classes
564
-	$custom_classes = apply_filters( 'lasso_modal_all_post_classes', '' );
564
+	$custom_classes = apply_filters('lasso_modal_all_post_classes', '');
565 565
 
566 566
 	?>
567
-	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" style="max-height:100%">
567
+	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" style="max-height:100%">
568 568
 		<div class="lasso--modal__inner">
569 569
 
570 570
 			<div class="lasso--post-filtering not-visible">
571 571
 				<div class="lasso--search__results">
572
-					<span id="lasso--results-found"></span><?php _e('results found','lasso');?>
572
+					<span id="lasso--results-found"></span><?php _e('results found', 'lasso'); ?>
573 573
 				</div>
574 574
 				<div class="lasso--search">
575 575
 					<i id="lasso--search__toggle" class="dashicons dashicons-search"></i>
@@ -583,16 +583,16 @@  discard block
 block discarded – undo
583 583
 				$post_types = lasso_post_types_names();
584 584
 				$rest_bases = lasso_post_types_rest_base();
585 585
 
586
-				if ( ! empty( $post_types ) ) {
586
+				if (!empty($post_types)) {
587 587
 					$first = 'active';
588
-					foreach( $post_types as $name => $label ) {
589
-						printf( '<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr( $first), esc_attr( $rest_bases[$name] ), esc_attr( $label ) );
588
+					foreach ($post_types as $name => $label) {
589
+						printf('<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr($first), esc_attr($rest_bases[$name]), esc_attr($label));
590 590
 						$first = '';
591 591
 					}
592 592
 
593 593
 				}
594 594
 
595
-				do_action('lasso_modal_post_objects');?>
595
+				do_action('lasso_modal_post_objects'); ?>
596 596
 
597 597
 			</ul>
598 598
 			<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
@@ -610,18 +610,18 @@  discard block
 block discarded – undo
610 610
 
611 611
 	ob_start();
612 612
 
613
-	if ( !lasso_user_can() )
613
+	if (!lasso_user_can())
614 614
 		return;
615 615
 
616 616
 	// let users add custom css classes
617
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
617
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
618 618
 
619 619
 	?>
620
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
621
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
622
-		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
623
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
624
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
620
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
621
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
622
+		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
623
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
624
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
625 625
 	</ul>
626 626
 
627 627
 	<?php return ob_get_clean();
@@ -631,18 +631,18 @@  discard block
 block discarded – undo
631 631
 
632 632
 	ob_start();
633 633
 
634
-	if ( !lasso_user_can() )
634
+	if (!lasso_user_can())
635 635
 		return;
636 636
 
637 637
 	// let users add custom css classes
638
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
638
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
639 639
 
640 640
 	?>
641
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
642
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
643
-		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
644
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
645
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
641
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
642
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
643
+		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
644
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
645
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
646 646
 	</ul>
647 647
 
648 648
 	<?php return ob_get_clean();
@@ -655,16 +655,16 @@  discard block
 block discarded – undo
655 655
  */
656 656
 function lasso_map_form_footer() {
657 657
 
658
-	$nonce = wp_create_nonce( 'lasso-process-map' );
658
+	$nonce = wp_create_nonce('lasso-process-map');
659 659
 
660 660
 	ob_start();
661 661
 
662 662
 	?>
663 663
 	<div class="lasso--map-form__footer">
664
-		<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
665
-		<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
664
+		<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
665
+		<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
666 666
 		<input type="hidden" name="action" value="process_map_save">
667
-		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e( 'Save Locations', 'lasso' );?>">
667
+		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e('Save Locations', 'lasso'); ?>">
668 668
 	</div>
669 669
 
670 670
 	<?php return ob_get_clean();
@@ -682,7 +682,7 @@  discard block
 block discarded – undo
682 682
 
683 683
 	?>
684 684
 	<div id="lasso--pagerefresh" class="visible">
685
-		<?php _e( 'Save this post and refesh the page to see these changes.', 'lasso' );?>
685
+		<?php _e('Save this post and refesh the page to see these changes.', 'lasso'); ?>
686 686
 	</div>
687 687
 
688 688
 	<?php return ob_get_clean();
@@ -696,43 +696,43 @@  discard block
 block discarded – undo
696 696
  */
697 697
 function lasso_editor_options_blob() {
698 698
 
699
-	$codes   = function_exists( 'aesop_shortcodes' ) ? aesop_shortcodes() : apply_filters( 'lasso_custom_options', '' );
700
-	$galleries  = function_exists( 'lasso_editor_galleries_exist' ) && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
699
+	$codes = function_exists('aesop_shortcodes') ? aesop_shortcodes() : apply_filters('lasso_custom_options', '');
700
+	$galleries = function_exists('lasso_editor_galleries_exist') && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
701 701
 
702
-	$nonce = wp_create_nonce( 'lasso_gallery' );
702
+	$nonce = wp_create_nonce('lasso_gallery');
703 703
 
704 704
 	$blob = array();
705 705
 
706
-	if ( empty( $codes ) )
706
+	if (empty($codes))
707 707
 		return;
708 708
 
709
-	foreach ( $codes as $slug => $shortcode ) {
709
+	foreach ($codes as $slug => $shortcode) {
710 710
 		$return = '';
711 711
 		// Shortcode has atts
712 712
 
713
-		if ( count( $shortcode['atts'] ) && $shortcode['atts'] ) {
713
+		if (count($shortcode['atts']) && $shortcode['atts']) {
714 714
 
715
-			foreach ( $shortcode['atts'] as $attr_name => $attr_info ) {
715
+			foreach ($shortcode['atts'] as $attr_name => $attr_info) {
716 716
 
717 717
 
718
-				$prefix = isset( $attr_info['prefix'] ) ? sprintf( '<span class="lasso-option-prefix">%s</span>', $attr_info['prefix'] ) : null;
718
+				$prefix = isset($attr_info['prefix']) ? sprintf('<span class="lasso-option-prefix">%s</span>', $attr_info['prefix']) : null;
719 719
 
720 720
 				$return .= '<form id="lasso--component-settings-form" class="'.$galleries.'" method="post">';
721 721
 				$return .= '<p data-option="'.$attr_name.'" class="lasso-option lasso-'.$slug.'-'.$attr_name.'">';
722
-				$return .= '<label for="lasso-generator-attr-' . $attr_name . '">' . $attr_info['desc'] . '</label>';
722
+				$return .= '<label for="lasso-generator-attr-'.$attr_name.'">'.$attr_info['desc'].'</label>';
723 723
 				$return .= '<small class="lasso-option-desc">'.$attr_info['tip'].'</small>';
724 724
 				// Select
725 725
 
726
-				if ( isset( $attr_info['values'] ) ) {
726
+				if (isset($attr_info['values'])) {
727 727
 
728
-					$return .= '<select name="' . $attr_name . '" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr">';
728
+					$return .= '<select name="'.$attr_name.'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr">';
729 729
 
730
-					$i=0;
730
+					$i = 0;
731 731
 
732
-					foreach ( $attr_info['values'] as $attr_value ) {
732
+					foreach ($attr_info['values'] as $attr_value) {
733 733
 						$attr_value_selected = $attr_info['default'] == $attr_value ? ' selected="selected"' : '';
734 734
 
735
-						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" ' . $attr_value_selected . '>'.$attr_info['values'][$i]['name'].'</option>';
735
+						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" '.$attr_value_selected.'>'.$attr_info['values'][$i]['name'].'</option>';
736 736
 
737 737
 						$i++;
738 738
 					}
@@ -741,24 +741,24 @@  discard block
 block discarded – undo
741 741
 
742 742
 				} else {
743 743
 
744
-					$attr_field_type = isset( $attr_info['type'] ) ? $attr_info['type'] : 'text';
744
+					$attr_field_type = isset($attr_info['type']) ? $attr_info['type'] : 'text';
745 745
 
746 746
 					// image upload
747
-					if ( 'media_upload' == $attr_info['type'] ) {
747
+					if ('media_upload' == $attr_info['type']) {
748 748
 
749
-						$return .= '<input type="' . $attr_field_type . '" name="' . $attr_name . '" value="'.$attr_info['default'].'" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />';
749
+						$return .= '<input type="'.$attr_field_type.'" name="'.$attr_name.'" value="'.$attr_info['default'].'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />';
750 750
 						$return .= '<a href="#" id="lasso-upload-img" class="lasso-option-button" /></a>';
751 751
 
752
-					} elseif ( 'color' == $attr_info['type'] ) {
752
+					} elseif ('color' == $attr_info['type']) {
753 753
 
754
-						$return .= '<input type="color" name="' . $attr_name . '" value="'.$attr_info['default'].'" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />';
754
+						$return .= '<input type="color" name="'.$attr_name.'" value="'.$attr_info['default'].'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />';
755 755
 
756
-					} elseif ( 'text_area' == $attr_info['type'] ) {
756
+					} elseif ('text_area' == $attr_info['type']) {
757 757
 
758
-						$return .= '<textarea name="' . $attr_name . '" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" placeholder="'.$attr_info['default'].'" /></textarea>'.$prefix.'';
758
+						$return .= '<textarea name="'.$attr_name.'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" placeholder="'.$attr_info['default'].'" /></textarea>'.$prefix.'';
759 759
 
760 760
 					} else {
761
-						$return .= '<input type="' . $attr_field_type . '" name="' . $attr_name . '" value="'.$attr_info['default'].'" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />'.$prefix.'';
761
+						$return .= '<input type="'.$attr_field_type.'" name="'.$attr_name.'" value="'.$attr_info['default'].'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />'.$prefix.'';
762 762
 					}
763 763
 				}
764 764
 				$return .= '</p>';
@@ -769,9 +769,9 @@  discard block
 block discarded – undo
769 769
 		///////////////////////////
770 770
 		// START GALLERY AND MAP FRONT END STUFFS
771 771
 		///////////////////////////
772
-		if ( isset( $shortcode['front'] ) && true == $shortcode['front'] ) {
772
+		if (isset($shortcode['front']) && true == $shortcode['front']) {
773 773
 
774
-			if ( 'gallery' == $shortcode['front_type'] ) {
774
+			if ('gallery' == $shortcode['front_type']) {
775 775
 
776 776
 				$return .= lasso_gallery_editor_module();
777 777
 
@@ -782,13 +782,13 @@  discard block
 block discarded – undo
782 782
 		///////////////////////////
783 783
 
784 784
 		// Single shortcode (not closed)
785
-		if ( 'single' == $shortcode['type'] ) {
785
+		if ('single' == $shortcode['type']) {
786 786
 
787 787
 			$return .= '<input type="hidden" name="lasso-generator-content" id="lasso-generator-content" value="false" />';
788 788
 
789 789
 		} else {
790 790
 
791
-			$return .= '<p data-option="content" class="lasso-option lasso-c-comp-text"><label>' . __( 'Content', 'lasso' ) . '</label><textarea type="text" name="lasso-generator-content" id="lasso-generator-content" value="' . $shortcode['content'] . '" /></textarea></p>';
791
+			$return .= '<p data-option="content" class="lasso-option lasso-c-comp-text"><label>'.__('Content', 'lasso').'</label><textarea type="text" name="lasso-generator-content" id="lasso-generator-content" value="'.$shortcode['content'].'" /></textarea></p>';
792 792
 		}
793 793
 
794 794
 		$return .= '<p class="lasso-buttoninsert-wrap"><a href="#" class="lasso-generator-cancel" id="lasso--sidebar__close">Cancel
@@ -821,7 +821,7 @@  discard block
 block discarded – undo
821 821
 				<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
822 822
 				<div id="lasso--hide" style="display:none;" class="lasso--post-form">
823 823
 					<i class="lasso-icon lasso-icon-move"></i>
824
-					<label><?php _e( 'Revisions', 'lasso' );?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e( 'Use the slider to view the revision live on the page.', 'lasso' );?>"><i class="lasso-icon-help"></i></span></label>
824
+					<label><?php _e('Revisions', 'lasso'); ?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e('Use the slider to view the revision live on the page.', 'lasso'); ?>"><i class="lasso-icon-help"></i></span></label>
825 825
 					<div class="lasso--slider_wrap">
826 826
 						<div id="lasso--slider"></div>
827 827
 					</div>
Please login to merge, or discard this patch.
public/includes/lasso.php 3 patches
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -255,14 +255,14 @@  discard block
 block discarded – undo
255 255
 		$out = load_textdomain( $domain, trailingslashit( LASSO_DIR ). 'languages/' . $domain . '-' . $locale . '.mo' );
256 256
 	}
257 257
 	
258
-    // new ajax function to lock post for editing
258
+	// new ajax function to lock post for editing
259 259
 	public function editus_lock_post()
260 260
 	{
261 261
 		$post_id= $_POST["postid"];
262 262
 		$locked = wp_check_post_lock($post_id);
263 263
 		
264 264
 		if (!$locked) {
265
-		    wp_set_post_lock($post_id);
265
+			wp_set_post_lock($post_id);
266 266
 			echo "true";
267 267
 		} else {
268 268
 			$user_info = get_userdata($locked);
@@ -281,52 +281,52 @@  discard block
 block discarded – undo
281 281
 		 );
282 282
 		foreach ($_POST as $key => $value) {
283 283
 			if ($key !="code" && $key !="action") {
284
-			    //$shortcode = $shortcode.$key.'="'.$value.'" ';
284
+				//$shortcode = $shortcode.$key.'="'.$value.'" ';
285 285
 				$atts[$key] = $value;
286 286
 			}
287 287
 		}
288 288
 		if ($code == "aesop_video") {
289
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-video.php');
290
-		    echo aesop_video_shortcode($atts);
289
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-video.php');
290
+			echo aesop_video_shortcode($atts);
291 291
 		}
292 292
 		
293 293
 		if ($code == "aesop_image") {
294
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php');
295
-		    echo aesop_image_shortcode($atts);
294
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php');
295
+			echo aesop_image_shortcode($atts);
296 296
 		}
297 297
 		if ($code == "aesop_quote") {
298
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php');
299
-		    echo aesop_quote_shortcode($atts);
298
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php');
299
+			echo aesop_quote_shortcode($atts);
300 300
 		}
301 301
 		
302 302
 		if ($code == "aesop_parallax") {
303
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php');
304
-		    echo aesop_parallax_shortcode($atts);
303
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php');
304
+			echo aesop_parallax_shortcode($atts);
305 305
 		}
306 306
 		
307 307
 		if ($code == "aesop_character") {
308
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php');
309
-		    echo aesop_character_shortcode($atts);
308
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php');
309
+			echo aesop_character_shortcode($atts);
310 310
 		}
311 311
 		
312 312
 		if ($code == "aesop_collection") {
313
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php');
314
-		    echo aesop_collection_shortcode($atts);
313
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php');
314
+			echo aesop_collection_shortcode($atts);
315 315
 		}
316 316
 		
317 317
 		if ($code == "aesop_chapter") {
318
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php');
319
-		    echo aesop_chapter_shortcode($atts);
318
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php');
319
+			echo aesop_chapter_shortcode($atts);
320 320
 		}
321 321
 		
322 322
 		if ($code == "aesop_content") {
323
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php');
324
-		    echo aesop_content_shortcode($atts, $atts['content_data']);
323
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php');
324
+			echo aesop_content_shortcode($atts, $atts['content_data']);
325 325
 		}
326 326
 		
327 327
 		if ($code == "aesop_gallery") {
328
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
329
-		    echo do_shortcode( '[aesop_gallery id="'.$atts["id"].'"]');
328
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
329
+			echo do_shortcode( '[aesop_gallery id="'.$atts["id"].'"]');
330 330
 		}
331 331
 		
332 332
 		exit; 
Please login to merge, or discard this patch.
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 	 *
74 74
 	 * @since    0.0.1
75 75
 	 *
76
-	 * @return    Plugin slug variable.
76
+	 * @return    string slug variable.
77 77
 	 */
78 78
 	public function get_plugin_slug() {
79 79
 		return $this->plugin_slug;
@@ -274,6 +274,9 @@  discard block
 block discarded – undo
274 274
 		exit;
275 275
 	}
276 276
 	
277
+	/**
278
+	 * @param string $type
279
+	 */
277 280
 	public static function enable_metasave($type)
278 281
 	{
279 282
 		register_rest_field( $type, 'metadata', array(
Please login to merge, or discard this patch.
Spacing   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -52,14 +52,14 @@  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' ) );
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 63
 
64 64
 		// enable saving custom fields through REST API
65 65
 		self::enable_metasave('post');
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 	public static function get_instance() {
91 91
 
92 92
 		// If the single instance hasn't been set, set it now.
93
-		if ( null == self::$instance ) {
93
+		if (null == self::$instance) {
94 94
 			self::$instance = new self;
95 95
 		}
96 96
 
@@ -107,18 +107,18 @@  discard block
 block discarded – undo
107 107
 	 *                                       WPMU is disabled or plugin is
108 108
 	 *                                       activated on an individual blog.
109 109
 	 */
110
-	public static function activate( $network_wide ) {
110
+	public static function activate($network_wide) {
111 111
 
112
-		if ( function_exists( 'is_multisite' ) && is_multisite() ) {
112
+		if (function_exists('is_multisite') && is_multisite()) {
113 113
 
114
-			if ( $network_wide  ) {
114
+			if ($network_wide) {
115 115
 
116 116
 				// Get all blog ids
117 117
 				$blog_ids = self::get_blog_ids();
118 118
 
119
-				foreach ( $blog_ids as $blog_id ) {
119
+				foreach ($blog_ids as $blog_id) {
120 120
 
121
-					switch_to_blog( $blog_id );
121
+					switch_to_blog($blog_id);
122 122
 					self::single_activate();
123 123
 				}
124 124
 
@@ -144,18 +144,18 @@  discard block
 block discarded – undo
144 144
 	 *                                       WPMU is disabled or plugin is
145 145
 	 *                                       deactivated on an individual blog.
146 146
 	 */
147
-	public static function deactivate( $network_wide ) {
147
+	public static function deactivate($network_wide) {
148 148
 
149
-		if ( function_exists( 'is_multisite' ) && is_multisite() ) {
149
+		if (function_exists('is_multisite') && is_multisite()) {
150 150
 
151
-			if ( $network_wide ) {
151
+			if ($network_wide) {
152 152
 
153 153
 				// Get all blog ids
154 154
 				$blog_ids = self::get_blog_ids();
155 155
 
156
-				foreach ( $blog_ids as $blog_id ) {
156
+				foreach ($blog_ids as $blog_id) {
157 157
 
158
-					switch_to_blog( $blog_id );
158
+					switch_to_blog($blog_id);
159 159
 					self::single_deactivate();
160 160
 
161 161
 				}
@@ -179,13 +179,13 @@  discard block
 block discarded – undo
179 179
 	 *
180 180
 	 * @param int     $blog_id ID of the new blog.
181 181
 	 */
182
-	public function activate_new_site( $blog_id ) {
182
+	public function activate_new_site($blog_id) {
183 183
 
184
-		if ( 1 !== did_action( 'wpmu_new_blog' ) ) {
184
+		if (1 !== did_action('wpmu_new_blog')) {
185 185
 			return;
186 186
 		}
187 187
 
188
-		switch_to_blog( $blog_id );
188
+		switch_to_blog($blog_id);
189 189
 		self::single_activate();
190 190
 		restore_current_blog();
191 191
 
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 			WHERE archived = '0' AND spam = '0'
211 211
 			AND deleted = '0'";
212 212
 
213
-		return $wpdb->get_col( $sql );
213
+		return $wpdb->get_col($sql);
214 214
 
215 215
 	}
216 216
 
@@ -221,18 +221,18 @@  discard block
 block discarded – undo
221 221
 	 */
222 222
 	private static function single_activate() {
223 223
 
224
-		$curr_version = get_option( 'lasso_version' );
224
+		$curr_version = get_option('lasso_version');
225 225
 
226 226
 		// update upgraded from
227
-		if ( $curr_version ) {
228
-			update_option( 'lasso_updated_from', $curr_version );
227
+		if ($curr_version) {
228
+			update_option('lasso_updated_from', $curr_version);
229 229
 		}
230 230
 
231 231
 		// update lasso version option
232
-		update_option( 'lasso_version', LASSO_VERSION );
232
+		update_option('lasso_version', LASSO_VERSION);
233 233
 
234 234
 		// set transietn for activation welcome
235
-		set_transient( '_lasso_welcome_redirect', true, 30 );
235
+		set_transient('_lasso_welcome_redirect', true, 30);
236 236
 
237 237
 
238 238
 	}
@@ -254,15 +254,15 @@  discard block
 block discarded – undo
254 254
 	public function load_plugin_textdomain() {
255 255
 
256 256
 		$domain = $this->plugin_slug;
257
-		$locale = apply_filters( 'plugin_locale', get_locale(), $domain );
257
+		$locale = apply_filters('plugin_locale', get_locale(), $domain);
258 258
 
259
-		$out = load_textdomain( $domain, trailingslashit( LASSO_DIR ). 'languages/' . $domain . '-' . $locale . '.mo' );
259
+		$out = load_textdomain($domain, trailingslashit(LASSO_DIR).'languages/'.$domain.'-'.$locale.'.mo');
260 260
 	}
261 261
 	
262 262
     // new ajax function to lock post for editing
263 263
 	public function editus_lock_post()
264 264
 	{
265
-		$post_id= $_POST["postid"];
265
+		$post_id = $_POST["postid"];
266 266
 		$locked = wp_check_post_lock($post_id);
267 267
 		
268 268
 		if (!$locked) {
@@ -270,18 +270,18 @@  discard block
 block discarded – undo
270 270
 			echo "true";
271 271
 		} else {
272 272
 			$user_info = get_userdata($locked);
273
-			echo "Post opened by ".$user_info->first_name .  " " . $user_info->last_name;
273
+			echo "Post opened by ".$user_info->first_name." ".$user_info->last_name;
274 274
 		}
275 275
 		exit;
276 276
 	}
277 277
 	
278 278
 	public static function enable_metasave($type)
279 279
 	{
280
-		register_rest_field( $type, 'metadata', array(
281
-			'get_callback' => function ( $data ) {
282
-				return get_post_meta( $data['id']);//, '', '' );
280
+		register_rest_field($type, 'metadata', array(
281
+			'get_callback' => function($data) {
282
+				return get_post_meta($data['id']); //, '', '' );
283 283
 			}, 
284
-			'update_callback' => function( $data, $post ) {
284
+			'update_callback' => function($data, $post) {
285 285
 				foreach ($data as $key => $value) {
286 286
 					update_post_meta($post->ID, $key, $value);
287 287
 				}
@@ -293,9 +293,9 @@  discard block
 block discarded – undo
293 293
 	public function editus_do_shortcode()
294 294
 	{
295 295
 		
296
-		$code= $_POST["code"];
296
+		$code = $_POST["code"];
297 297
 		file_put_contents(WP_PLUGIN_DIR."/file10.txt", $code);
298
-		$out = lasso_wrap_shortcodes( $code);
298
+		$out = lasso_wrap_shortcodes($code);
299 299
 		echo do_shortcode($out);
300 300
 		exit;
301 301
 	}
@@ -304,57 +304,57 @@  discard block
 block discarded – undo
304 304
 	{
305 305
 		
306 306
 		
307
-		$code= $_POST["code"];
307
+		$code = $_POST["code"];
308 308
 		$atts = array(
309 309
 		 );
310 310
 		foreach ($_POST as $key => $value) {
311
-			if ($key !="code" && $key !="action") {
311
+			if ($key != "code" && $key != "action") {
312 312
 			    //$shortcode = $shortcode.$key.'="'.$value.'" ';
313 313
 				$atts[$key] = $value;
314 314
 			}
315 315
 		}
316 316
 		if ($code == "aesop_video") {
317
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-video.php');
317
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-video.php');
318 318
 		    echo aesop_video_shortcode($atts);
319 319
 		}
320 320
 		
321 321
 		if ($code == "aesop_image") {
322
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php');
322
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php');
323 323
 		    echo aesop_image_shortcode($atts);
324 324
 		}
325 325
 		if ($code == "aesop_quote") {
326
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php');
326
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php');
327 327
 		    echo aesop_quote_shortcode($atts);
328 328
 		}
329 329
 		
330 330
 		if ($code == "aesop_parallax") {
331
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php');
331
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php');
332 332
 		    echo aesop_parallax_shortcode($atts);
333 333
 		}
334 334
 		
335 335
 		if ($code == "aesop_character") {
336
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php');
336
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php');
337 337
 		    echo aesop_character_shortcode($atts);
338 338
 		}
339 339
 		
340 340
 		if ($code == "aesop_collection") {
341
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php');
341
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php');
342 342
 		    echo aesop_collection_shortcode($atts);
343 343
 		}
344 344
 		
345 345
 		if ($code == "aesop_chapter") {
346
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php');
346
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php');
347 347
 		    echo aesop_chapter_shortcode($atts);
348 348
 		}
349 349
 		
350 350
 		if ($code == "aesop_content") {
351
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php');
351
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php');
352 352
 		    echo aesop_content_shortcode($atts, $atts['content_data']);
353 353
 		}
354 354
 		
355 355
 		if ($code == "aesop_gallery") {
356
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
357
-		    echo do_shortcode( '[aesop_gallery id="'.$atts["id"].'"]');
356
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
357
+		    echo do_shortcode('[aesop_gallery id="'.$atts["id"].'"]');
358 358
 		}
359 359
 		
360 360
 		exit; 
Please login to merge, or discard this patch.
includes/process/update_object.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 	 *  @since    0.9.3
119 119
 	 *
120 120
 	 *  @param    int    	$postid       	The current postid
121
-     *  @param    string|bool     $value    The term slug, or a comma separated list of slugs. Or false to remove all terms set for post.
121
+	 *  @param    string|bool     $value    The term slug, or a comma separated list of slugs. Or false to remove all terms set for post.
122 122
 	 *  @param    string     $taxonomy    	The name of the taxonomy to which the term belongs.
123 123
 	 *
124 124
 	 *  @return bool True if update was successful, false if not.
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 			}
132 132
 			
133 133
 			if ($taxonomy =='category') {
134
-                // convert from names to category ids
134
+				// convert from names to category ids
135 135
 				$cats = array();
136 136
 				if (is_array($value)) {
137 137
 					foreach ($value as $cat) {
Please login to merge, or discard this 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.
Braces   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -144,8 +144,7 @@  discard block
 block discarded – undo
144 144
 			}
145 145
 	
146 146
 			$result = wp_set_object_terms( $postid, $value, $taxonomy );
147
-		}
148
-		else  {
147
+		} else  {
149 148
 			//remove all terms from post
150 149
 			$result = wp_set_object_terms( $postid, null, $taxonomy );
151 150
 
@@ -153,7 +152,7 @@  discard block
 block discarded – undo
153 152
 
154 153
 		if ( ! is_wp_error( $result ) ) {
155 154
 			return true;
156
-		}else{
155
+		} else{
157 156
 			return false;
158 157
 		}
159 158
 
Please login to merge, or discard this patch.
public/includes/helpers.php 4 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@  discard block
 block discarded – undo
6 6
  * If we're on multsite we'll grab the site option which is stored in the main blogs site option tables, otherwise
7 7
  * we'll grab the option which is stored on the single blogs option tables
8 8
  *
9
- * @param unknown $option  string name of the option
10
- * @param unknown $section string name of the section
9
+ * @param string $option  string name of the option
10
+ * @param string $section string name of the section
11 11
  * @param unknown $default string/int default option value
12 12
  * @return the option value
13 13
  * @since 1.0
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
  *	Return an array of categories for autocomplete
215 215
  *
216 216
  *	@since 0.9.3
217
- *	@return array all categoiries
217
+ *	@return null|string all categoiries
218 218
 */
219 219
 function lasso_get_objects( $taxonomy = 'category' ) {
220 220
 
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
 *	Used internally as a callback to build a tab or content area for modal addons
300 300
 *
301 301
 *	@param $tab object
302
-*	@param $type string tab or content
302
+*	@param string $type string tab or content
303 303
 *	@uses lasso_modal_addons()
304 304
 *	@since 0.9.4
305 305
 */
Please login to merge, or discard this patch.
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 		'public' => true,
244 244
 	), 'objects' );
245 245
 	$post_types = array_combine( array_keys( $post_types ), wp_list_pluck( $post_types, 'label' ) );
246
-    unset( $post_types[ 'attachment' ] );
246
+	unset( $post_types[ 'attachment' ] );
247 247
 
248 248
 	/**
249 249
 	 * Set which post types are allowed
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
 	$post_types = get_post_types( array(
271 271
 		'public' => true,
272 272
 	), 'names' );
273
-    unset( $post_types[ 'attachment' ] );
273
+	unset( $post_types[ 'attachment' ] );
274 274
 
275 275
 	/**
276 276
 	 * Set which post types are allowed
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
  */
383 383
 if ( !function_exists( 'lasso_user_can' ) ):
384 384
 	function lasso_user_can( $action = '', $postid = 0 ) {
385
-        $result = false;
385
+		$result = false;
386 386
 		if ( empty( $action ) )
387 387
 			$action = 'edit_posts';
388 388
 
@@ -397,17 +397,17 @@  discard block
 block discarded – undo
397 397
 				$allowed_post_types = array_diff($allowed_post_types,array('page'));
398 398
 			}
399 399
 			
400
-            if (!empty($allowed_post_types) && !empty($postid)) {
400
+			if (!empty($allowed_post_types) && !empty($postid)) {
401 401
 				$type = get_post_type( $postid );
402
-                $allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
402
+				$allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
403 403
 				
404
-                if ( in_array( $type, $allowed_post_types ) ) {
404
+				if ( in_array( $type, $allowed_post_types ) ) {
405 405
 				   $result =  true;
406
-			    }
407
-            } else {
408
-                //we are not checking against a post, return true
406
+				}
407
+			} else {
408
+				//we are not checking against a post, return true
409 409
 				$result =  true;
410
-        	}
410
+			}
411 411
 		} else {
412 412
 			$result = false;
413 413
 		}
Please login to merge, or discard this patch.
Spacing   +82 added lines, -82 removed lines patch added patch discarded remove patch
@@ -12,21 +12,21 @@  discard block
 block discarded – undo
12 12
  * @return the option value
13 13
  * @since 1.0
14 14
  */
15
-function lasso_editor_get_option( $option, $section, $default = '' ) {
15
+function lasso_editor_get_option($option, $section, $default = '') {
16 16
 
17
-	if ( empty( $option ) )
17
+	if (empty($option))
18 18
 		return;
19 19
 
20
-	if ( function_exists( 'is_multisite' ) && is_multisite() ) {
20
+	if (function_exists('is_multisite') && is_multisite()) {
21 21
 
22
-		$options = get_site_option( $section );
22
+		$options = get_site_option($section);
23 23
 
24 24
 	} else {
25 25
 
26
-		$options = get_option( $section );
26
+		$options = get_option($section);
27 27
 	}
28 28
 
29
-	if ( isset( $options[$option] ) ) {
29
+	if (isset($options[$option])) {
30 30
 		return $options[$option];
31 31
 	}
32 32
 
@@ -40,9 +40,9 @@  discard block
 block discarded – undo
40 40
  */
41 41
 function lasso_editor_galleries_exist() {
42 42
 
43
-	$q = new wp_query( array( 'post_type' => 'ai_galleries', 'post_status' => 'publish' ) );
43
+	$q = new wp_query(array('post_type' => 'ai_galleries', 'post_status' => 'publish'));
44 44
 
45
-	if ( $q->have_posts() )
45
+	if ($q->have_posts())
46 46
 		return true;
47 47
 	else
48 48
 		return false;
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
 function lasso_get_supported_theme_class() {
58 58
 
59 59
 	$name  	= wp_get_theme()->get('Name');
60
-	$slug  	= lasso_clean_string( $name );
60
+	$slug  	= lasso_clean_string($name);
61 61
 
62
-	switch ( $slug ) {
62
+	switch ($slug) {
63 63
 		case 'aesop-story-theme': // aesop
64 64
 			$out = '.aesop-entry-content';
65 65
 			break;
@@ -108,16 +108,16 @@  discard block
 block discarded – undo
108 108
 
109 109
 	}
110 110
 
111
-	return apply_filters('lasso_content_class', !empty( $out ) ? $out : false);
111
+	return apply_filters('lasso_content_class', !empty($out) ? $out : false);
112 112
 	//return !empty( $out ) ? $out : false;
113 113
 }
114 114
 
115 115
 function lasso_get_supported_theme_title_class() {
116 116
 
117 117
 	$name  	= wp_get_theme()->get('Name');
118
-	$slug  	= lasso_clean_string( $name );
118
+	$slug  	= lasso_clean_string($name);
119 119
 
120
-	switch ( $slug ) {
120
+	switch ($slug) {
121 121
 
122 122
 		case 'aesop-story-theme': // aesop
123 123
 			$out = '.aesop-entry-title';
@@ -145,16 +145,16 @@  discard block
 block discarded – undo
145 145
 			break;
146 146
 	}
147 147
 
148
-	return apply_filters('lasso_title_class', !empty( $out ) ? $out : false);
148
+	return apply_filters('lasso_title_class', !empty($out) ? $out : false);
149 149
 }
150 150
 
151 151
 //since 0.9.9.6
152 152
 function lasso_get_supported_theme_featured_image_class() {
153 153
 
154 154
 	$name  	= wp_get_theme()->get('Name');
155
-	$slug  	= lasso_clean_string( $name );
155
+	$slug  	= lasso_clean_string($name);
156 156
 
157
-	return apply_filters('lasso_featured_image_class', !empty( $out ) ? $out : false);
157
+	return apply_filters('lasso_featured_image_class', !empty($out) ? $out : false);
158 158
 }
159 159
 
160 160
 
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 *	@since 0.8.7
166 166
 *	@return string of comma separated classes
167 167
 */
168
-function lasso_supported_no_save(){
168
+function lasso_supported_no_save() {
169 169
 
170 170
 	return apply_filters('lasso_dont_save', '.lasso--ignore, .sharedaddy, .us_wrapper, .twitter-tweet, .meta, .edit-link, .ssba, .jp-relatedposts, .fb-comments');
171 171
 }
@@ -179,8 +179,8 @@  discard block
 block discarded – undo
179 179
  *
180 180
  * @return array|mixed|object|string|void
181 181
  */
182
-function lasso_sanitize_data( $data ) {
183
-	return \lasso\sanatize::do_sanitize( $data );
182
+function lasso_sanitize_data($data) {
183
+	return \lasso\sanatize::do_sanitize($data);
184 184
 
185 185
 }
186 186
 
@@ -190,18 +190,18 @@  discard block
 block discarded – undo
190 190
  *	@since 0.9.3
191 191
  *	@return string of comma delimited category slugs
192 192
 */
193
-function lasso_get_post_objects( $postid = '', $taxonomy = 'category') {
193
+function lasso_get_post_objects($postid = '', $taxonomy = 'category') {
194 194
 
195
-	if ( empty( $postid ) )
195
+	if (empty($postid))
196 196
 		$postid = get_the_ID();
197 197
 
198
-	$objects = 'category' == $taxonomy ? get_the_category( $postid ) : get_the_tags( $postid );
198
+	$objects = 'category' == $taxonomy ? get_the_category($postid) : get_the_tags($postid);
199 199
 
200
-	if ( empty( $objects) )
200
+	if (empty($objects))
201 201
 		return;
202 202
 
203 203
 	$out = '';
204
-	foreach( $objects as $object ) {
204
+	foreach ($objects as $object) {
205 205
 		//$out .= $object->slug.', ';
206 206
 		$out .= $object->name.', ';
207 207
 	}
@@ -216,15 +216,15 @@  discard block
 block discarded – undo
216 216
  *	@since 0.9.3
217 217
  *	@return array all categoiries
218 218
 */
219
-function lasso_get_objects( $taxonomy = 'category' ) {
219
+function lasso_get_objects($taxonomy = 'category') {
220 220
 
221 221
 	$objects = 'category' == $taxonomy ? get_categories(array('hide_empty' => 0)) : get_tags(array('hide_empty' => 0));
222 222
 
223
-	if ( empty( $objects) )
223
+	if (empty($objects))
224 224
 		return;
225 225
 
226 226
 	$out = "";
227
-	foreach( $objects as $object ) {
227
+	foreach ($objects as $object) {
228 228
 		$out .= $object->name.',';
229 229
 	}
230 230
 
@@ -239,11 +239,11 @@  discard block
 block discarded – undo
239 239
  * @since 0.9.4
240 240
  */
241 241
 function lasso_post_types_names() {
242
-	$post_types = get_post_types( array(
242
+	$post_types = get_post_types(array(
243 243
 		'public' => true,
244
-	), 'objects' );
245
-	$post_types = array_combine( array_keys( $post_types ), wp_list_pluck( $post_types, 'label' ) );
246
-    unset( $post_types[ 'attachment' ] );
244
+	), 'objects');
245
+	$post_types = array_combine(array_keys($post_types), wp_list_pluck($post_types, 'label'));
246
+    unset($post_types['attachment']);
247 247
 
248 248
 	/**
249 249
 	 * Set which post types are allowed
@@ -252,14 +252,14 @@  discard block
 block discarded – undo
252 252
 	 *
253 253
 	 * @param array $allowed_post_types Array of names (not labels) of allowed post types. Must be registered.
254 254
 	 */
255
-	$allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor', array( 'post', 'page') );
256
-	$allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
255
+	$allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', array('post', 'page'));
256
+	$allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
257 257
 	if (!current_user_can('edit_pages')) {
258
-		$allowed_post_types = array_diff($allowed_post_types,array('page'));
258
+		$allowed_post_types = array_diff($allowed_post_types, array('page'));
259 259
 	}
260
-	foreach( $post_types as $name => $label ) {
261
-		if ( ! in_array( $name, $allowed_post_types ) ) {
262
-			unset( $post_types[ $name ] );
260
+	foreach ($post_types as $name => $label) {
261
+		if (!in_array($name, $allowed_post_types)) {
262
+			unset($post_types[$name]);
263 263
 		}
264 264
 	}
265 265
 	return $post_types;
@@ -267,10 +267,10 @@  discard block
 block discarded – undo
267 267
 
268 268
 
269 269
 function lasso_post_types() {
270
-	$post_types = get_post_types( array(
270
+	$post_types = get_post_types(array(
271 271
 		'public' => true,
272
-	), 'names' );
273
-    unset( $post_types[ 'attachment' ] );
272
+	), 'names');
273
+    unset($post_types['attachment']);
274 274
 
275 275
 	/**
276 276
 	 * Set which post types are allowed
@@ -279,11 +279,11 @@  discard block
 block discarded – undo
279 279
 	 *
280 280
 	 * @param array $allowed_post_types Array of names (not labels) of allowed post types. Must be registered.
281 281
 	 */
282
-	$allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor', array( 'post') );
283
-	$allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
284
-	foreach( $post_types as $name => $label ) {
285
-		if ( ! in_array( $name, $allowed_post_types ) ) {
286
-			unset( $post_types[ $name ] );
282
+	$allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', array('post'));
283
+	$allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
284
+	foreach ($post_types as $name => $label) {
285
+		if (!in_array($name, $allowed_post_types)) {
286
+			unset($post_types[$name]);
287 287
 		}
288 288
 	}
289 289
 	return $post_types;
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
 	global $wp_post_types;
294 294
 	$post_types = lasso_post_types();
295 295
 	$rest_base = array();
296
-	foreach ( $post_types as $post_type) {
296
+	foreach ($post_types as $post_type) {
297 297
 		$rest_base[$post_type] = $wp_post_types[$post_type]->rest_base;
298 298
 	}
299 299
     
@@ -311,22 +311,22 @@  discard block
 block discarded – undo
311 311
 *	@uses lasso_modal_addons()
312 312
 *	@since 0.9.4
313 313
 */
314
-function lasso_modal_addons_content( $tab = '', $type ){
314
+function lasso_modal_addons_content($tab = '', $type) {
315 315
 
316
-	$name = lasso_clean_string( $tab['name'] );
316
+	$name = lasso_clean_string($tab['name']);
317 317
 
318
-	if ( 'tab' == $type ) {
318
+	if ('tab' == $type) {
319 319
 
320
-		$out = sprintf( '<li data-addon-name="%s">%s</li>', $name, $tab['name'] );
320
+		$out = sprintf('<li data-addon-name="%s">%s</li>', $name, $tab['name']);
321 321
 
322
-	} else if ( 'content' == $type ){
322
+	} else if ('content' == $type) {
323 323
 
324
-		$content = isset( $tab['content'] ) && is_callable( $tab['content'] ) ? call_user_func( $tab['content'] ) : false;
325
-		$options = isset( $tab['options'] ) && is_callable( $tab['options'] ) ? call_user_func( $tab['options'] ) : false;
324
+		$content = isset($tab['content']) && is_callable($tab['content']) ? call_user_func($tab['content']) : false;
325
+		$options = isset($tab['options']) && is_callable($tab['options']) ? call_user_func($tab['options']) : false;
326 326
 
327
-		$out = sprintf( '<div class="lasso--modal__content not-visible" data-addon-content="%s">
327
+		$out = sprintf('<div class="lasso--modal__content not-visible" data-addon-content="%s">
328 328
 			%s%s
329
-			</div>', $name, $content, lasso_option_form( $name, $options ) );
329
+			</div>', $name, $content, lasso_option_form($name, $options));
330 330
 
331 331
 	}
332 332
 
@@ -341,12 +341,12 @@  discard block
 block discarded – undo
341 341
 *
342 342
 * @return void|string
343 343
 */
344
-function lasso_clean_string( $string = '' ) {
344
+function lasso_clean_string($string = '') {
345 345
 
346
-	if ( empty( $string ) )
346
+	if (empty($string))
347 347
 		return;
348 348
 
349
-	return sanitize_text_field( strtolower( preg_replace('/[\s_]/', '-', $string ) ) );
349
+	return sanitize_text_field(strtolower(preg_replace('/[\s_]/', '-', $string)));
350 350
 }
351 351
 
352 352
 /**
@@ -359,13 +359,13 @@  discard block
 block discarded – undo
359 359
  *
360 360
  * @return void|string
361 361
  */
362
-function lasso_unclean_string( $string = '' ) {
362
+function lasso_unclean_string($string = '') {
363 363
 
364
-	if ( empty( $string ) ) {
364
+	if (empty($string)) {
365 365
 		return;
366 366
 	}
367 367
 
368
-	return sanitize_text_field( strtolower( str_replace( '-', '_', $string ) ) );
368
+	return sanitize_text_field(strtolower(str_replace('-', '_', $string)));
369 369
 }
370 370
 
371 371
 
@@ -380,39 +380,39 @@  discard block
 block discarded – undo
380 380
  * @param unknown $postid int the id of the post object to check against
381 381
  * @since 0.9.9.7 added filter 'lasso_user_can_filter'
382 382
  */
383
-if ( !function_exists( 'lasso_user_can' ) ):
384
-	function lasso_user_can( $action = '', $postid = 0 ) {
383
+if (!function_exists('lasso_user_can')):
384
+	function lasso_user_can($action = '', $postid = 0) {
385 385
         $result = false;
386
-		if ( empty( $action ) )
386
+		if (empty($action))
387 387
 			$action = 'edit_posts';
388 388
 
389
-		if ( empty( $postid ) && $action != 'edit_posts' && $action != 'publish_posts')
389
+		if (empty($postid) && $action != 'edit_posts' && $action != 'publish_posts')
390 390
 			$postid = get_the_ID();
391 391
 
392
-		if ( is_user_logged_in() && current_user_can( $action, $postid ) ) {
392
+		if (is_user_logged_in() && current_user_can($action, $postid)) {
393 393
 			// check against post types:
394
-			$allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor', array( 'post', 'page') );
394
+			$allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', array('post', 'page'));
395 395
 			
396 396
 			if (!current_user_can('edit_pages')) {
397
-				$allowed_post_types = array_diff($allowed_post_types,array('page'));
397
+				$allowed_post_types = array_diff($allowed_post_types, array('page'));
398 398
 			}
399 399
 			
400 400
             if (!empty($allowed_post_types) && !empty($postid)) {
401
-				$type = get_post_type( $postid );
402
-                $allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
401
+				$type = get_post_type($postid);
402
+                $allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
403 403
 				
404
-                if ( in_array( $type, $allowed_post_types ) ) {
405
-				   $result =  true;
404
+                if (in_array($type, $allowed_post_types)) {
405
+				   $result = true;
406 406
 			    }
407 407
             } else {
408 408
                 //we are not checking against a post, return true
409
-				$result =  true;
409
+				$result = true;
410 410
         	}
411 411
 		} else {
412 412
 			$result = false;
413 413
 		}
414 414
 		
415
-		return apply_filters( 'lasso_user_can_filter', $result,  $action, $postid);
415
+		return apply_filters('lasso_user_can_filter', $result, $action, $postid);
416 416
 	}
417 417
 endif;
418 418
 
@@ -421,25 +421,25 @@  discard block
 block discarded – undo
421 421
 *
422 422
 *	@since 0.9.5
423 423
 */
424
-if ( !function_exists('lasso_editor_empty_results') ):
424
+if (!function_exists('lasso_editor_empty_results')):
425 425
 
426
-	function lasso_editor_empty_results( $type = 'posts' ){
426
+	function lasso_editor_empty_results($type = 'posts') {
427 427
 
428
-		if ( 'posts' == $type ) {
428
+		if ('posts' == $type) {
429 429
 
430
-			$string = apply_filters('lasso_empty_state_message', __('No posts to show', 'lasso') );
430
+			$string = apply_filters('lasso_empty_state_message', __('No posts to show', 'lasso'));
431 431
 			$icon = 'lasso-icon-file-text2';
432 432
 			$button = false;
433 433
 
434
-		} elseif ( 'revision' == $type ) {
434
+		} elseif ('revision' == $type) {
435 435
 
436
-			$string = apply_filters('lasso_empty_state_message', __('No revisions found', 'lasso') );
436
+			$string = apply_filters('lasso_empty_state_message', __('No revisions found', 'lasso'));
437 437
 			$icon = 'lasso-icon-history';
438
-			$button = sprintf('<a href="#" class="lasso--btn-secondary" id="lasso--close-modal">%s</a>', __('Close','lasso') );
438
+			$button = sprintf('<a href="#" class="lasso--btn-secondary" id="lasso--close-modal">%s</a>', __('Close', 'lasso'));
439 439
 
440 440
 		}
441 441
 
442
-		return sprintf('<div id="lasso--empty-state" class="lasso--empty-state"><i class="lasso--empty-state-icon lasso-icon %s"></i><p>%s</p>%s</div>', $icon, $string, $button );
442
+		return sprintf('<div id="lasso--empty-state" class="lasso--empty-state"><i class="lasso--empty-state-icon lasso-icon %s"></i><p>%s</p>%s</div>', $icon, $string, $button);
443 443
 	}
444 444
 
445 445
 endif;
Please login to merge, or discard this patch.
Braces   +27 added lines, -19 removed lines patch added patch discarded remove patch
@@ -14,8 +14,9 @@  discard block
 block discarded – undo
14 14
  */
15 15
 function lasso_editor_get_option( $option, $section, $default = '' ) {
16 16
 
17
-	if ( empty( $option ) )
18
-		return;
17
+	if ( empty( $option ) ) {
18
+			return;
19
+	}
19 20
 
20 21
 	if ( function_exists( 'is_multisite' ) && is_multisite() ) {
21 22
 
@@ -42,11 +43,12 @@  discard block
 block discarded – undo
42 43
 
43 44
 	$q = new wp_query( array( 'post_type' => 'ai_galleries', 'post_status' => 'publish' ) );
44 45
 
45
-	if ( $q->have_posts() )
46
-		return true;
47
-	else
48
-		return false;
49
-}
46
+	if ( $q->have_posts() ) {
47
+			return true;
48
+	} else {
49
+			return false;
50
+	}
51
+	}
50 52
 
51 53
 /**
52 54
  * Return a CSS class of an automatically supported theme
@@ -192,13 +194,15 @@  discard block
 block discarded – undo
192 194
 */
193 195
 function lasso_get_post_objects( $postid = '', $taxonomy = 'category') {
194 196
 
195
-	if ( empty( $postid ) )
196
-		$postid = get_the_ID();
197
+	if ( empty( $postid ) ) {
198
+			$postid = get_the_ID();
199
+	}
197 200
 
198 201
 	$objects = 'category' == $taxonomy ? get_the_category( $postid ) : get_the_tags( $postid );
199 202
 
200
-	if ( empty( $objects) )
201
-		return;
203
+	if ( empty( $objects) ) {
204
+			return;
205
+	}
202 206
 
203 207
 	$out = '';
204 208
 	foreach( $objects as $object ) {
@@ -220,8 +224,9 @@  discard block
 block discarded – undo
220 224
 
221 225
 	$objects = 'category' == $taxonomy ? get_categories(array('hide_empty' => 0)) : get_tags(array('hide_empty' => 0));
222 226
 
223
-	if ( empty( $objects) )
224
-		return;
227
+	if ( empty( $objects) ) {
228
+			return;
229
+	}
225 230
 
226 231
 	$out = "";
227 232
 	foreach( $objects as $object ) {
@@ -343,8 +348,9 @@  discard block
 block discarded – undo
343 348
 */
344 349
 function lasso_clean_string( $string = '' ) {
345 350
 
346
-	if ( empty( $string ) )
347
-		return;
351
+	if ( empty( $string ) ) {
352
+			return;
353
+	}
348 354
 
349 355
 	return sanitize_text_field( strtolower( preg_replace('/[\s_]/', '-', $string ) ) );
350 356
 }
@@ -383,11 +389,13 @@  discard block
 block discarded – undo
383 389
 if ( !function_exists( 'lasso_user_can' ) ):
384 390
 	function lasso_user_can( $action = '', $postid = 0 ) {
385 391
         $result = false;
386
-		if ( empty( $action ) )
387
-			$action = 'edit_posts';
392
+		if ( empty( $action ) ) {
393
+					$action = 'edit_posts';
394
+		}
388 395
 
389
-		if ( empty( $postid ) && $action != 'edit_posts' && $action != 'publish_posts')
390
-			$postid = get_the_ID();
396
+		if ( empty( $postid ) && $action != 'edit_posts' && $action != 'publish_posts') {
397
+					$postid = get_the_ID();
398
+		}
391 399
 
392 400
 		if ( is_user_logged_in() && current_user_can( $action, $postid ) ) {
393 401
 			// check against post types:
Please login to merge, or discard this patch.
lasso.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,8 +57,8 @@
 block discarded – undo
57 57
 		if( !$wp_post_types[$key] )
58 58
 			continue;
59 59
 	    	
60
-    	$wp_post_types[$key]->show_in_rest = true;
61
-    }
60
+		$wp_post_types[$key]->show_in_rest = true;
61
+	}
62 62
 }
63 63
 
64 64
  add_action( 'init', 'lasso_show_in_rest' );
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,8 +54,9 @@
 block discarded – undo
54 54
 	foreach( $allowed_post_types as $key ) {
55 55
 	    
56 56
 		// If the post type doesn't exist, skip it
57
-		if( !$wp_post_types[$key] )
58
-			continue;
57
+		if( !$wp_post_types[$key] ) {
58
+					continue;
59
+		}
59 60
 	    	
60 61
     	$wp_post_types[$key]->show_in_rest = true;
61 62
     }
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -18,27 +18,27 @@  discard block
 block discarded – undo
18 18
  */
19 19
 
20 20
 // If this file is called directly, abort.
21
-if ( ! defined( 'WPINC' ) ) {
21
+if (!defined('WPINC')) {
22 22
 	die;
23 23
 }
24 24
 
25 25
 // Set some constants
26
-define( 'LASSO_VERSION', '0.9.15.1' );
27
-define( 'LASSO_DIR', plugin_dir_path( __FILE__ ) );
28
-define( 'LASSO_URL', plugins_url( '', __FILE__ ) );
29
-define( 'LASSO_FILE', __FILE__ );
26
+define('LASSO_VERSION', '0.9.15.1');
27
+define('LASSO_DIR', plugin_dir_path(__FILE__));
28
+define('LASSO_URL', plugins_url('', __FILE__));
29
+define('LASSO_FILE', __FILE__);
30 30
 
31 31
 /**
32 32
  * Load plugin if PHP version is 5.4 or later.
33 33
  */
34
-if ( version_compare( PHP_VERSION, '5.4.0', '>=' ) ) {
34
+if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
35 35
 
36
-	include_once( LASSO_DIR . '/bootstrap.php' );
36
+	include_once(LASSO_DIR.'/bootstrap.php');
37 37
 
38 38
 } else {
39 39
 
40 40
 	add_action('admin_head', 'lasso_fail_notice');
41
-	function lasso_fail_notice(){
41
+	function lasso_fail_notice() {
42 42
 
43 43
 		printf('<div class="error"><p>Lasso requires PHP 5.4 or higher.</p></div>');
44 44
 
@@ -48,18 +48,18 @@  discard block
 block discarded – undo
48 48
 function lasso_show_in_rest() {
49 49
 	global $wp_post_types;
50 50
 	
51
-	$allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor', array( ) );
52
-	$allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
51
+	$allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', array( ));
52
+	$allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
53 53
 	
54
-	foreach( $allowed_post_types as $key ) {
54
+	foreach ($allowed_post_types as $key) {
55 55
 	    
56 56
 		// If the post type doesn't exist, skip it
57
-		if( !$wp_post_types[$key] )
57
+		if (!$wp_post_types[$key])
58 58
 			continue;
59 59
 	    	
60 60
     	$wp_post_types[$key]->show_in_rest = true;
61 61
     }
62 62
 }
63 63
 
64
- add_action( 'init', 'lasso_show_in_rest' );
64
+ add_action('init', 'lasso_show_in_rest');
65 65
 
Please login to merge, or discard this patch.
admin/includes/menus/settings.php 2 patches
Braces   +9 added lines, -5 removed lines patch added patch discarded remove patch
@@ -45,8 +45,9 @@  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() )
49
-			return;
48
+		if ( !current_user_can( 'manage_options' ) || !is_user_logged_in() ) {
49
+					return;
50
+		}
50 51
 
51 52
 		if ( isset( $_POST['action'] ) && 'lasso-editor-settings' == $_POST['action'] && check_admin_referer( 'nonce', 'lasso_editor_settings' ) ) {
52 53
 
@@ -86,8 +87,9 @@  discard block
 block discarded – undo
86 87
 	 */
87 88
 	function lasso_editor_settings_form() {
88 89
 
89
-		if ( !is_user_logged_in() )
90
-			return;
90
+		if ( !is_user_logged_in() ) {
91
+					return;
92
+		}
91 93
 
92 94
 		$article_object   = lasso_editor_get_option( 'article_class', 'lasso_editor' );
93 95
 		$featImgClass    = lasso_editor_get_option( 'featimg_class', 'lasso_editor' );
@@ -137,7 +139,9 @@  discard block
 block discarded – undo
137 139
 						$post_types = get_post_types( $args, 'objects' );
138 140
 						 
139 141
 						foreach ( $post_types  as $post_type ) {
140
-						   if ($post_type->name == 'attachment') continue;
142
+						   if ($post_type->name == 'attachment') {
143
+						   	continue;
144
+						   }
141 145
 						   $checked ="";
142 146
 						   if (  in_array( $post_type->name, $allowed_post_types )  ) {
143 147
 								$checked = 'checked="checked"';
Please login to merge, or discard this patch.
Spacing   +98 added lines, -98 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,62 +86,62 @@  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");
116
+		$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor', "b");
117 117
 
118 118
 ?>
119 119
 		<div class="wrap">
120 120
 
121
-	    	<h2><?php _e( 'Editus Settings', 'lasso' );?></h2>
121
+	    	<h2><?php _e('Editus Settings', 'lasso'); ?></h2>
122 122
 
123 123
 			<form id="lasso-editor-settings-form" class="lasso--form-settings" method="post" enctype="multipart/form-data">
124 124
 
125
-				<?php do_action('lasso_settings_before');?>
125
+				<?php do_action('lasso_settings_before'); ?>
126 126
 				
127 127
 				
128 128
 				
129 129
 				<div class="lasso-editor-settings--option-wrap">
130 130
 					<div class="lasso-editor-settings--option-inner">
131
-						<label><?php _e( 'Enable for:', 'lasso' );?></label>
132
-						<span class="lasso--setting-description"><?php _e( 'Enable Editus for the following post types.', 'lasso' );?></span>
131
+						<label><?php _e('Enable for:', 'lasso'); ?></label>
132
+						<span class="lasso--setting-description"><?php _e('Enable Editus for the following post types.', 'lasso'); ?></span>
133 133
 						<?php
134 134
 						$args = array(
135 135
 							'public'   => true
136 136
 						);
137 137
 						 
138
-						$allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types );
139
-						$post_types = get_post_types( $args, 'objects' );
138
+						$allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types);
139
+						$post_types = get_post_types($args, 'objects');
140 140
 						 
141
-						foreach ( $post_types  as $post_type ) {
141
+						foreach ($post_types  as $post_type) {
142 142
 						   if ($post_type->name == 'attachment') continue;
143
-						   $checked ="";
144
-						   if (  in_array( $post_type->name, $allowed_post_types )  ) {
143
+						   $checked = "";
144
+						   if (in_array($post_type->name, $allowed_post_types)) {
145 145
 								$checked = 'checked="checked"';
146 146
 						   }
147 147
 						   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>';
@@ -154,66 +154,66 @@  discard block
 block discarded – undo
154 154
 				<h3>Internal Settings</h3>
155 155
 				<div class="lasso-editor-settings--option-wrap">
156 156
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
157
-						<label><?php _e( 'Article Class', 'lasso' );?></label>
158
-						<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>
159
-						<input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr( $article_object );?>" placeholder=".entry-content">
157
+						<label><?php _e('Article Class', 'lasso'); ?></label>
158
+						<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>
159
+						<input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr($article_object); ?>" placeholder=".entry-content">
160 160
 					</div>
161 161
 				
162 162
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
163
-						<label><?php _e( 'Featured Image Class', 'lasso' );?></label>
164
-						<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>
165
-						<input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr( $featImgClass );?>" placeholder=".entry-content">
163
+						<label><?php _e('Featured Image Class', 'lasso'); ?></label>
164
+						<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>
165
+						<input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr($featImgClass); ?>" placeholder=".entry-content">
166 166
 					</div>
167 167
 				
168 168
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
169
-						<label><?php _e( 'Article Title Class', 'lasso' );?></label>
170
-						<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>
171
-						<input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr( $titleClass );?>" placeholder=".entry-content">
169
+						<label><?php _e('Article Title Class', 'lasso'); ?></label>
170
+						<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>
171
+						<input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr($titleClass); ?>" placeholder=".entry-content">
172 172
 					</div>
173 173
 				
174 174
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
175
-						<label><?php _e( 'Ignored Items to Save', 'lasso' );?></label>
176
-						<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>
177
-						<textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNoSave );?></textarea>
175
+						<label><?php _e('Ignored Items to Save', 'lasso'); ?></label>
176
+						<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>
177
+						<textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNoSave); ?></textarea>
178 178
 					</div>
179 179
 				
180 180
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
181
-						<label><?php _e( 'Read Only Items', 'lasso' );?></label>
182
-						<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>
183
-						<textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNonEditable );?></textarea>
181
+						<label><?php _e('Read Only Items', 'lasso'); ?></label>
182
+						<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>
183
+						<textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNonEditable); ?></textarea>
184 184
 					</div>
185 185
 				
186 186
 					<div class="lasso-editor-settings--option-inner" >
187
-						<input type="checkbox" class="checkbox" name="lasso_editor[show_ignored_items]" id="lasso_editor[show_ignored_items]" <?php echo checked( $show_ignored_items, 'on' );?> >
188
-						<label for="lasso_editor[show_ignored_items]"> <?php _e( 'Show Ignored Items', 'lasso' );?></label>
189
-						<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>
187
+						<input type="checkbox" class="checkbox" name="lasso_editor[show_ignored_items]" id="lasso_editor[show_ignored_items]" <?php echo checked($show_ignored_items, 'on'); ?> >
188
+						<label for="lasso_editor[show_ignored_items]"> <?php _e('Show Ignored Items', 'lasso'); ?></label>
189
+						<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>
190 190
 					</div>
191 191
 				</div>
192 192
 
193 193
 				<h3>Editor UI</h3>
194 194
 				<div class="lasso-editor-settings--option-wrap">
195 195
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
196
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked( $toolbar_headings, 'on' );?> >
197
-						<label for="lasso_editor[toolbar_headings]"><?php _e( 'Enable H2 and H3 Buttons', 'lasso' );?></label>
198
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set H2 and H3 settings.', 'lasso' );?></span>
196
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked($toolbar_headings, 'on'); ?> >
197
+						<label for="lasso_editor[toolbar_headings]"><?php _e('Enable H2 and H3 Buttons', 'lasso'); ?></label>
198
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set H2 and H3 settings.', 'lasso'); ?></span>
199 199
 
200 200
 					</div>
201 201
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
202
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings_h4]" id="lasso_editor[toolbar_headings_h4]" <?php echo checked( $toolbar_headings_h4, 'on' );?> >
203
-						<label for="lasso_editor[toolbar_headings_h4]"><?php _e( 'Enable H4/H5/H6 Buttons', 'lasso' );?></label>
204
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set H4/H5/H6 settings.', 'lasso' );?></span>
202
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings_h4]" id="lasso_editor[toolbar_headings_h4]" <?php echo checked($toolbar_headings_h4, 'on'); ?> >
203
+						<label for="lasso_editor[toolbar_headings_h4]"><?php _e('Enable H4/H5/H6 Buttons', 'lasso'); ?></label>
204
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set H4/H5/H6 settings.', 'lasso'); ?></span>
205 205
 
206 206
 					</div>
207 207
 					<div class="lasso-editor-settings--option-inner" style="border:none;">
208
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked( $toolbar_show_color, 'on' );?> >
209
-						<label for="lasso_editor[toolbar_show_color]"><?php _e( 'Enable Text Color Buttons', 'lasso' );?></label>
210
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set text colors.', 'lasso' );?></span>
208
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked($toolbar_show_color, 'on'); ?> >
209
+						<label for="lasso_editor[toolbar_show_color]"><?php _e('Enable Text Color Buttons', 'lasso'); ?></label>
210
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set text colors.', 'lasso'); ?></span>
211 211
 
212 212
 					</div>
213 213
 					<div class="lasso-editor-settings--option-inner">
214
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked( $toolbar_show_alignment, 'on' );?> >
215
-						<label for="lasso_editor[toolbar_show_alignment]"><?php _e( 'Enable Text Align Buttons', 'lasso' );?></label>
216
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set text alignment.', 'lasso' );?></span>
214
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked($toolbar_show_alignment, 'on'); ?> >
215
+						<label for="lasso_editor[toolbar_show_alignment]"><?php _e('Enable Text Align Buttons', 'lasso'); ?></label>
216
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set text alignment.', 'lasso'); ?></span>
217 217
 
218 218
 					</div>
219 219
 				</div>
@@ -225,60 +225,60 @@  discard block
 block discarded – undo
225 225
 				<h3>Post UI</h3>
226 226
 				<div class="lasso-editor-settings--option-wrap"  >
227 227
 					<div class="lasso-editor-settings--option-inner" style="border:none">
228
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked( $post_settings_disabled, 'on' );?> >
229
-						<label for="lasso_editor[post_settings_disabled]"> <?php _e( 'Disable Post Settings', 'lasso' );?></label>
230
-						<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>
228
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked($post_settings_disabled, 'on'); ?> >
229
+						<label for="lasso_editor[post_settings_disabled]"> <?php _e('Disable Post Settings', 'lasso'); ?></label>
230
+						<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>
231 231
 					</div>
232 232
 				
233 233
 					<div class="lasso-editor-settings--option-inner" >
234
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked( $post_new_disabled, 'on' );?> >
235
-						<label for="lasso_editor[post_adding_disabled]"><?php _e( 'Disable Post Adding', 'lasso' );?></label>
236
-						<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>
234
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked($post_new_disabled, 'on'); ?> >
235
+						<label for="lasso_editor[post_adding_disabled]"><?php _e('Disable Post Adding', 'lasso'); ?></label>
236
+						<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>
237 237
 					</div>
238 238
 				</div>
239 239
 				
240 240
 				<h3>Misc</h3>
241 241
 				<div class="lasso-editor-settings--option-wrap">
242 242
 					<div class="lasso-editor-settings--option-inner" style="border:none">
243
-						<input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked( $disable_tour, 'on' );?> >
244
-						<label for="lasso_editor[disable_tour]"> <?php _e( 'Do Not Show Tour Dialog', 'lasso' );?></label>
245
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable the tour dialog box for all users.', 'lasso' );?></span>
243
+						<input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked($disable_tour, 'on'); ?> >
244
+						<label for="lasso_editor[disable_tour]"> <?php _e('Do Not Show Tour Dialog', 'lasso'); ?></label>
245
+						<span class="lasso--setting-description"><?php _e('Check this box to disable the tour dialog box for all users.', 'lasso'); ?></span>
246 246
 					</div>
247 247
 
248 248
 					<div class="lasso-editor-settings--option-inner" >
249
-					    <label for="lasso_editor[bold_tag]"> <?php _e( '"Bold" Tag', 'lasso' );?></label>
250
-						<span class="lasso--setting-description"><?php _e( 'Choose the HTML tag used for "Bold".', 'lasso' );?></span>
251
-					    <input type="radio" name="lasso_editor[bold_tag]" value='b' <?php echo checked( $bold_tag, 'b' );?>> b
252
-						<input type="radio" name="lasso_editor[bold_tag]" value="strong" <?php echo checked( $bold_tag, 'strong' );?>> strong
253
-						<input type="radio" name="lasso_editor[bold_tag]" value="em" <?php echo checked( $bold_tag, 'em' );?>> em  
249
+					    <label for="lasso_editor[bold_tag]"> <?php _e('"Bold" Tag', 'lasso'); ?></label>
250
+						<span class="lasso--setting-description"><?php _e('Choose the HTML tag used for "Bold".', 'lasso'); ?></span>
251
+					    <input type="radio" name="lasso_editor[bold_tag]" value='b' <?php echo checked($bold_tag, 'b'); ?>> b
252
+						<input type="radio" name="lasso_editor[bold_tag]" value="strong" <?php echo checked($bold_tag, 'strong'); ?>> strong
253
+						<input type="radio" name="lasso_editor[bold_tag]" value="em" <?php echo checked($bold_tag, 'em'); ?>> em  
254 254
 					</div>
255 255
 				</div>
256 256
 
257 257
 				<h3>Advanced</h3>
258 258
 				<div class="lasso-editor-settings--option-wrap ">
259 259
 					<div class="lasso-editor-settings--option-inner">
260
-						<input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked( $shortcodify_disabled, 'on' );?> >
261
-						<label for="lasso_editor[shortcodify_disabled]"><?php _e( 'Disable Aesop Component Conversion', 'lasso' );?></label>
262
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso' );?></span>
260
+						<input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked($shortcodify_disabled, 'on'); ?> >
261
+						<label for="lasso_editor[shortcodify_disabled]"><?php _e('Disable Aesop Component Conversion', 'lasso'); ?></label>
262
+						<span class="lasso--setting-description"><?php _e('Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso'); ?></span>
263 263
 					</div>
264 264
 				
265 265
 					<div class="lasso-editor-settings--option-inner">
266
-						<input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked( $enable_autosave, 'on' );?> >
267
-						<label for="lasso_editor[enable_autosave]"><?php _e( 'Enable Auto Save', 'lasso' );?></label>
268
-						<span class="lasso--setting-description"><?php _e( 'Check this box to enable auto save.', 'lasso' );?></span>
266
+						<input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked($enable_autosave, 'on'); ?> >
267
+						<label for="lasso_editor[enable_autosave]"><?php _e('Enable Auto Save', 'lasso'); ?></label>
268
+						<span class="lasso--setting-description"><?php _e('Check this box to enable auto save.', 'lasso'); ?></span>
269 269
 					</div>
270 270
 				
271 271
 					<div class="lasso-editor-settings--option-inner">
272
-						<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' );?> >
273
-						<label for="lasso_editor[post_save_disabled]"><?php _e( 'Disable Post Saving', 'lasso' );?></label>
274
-						<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>
272
+						<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'); ?> >
273
+						<label for="lasso_editor[post_save_disabled]"><?php _e('Disable Post Saving', 'lasso'); ?></label>
274
+						<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>
275 275
 
276 276
 					</div>
277 277
 				
278 278
 					<div class="lasso-editor-settings--option-inner">
279
-						<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' );?> >
280
-						<label for="lasso_editor[save_using_rest_disabled]"><?php _e( "Don't Use REST API to Save", 'lasso' );?></label>
281
-						<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>
279
+						<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'); ?> >
280
+						<label for="lasso_editor[save_using_rest_disabled]"><?php _e("Don't Use REST API to Save", 'lasso'); ?></label>
281
+						<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>
282 282
 
283 283
 					</div>
284 284
 				</div>
@@ -288,11 +288,11 @@  discard block
 block discarded – undo
288 288
 
289 289
 				<div class="lasso-editor-settings--submit">
290 290
 				    <input type="hidden" name="action" value="lasso-editor-settings" />
291
-				    <input type="submit" class="button-primary" value="<?php esc_attr_e( 'Save Settings', 'lasso' );?>" />
292
-					<?php wp_nonce_field( 'nonce', 'lasso_editor_settings' ); ?>
291
+				    <input type="submit" class="button-primary" value="<?php esc_attr_e('Save Settings', 'lasso'); ?>" />
292
+					<?php wp_nonce_field('nonce', 'lasso_editor_settings'); ?>
293 293
 				</div>
294 294
 				
295
-				<?php do_action('lasso_settings_after');?>
295
+				<?php do_action('lasso_settings_after'); ?>
296 296
 			</form>
297 297
 
298 298
 		</div><?php
Please login to merge, or discard this patch.