Making WordPress.org


Ignore:
Timestamp:
11/22/2022 12:50:46 AM (4 years ago)
Author:
adamwood
Message:

Learn: Sync with git WordPress/learn@5ad9322

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/inc/taxonomy.php

    r12174 r12259  
    99 */
    1010add_action( 'init', __NAMESPACE__ . '\register' );
     11add_action( 'audience_add_form_fields', __NAMESPACE__ . '\register_custom_fields' );
     12add_action( 'wporg_lesson_category_add_form_fields', __NAMESPACE__ . '\register_custom_fields' );
     13add_action( 'topic_add_form_fields', __NAMESPACE__ . '\register_custom_fields' );
     14add_action( 'audience_edit_form_fields', __NAMESPACE__ . '\tax_edit_term_fields', 10, 2 );
     15add_action( 'wporg_lesson_category_edit_form_fields', __NAMESPACE__ . '\tax_edit_term_fields', 10, 2 );
     16add_action( 'topic_edit_form_fields', __NAMESPACE__ . '\tax_edit_term_fields', 10, 2 );
     17add_action( 'created_audience', __NAMESPACE__ . '\tax_save_term_fields' );
     18add_action( 'edited_audience', __NAMESPACE__ . '\tax_save_term_fields' );
     19add_action( 'created_wporg_lesson_category', __NAMESPACE__ . '\tax_save_term_fields' );
     20add_action( 'edited_wporg_lesson_category', __NAMESPACE__ . '\tax_save_term_fields' );
     21add_action( 'created_topic', __NAMESPACE__ . '\tax_save_term_fields' );
     22add_action( 'edited_topic', __NAMESPACE__ . '\tax_save_term_fields' );
    1123
    1224/**
    … …  
    584596}
    585597
    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 
    589598/**
    590599 * Icon field on edit screen.
    … …  
    594603 */
    595604function 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 );
    597606        $sticky = get_term_meta( $term->term_id, 'sticky', true );
    598607
    … …  
    618627}
    619628
    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 
    623629/**
    624630 * Save icon field.
    … …  
    648654        );
    649655}
    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.