@@ -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); |
@@ -400,59 +400,59 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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) ), |