_update_generic_term_count [ WordPress Function ]
_update_generic_term_count ( $terms, $taxonomy )
| Parameters: |
|
| Uses: |
|
| Defined at: |
|
Benzer Fonksiyonlar: wp_update_term_count, _update_post_term_count, wp_update_term_count_now, wp_update_network_counts, wp_update_comment_count
Will update term count based on number of objects.
Default callback for the link_category taxonomy.
Source
<?php
function _update_generic_term_count( $terms, $taxonomy ) {
global $wpdb;
foreach ( (array) $terms as $term ) {
$count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->term_relationships WHERE term_taxonomy_id = %d", $term ) );
do_action( 'edit_term_taxonomy', $term, $taxonomy );
$wpdb->update( $wpdb->term_taxonomy, compact( 'count' ), array( 'term_taxonomy_id' => $term ) );
do_action( 'edited_term_taxonomy', $term, $taxonomy );
}
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- _update_generic_term_count() WordPress function reference ...
Will update term count based on number of objects.
queryposts.com - _update_generic_term_count | A HitchHackers guide through ...
Dec 13, 2011 ... function _update_generic_term_count( $terms, $taxonomy ) { global $wpdb; foreach ( (array) $terms as $term ) { $count = $wpdb->get_var( ...
hitchhackerguide.com - Docs for page taxonomy.php
Defaults to _update_generic_term_count() for taxonomies attached to other object types, such as links. rewrite - false to prevent rewrite, or array('slug'=>$slug ) ...
phpdoc.wordpress.org - using custom taxonomies on non wp table? - WordPress
Nov 12, 2011 ... WordPress explicitly supports that (e.g. there is the function _update_generic_term_count to update the term count for those types of ...
wordpress.stackexchange.com