[wp-trac] [WordPress Trac] #50648: Different behavior for default category term with editors
WordPress Trac
noreply at wordpress.org
Fri Aug 7 09:41:49 UTC 2020
#50648: Different behavior for default category term with editors
-------------------------------+------------------------------
Reporter: enrico.sorcinelli | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: trunk
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------------+------------------------------
Comment (by enrico.sorcinelli):
All administration post category term stuffs relies on default category
settings: by creating or updating post without category terms and deleting
a category terms as well, the default post category will be auto-added .
Block editor change this behavior by allowing to set empty terms
disregarding the **Settings > Writing > Default post category** user
choice.
This creates an inconsistence across the different editors.
This simple patch aims to fix that.
I added a `--None--` option with a `0` value in order to explicitly allow
posts with empty terms:
[[Image(https://gist.githubusercontent.com/enrico-
sorcinelli/627c125e3f45105b9a5f59cc917eddb5/raw/feea7256209d484cad1d3db2d56d18f8cfe20645
/settings-writing.png)]]
The REST posts controller adds (or not) the default category term
according to the settings above.
This way, all editors (quick/classic/block) can empty category terms, as
well custom taxonomies terms.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50648#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list