I’ve created a module which defines a new text format filter.
Now I want to define a text format using this new filter, directly from module php. Drupal Administrator can do this manually from admin/config/content/formats/add admin page, but I want to avoid this step. What do I need to add to my_dmodule.module?
I’ve created a module which defines a new text format filter . Now I
Share
I’m guessing that you are trying to create a text format on module installation. If so, you could call filter_format_save(). The details on creating the object can be found in filter.module (Drupal API reference).
You might have to load the filter module first if you are creating the filter in hook_install(), haven’t checked: