Opened 15 years ago
Closed 15 years ago
#10943 closed enhancement (fixed)
Need way to prohibit creation of new taxonomy terms
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | normal | Version: | 2.8.4 |
Component: | Taxonomy | Keywords: | has-patch |
Focuses: | Cc: |
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
@
15 years ago
- Cc mpretty@… 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.
Patch.