Changeset 12259 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/inc/taxonomy.php
- Timestamp:
- 11/22/2022 12:50:46 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/inc/taxonomy.php
r12174 r12259 9 9 */ 10 10 add_action( 'init', __NAMESPACE__ . '\register' ); 11 add_action( 'audience_add_form_fields', __NAMESPACE__ . '\register_custom_fields' ); 12 add_action( 'wporg_lesson_category_add_form_fields', __NAMESPACE__ . '\register_custom_fields' ); 13 add_action( 'topic_add_form_fields', __NAMESPACE__ . '\register_custom_fields' ); 14 add_action( 'audience_edit_form_fields', __NAMESPACE__ . '\tax_edit_term_fields', 10, 2 ); 15 add_action( 'wporg_lesson_category_edit_form_fields', __NAMESPACE__ . '\tax_edit_term_fields', 10, 2 ); 16 add_action( 'topic_edit_form_fields', __NAMESPACE__ . '\tax_edit_term_fields', 10, 2 ); 17 add_action( 'created_audience', __NAMESPACE__ . '\tax_save_term_fields' ); 18 add_action( 'edited_audience', __NAMESPACE__ . '\tax_save_term_fields' ); 19 add_action( 'created_wporg_lesson_category', __NAMESPACE__ . '\tax_save_term_fields' ); 20 add_action( 'edited_wporg_lesson_category', __NAMESPACE__ . '\tax_save_term_fields' ); 21 add_action( 'created_topic', __NAMESPACE__ . '\tax_save_term_fields' ); 22 add_action( 'edited_topic', __NAMESPACE__ . '\tax_save_term_fields' ); 11 23 12 24 /** … … 584 596 } 585 597 586 add_action( 'audience_add_form_fields', __NAMESPACE__ . '\register_custom_fields' );587 add_action( 'wporg_lesson_category_add_form_fields', __NAMESPACE__ . '\register_custom_fields' );588 589 598 /** 590 599 * Icon field on edit screen. … … 594 603 */ 595 604 function tax_edit_term_fields( $term, $taxonomy ) { 596 $value = get_term_meta( $term->term_id, 'dashicon-class', true );605 $value = get_term_meta( $term->term_id, 'dashicon-class', true ); 597 606 $sticky = get_term_meta( $term->term_id, 'sticky', true ); 598 607 … … 618 627 } 619 628 620 add_action( 'audience_edit_form_fields', __NAMESPACE__ . '\tax_edit_term_fields', 10, 2 );621 add_action( 'wporg_lesson_category_edit_form_fields', __NAMESPACE__ . '\tax_edit_term_fields', 10, 2 );622 623 629 /** 624 630 * Save icon field. … … 648 654 ); 649 655 } 650 651 add_action( 'created_audience', __NAMESPACE__ . '\tax_save_term_fields' );652 add_action( 'edited_audience', __NAMESPACE__ . '\tax_save_term_fields' );653 add_action( 'created_wporg_lesson_category', __NAMESPACE__ . '\tax_save_term_fields' );654 add_action( 'edited_wporg_lesson_category', __NAMESPACE__ . '\tax_save_term_fields' );
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)