芝麻web文件管理V1.00
编辑当前文件:/home/sditechnicalteam/socialdigivlms.com/wp-content/plugins/tutor/tutor-droip/backend/Helper.php
'droip_template', 'posts_per_page' => -1, 'post_status' => ['draft', 'publish'], ) ); $data=[]; foreach ($all_templates as $key => $template) { $conditions = get_post_meta($template->ID, 'droip_template_conditions', true); if($conditions){ foreach ($conditions as $key2 => $condition) { if($condition['category'] === 'courses'){ $data[] = $template; } } } } if(count($data) === 0){ //create a course template $post_id = wp_insert_post( array( 'post_title' => 'Course Details', 'post_name' => 'Course Details', 'post_type' => 'droip_template' ) ); $conditions = array( array( 'category'=>'courses', 'taxonomy' => '*', 'visibility' => 'show' ) ); update_post_meta( $post_id, 'droip_template_conditions', $conditions ); if (class_exists('Droip\Ajax\ExportImport')) { $template_path = TDE_ROOT_PATH . '/assets/course-details.zip'; ExportImport::process_droip_template_zip($template_path, false, $post_id); } $data[] = get_post($post_id); } return $data; } }