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

Shortcode parsing does not allow standalone variables (Shortcake issue) #38

Closed
oherman opened this issue Feb 20, 2015 · 4 comments
Closed

Comments

@oherman
Copy link
Contributor

oherman commented Feb 20, 2015

Shortcake can allow and parse variables with values
eg. [mycode src=someplaceinthenet]

but WILL NOT PARSE NOR ALLOW THIS KIND OF CODE
eg. [mycode someplaceintenet]

Called as standalone variables for easier identification, these kinds cannot be easily generated within shortcake.

These standalone variables are parsed as
$attr[0], $attr[1] and so on...

while normal variables are passed as
$attr('src' => 'value')

Shortcake generates values to pass on to shortcodes by this method:

array(
'label' => 'IFrame embed code',
'attr' => 'content',
'type' => 'textarea',
'description' => 'Enter embed code generated from Google Maps.',
),

It has no provisions for sending standalone variables.

A fix for this issue requires a change in shortcake.

@bfintal
Copy link
Owner

bfintal commented Feb 20, 2015

This is an unresolved Shortcake issue wp-shortcake/shortcake#128

Might consider contributing to them to fix it

@bfintal
Copy link
Owner

bfintal commented Feb 21, 2015

Submitted a fix to Shortcake wp-shortcake/shortcake#180

@bfintal
Copy link
Owner

bfintal commented Feb 21, 2015

If the pull request goes through, we should remove our own implementation sandwich-googlemaps then do a remove_shortcode then add_shortcode on googlemaps to re-implement it. We can end up with 1 shortcode that works with Jetpack's googlemaps shortcode

@bfintal
Copy link
Owner

bfintal commented Feb 25, 2015

The new PR to Shortcake: wp-shortcake/shortcake#198

@bfintal bfintal closed this as completed Feb 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants