@@ -150,7 +150,7 @@ discard block |
||
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 |
||
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 |
@@ -255,14 +255,14 @@ discard block |
||
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 |
||
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; |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | if ( strpos( $m[2],'aesop_' ) === 0 ) { |
69 | 69 | // check against the exceptions |
70 | 70 | if (strpos_arr($m[2],$exception_arr1)===false) { |
71 | - return $m[0]; |
|
71 | + return $m[0]; |
|
72 | 72 | } |
73 | 73 | } |
74 | 74 | if (strpos_arr($m[2],$exception_arr2)!==false) { |
@@ -80,9 +80,9 @@ discard block |
||
80 | 80 | |
81 | 81 | /* a helper function */ |
82 | 82 | function strpos_arr($haystack, $needle) { |
83 | - if(!is_array($needle)) $needle = array($needle); |
|
84 | - foreach($needle as $what) { |
|
85 | - if(($pos = strpos($haystack, $what))!==false) return $pos; |
|
86 | - } |
|
87 | - return false; |
|
83 | + if(!is_array($needle)) $needle = array($needle); |
|
84 | + foreach($needle as $what) { |
|
85 | + if(($pos = strpos($haystack, $what))!==false) return $pos; |
|
86 | + } |
|
87 | + return false; |
|
88 | 88 | } |
89 | 89 | \ No newline at end of file |
@@ -118,7 +118,7 @@ discard block |
||
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 |
||
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) { |
@@ -243,7 +243,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -57,8 +57,8 @@ |
||
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' ); |