| Server IP : 104.21.25.182 / Your IP : 216.73.216.252 Web Server : Apache System : Linux server.rehabsharif.com 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64 User : nobi37te ( 1003) PHP Version : 8.2.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/nobi37te/public_html/wp-content/plugins/sfwd-lms/includes/import/ |
Upload File : |
<?php
/**
* LearnDash Import Topic CPT
*
* This file contains functions to handle import of the LearnDash Topic
*
* @package LearnDash\Import
* @since 1.0.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ( ! class_exists( 'LearnDash_Import_Topic' ) ) && ( class_exists( 'LearnDash_Import_Post' ) ) ) {
/**
* Class to import topics
*/
class LearnDash_Import_Topic extends LearnDash_Import_Post {
/**
* Version
*
* @var string Version.
*/
private $version = '1.0';
/**
* Destination Post Type
*
* @var string $dest_post_type
*/
protected $dest_post_type = 'sfwd-topic';
/**
* Source Post Type
*
* @var string $source_post_type
*/
protected $source_post_type = 'sfwd-topic';
/**
* Destination Taxonomy
*
* @var string $dest_taxonomy
*/
protected $dest_taxonomy = 'ld_topic_tag';
/**
* Duplicate post
*
* @param integer $source_post_id Post ID to copy.
* @param boolean $force_copy Whether to force the copy. Default false.
*
* @return WP_Post
*/
public function duplicate_post( $source_post_id = 0, $force_copy = false ) {
$new_post = parent::duplicate_post( $source_post_id, $force_copy );
return $new_post;
}
/**
* Duplicate Post's taxonomies
*
* @param WP_Term $source_term WP_Term to duplicate.
* @param boolean $create_parents Whether to create parent taxonomies. Default false.
*
* @return WP_Term
*/
public function duplicate_post_tax_term( $source_term, $create_parents = false ) {
$new_term = parent::duplicate_post( $source_term, $create_parents );
return $new_term;
}
// End of functions.
}
}