Opened 17 years ago
Closed 16 years ago
#10943 closed enhancement (fixed)
Need way to prohibit creation of new taxonomy terms
| Reported by: | sirzooro | Owned by: | filosofo |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.0 |
| Component: | Taxonomy | Version: | 2.8.4 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
I have site where everyone can submit post. I have created categories, which are usually used by people. Unfortunately from time to time I get post (probably added by some automated software), which is added to newly created category, which name consists of digits only. Therefore I need some way to disable this, e.g. new filter called at beginning of wp_insert_term(), which can be used to deny operation.
Attachments (2)
Change History (7)
#2
@
17 years ago
- Cc added
I have a similar need, but this patch (attachment:taxonomy.php.diff) has some limitations. If wp_insert_term returns a WP_Error than the wp_set_object_terms will return directly after with an error, causing none of the terms to be mapped to the object. I think a better solution would be the ability to filter our the new terms before the loop even begins.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Patch.