This patch defines a new API function that simply looks at $form and returns TRUE or FALSE indicating whether or not it represents a product node form. This will be usable anywhere the core modules or contributed modules want to add to or alter product node forms. So far, each implementation of hook_form_alter() has had to perform its own check.
No longer!
This patch includes an example use in the quote module, along with a general cleanup of uc_quote_form_alter(). Sorry, couldn't resist. I think it's good to keep doing cleanup in these patches anyways, especially commenting.
We can either commit this one and then spread the wealth to other implementations or roll it all into this one patch.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | uc_product_is_product_form.patch | 16.85 KB | Island Usurper |
| uc_product_is_product_form.patch | 6.45 KB | rszrama |
Comments
Comment #1
Island Usurper commentedI've spread the wealth around to the shipping method modules, so here's the new patch. Nothing major, so committed.