@@ -68,7 +68,7 @@ discard block |
||
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 |
||
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); |
@@ -288,9 +288,9 @@ discard block |
||
288 | 288 | { |
289 | 289 | $post_id= $_POST["postid"]; |
290 | 290 | $locked = wp_check_post_lock($post_id); |
291 | - if (!$locked) { |
|
292 | - delete_post_meta( $post_id, '_edit_lock'); |
|
293 | - } |
|
291 | + if (!$locked) { |
|
292 | + delete_post_meta( $post_id, '_edit_lock'); |
|
293 | + } |
|
294 | 294 | echo "true"; |
295 | 295 | |
296 | 296 | exit; |
@@ -402,59 +402,59 @@ discard block |
||
402 | 402 | ); |
403 | 403 | foreach ($_POST as $key => $value) { |
404 | 404 | if ($key !="code" && $key !="action") { |
405 | - //$shortcode = $shortcode.$key.'="'.$value.'" '; |
|
405 | + //$shortcode = $shortcode.$key.'="'.$value.'" '; |
|
406 | 406 | $atts[$key] = $value; |
407 | 407 | } |
408 | 408 | } |
409 | 409 | if ($code == "aesop_video") { |
410 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-video.php'); |
|
411 | - echo aesop_video_shortcode($atts); |
|
410 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-video.php'); |
|
411 | + echo aesop_video_shortcode($atts); |
|
412 | 412 | } |
413 | 413 | else if ($code == "aesop_image") { |
414 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php'); |
|
415 | - echo aesop_image_shortcode($atts); |
|
414 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php'); |
|
415 | + echo aesop_image_shortcode($atts); |
|
416 | 416 | } |
417 | 417 | else if ($code == "aesop_quote") { |
418 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php'); |
|
419 | - echo aesop_quote_shortcode($atts); |
|
418 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php'); |
|
419 | + echo aesop_quote_shortcode($atts); |
|
420 | 420 | } |
421 | 421 | else if ($code == "aesop_parallax") { |
422 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php'); |
|
423 | - echo aesop_parallax_shortcode($atts); |
|
422 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php'); |
|
423 | + echo aesop_parallax_shortcode($atts); |
|
424 | 424 | } |
425 | 425 | else if ($code == "aesop_character") { |
426 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php'); |
|
427 | - echo aesop_character_shortcode($atts); |
|
426 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php'); |
|
427 | + echo aesop_character_shortcode($atts); |
|
428 | 428 | } |
429 | 429 | else if ($code == "aesop_collection") { |
430 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php'); |
|
431 | - echo aesop_collection_shortcode($atts); |
|
430 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php'); |
|
431 | + echo aesop_collection_shortcode($atts); |
|
432 | 432 | } |
433 | 433 | else if ($code == "aesop_chapter") { |
434 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php'); |
|
435 | - echo aesop_chapter_shortcode($atts); |
|
434 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php'); |
|
435 | + echo aesop_chapter_shortcode($atts); |
|
436 | 436 | } |
437 | 437 | else if ($code == "aesop_content") { |
438 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php'); |
|
439 | - echo aesop_content_shortcode($atts, $atts['content_data']); |
|
438 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php'); |
|
439 | + echo aesop_content_shortcode($atts, $atts['content_data']); |
|
440 | 440 | } |
441 | 441 | else if ($code == "aesop_gallery") { |
442 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php'); |
|
443 | - echo do_shortcode( '[aesop_gallery id="'.$atts["id"].'"]'); |
|
442 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php'); |
|
443 | + echo do_shortcode( '[aesop_gallery id="'.$atts["id"].'"]'); |
|
444 | 444 | } |
445 | 445 | else if ($code == "aesop_audio") { |
446 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-audio.php'); |
|
447 | - echo aesop_audio_shortcode($atts); |
|
446 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-audio.php'); |
|
447 | + echo aesop_audio_shortcode($atts); |
|
448 | 448 | } |
449 | 449 | else { |
450 | 450 | $code = '['.$code.' '; |
451 | 451 | foreach ($atts as $key => $value) { |
452 | - $code = ''.$key.'="'.$value.'" '; |
|
452 | + $code = ''.$key.'="'.$value.'" '; |
|
453 | 453 | } |
454 | 454 | $code = $code.']'; |
455 | 455 | echo do_shortcode($code); |
456 | - //require_once( ABSPATH . '/wp-content/plugins/aesop-events/public/includes/shortcode.php'); |
|
457 | - //echo aesop_audio_shortcode($atts); |
|
456 | + //require_once( ABSPATH . '/wp-content/plugins/aesop-events/public/includes/shortcode.php'); |
|
457 | + //echo aesop_audio_shortcode($atts); |
|
458 | 458 | } |
459 | 459 | |
460 | 460 | exit; |
@@ -494,12 +494,12 @@ discard block |
||
494 | 494 | exit; |
495 | 495 | } |
496 | 496 | |
497 | - /* This function doesn't actually publish post, but should be called when a post is published */ |
|
498 | - public function publish_post( ) { |
|
497 | + /* This function doesn't actually publish post, but should be called when a post is published */ |
|
498 | + public function publish_post( ) { |
|
499 | 499 | |
500 | 500 | $post_id = isset( $_POST['postid'] ) ? $_POST['postid'] : false; |
501 | 501 | |
502 | - do_action( 'transition_post_status', 'publish', 'draft', get_post( $post_id ) ); |
|
502 | + do_action( 'transition_post_status', 'publish', 'draft', get_post( $post_id ) ); |
|
503 | 503 | |
504 | 504 | exit; |
505 | 505 | } |
@@ -557,14 +557,14 @@ discard block |
||
557 | 557 | $allow_new_category = lasso_editor_get_option( 'allow_new_category', 'lasso_editor' ); |
558 | 558 | |
559 | 559 | if ($taxonomy =='category') { |
560 | - // convert from names to category ids |
|
560 | + // convert from names to category ids |
|
561 | 561 | $cats = array(); |
562 | 562 | foreach ($value as $cat) { |
563 | 563 | $cat_id = get_cat_ID($cat); |
564 | 564 | if ($cat_id !=0) { |
565 | 565 | $cats [] = $cat_id; |
566 | 566 | } else if ($allow_new_category) { |
567 | - $cats [] = wp_create_category($cat); |
|
567 | + $cats [] = wp_create_category($cat); |
|
568 | 568 | } |
569 | 569 | } |
570 | 570 | $value = $cats; |
@@ -606,7 +606,7 @@ discard block |
||
606 | 606 | public function set_date( $postid, $value) { |
607 | 607 | if( $value ) { |
608 | 608 | $value = self::getEnglishMonthName($value)." ".date("H:i:s", current_time( 'timestamp', 1 )); |
609 | - wp_update_post( |
|
609 | + wp_update_post( |
|
610 | 610 | array ( |
611 | 611 | 'ID' => $postid, // ID of the post to update |
612 | 612 | 'post_date' => date( 'Y-m-d H:i:s', strtotime($value) ), |