Skip to content

Instantly share code, notes, and snippets.

@jdoubleu
jdoubleu / wordpress_shortcode.php
Created Jul 1, 2016
Get attributes of child shortcodes in parent.
View wordpress_shortcode.php
<?php
// Currently in: Container
$mycontent = "Some content from before";
// Attributes of Elements
$elements = array();
// Register shortcode
add_shortcode('container_element', function($atts, $content) use(&$elements) {
$atts = shortcode_atts(array(
You can’t perform that action at this time.