Template in Shortcode does not work
-
Hi,
the usage of [wp-tiles template=”Plain”] (and any other template) seems not to work. Here are my investigations:
– wrong script is outputed:
"rowTemplates":{"0":[" . . . . . "],"small":[" A A "," . . "," A A "," . . "," A A "," . . "," A A "]}
I think this have to be strings not arrays (if choosing no template, there are strings not arrays)
– I have looked at wp-tiles.php. The issue seems to be somewhere around here:if ( ! empty ( $atts['template'] ) && ! empty ( $atts['templates']['templates'][ $atts['template'] ] ) ) { $templates = array ( $atts['templates']['templates'][ $atts['template'] ] ); } else { $templates = $atts['templates']['templates']; } foreach ( $templates as &$template ) { $template = explode ( "\n", $template ); }
Finally, I could not fix it. Could You fix it please?
By the way, PHPStorm shows some PHP validation errors that should be fixed too.
Greets
Raubvogel
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Template in Shortcode does not work’ is closed to new replies.