There is not a real text format API to load/save/delete text formats, all the queries are executed in form submit handlers.
Install profiles could use text format APIs to add predefined formats when installing.
The patch add filter_format_save() and filter_format_delete() to filter module. The code from the submit handlers is moved to these API functions.
Related issue: #428296: Filter system doesn't communicate with modules about altered text formats. We should add the hooks proposed there inside these API functions.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | formats-API-4.patch | 7.61 KB | dropcube |
| formats-API.patch | 7.84 KB | dropcube |
Comments
Comment #1
dropcube commentedThis API would useful for #556838: Install profiles should install the text formats they require
Comment #2
moshe weitzman commentedNice work. We have good code coverage for this with testFilterAdmin() class so we can proceed with RTBC.
Ping me if you have a patch to start using strings for text format IDs (hint hint).
Thanks for working on our neglected text format system.
Comment #3
sunWrong indentation.
These lines could use some simple comments to explain what's being done.
(and elsewhere) Trailing white-space.
Better check using !empty().
Wrong indentation and trailing white-space here.
I'm on crack. Are you, too?
Comment #4
dropcube commentedUpdate patch fixing issues reported by sun and other cleanups.
Comment #5
dropcube commentedComment #6
moshe weitzman commentedComment #7
dries commentedCommitted to CVS HEAD. Thanks.