wp_create_categories [ WordPress Function ]
wp_create_categories ( $categories, $post_id = '' )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: wp_create_category, wp_list_categories, wp_get_post_categories, get_categories, wp_set_post_categories
{@internal Missing Short Description}}
Source
<?php
function wp_create_categories($categories, $post_id = '') {
$cat_ids = array ();
foreach ($categories as $category) {
if ($id = category_exists($category))
$cat_ids[] = $id;
else
if ($id = wp_create_category($category))
$cat_ids[] = $id;
}
if ( $post_id )
wp_set_post_categories($post_id, $cat_ids);
return $cat_ids;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- wp_create_category - WordPress Codex
Description. This function adds a "simple" category by specifying a category name and (optionally) a category parent. Usage. <?php wp_create_category( ...
codex.wordpress.org - WordPress › Support » Tags — wp_create_categories
Forums. Username or Email Address Password (forgot?) Register · WordPress › Support » wp_create_categories. Tag: wp_create_categories Add New » ...
wordpress.org - wp_create_categories (WordPress Function) - WPSeek.com
WordPress lookup for wp_create_categories, a WordPress Function. wpseek. com is a WordPress-centric search tool for developers and theme authors.
wpseek.com - wp_create_categories
Function and Method Cross Reference. wp_create_categories(). Defined at: /wp- admin/includes/taxonomy.php -> line 57. No references found.
phpxref.ftwr.co.uk
Gebruikersdiscussies [ wordpress.org ]
- Anthony Barrier on "Create category don't work"
- Anthony Barrier on "Create category don't work"
- Johnb81 on "Create category don't work"
- Anthony Barrier on "Create category don't work"
- Martin Black on "Automatically create categories"
- Martin Black on "Automatically create categories"
- tiptop10 on "wp_create_categories broken?"
- Otto on "wp_create_categories broken?"
- tiptop10 on "wp_create_categories broken?"
- Otto on "wp_create_categories broken?"