Completed
Push — master ( 516a8e...498f6d )
by
unknown
02:18
created
public/includes/lasso.php 2 patches
Indentation   +9 added lines, -9 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,22 +274,22 @@  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_gallery") {
291
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
292
-		    echo do_shortcode( '[aesop_gallery id="'.$atts["id"]."]");
291
+			require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
292
+			echo do_shortcode( '[aesop_gallery id="'.$atts["id"]."]");
293 293
 		}
294 294
 		
295 295
 		exit; 
Please login to merge, or discard this patch.
Spacing   +32 added lines, -32 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,22 +274,22 @@  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_gallery") {
291
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
292
-		    echo do_shortcode( '[aesop_gallery id="'.$atts["id"]."]");
291
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
292
+		    echo do_shortcode('[aesop_gallery id="'.$atts["id"]."]");
293 293
 		}
294 294
 		
295 295
 		exit; 
Please login to merge, or discard this patch.
public/includes/components.php 1 patch
Spacing   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -16,76 +16,76 @@  discard block
 block discarded – undo
16 16
 
17 17
 	$array = array(
18 18
 		'quote' => array(
19
-			'name'    => __('Quote','lasso'),
19
+			'name'    => __('Quote', 'lasso'),
20 20
 			'content' => lasso_quote_component(),
21 21
 		),
22 22
 		'image' => array(
23
-			'name'    => __('Image','lasso'),
23
+			'name'    => __('Image', 'lasso'),
24 24
 			'content' => lasso_image_component(),
25 25
 		),
26 26
 		'parallax' => array(
27
-			'name'    => __('Parallax','lasso'),
27
+			'name'    => __('Parallax', 'lasso'),
28 28
 			'content' => lasso_parallax_component(),
29 29
 		),
30 30
 		'audio' => array(
31
-			'name'    => __('Audio','lasso'),
31
+			'name'    => __('Audio', 'lasso'),
32 32
 			'content' => lasso_audio_component(),
33 33
 		),
34 34
 		'content' => array(
35
-			'name'    => __('Content','lasso'),
35
+			'name'    => __('Content', 'lasso'),
36 36
 			'content' => lasso_content_component(),
37 37
 		),
38 38
 		'character' => array(
39
-			'name'    => __('Character','lasso'),
39
+			'name'    => __('Character', 'lasso'),
40 40
 			'content' => lasso_character_component(),
41 41
 		),
42 42
 		'collection' => array(
43
-			'name'    => __('Collection','lasso'),
43
+			'name'    => __('Collection', 'lasso'),
44 44
 			'content' => lasso_collections_component(),
45 45
 		),
46 46
 		'document' => array(
47
-			'name'    => __('Document','lasso'),
47
+			'name'    => __('Document', 'lasso'),
48 48
 			'content' => lasso_document_component(),
49 49
 		),
50 50
 		'gallery' => array(
51
-			'name'    => __('Gallery','lasso'),
51
+			'name'    => __('Gallery', 'lasso'),
52 52
 			'content' => lasso_gallery_component(),
53 53
 		),
54 54
 		'chapter' => array(
55
-			'name'    => __('Chapter','lasso'),
55
+			'name'    => __('Chapter', 'lasso'),
56 56
 			'content' => lasso_heading_component(),
57 57
 		),
58 58
 		'map' => array(
59
-			'name'    => __('Map','lasso'),
59
+			'name'    => __('Map', 'lasso'),
60 60
 			'content' => lasso_map_component(),
61 61
 		),
62 62
 		'timeline_stop' => array(
63
-			'name'    => __('Timeline','lasso'),
63
+			'name'    => __('Timeline', 'lasso'),
64 64
 			'content' => lasso_timeline_component(),
65 65
 		),
66 66
 		'video' => array(
67
-			'name'    => __('Video','lasso'),
67
+			'name'    => __('Video', 'lasso'),
68 68
 			'content' => lasso_video_component(),
69 69
 		),
70 70
 		'wpimg' => array(
71
-			'name'    => __('WordPress Image','lasso'),
71
+			'name'    => __('WordPress Image', 'lasso'),
72 72
 			'content' => lasso_wp_image(),
73 73
 		),
74 74
 		'wpquote' => array(
75
-			'name'    => __('WordPress Quote','lasso'),
75
+			'name'    => __('WordPress Quote', 'lasso'),
76 76
 			'content' => lasso_wp_quote(),
77 77
 		),
78 78
 		'gallery_pop' => array(
79
-			'name'    => __('Gallery Pop','lasso'),
79
+			'name'    => __('Gallery Pop', 'lasso'),
80 80
 			'content' => lasso_gallery_pop_component(),
81 81
 		),
82 82
 		'wpvideo' => array(
83
-			'name'    => __('WordPress Image','lasso'),
83
+			'name'    => __('WordPress Image', 'lasso'),
84 84
 			'content' => lasso_wp_video(),
85 85
 		),
86 86
 	);
87 87
 
88
-	return apply_filters( 'lasso_components', $array );
88
+	return apply_filters('lasso_components', $array);
89 89
 }
90 90
 
91 91
 /**
@@ -111,132 +111,132 @@  discard block
 block discarded – undo
111 111
  */
112 112
 
113 113
 // 1
114
-if ( !function_exists( 'lasso_quote_component' ) ):
114
+if (!function_exists('lasso_quote_component')):
115 115
 	function lasso_quote_component() {
116 116
 
117
-		return do_shortcode( '[aesop_quote quote="The Universe is made of stories, not of atoms."]' );
117
+		return do_shortcode('[aesop_quote quote="The Universe is made of stories, not of atoms."]');
118 118
 	}
119 119
 endif;
120 120
 
121 121
 // 2
122
-if ( !function_exists( 'lasso_image_component' ) ):
122
+if (!function_exists('lasso_image_component')):
123 123
 	function lasso_image_component() {
124 124
 
125
-		return do_shortcode( '[aesop_image img="'.LASSO_URL.'/public/assets/img/empty-img.png" align="center" imgwidth="800px"]' );
125
+		return do_shortcode('[aesop_image img="'.LASSO_URL.'/public/assets/img/empty-img.png" align="center" imgwidth="800px"]');
126 126
 	}
127 127
 endif;
128 128
 
129 129
 // 3
130
-if ( !function_exists( 'lasso_parallax_component' ) ):
130
+if (!function_exists('lasso_parallax_component')):
131 131
 	function lasso_parallax_component() {
132 132
 
133
-		return do_shortcode( '[aesop_parallax img="'.LASSO_URL.'/public/assets/img/empty-img.png"]' );
133
+		return do_shortcode('[aesop_parallax img="'.LASSO_URL.'/public/assets/img/empty-img.png"]');
134 134
 	}
135 135
 endif;
136 136
 
137 137
 // 4
138
-if ( !function_exists( 'lasso_audio_component' ) ):
138
+if (!function_exists('lasso_audio_component')):
139 139
 	function lasso_audio_component() {
140 140
 
141
-		return do_shortcode( '[aesop_audio src="http://users.skynet.be/fa046054/home/P22/track06.mp3"]' );
141
+		return do_shortcode('[aesop_audio src="http://users.skynet.be/fa046054/home/P22/track06.mp3"]');
142 142
 
143 143
 	}
144 144
 endif;
145 145
 
146 146
 // 5
147
-if ( !function_exists( 'lasso_content_component' ) ):
147
+if (!function_exists('lasso_content_component')):
148 148
 	function lasso_content_component() {
149 149
 
150
-		return do_shortcode( '[aesop_content]Start typing here...[/aesop_content]' );
150
+		return do_shortcode('[aesop_content]Start typing here...[/aesop_content]');
151 151
 	}
152 152
 endif;
153 153
 
154 154
 // 6
155
-if ( !function_exists( 'lasso_character_component' ) ):
155
+if (!function_exists('lasso_character_component')):
156 156
 	function lasso_character_component() {
157 157
 
158
-		return do_shortcode( '[aesop_character img="'.LASSO_URL.'/public/assets/img/empty-img.png" name="Joes Apartment" width="150px"]' );
158
+		return do_shortcode('[aesop_character img="'.LASSO_URL.'/public/assets/img/empty-img.png" name="Joes Apartment" width="150px"]');
159 159
 
160 160
 	}
161 161
 endif;
162 162
 
163 163
 // 7
164
-if ( !function_exists( 'lasso_collections_component' ) ):
164
+if (!function_exists('lasso_collections_component')):
165 165
 	function lasso_collections_component() {
166 166
 
167
-		return do_shortcode( '[aesop_collection]' );
167
+		return do_shortcode('[aesop_collection]');
168 168
 	}
169 169
 endif;
170 170
 
171 171
 // 8
172
-if ( !function_exists( 'lasso_document_component' ) ):
172
+if (!function_exists('lasso_document_component')):
173 173
 	function lasso_document_component() {
174 174
 
175
-		return do_shortcode( '[aesop_document src="'.LASSO_URL.'/public/assets/img/empty-img.png" ]' );
175
+		return do_shortcode('[aesop_document src="'.LASSO_URL.'/public/assets/img/empty-img.png" ]');
176 176
 
177 177
 	}
178 178
 endif;
179 179
 
180 180
 // 9
181
-if ( !function_exists( 'lasso_gallery_component' ) ):
181
+if (!function_exists('lasso_gallery_component')):
182 182
 	function lasso_gallery_component() {
183 183
 
184
-		return do_shortcode( '[aesop_gallery]' );
184
+		return do_shortcode('[aesop_gallery]');
185 185
 
186 186
 	}
187 187
 endif;
188 188
 
189 189
 // 10
190
-if ( !function_exists( 'lasso_heading_component' ) ):
190
+if (!function_exists('lasso_heading_component')):
191 191
 	function lasso_heading_component() {
192 192
 
193
-		return do_shortcode( '[aesop_chapter title="Chapter One" img="'.LASSO_URL.'/public/assets/img/empty-img.png" full="on"]' );
193
+		return do_shortcode('[aesop_chapter title="Chapter One" img="'.LASSO_URL.'/public/assets/img/empty-img.png" full="on"]');
194 194
 	}
195 195
 endif;
196 196
 
197 197
 // 11
198
-if ( !function_exists( 'lasso_map_component' ) ):
198
+if (!function_exists('lasso_map_component')):
199 199
 	function lasso_map_component() {
200 200
 
201 201
 		return '<form id="lasso--map-form" class="aesop-component aesop-map-component lasso--map-drag-holder" enctype="multipart/form-data">
202 202
 				'.lasso_map_form_footer().'
203
-				'.do_shortcode( '[aesop_map sticky="off"]' ).'
203
+				'.do_shortcode('[aesop_map sticky="off"]').'
204 204
 			</form>';
205 205
 
206 206
 	}
207 207
 endif;
208 208
 
209 209
 // 12
210
-if ( !function_exists( 'lasso_timeline_component' ) ):
210
+if (!function_exists('lasso_timeline_component')):
211 211
 	function lasso_timeline_component() {
212 212
 
213
-		return do_shortcode( '[aesop_timeline_stop num="Title" title="2014"]' );
213
+		return do_shortcode('[aesop_timeline_stop num="Title" title="2014"]');
214 214
 
215 215
 	}
216 216
 endif;
217 217
 
218 218
 // 13
219
-if ( !function_exists( 'lasso_video_component' ) ):
219
+if (!function_exists('lasso_video_component')):
220 220
 	function lasso_video_component() {
221 221
 
222
-		return do_shortcode( '[aesop_video src="vimeo" id="59940289" width="100%" align="center"]' );
222
+		return do_shortcode('[aesop_video src="vimeo" id="59940289" width="100%" align="center"]');
223 223
 
224 224
 	}
225 225
 endif;
226 226
 
227 227
 // 14 - since 0.9.1
228
-if ( !function_exists('lasso_wp_image') ):
228
+if (!function_exists('lasso_wp_image')):
229 229
 
230
-	function lasso_wp_image(){
230
+	function lasso_wp_image() {
231 231
 		return '<div data-component-type="wpimg" class="lasso--wpimg__wrap lasso-component"><img class="wp-image-0" src="'.LASSO_URL.'/public/assets/img/empty-img.png"></div>';
232 232
 	}
233 233
 
234 234
 endif;
235 235
 
236 236
 // 15 - since 0.9.2
237
-if ( !function_exists('lasso_wp_quote') ):
237
+if (!function_exists('lasso_wp_quote')):
238 238
 
239
-	function lasso_wp_quote(){
239
+	function lasso_wp_quote() {
240 240
 		return '<blockquote data-component-type="wpquote" class="lasso--wpquote lasso-component"><p>The universe is made of stories.</p></blockquote>';
241 241
 	}
242 242
 
@@ -244,16 +244,16 @@  discard block
 block discarded – undo
244 244
 
245 245
 // 16 gallery pop added but not fully supported as of 0.9.9.11 
246 246
 
247
-if ( !function_exists( 'lasso_gallery_pop_component' ) ):
247
+if (!function_exists('lasso_gallery_pop_component')):
248 248
 	function lasso_gallery_pop_component() {
249
-		return do_shortcode( '[aesop_gallery_pop]' );
249
+		return do_shortcode('[aesop_gallery_pop]');
250 250
 	}
251 251
 endif;
252 252
 
253 253
 // 17 - work in progress
254
-if ( !function_exists('lasso_wp_video') ):
254
+if (!function_exists('lasso_wp_video')):
255 255
 
256
-	function lasso_wp_video(){
256
+	function lasso_wp_video() {
257 257
 		return '<div data-component-type="wpvideo" class="lasso--wpvideo__wrap lasso-component"><video class="wp-video-0"></video>';
258 258
 	}
259 259
 
Please login to merge, or discard this patch.
public/includes/assets.php 1 patch
Spacing   +67 added lines, -67 removed lines patch added patch discarded remove patch
@@ -10,16 +10,16 @@  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 21
         // for now editus is disabled for mobile. it will be reenabled when mobile platforms are better supported
22
-		if ( lasso_user_can('edit_posts')) {
22
+		if (lasso_user_can('edit_posts')) {
23 23
 
24 24
 			wp_enqueue_style('lasso-style', LASSO_URL.'/public/assets/css/lasso.css', LASSO_VERSION, true);
25 25
 
@@ -34,21 +34,21 @@  discard block
 block discarded – undo
34 34
 			// url for json api
35 35
 			$home_url = function_exists('json_get_url_prefix') ? json_get_url_prefix() : false;
36 36
 
37
-			$article_object 	= lasso_editor_get_option('article_class','lasso_editor');
37
+			$article_object 	= lasso_editor_get_option('article_class', 'lasso_editor');
38 38
 
39
-			$article_object 	= empty( $article_object ) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object;
39
+			$article_object 	= empty($article_object) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object;
40 40
 
41
-			$featImgClass 		= lasso_editor_get_option('featimg_class','lasso_editor');
42
-			if (empty( $featImgClass )) {
41
+			$featImgClass = lasso_editor_get_option('featimg_class', 'lasso_editor');
42
+			if (empty($featImgClass)) {
43 43
 				$featImgClass = lasso_get_supported_theme_featured_image_class();
44 44
 			}
45
-			$titleClass 		= lasso_editor_get_option('title_class','lasso_editor');
46
-			if (empty( $titleClass )) {
45
+			$titleClass = lasso_editor_get_option('title_class', 'lasso_editor');
46
+			if (empty($titleClass)) {
47 47
 				$titleClass = lasso_get_supported_theme_title_class();
48 48
 			}
49
-			$toolbar_headings  	= lasso_editor_get_option('toolbar_headings', 'lasso_editor');
50
-			$objectsNoSave  	= lasso_editor_get_option('dont_save', 'lasso_editor');
51
-			$objectsNonEditable  	= lasso_editor_get_option('non_editable', 'lasso_editor');
49
+			$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
50
+			$objectsNoSave = lasso_editor_get_option('dont_save', 'lasso_editor');
51
+			$objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor');
52 52
 
53 53
 			
54 54
 			//text alignement
@@ -59,74 +59,74 @@  discard block
 block discarded – undo
59 59
 			
60 60
 			if ($show_color) {
61 61
 				//color picker
62
-				wp_enqueue_style( 'wp-color-picker' );
63
-				wp_enqueue_script( 'iris', admin_url( 'js/iris.min.js' ), array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), false, 1 );
62
+				wp_enqueue_style('wp-color-picker');
63
+				wp_enqueue_script('iris', admin_url('js/iris.min.js'), array('jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch'), false, 1);
64 64
 			}
65 65
 
66 66
 
67 67
 
68 68
 			// post id reference
69
-			$postid 			= get_the_ID();
69
+			$postid = get_the_ID();
70 70
 
71 71
 			$strings = array(
72
-				'save' 				=> __('Save','lasso'),
73
-				'saving' 			=> __('Saving...','lasso'),
74
-				'saved'				=> __('Saved!','lasso'),
75
-				'adding' 			=> __('Adding...','lasso'),
76
-				'added'				=> __('Added!','lasso'),
77
-				'loading' 			=> __('Loading...','lasso'),
78
-				'loadMore'			=> __('Load More','lasso'),
79
-				'noPostsFound'		=> __('No more posts found','lasso'),
80
-				'fetchFail'	    	=> __('Fetching failed. REST API plugin may not have been installed or configured correctly.','lasso'),
81
-				'galleryCreated' 	=> __('Gallery Created!','lasso'),
82
-				'galleryUpdated' 	=> __('Gallery Updated!','lasso'),
83
-				'justWrite'			=> __('Just write...','lasso'),
84
-				'chooseImage'		=> __('Choose an image','lasso'),
85
-				'updateImage'		=> __('Update Image','lasso'),
86
-				'insertImage'		=> __('Insert Image','lasso'),
87
-				'selectImage'		=> __('Select Image','lasso'),
88
-				'removeFeatImg'     => __('Remove featured image?','lasso'),
89
-				'updateSelectedImg' => __('Update Selected Image','lasso'),
90
-				'chooseImages'		=> __('Choose images','lasso'),
91
-				'editImage'			=> __('Edit Image','lasso'),
92
-				'addImages'			=> __('Add Images','lasso'),
93
-				'addNewGallery'		=> __('Add New Gallery','lasso'),
94
-				'selectGallery'		=> __('Select Lasso Gallery Image','lasso'),
95
-				'useSelectedImages' => __('Use Selected Images','lasso'),
96
-				'publishPost'		=> __('Publish Post?','lasso'),
97
-				'publishYes'		=> __('Yes, publish it!','lasso'),
98
-				'deletePost'		=> __('Trash Post?','lasso'),
99
-				'deleteYes'			=> __('Yes, trash it!','lasso'),
100
-				'warning'			=> __('Oh snap!','laso'),
101
-				'cancelText'		=> __('O.K. got it!','lasso'),
102
-				'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'),
72
+				'save' 				=> __('Save', 'lasso'),
73
+				'saving' 			=> __('Saving...', 'lasso'),
74
+				'saved'				=> __('Saved!', 'lasso'),
75
+				'adding' 			=> __('Adding...', 'lasso'),
76
+				'added'				=> __('Added!', 'lasso'),
77
+				'loading' 			=> __('Loading...', 'lasso'),
78
+				'loadMore'			=> __('Load More', 'lasso'),
79
+				'noPostsFound'		=> __('No more posts found', 'lasso'),
80
+				'fetchFail'	    	=> __('Fetching failed. REST API plugin may not have been installed or configured correctly.', 'lasso'),
81
+				'galleryCreated' 	=> __('Gallery Created!', 'lasso'),
82
+				'galleryUpdated' 	=> __('Gallery Updated!', 'lasso'),
83
+				'justWrite'			=> __('Just write...', 'lasso'),
84
+				'chooseImage'		=> __('Choose an image', 'lasso'),
85
+				'updateImage'		=> __('Update Image', 'lasso'),
86
+				'insertImage'		=> __('Insert Image', 'lasso'),
87
+				'selectImage'		=> __('Select Image', 'lasso'),
88
+				'removeFeatImg'     => __('Remove featured image?', 'lasso'),
89
+				'updateSelectedImg' => __('Update Selected Image', 'lasso'),
90
+				'chooseImages'		=> __('Choose images', 'lasso'),
91
+				'editImage'			=> __('Edit Image', 'lasso'),
92
+				'addImages'			=> __('Add Images', 'lasso'),
93
+				'addNewGallery'		=> __('Add New Gallery', 'lasso'),
94
+				'selectGallery'		=> __('Select Lasso Gallery Image', 'lasso'),
95
+				'useSelectedImages' => __('Use Selected Images', 'lasso'),
96
+				'publishPost'		=> __('Publish Post?', 'lasso'),
97
+				'publishYes'		=> __('Yes, publish it!', 'lasso'),
98
+				'deletePost'		=> __('Trash Post?', 'lasso'),
99
+				'deleteYes'			=> __('Yes, trash it!', 'lasso'),
100
+				'warning'			=> __('Oh snap!', 'laso'),
101
+				'cancelText'		=> __('O.K. got it!', 'lasso'),
102
+				'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'),
103 103
 				'missingConfirm'	=> __('Update Settings', 'lasso'),
104
-				'helperText'		=> __('one more letter','lasso'),
104
+				'helperText'		=> __('one more letter', 'lasso'),
105 105
 				'editingBackup'  	=> __('You are currently editing a backup copy of this post.')
106 106
 			);
107 107
 
108
-			$api_url = trailingslashit( home_url() ) . 'lasso-internal-api';
108
+			$api_url = trailingslashit(home_url()).'lasso-internal-api';
109 109
 
110 110
 			$gallery_class = new gallery();
111 111
 			$gallery_nonce_action = $gallery_class->nonce_action;
112
-			$gallery_nonce = wp_create_nonce( $gallery_nonce_action );
112
+			$gallery_nonce = wp_create_nonce($gallery_nonce_action);
113 113
 
114 114
 			// localized objects
115 115
 			$objects = array(
116
-				'ajaxurl' 			=> esc_url( $api_url ),
117
-				'ajaxurl2' 			=> esc_url( admin_url( 'admin-ajax.php' )),
116
+				'ajaxurl' 			=> esc_url($api_url),
117
+				'ajaxurl2' 			=> esc_url(admin_url('admin-ajax.php')),
118 118
 				'editor' 			=> 'lasso--content', // ID of editable content (without #) DONT CHANGE
119 119
 				'article_object'	=> $article_object,
120 120
 				'featImgClass'		=> $featImgClass,
121 121
 				'titleClass'		=> $titleClass,
122 122
 				'strings'			=> $strings,
123
-				'settingsLink'		=> function_exists('is_multisite') && is_multisite() ? network_admin_url( 'settings.php?page=lasso-editor' ) : admin_url( 'admin.php?page=lasso-editor-settings' ),
124
-				'post_status'		=> get_post_status( $postid ),
123
+				'settingsLink'		=> function_exists('is_multisite') && is_multisite() ? network_admin_url('settings.php?page=lasso-editor') : admin_url('admin.php?page=lasso-editor-settings'),
124
+				'post_status'		=> get_post_status($postid),
125 125
 				'postid'			=> $postid,
126 126
 				'permalink'			=> get_permalink(),
127 127
 				'edit_others_pages'	=> current_user_can('edit_others_pages') ? true : false,
128 128
 				'edit_others_posts'	=> current_user_can('edit_others_posts') ? true : false,
129
-				'userCanEdit'		=> current_user_can('edit_post', $postid ),
129
+				'userCanEdit'		=> current_user_can('edit_post', $postid),
130 130
 				'can_publish_posts'	=> current_user_can('publish_posts'),
131 131
 				'can_publish_pages'	=> current_user_can('publish_pages'),
132 132
 				'author'			=> is_user_logged_in() ? get_current_user_ID() : false,
@@ -160,30 +160,30 @@  discard block
 block discarded – undo
160 160
 				'postTags'    		=> lasso_get_objects('tag'),
161 161
 				'noResultsDiv'		=> lasso_editor_empty_results(),
162 162
 				'noRevisionsDiv'	=> lasso_editor_empty_results('revision'),
163
-				'mapTileProvider'   => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider( $postid ) : false,
164
-				'mapLocations'		=> get_post_meta( $postid, 'ase_map_component_locations' ),
165
-				'mapStart'			=> get_post_meta( $postid, 'ase_map_component_start_point', true ),
166
-				'mapZoom'			=> get_post_meta( $postid, 'ase_map_component_zoom', true ),
163
+				'mapTileProvider'   => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider($postid) : false,
164
+				'mapLocations'		=> get_post_meta($postid, 'ase_map_component_locations'),
165
+				'mapStart'			=> get_post_meta($postid, 'ase_map_component_start_point', true),
166
+				'mapZoom'			=> get_post_meta($postid, 'ase_map_component_zoom', true),
167 167
 				'revisionModal' 	=> lasso_editor_revision_modal(),
168 168
 				'isMobile'          => wp_is_mobile(),
169
-				'enableAutoSave'    => lasso_editor_get_option( 'enable_autosave', 'lasso_editor' ),
169
+				'enableAutoSave'    => lasso_editor_get_option('enable_autosave', 'lasso_editor'),
170 170
 				'showColor'         => $show_color,
171 171
 				'showAlignment'  => $show_align
172 172
 			);
173 173
 
174 174
 
175 175
 			// wp api client
176
-			wp_enqueue_script( 'wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
177
-			$settings = array( 'root' => home_url( $home_url ), 'nonce' => wp_create_nonce( 'wp_json' ) );
178
-			wp_localize_script( 'wp-api-js', 'WP_API_Settings', $settings );
176
+			wp_enqueue_script('wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true);
177
+			$settings = array('root' => home_url($home_url), 'nonce' => wp_create_nonce('wp_json'));
178
+			wp_localize_script('wp-api-js', 'WP_API_Settings', $settings);
179 179
 
180
-			$postfix = ( defined( 'SCRIPT_DEBUG' ) && true === SCRIPT_DEBUG ) ? '' : '.min';
180
+			$postfix = (defined('SCRIPT_DEBUG') && true === SCRIPT_DEBUG) ? '' : '.min';
181 181
 			if ($show_color) {
182
-				wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'iris'), LASSO_VERSION, true);
182
+				wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery', 'iris'), LASSO_VERSION, true);
183 183
 			} else {
184
-			    wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery'), LASSO_VERSION, true);
184
+			    wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery'), LASSO_VERSION, true);
185 185
 			}
186
-			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects ) );
186
+			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects));
187 187
 
188 188
 
189 189
 		}
Please login to merge, or discard this patch.