Completed
Push — master ( 498f6d...4e9082 )
by
unknown
02:20
created
public/includes/lasso.php 2 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 		 );
265 265
 		foreach ($_POST as $key => $value) {
266 266
 			if ($key !="code" && $key !="action") {
267
-			    //$shortcode = $shortcode.$key.'="'.$value.'" ';
267
+				//$shortcode = $shortcode.$key.'="'.$value.'" ';
268 268
 				$atts[$key] = $value;
269 269
 			}
270 270
 		}
@@ -274,32 +274,32 @@  discard block
 block discarded – undo
274 274
 		}*/
275 275
 		
276 276
 		if ($code == "aesop_image") {
277
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php');
278
-		    echo aesop_image_shortcode($atts);
277
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php');
278
+			echo aesop_image_shortcode($atts);
279 279
 		}
280 280
 		if ($code == "aesop_quote") {
281
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php');
282
-		    echo aesop_quote_shortcode($atts);
281
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php');
282
+			echo aesop_quote_shortcode($atts);
283 283
 		}
284 284
 		
285 285
 		if ($code == "aesop_parallax") {
286
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php');
287
-		    echo aesop_parallax_shortcode($atts);
286
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php');
287
+			echo aesop_parallax_shortcode($atts);
288 288
 		}
289 289
 		
290 290
 		if ($code == "aesop_character") {
291
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php');
292
-		    echo aesop_character_shortcode($atts);
291
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php');
292
+			echo aesop_character_shortcode($atts);
293 293
 		}
294 294
 		
295 295
 		if ($code == "aesop_chapter") {
296
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php');
297
-		    echo aesop_chapter_shortcode($atts);
296
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php');
297
+			echo aesop_chapter_shortcode($atts);
298 298
 		}
299 299
 		
300 300
 		if ($code == "aesop_gallery") {
301
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
302
-		    echo do_shortcode( '[aesop_gallery id="'.$atts["id"]."]");
301
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
302
+			echo do_shortcode( '[aesop_gallery id="'.$atts["id"]."]");
303 303
 		}
304 304
 		
305 305
 		exit; 
Please login to merge, or discard this patch.
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -52,12 +52,12 @@  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' ) );
60
+		add_action('wp_ajax_get_aesop_component', array($this, 'get_aesop_component'));
61 61
 
62 62
 		//enqueue assets
63 63
 		new assets();
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 	public static function get_instance() {
86 86
 
87 87
 		// If the single instance hasn't been set, set it now.
88
-		if ( null == self::$instance ) {
88
+		if (null == self::$instance) {
89 89
 			self::$instance = new self;
90 90
 		}
91 91
 
@@ -102,18 +102,18 @@  discard block
 block discarded – undo
102 102
 	 *                                       WPMU is disabled or plugin is
103 103
 	 *                                       activated on an individual blog.
104 104
 	 */
105
-	public static function activate( $network_wide ) {
105
+	public static function activate($network_wide) {
106 106
 
107
-		if ( function_exists( 'is_multisite' ) && is_multisite() ) {
107
+		if (function_exists('is_multisite') && is_multisite()) {
108 108
 
109
-			if ( $network_wide  ) {
109
+			if ($network_wide) {
110 110
 
111 111
 				// Get all blog ids
112 112
 				$blog_ids = self::get_blog_ids();
113 113
 
114
-				foreach ( $blog_ids as $blog_id ) {
114
+				foreach ($blog_ids as $blog_id) {
115 115
 
116
-					switch_to_blog( $blog_id );
116
+					switch_to_blog($blog_id);
117 117
 					self::single_activate();
118 118
 				}
119 119
 
@@ -139,18 +139,18 @@  discard block
 block discarded – undo
139 139
 	 *                                       WPMU is disabled or plugin is
140 140
 	 *                                       deactivated on an individual blog.
141 141
 	 */
142
-	public static function deactivate( $network_wide ) {
142
+	public static function deactivate($network_wide) {
143 143
 
144
-		if ( function_exists( 'is_multisite' ) && is_multisite() ) {
144
+		if (function_exists('is_multisite') && is_multisite()) {
145 145
 
146
-			if ( $network_wide ) {
146
+			if ($network_wide) {
147 147
 
148 148
 				// Get all blog ids
149 149
 				$blog_ids = self::get_blog_ids();
150 150
 
151
-				foreach ( $blog_ids as $blog_id ) {
151
+				foreach ($blog_ids as $blog_id) {
152 152
 
153
-					switch_to_blog( $blog_id );
153
+					switch_to_blog($blog_id);
154 154
 					self::single_deactivate();
155 155
 
156 156
 				}
@@ -174,13 +174,13 @@  discard block
 block discarded – undo
174 174
 	 *
175 175
 	 * @param int     $blog_id ID of the new blog.
176 176
 	 */
177
-	public function activate_new_site( $blog_id ) {
177
+	public function activate_new_site($blog_id) {
178 178
 
179
-		if ( 1 !== did_action( 'wpmu_new_blog' ) ) {
179
+		if (1 !== did_action('wpmu_new_blog')) {
180 180
 			return;
181 181
 		}
182 182
 
183
-		switch_to_blog( $blog_id );
183
+		switch_to_blog($blog_id);
184 184
 		self::single_activate();
185 185
 		restore_current_blog();
186 186
 
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 			WHERE archived = '0' AND spam = '0'
206 206
 			AND deleted = '0'";
207 207
 
208
-		return $wpdb->get_col( $sql );
208
+		return $wpdb->get_col($sql);
209 209
 
210 210
 	}
211 211
 
@@ -216,18 +216,18 @@  discard block
 block discarded – undo
216 216
 	 */
217 217
 	private static function single_activate() {
218 218
 
219
-		$curr_version = get_option( 'lasso_version' );
219
+		$curr_version = get_option('lasso_version');
220 220
 
221 221
 		// update upgraded from
222
-		if ( $curr_version ) {
223
-			update_option( 'lasso_updated_from', $curr_version );
222
+		if ($curr_version) {
223
+			update_option('lasso_updated_from', $curr_version);
224 224
 		}
225 225
 
226 226
 		// update lasso version option
227
-		update_option( 'lasso_version', LASSO_VERSION );
227
+		update_option('lasso_version', LASSO_VERSION);
228 228
 
229 229
 		// set transietn for activation welcome
230
-		set_transient( '_lasso_welcome_redirect', true, 30 );
230
+		set_transient('_lasso_welcome_redirect', true, 30);
231 231
 
232 232
 
233 233
 	}
@@ -249,9 +249,9 @@  discard block
 block discarded – undo
249 249
 	public function load_plugin_textdomain() {
250 250
 
251 251
 		$domain = $this->plugin_slug;
252
-		$locale = apply_filters( 'plugin_locale', get_locale(), $domain );
252
+		$locale = apply_filters('plugin_locale', get_locale(), $domain);
253 253
 
254
-		$out = load_textdomain( $domain, trailingslashit( LASSO_DIR ). 'languages/' . $domain . '-' . $locale . '.mo' );
254
+		$out = load_textdomain($domain, trailingslashit(LASSO_DIR).'languages/'.$domain.'-'.$locale.'.mo');
255 255
 	}
256 256
 	
257 257
 	
@@ -259,11 +259,11 @@  discard block
 block discarded – undo
259 259
 	{
260 260
 		
261 261
 		
262
-		$code= $_POST["code"];
262
+		$code = $_POST["code"];
263 263
 		$atts = array(
264 264
 		 );
265 265
 		foreach ($_POST as $key => $value) {
266
-			if ($key !="code" && $key !="action") {
266
+			if ($key != "code" && $key != "action") {
267 267
 			    //$shortcode = $shortcode.$key.'="'.$value.'" ';
268 268
 				$atts[$key] = $value;
269 269
 			}
@@ -274,32 +274,32 @@  discard block
 block discarded – undo
274 274
 		}*/
275 275
 		
276 276
 		if ($code == "aesop_image") {
277
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php');
277
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php');
278 278
 		    echo aesop_image_shortcode($atts);
279 279
 		}
280 280
 		if ($code == "aesop_quote") {
281
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php');
281
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php');
282 282
 		    echo aesop_quote_shortcode($atts);
283 283
 		}
284 284
 		
285 285
 		if ($code == "aesop_parallax") {
286
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php');
286
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php');
287 287
 		    echo aesop_parallax_shortcode($atts);
288 288
 		}
289 289
 		
290 290
 		if ($code == "aesop_character") {
291
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php');
291
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php');
292 292
 		    echo aesop_character_shortcode($atts);
293 293
 		}
294 294
 		
295 295
 		if ($code == "aesop_chapter") {
296
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php');
296
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php');
297 297
 		    echo aesop_chapter_shortcode($atts);
298 298
 		}
299 299
 		
300 300
 		if ($code == "aesop_gallery") {
301
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
302
-		    echo do_shortcode( '[aesop_gallery id="'.$atts["id"]."]");
301
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
302
+		    echo do_shortcode('[aesop_gallery id="'.$atts["id"]."]");
303 303
 		}
304 304
 		
305 305
 		exit; 
Please login to merge, or discard this patch.