wp_update_category [ WordPress Function ]
wp_update_category ( $catarr )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Benzer Fonksiyonlar: wp_delete_category, wp_create_category, wp_update_term, wp_update_core, update_category_cache
Aliases wp_insert_category() with minimal args.
If you want to update only some fields of an existing category, call this function with only the new values set inside $catarr.
Source
<?php
function wp_update_category($catarr) {
$cat_ID = (int) $catarr['cat_ID'];
if ( isset($catarr['category_parent']) && ($cat_ID == $catarr['category_parent']) )
return false;
// First, get all of the original fields
$category = get_category($cat_ID, ARRAY_A);
// Escape data pulled from DB.
$category = add_magic_quotes($category);
// Merge old and new fields with new fields overwriting old ones.
$catarr = array_merge($category, $catarr);
return wp_insert_category($catarr);
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- php - Update category's parent via script wp_update_category ...
The original source code for wp_update_cagetory() is: /** * Aliases wp_insert_category() with minimal args. * * If you want to update only some fields ...
stackoverflow.com - wp_update_category
Function and Method Cross Reference. wp_update_category(). Defined at: /wp- admin/includes/taxonomy.php -> line 140. No references found.
phpxref.ftwr.co.uk - wp_update_category (WordPress Function) - WPSeek.com
WordPress lookup for wp_update_category, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers and theme authors.
wpseek.com - WordPress › Support » Tags — wp_update_category
Forums. Username or Email Address Password (forgot?) Register · WordPress › Support » wp_update_category. Tag: wp_update_category Add New » ...
wordpress.org