WordPress.org

Make WordPress Core

Ticket #44733: 44733.diff

File 44733.diff, 1.1 KB (added by soulseekah, 15 months ago)
  • src/wp-includes/taxonomy.php

    diff --git src/wp-includes/taxonomy.php src/wp-includes/taxonomy.php
    index 1806ad0..1683ee1 100644
    function register_taxonomy_for_object_type( $taxonomy, $object_type ) { 
    613613        // Filter out empties.
    614614        $wp_taxonomies[ $taxonomy ]->object_type = array_filter( $wp_taxonomies[ $taxonomy ]->object_type );
    615615
     616        /**
     617         * Fires after a taxonomy is registered for an object type.
     618         *
     619         * @since trunk
     620         *
     621         * @param string $taxonomy Taxonomy name.
     622         * @param string $object_type Name of the object type.
     623         */
     624        do_action( 'registered_taxonomy_for_object_type', $taxonomy, $object_type );
     625
    616626        return true;
    617627}
    618628
    function unregister_taxonomy_for_object_type( $taxonomy, $object_type ) { 
    644654        }
    645655
    646656        unset( $wp_taxonomies[ $taxonomy ]->object_type[ $key ] );
     657
     658        /**
     659         * Fires after a taxonomy is unregistered for an object type.
     660         *
     661         * @since trunk
     662         *
     663         * @param string $taxonomy Taxonomy name.
     664         * @param string $object_type Name of the object type.
     665         */
     666        do_action( 'unregistered_taxonomy_for_object_type', $taxonomy, $object_type );
     667
    647668        return true;
    648669}
    649670