-
Notifications
You must be signed in to change notification settings - Fork 869
Contact Form: change [contact-form] shortcode to [contact_form] #2065
Description
While the Jetpack doesn't use wpviews to make the contact form have a visual representation in the editor, as already happens with the galleries and audio and video shortcodes (@georgestephanis set this as "vFuture" on #642), there is a suggestion for now.
Some of you know that @danielbachhuber's Shortcake (Shortcode UI) plug-in has been a great solution to visually represent shortcodes in editing screen. I tried to register [contact-field] as visual shortcode, but I discovered that shortcodes using hyphen - in your slug are not accepted by Shortcake.
Thus, Jetpack could use [contact_field] (using an underscore _ to represent slug) instead of [contact-field]. So, if user has Shortcode UI installed & activated, the Contact Form could be visually represented. The user had to make proper registration of the visual shortcode. However, it'd be even better if Jetpack could test if shortcake function_exists registry function already existed and did its registration.
PS.: To prevent this update breaking sites that already have the forms generated with [contact-field], both shortcodes could coexist. [contact-field] could be an alias for [contact_field].