Skip to content

Commit

Permalink
Indigenous Learning topic adjust from Curator
Browse files Browse the repository at this point in the history
  • Loading branch information
allanhaggett committed Dec 26, 2023
1 parent 51a88e1 commit 394ee8d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion wp-bcgov-corp-learn-portal.php
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,8 @@ function course_tax_template( $tax_template ) {
}
if ( is_tax ( 'topics' ) ) {
$tax_template = dirname( __FILE__ ) . '/taxonomy-topics.php';


}
if ( is_tax ( 'delivery_method' ) ) {
$tax_template = dirname( __FILE__ ) . '/taxonomy-delivery-method.php';
Expand Down Expand Up @@ -975,7 +977,11 @@ function curator_sync () {
#TODO update topics and maybe keywords too?
$coursetop = get_the_terms($course->ID,'topics');
if($coursetop[0]->name != $feedcourse->topic->name) {
wp_set_object_terms( $course->ID, sanitize_text_field($feedcourse->topic->name), 'topics', false);
$tname = $coursetop[0]->name;
if($coursetop[0]->name != 'House of Indigenous Learning') {
$tname = 'Indigenous Learning';
}
wp_set_object_terms( $course->ID, sanitize_text_field($tname), 'topics', false);
}

// Coming into the home stretch updating the partner and delivery method.
Expand Down

0 comments on commit 394ee8d

Please sign in to comment.