Completed
Push — master ( c34fb4...51d4c2 )
by
unknown
01:31
created
admin/includes/menus/welcome.php 1 patch
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -204,49 +204,49 @@
 block discarded – undo
204 204
 	 */
205 205
 	function required_plugins() {
206 206
 
207
-	    $plugins = array(
208
-
209
-	        array(
210
-	            'name'      => __('Aesop Story Engine','lasso'),
211
-	            'slug'      => 'aesop-story-engine',
212
-	            'required'  => false,
213
-	        ),
214
-
215
-	    );
216
-
217
-	    $config = array(
218
-	        'default_path' => '',                      // Default absolute path to pre-packaged plugins.
219
-	        'menu'         => 'lasso-install-plugins', // Menu slug.
220
-	        'has_notices'  => true,                    // Show admin notices or not.
221
-	        'dismissable'  => true,                    // If false, a user cannot dismiss the nag message.
222
-	        'dismiss_msg'  => '',                      // If 'dismissable' is false, this message will be output at top of nag.
223
-	        'is_automatic' => false,                   // Automatically activate plugins after installation or not.
224
-	        'message'      => '',                      // Message to output right before the plugins table.
225
-	        'strings'      => array(
226
-	            'page_title'                      => __( 'Install Required Plugins', 'lasso' ),
227
-	            'menu_title'                      => __( 'Install Plugins', 'lasso' ),
228
-	            'installing'                      => __( 'Installing Plugin: %s', 'lasso' ), // %s = plugin name.
229
-	            'oops'                            => __( 'Something went wrong with the plugin API.', 'lasso' ),
230
-	            'notice_can_install_required'     => _n_noop( 'This plugin requires the following plugin: %1$s.', 'This plugin requires the following plugins: %1$s.' ), // %1$s = plugin name(s).
231
-	            'notice_can_install_recommended'  => _n_noop( 'This plugin recommends the following plugin: %1$s.', 'This plugin recommends the following plugins: %1$s.' ), // %1$s = plugin name(s).
232
-	            'notice_cannot_install'           => _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.' ), // %1$s = plugin name(s).
233
-	            'notice_can_activate_required'    => _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s).
234
-	            'notice_can_activate_recommended' => _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s).
235
-	            'notice_cannot_activate'          => _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.' ), // %1$s = plugin name(s).
236
-	            'notice_ask_to_update'            => _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this plugin: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this plugin: %1$s.' ), // %1$s = plugin name(s).
237
-	            'notice_cannot_update'            => _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.' ), // %1$s = plugin name(s).
238
-	            'install_link'                    => _n_noop( 'Begin installing plugin', 'Begin installing plugins' ),
239
-	            'activate_link'                   => _n_noop( 'Begin activating plugin', 'Begin activating plugins' ),
240
-	            'return'                          => __( 'Return to Required Plugins Installer', 'lasso' ),
241
-	            'plugin_activated'                => __( 'Plugin activated successfully.', 'lasso' ),
242
-	            'complete'                        => __( 'All plugins installed and activated successfully. %s', 'lasso' ), // %s = dashboard link.
243
-	            'nag_type'                        => 'updated' // Determines admin notice type - can only be 'updated', 'update-nag' or 'error'.
244
-	        )
245
-	    );
207
+		$plugins = array(
208
+
209
+			array(
210
+				'name'      => __('Aesop Story Engine','lasso'),
211
+				'slug'      => 'aesop-story-engine',
212
+				'required'  => false,
213
+			),
214
+
215
+		);
216
+
217
+		$config = array(
218
+			'default_path' => '',                      // Default absolute path to pre-packaged plugins.
219
+			'menu'         => 'lasso-install-plugins', // Menu slug.
220
+			'has_notices'  => true,                    // Show admin notices or not.
221
+			'dismissable'  => true,                    // If false, a user cannot dismiss the nag message.
222
+			'dismiss_msg'  => '',                      // If 'dismissable' is false, this message will be output at top of nag.
223
+			'is_automatic' => false,                   // Automatically activate plugins after installation or not.
224
+			'message'      => '',                      // Message to output right before the plugins table.
225
+			'strings'      => array(
226
+				'page_title'                      => __( 'Install Required Plugins', 'lasso' ),
227
+				'menu_title'                      => __( 'Install Plugins', 'lasso' ),
228
+				'installing'                      => __( 'Installing Plugin: %s', 'lasso' ), // %s = plugin name.
229
+				'oops'                            => __( 'Something went wrong with the plugin API.', 'lasso' ),
230
+				'notice_can_install_required'     => _n_noop( 'This plugin requires the following plugin: %1$s.', 'This plugin requires the following plugins: %1$s.' ), // %1$s = plugin name(s).
231
+				'notice_can_install_recommended'  => _n_noop( 'This plugin recommends the following plugin: %1$s.', 'This plugin recommends the following plugins: %1$s.' ), // %1$s = plugin name(s).
232
+				'notice_cannot_install'           => _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.' ), // %1$s = plugin name(s).
233
+				'notice_can_activate_required'    => _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s).
234
+				'notice_can_activate_recommended' => _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s).
235
+				'notice_cannot_activate'          => _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.' ), // %1$s = plugin name(s).
236
+				'notice_ask_to_update'            => _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this plugin: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this plugin: %1$s.' ), // %1$s = plugin name(s).
237
+				'notice_cannot_update'            => _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.' ), // %1$s = plugin name(s).
238
+				'install_link'                    => _n_noop( 'Begin installing plugin', 'Begin installing plugins' ),
239
+				'activate_link'                   => _n_noop( 'Begin activating plugin', 'Begin activating plugins' ),
240
+				'return'                          => __( 'Return to Required Plugins Installer', 'lasso' ),
241
+				'plugin_activated'                => __( 'Plugin activated successfully.', 'lasso' ),
242
+				'complete'                        => __( 'All plugins installed and activated successfully. %s', 'lasso' ), // %s = dashboard link.
243
+				'nag_type'                        => 'updated' // Determines admin notice type - can only be 'updated', 'update-nag' or 'error'.
244
+			)
245
+		);
246 246
 		
247 247
 		$plugins = apply_filters( 'lasso_required_plugins', $plugins );
248 248
 
249
-	    tgmpa( $plugins, $config );
249
+		tgmpa( $plugins, $config );
250 250
 
251 251
 	}
252 252
 }
Please login to merge, or discard this patch.
includes/process/update_object.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 	 *  @since    0.9.3
135 135
 	 *
136 136
 	 *  @param    int    	$postid       	The current postid
137
-     *  @param    string|bool     $value    The term slug, or a comma separated list of slugs. Or false to remove all terms set for post.
137
+	 *  @param    string|bool     $value    The term slug, or a comma separated list of slugs. Or false to remove all terms set for post.
138 138
 	 *  @param    string     $taxonomy    	The name of the taxonomy to which the term belongs.
139 139
 	 *
140 140
 	 *  @return bool True if update was successful, false if not.
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 			}
148 148
 			
149 149
 			if ($taxonomy =='category') {
150
-                // convert from names to category ids
150
+				// convert from names to category ids
151 151
 				$cats = array();
152 152
 				if (is_array($value)) {
153 153
 					foreach ($value as $cat) {
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 	 *
180 180
 	 *
181 181
 	 *  @param    int    	$postid       	The current postid
182
-     *  @param    string|bool     $value    The term slug, or a comma separated list of slugs. Or false to remove all terms set for post.
182
+	 *  @param    string|bool     $value    The term slug, or a comma separated list of slugs. Or false to remove all terms set for post.
183 183
 	 *                                      The first item is the name of taxonomy
184 184
 	 *
185 185
 	 *  @return bool True if update was successful, false if not.
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 				$value = explode( ',', $value );
193 193
 			}
194 194
 						
195
-            // Deleting first array item
195
+			// Deleting first array item
196 196
 			$taxonomy = array_shift($value);
197 197
 			$cats = array();
198 198
 			foreach ($value as $cat) {
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 		
215 215
 		if( $value ) {
216 216
 			$time = current_time('mysql');
217
-            wp_update_post(
217
+			wp_update_post(
218 218
 				array (
219 219
 					'ID'            => $postid, // ID of the post to update
220 220
 					'post_date'     => date( 'Y-m-d H:i:s',  strtotime($value) ),
Please login to merge, or discard this patch.
admin/includes/load_admin.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -99,8 +99,8 @@  discard block
 block discarded – undo
99 99
 
100 100
 		foreach ( $pages as $page ) {
101 101
 			wp_enqueue_media();
102
-            wp_enqueue_style( 'wp-color-picker');
103
-            wp_enqueue_script( 'wp-color-picker');
102
+			wp_enqueue_style( 'wp-color-picker');
103
+			wp_enqueue_script( 'wp-color-picker');
104 104
 		
105 105
 			wp_enqueue_script( 'lasso-editor-settings-script', LASSO_URL.'/admin/assets/js/lasso-editor-settings.js', array( 'jquery','wp-color-picker' ), LASSO_VERSION, true );
106 106
 			wp_enqueue_style( 'lasso-editor-settings-style', LASSO_URL.'/admin/assets/css/lasso-editor-settings.css', LASSO_VERSION );
@@ -131,11 +131,11 @@  discard block
 block discarded – undo
131 131
 	}
132 132
 
133 133
 	/**
134
-	*	Adds an admin notice reminding the user if their license key has not been saved
135
-	*
136
-	*	@since 0.9.7
137
-	*	@todo make dismissible
138
-	*/
134
+	 *	Adds an admin notice reminding the user if their license key has not been saved
135
+	 *
136
+	 *	@since 0.9.7
137
+	 *	@todo make dismissible
138
+	 */
139 139
 	public function license_nag(){
140 140
 
141 141
 		$screen 	= get_current_screen();
@@ -156,26 +156,26 @@  discard block
 block discarded – undo
156 156
 
157 157
 			if ( empty( $license ) ) {
158 158
 
159
-        		printf('<div class="lasso-notice error" style="position:relative;"><p>%s %s</p>%s</div>', $message_empty, $license_link, $dismiss_link );
159
+				printf('<div class="lasso-notice error" style="position:relative;"><p>%s %s</p>%s</div>', $message_empty, $license_link, $dismiss_link );
160 160
 
161
-        	} else if ( 'invalid' == $status ){ // license key entered wrong or something
161
+			} else if ( 'invalid' == $status ){ // license key entered wrong or something
162 162
 
163 163
 				printf('<div class="lasso-notice error" style="position:relative;"><p>%s %s</p>%s</div>', $message_invalid, $license_link , $dismiss_link );
164 164
 
165
-        	} else if ( empty( $status ) ){ // license key saved but not activated
165
+			} else if ( empty( $status ) ){ // license key saved but not activated
166 166
 
167 167
 				printf('<div class="lasso-notice error" style="position:relative;"><p>%s %s</p>%s</div>', $message_inactive, $license_link, $dismiss_link );
168 168
 
169
-        	}
169
+			}
170 170
 		}
171 171
 
172 172
 	}
173 173
 
174 174
 	/**
175
-	*  Process hiding the dimiss
176
-	*
177
-	* @since 0.9.7
178
-	*/
175
+	 *  Process hiding the dimiss
176
+	 *
177
+	 * @since 0.9.7
178
+	 */
179 179
 	public function dismiss_nag() {
180 180
 
181 181
 		if ( isset( $_GET['lasso-notice'] ) && 'dismiss' == $_GET['lasso-notice'] && current_user_can('manage_options') ) {
Please login to merge, or discard this patch.
public/includes/editor-modules.php 1 patch
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 	$toolbar_class  = $toolbar_headings ? 'toolbar-extended' : false;
205 205
 	
206 206
 	// mobile styles
207
-    $mobile_class = $is_mobile ? 'lasso-mobile' : false;
207
+	$mobile_class = $is_mobile ? 'lasso-mobile' : false;
208 208
 	$mobile_style =$is_mobile ? 'style="bottom:0px;"' : null;
209 209
 	
210 210
 	//show color
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
 						</div>
485 485
 						<?php 
486 486
 						if ($allow_change_date) { 
487
-						    $dateformat = get_option( 'date_format' ); 
487
+							$dateformat = get_option( 'date_format' ); 
488 488
 						?>
489 489
 						    <label><?php _e( 'Post Date', 'lasso' ); ?></label>
490 490
 							<input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid);?>"/>
@@ -598,7 +598,7 @@  discard block
 block discarded – undo
598 598
 						if ( !empty( $types ) ) {
599 599
 							// get the first element
600 600
 							$keys = array_keys($types);
601
-						    $type =$keys[0];						
601
+							$type =$keys[0];						
602 602
 							$type = preg_replace( '/s\b/','', $type );
603 603
 							printf( '<input type="hidden" name="object" value="%s">', lcfirst( esc_attr( $type ) ) );		
604 604
 						}
@@ -626,8 +626,8 @@  discard block
 block discarded – undo
626 626
 	global $post;
627 627
 	
628 628
 	global $wp_post_types;
629
-    $labels = &$wp_post_types['post']->labels;
630
-    $labels->name = 'Articles';
629
+	$labels = &$wp_post_types['post']->labels;
630
+	$labels->name = 'Articles';
631 631
 
632 632
 	ob_start();
633 633
 
@@ -870,9 +870,9 @@  discard block
 block discarded – undo
870 870
 		$return .= '</form>';
871 871
 
872 872
 		// extra JS codes
873
-        if (isset($shortcode['codes'])) {
874
-		    $return .= $shortcode['codes'];
875
-        }
873
+		if (isset($shortcode['codes'])) {
874
+			$return .= $shortcode['codes'];
875
+		}
876 876
 		$blob[$slug] = $return;
877 877
 	}
878 878
 
@@ -921,23 +921,23 @@  discard block
 block discarded – undo
921 921
  * @return string
922 922
  */
923 923
 function lasso_editor_adjustBrightness($hex, $steps) { 
924
-    $steps = max(-255, min(255, $steps));
924
+	$steps = max(-255, min(255, $steps));
925 925
 
926
-    // Normalize into a six character long hex string
927
-    $hex = str_replace('#', '', $hex);
928
-    if (strlen($hex) == 3) {
929
-        $hex = str_repeat(substr($hex,0,1), 2).str_repeat(substr($hex,1,1), 2).str_repeat(substr($hex,2,1), 2);
930
-    }
926
+	// Normalize into a six character long hex string
927
+	$hex = str_replace('#', '', $hex);
928
+	if (strlen($hex) == 3) {
929
+		$hex = str_repeat(substr($hex,0,1), 2).str_repeat(substr($hex,1,1), 2).str_repeat(substr($hex,2,1), 2);
930
+	}
931 931
 
932
-    // Split into three parts: R, G and B
933
-    $color_parts = str_split($hex, 2);
934
-    $return = '#';
932
+	// Split into three parts: R, G and B
933
+	$color_parts = str_split($hex, 2);
934
+	$return = '#';
935 935
 
936
-    foreach ($color_parts as $color) {
937
-        $color   = hexdec($color); // Convert to decimal
938
-        $color   = max(0,min(255,$color + $steps)); // Adjust color
939
-        $return .= str_pad(dechex($color), 2, '0', STR_PAD_LEFT); // Make two char hex code
940
-    }
936
+	foreach ($color_parts as $color) {
937
+		$color   = hexdec($color); // Convert to decimal
938
+		$color   = max(0,min(255,$color + $steps)); // Adjust color
939
+		$return .= str_pad(dechex($color), 2, '0', STR_PAD_LEFT); // Make two char hex code
940
+	}
941 941
 
942
-    return $return;
942
+	return $return;
943 943
 }
Please login to merge, or discard this patch.
includes/process/meta.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 		 */
43 43
 		$allowed_fields = apply_filters( 'lasso_meta_fields', array() );
44 44
         
45
-        file_put_contents(WP_PLUGIN_DIR."/file1.txt", print_r($data,true));
45
+		file_put_contents(WP_PLUGIN_DIR."/file1.txt", print_r($data,true));
46 46
         
47 47
 		if ( ! empty( $allowed_fields ) ) {
48 48
 			foreach( $allowed_fields as $field ) {
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 			}
55 55
 		}
56 56
 
57
-        do_action( 'editus_after_meta_update', $post_id, $data );
57
+		do_action( 'editus_after_meta_update', $post_id, $data );
58 58
 
59 59
 
60 60
 		return true;
Please login to merge, or discard this patch.
includes/process/map.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
 			}
46 46
 
47 47
 			// udpate start point
48
-            $point = json_decode( $start_point, true );
48
+			$point = json_decode( $start_point, true );
49 49
 			update_post_meta( $postid, 'ase_map_component_start_point', $point );
50 50
 
51 51
 			// update zoom
Please login to merge, or discard this patch.
public/includes/assets.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -20,12 +20,12 @@  discard block
 block discarded – undo
20 20
 	
21 21
 		global $post;
22 22
 		if ( lasso_user_can('edit_posts') 
23
-		     /* uncomment this line to disable Editus on Gutenberg posts*/
24
-             /* && !( function_exists( 'has_blocks' ) && has_blocks( $post->post_content)  && !is_home()) */              
25
-             ) {
23
+			 /* uncomment this line to disable Editus on Gutenberg posts*/
24
+			 /* && !( function_exists( 'has_blocks' ) && has_blocks( $post->post_content)  && !is_home()) */              
25
+			 ) {
26 26
 			
27 27
 			/**    Returns the time offset from UTC
28
-			*/
28
+			 */
29 29
 			function get_UTC_offset() {
30 30
 				$timezone_string = get_option( 'timezone_string' );
31 31
 				if (empty( $timezone_string ) ) {
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
 			wp_enqueue_style('lasso-style', LASSO_URL.'/public/assets/css/lasso.css', LASSO_VERSION, true);
42 42
 
43
-            //don't load autocomplete if it's a stockholm theme
43
+			//don't load autocomplete if it's a stockholm theme
44 44
 			$themename  	= wp_get_theme()->get('Name');
45 45
 			if ($themename !='Stockholm' ) {
46 46
 				wp_enqueue_script('jquery-ui-autocomplete');
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 			$tz_offset = get_UTC_offset();
116 116
 			$post_date = get_the_time('U', $postid);
117 117
 			$time = (time()+$tz_offset);
118
-            $delta = $time - $post_date;
118
+			$delta = $time - $post_date;
119 119
 
120 120
 			$strings = array(
121 121
 				'save' 				=> __('Save','lasso'),
@@ -170,11 +170,11 @@  discard block
 block discarded – undo
170 170
 			$gallery_nonce = wp_create_nonce( $gallery_nonce_action );
171 171
 			
172 172
 			
173
-            if ($allow_change_date) {
174
-			    $permalink = get_site_url().'/?p='.$postid;
175
-            } else {
176
-                $permalink = get_permalink($postid);
177
-            }
173
+			if ($allow_change_date) {
174
+				$permalink = get_site_url().'/?p='.$postid;
175
+			} else {
176
+				$permalink = get_permalink($postid);
177
+			}
178 178
 			
179 179
 			// rest api
180 180
 			$rest_nonce = '';
@@ -268,12 +268,12 @@  discard block
 block discarded – undo
268 268
 				'customFields'      => $custom_fields,
269 269
 				'clickToInsert'     => ($insert_comp_ui =='click'),
270 270
 				'buttonOnEmptyP'     => ($insert_comp_ui =='mediumcom'),      // auto show a button to insert components on an empty paragraph      
271
-                'rtl'               => is_rtl(),				
271
+				'rtl'               => is_rtl(),				
272 272
 				'skipToEdit'        =>( $delta < 10 && $delta >=0 ), // if it's a new post, skip to edit mode
273 273
 				'linksEditable'    => $links_editable,
274 274
 				'supportPendingStatus' => !$no_pending_status,
275 275
 				'tableCode' => apply_filters( 'lasso_table_html_code','<table><tr><th>Cell 1</th><th>Cell 2</th></tr><tr><td>Cell 3</td><td>Cell 4</td></tr></table>'),
276
-                'hasGutenberg' => (function_exists( 'has_blocks' ) && has_blocks( $post->post_content))
276
+				'hasGutenberg' => (function_exists( 'has_blocks' ) && has_blocks( $post->post_content))
277 277
 			);
278 278
 
279 279
 
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
 			
282 282
 			
283 283
 			if (!$using_restapiv2) {
284
-               // enqueue REST API V1
284
+			   // enqueue REST API V1
285 285
 			   wp_enqueue_script( 'wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
286 286
 			   $settings = array( 'root' => home_url( $home_url ), 'nonce' => wp_create_nonce( 'wp_json' ) );
287 287
 			   wp_localize_script( 'wp-api-js', 'WP_API_Settings', $settings );
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 			if ($show_color) {
298 298
 				wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api','iris'), LASSO_VERSION, true);
299 299
 			} else {
300
-			    wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
300
+				wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
301 301
 			}
302 302
 			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects ) );
303 303
 
Please login to merge, or discard this patch.
public/includes/lasso.php 1 patch
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 		add_action( 'wp_ajax_editus_featured_img',     array( $this, 'set_featured_img' ) );
69 69
 		add_action( 'wp_ajax_editus_del_featured_img',     array( $this, 'del_featured_img' ) );
70 70
         
71
-        add_action( 'wp_ajax_editus_publish_post',     array( $this, 'publish_post' ) );
71
+		add_action( 'wp_ajax_editus_publish_post',     array( $this, 'publish_post' ) );
72 72
 
73 73
 		// enable saving custom fields through REST API
74 74
 		self::enable_metasave('post');
@@ -268,14 +268,14 @@  discard block
 block discarded – undo
268 268
 		$out = load_textdomain( $domain, trailingslashit( LASSO_DIR ). 'languages/' . $domain . '-' . $locale . '.mo' );
269 269
 	}
270 270
 	
271
-    // new ajax function to lock post for editing
271
+	// new ajax function to lock post for editing
272 272
 	public function editus_lock_post()
273 273
 	{
274 274
 		$post_id= $_POST["postid"];
275 275
 		$locked = wp_check_post_lock($post_id);
276 276
 		
277 277
 		if (!$locked) {
278
-		    wp_set_post_lock($post_id);
278
+			wp_set_post_lock($post_id);
279 279
 			echo "true";
280 280
 		} else {
281 281
 			$user_info = get_userdata($locked);
@@ -400,59 +400,59 @@  discard block
 block discarded – undo
400 400
 		 );
401 401
 		foreach ($_POST as $key => $value) {
402 402
 			if ($key !="code" && $key !="action") {
403
-			    //$shortcode = $shortcode.$key.'="'.$value.'" ';
403
+				//$shortcode = $shortcode.$key.'="'.$value.'" ';
404 404
 				$atts[$key] = $value;
405 405
 			}
406 406
 		}
407 407
 		if ($code == "aesop_video") {
408
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-video.php');
409
-		    echo aesop_video_shortcode($atts);
408
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-video.php');
409
+			echo aesop_video_shortcode($atts);
410 410
 		}
411 411
 		else if ($code == "aesop_image") {
412
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php');
413
-		    echo aesop_image_shortcode($atts);
412
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php');
413
+			echo aesop_image_shortcode($atts);
414 414
 		}
415 415
 		else if ($code == "aesop_quote") {
416
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php');
417
-		    echo aesop_quote_shortcode($atts);
416
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php');
417
+			echo aesop_quote_shortcode($atts);
418 418
 		}
419 419
 		else if ($code == "aesop_parallax") {
420
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php');
421
-		    echo aesop_parallax_shortcode($atts);
420
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php');
421
+			echo aesop_parallax_shortcode($atts);
422 422
 		}
423 423
 		else if ($code == "aesop_character") {
424
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php');
425
-		    echo aesop_character_shortcode($atts);
424
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php');
425
+			echo aesop_character_shortcode($atts);
426 426
 		}
427 427
 		else if ($code == "aesop_collection") {
428
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php');
429
-		    echo aesop_collection_shortcode($atts);
428
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php');
429
+			echo aesop_collection_shortcode($atts);
430 430
 		}
431 431
 		else if ($code == "aesop_chapter") {
432
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php');
433
-		    echo aesop_chapter_shortcode($atts);
432
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php');
433
+			echo aesop_chapter_shortcode($atts);
434 434
 		}
435 435
 		else if ($code == "aesop_content") {
436
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php');
437
-		    echo aesop_content_shortcode($atts, $atts['content_data']);
436
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php');
437
+			echo aesop_content_shortcode($atts, $atts['content_data']);
438 438
 		}
439 439
 		else if ($code == "aesop_gallery") {
440
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
441
-		    echo do_shortcode( '[aesop_gallery id="'.$atts["id"].'"]');
440
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
441
+			echo do_shortcode( '[aesop_gallery id="'.$atts["id"].'"]');
442 442
 		}
443 443
 		else if ($code == "aesop_audio") {
444
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-audio.php');
445
-		    echo aesop_audio_shortcode($atts);
444
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-audio.php');
445
+			echo aesop_audio_shortcode($atts);
446 446
 		}
447 447
 		else {
448 448
 			$code = '['.$code.' ';
449 449
 			foreach ($atts as $key => $value) {
450
-			    $code = ''.$key.'="'.$value.'" ';
450
+				$code = ''.$key.'="'.$value.'" ';
451 451
 			}
452 452
 			$code = $code.']';
453 453
 			echo do_shortcode($code);
454
-		    //require_once( ABSPATH . '/wp-content/plugins/aesop-events/public/includes/shortcode.php');
455
-		    //echo aesop_audio_shortcode($atts);
454
+			//require_once( ABSPATH . '/wp-content/plugins/aesop-events/public/includes/shortcode.php');
455
+			//echo aesop_audio_shortcode($atts);
456 456
 		}
457 457
 		
458 458
 		exit; 
@@ -492,12 +492,12 @@  discard block
 block discarded – undo
492 492
 		exit;
493 493
 	}
494 494
     
495
-    /* This function doesn't actually publish post, but should be called when a post is published */
496
-    public function publish_post( ) {
495
+	/* This function doesn't actually publish post, but should be called when a post is published */
496
+	public function publish_post( ) {
497 497
 
498 498
 		$post_id = isset( $_POST['postid'] ) ? $_POST['postid'] : false;
499 499
         
500
-        do_action( 'transition_post_status', 'publish', 'draft', get_post( $post_id ) );
500
+		do_action( 'transition_post_status', 'publish', 'draft', get_post( $post_id ) );
501 501
 
502 502
 		exit;
503 503
 	}
@@ -555,14 +555,14 @@  discard block
 block discarded – undo
555 555
 			$allow_new_category = lasso_editor_get_option( 'allow_new_category', 'lasso_editor' );
556 556
 			
557 557
 			if ($taxonomy =='category') {
558
-                // convert from names to category ids
558
+				// convert from names to category ids
559 559
 				$cats = array();
560 560
 				foreach ($value as $cat) {
561 561
 					$cat_id = get_cat_ID($cat);
562 562
 					if ($cat_id !=0) {
563 563
 						$cats [] = $cat_id;
564 564
 					} else if ($allow_new_category) {
565
-					    $cats [] = wp_create_category($cat);
565
+						$cats [] = wp_create_category($cat);
566 566
 					}
567 567
 				}
568 568
 				$value = $cats;
@@ -604,7 +604,7 @@  discard block
 block discarded – undo
604 604
 	public function set_date( $postid, $value) {
605 605
 		if( $value ) {
606 606
 			$value = self::getEnglishMonthName($value)." ".date("H:i:s", current_time( 'timestamp', 1 ));
607
-            wp_update_post(
607
+			wp_update_post(
608 608
 				array (
609 609
 					'ID'            => $postid, // ID of the post to update
610 610
 					'post_date'     => date( 'Y-m-d H:i:s',  strtotime($value) ),
Please login to merge, or discard this patch.