WordPress.org

Make WordPress Core

Ticket #30999: 30999.patch

File 30999.patch, 1.7 KB (added by ipm-frommen, 7 years ago)

Pass taxonomy name instead of object

  • wp-includes/taxonomy.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    40624062                        $count += (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->term_relationships, $wpdb->posts WHERE $wpdb->posts.ID = $wpdb->term_relationships.object_id AND post_status = 'publish' AND post_type IN ('" . implode("', '", $object_types ) . "') AND term_taxonomy_id = %d", $term ) );
    40634063
    40644064                /** This action is documented in wp-includes/taxonomy.php */
    4065                 do_action( 'edit_term_taxonomy', $term, $taxonomy );
     4065                do_action( 'edit_term_taxonomy', $term, $taxonomy->name );
    40664066                $wpdb->update( $wpdb->term_taxonomy, compact( 'count' ), array( 'term_taxonomy_id' => $term ) );
    40674067
    40684068                /** This action is documented in wp-includes/taxonomy.php */
    4069                 do_action( 'edited_term_taxonomy', $term, $taxonomy );
     4069                do_action( 'edited_term_taxonomy', $term, $taxonomy->name );
    40704070        }
    40714071}
    40724072
     
    40894089                $count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->term_relationships WHERE term_taxonomy_id = %d", $term ) );
    40904090
    40914091                /** This action is documented in wp-includes/taxonomy.php */
    4092                 do_action( 'edit_term_taxonomy', $term, $taxonomy );
     4092                do_action( 'edit_term_taxonomy', $term, $taxonomy->name );
    40934093                $wpdb->update( $wpdb->term_taxonomy, compact( 'count' ), array( 'term_taxonomy_id' => $term ) );
    40944094
    40954095                /** This action is documented in wp-includes/taxonomy.php */
    4096                 do_action( 'edited_term_taxonomy', $term, $taxonomy );
     4096                do_action( 'edited_term_taxonomy', $term, $taxonomy->name );
    40974097        }
    40984098}
    40994099