Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[contact-form $attributes] now ok in do_shortcode #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

webservices-nm
Copy link
Member

Previously, when using the [contact-form] shortcode in do_shortcode situations like a page template, the attributes like 'to' and 'subject' were being dropped. $attributes and all its variations aren't available by the time we get to processing the submission, so I had to rewrite it as a string earlier in the process, in store_shortcode(), when we still have access to $attributes. If someone knows how to get access to the shortcode attributes in process_form_submission() then we could save a few lines of code and keep attributes as an array.

Previously, when using the [contact-form] shortcode in do_shortcode situations like a page template, the attributes like 'to' and 'subject' were being dropped. $attributes and all its variations aren't available by the time we get to processing the submission, so I had to rewrite it as a string earlier in the process, in store_shortcode(), when we still have access to $attributes. If someone knows how to get access to the shortcode attributes in process_form_submission() then we could save a few lines of code and keep attributes as an array.
@jeherve
Copy link

jeherve commented Dec 18, 2015

Ported to Jetpack here:
Automattic#3188

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants