Related
I do not know if this is possible or not, I should ask rather than just be quiet, can json array result using loops? for example
i have loops script like this
$count = count($json);
if($count > 10){
$count = 10;
}
for($i=0; $i < $count; $i++) {
...
}
and then, i have a json array that only has 1 path, json is like this
array (
'type' => 'template',
'altText' => 'this is a carousel template',
'template' =>
array (
'type' => 'carousel',
'columns' =>
array (
0 =>
array (
'thumbnailImageUrl' => 'https://example.com/images/item1.jpg',
'imageBackgroundColor' => '#FFFFFF',
'title' => 'this is menu',
'text' => 'description',
'actions' =>
array (
0 =>
array (
'type' => 'postback',
'label' => 'Buy',
'data' => 'action=buy&itemid=111',
),
),
),
),
),
)
is there a way for my loops function to work on json array above? so for path ['template']['columns'] can generate 10 paths according to the number of loops I have, so the result is like this if the loops function just 2
array (
'type' => 'template',
'altText' => 'this is a carousel template',
'template' =>
array (
'type' => 'carousel',
'columns' =>
array (
0 =>
array (
'thumbnailImageUrl' => 'https://example.com/images/item1.jpg',
'imageBackgroundColor' => '#FFFFFF',
'title' => 'this is menu',
'text' => 'description',
'actions' =>
array (
0 =>
array (
'type' => 'postback',
'label' => 'Buy',
'data' => 'action=buy&itemid=111',
),
),
),
1 =>
array (
'thumbnailImageUrl' => 'https://example.com/images/item1.jpg',
'imageBackgroundColor' => '#FFFFFF',
'title' => 'this is menu',
'text' => 'description',
'actions' =>
array (
0 =>
array (
'type' => 'postback',
'label' => 'Buy',
'data' => 'action=buy&itemid=111',
),
),
),
),
),
)
thank you
I don't know what do you want. But this is my understanding about your question
$jsson = array (
'type' => 'template',
'altText' => 'this is a carousel template',
'template' =>
array (
'type' => 'carousel',
'columns' =>
array (
0 =>
array (
'thumbnailImageUrl' => 'https://example.com/images/item1.jpg',
'imageBackgroundColor' => '#FFFFFF',
'title' => 'this is menu',
'text' => 'description',
'actions' =>
array (
0 =>
array (
'type' => 'postback',
'label' => 'Buy',
'data' => 'action=buy&itemid=111',
),
),
),
),
),
);
for($i=1; $i < 2; $i++){
$jsson['template']['columns'][$i] = $jsson['template']['columns'];
}
array (
0 =>
array (
'label' => '1',
'index' => 1,
'product_attributes' =>
array (
0 =>
array (
'type' => 'product',
'id' => 1,
'label' => 'Size',
'placeholder' => 'Select Size',
'description' => '',
'defaultValue' =>
array (
'text' => 'Size32',
'price' => '22',
'isSelected' => false,
),
'choices' =>
array (
0 =>
array (
'text' => 'Size30',
'price' => '20',
'isSelected' => 'true',
),
1 =>
array (
'text' => 'Size32',
'price' => '22',
'isSelected' => false,
),
),
'conditionalLogic' => '',
),
1 =>
array (
'type' => 'product',
'id' => 2,
'label' => 'Color',
'placeholder' => 'Select Color',
'description' => 'DEsc',
'defaultValue' =>
array (
'text' => 'Black',
'price' => '5',
'isSelected' => 'false',
),
'choices' =>
array (
0 =>
array (
'text' => 'Black',
'price' => '5',
'isSelected' => 'false',
),
1 =>
array (
'text' => 'Green',
'price' => '6',
'isSelected' => 'false',
),
2 =>
array (
'text' => 'Blue',
'price' => '4',
'isSelected' => 'true',
),
3 =>
array (
'text' => 'White',
'price' => '1',
'isSelected' => 'false',
),
),
'conditionalLogic' => '',
),
2 =>
array (
'type' => 'product',
'id' => 3,
'label' => 'Fit',
'placeholder' => 'Select Fit',
'description' => 'Select Fit',
'defaultValue' =>
array (
),
'choices' =>
array (
0 =>
array (
'text' => 'Slim',
'price' => '2',
'isSelected' => false,
),
1 =>
array (
'text' => 'Regular',
'price' => '3',
'isSelected' => false,
),
2 =>
array (
'text' => 'Casual',
'price' => '5',
'isSelected' => false,
),
),
'conditionalLogic' => '',
),
),
'total_product_cost' => '$27.00',
'total_product_price' => '27.00',
'product_id' => '36',
),
1 =>
array (
'label' => 'label21',
'total_product_cost' => '$27.00',
'total_product_price' => '27.00',
'index' => 3,
'product_id' => '36',
'product_attributes' =>
array (
0 =>
array (
'type' => 'product',
'id' => 1,
'label' => 'Size',
'placeholder' => 'Select Size',
'description' => '',
'defaultValue' =>
array (
'text' => 'Size32',
'price' => '22',
'isSelected' => false,
),
'choices' =>
array (
0 =>
array (
'text' => 'Size30',
'price' => '20',
'isSelected' => 'true',
),
1 =>
array (
'text' => 'Size32',
'price' => '22',
'isSelected' => false,
),
),
'conditionalLogic' => '',
'conditionalLogic2' =>
array (
'actionType' => 'show',
'logicType' => 'all',
'checkbox' => true,
'rules' =>
array (
0 =>
array (
'fieldId' => 2,
'operator' => 'is',
'value' => 'Black',
),
),
),
),
1 =>
array (
'type' => 'product',
'id' => 2,
'label' => 'Color',
'placeholder' => 'Select Color',
'description' => 'DEsc',
'defaultValue' =>
array (
'text' => 'Black',
'price' => '5',
'isSelected' => 'false',
),
'choices' =>
array (
0 =>
array (
'text' => 'Black',
'price' => '5',
'isSelected' => 'false',
),
1 =>
array (
'text' => 'Green',
'price' => '6',
'isSelected' => 'false',
),
2 =>
array (
'text' => 'Blue',
'price' => '4',
'isSelected' => 'true',
),
3 =>
array (
'text' => 'White',
'price' => '1',
'isSelected' => 'false',
),
),
'conditionalLogic' => '',
),
2 =>
array (
'type' => 'product',
'id' => 3,
'label' => 'Fit',
'placeholder' => 'Select Fit',
'description' => 'Select Fit',
'defaultValue' =>
array (
),
'choices' =>
array (
0 =>
array (
'text' => 'Slim',
'price' => '2',
'isSelected' => false,
),
1 =>
array (
'text' => 'Regular',
'price' => '3',
'isSelected' => false,
),
2 =>
array (
'text' => 'Casual',
'price' => '5',
'isSelected' => false,
),
),
'conditionalLogic' => '',
),
),
),
)
I have posted my array value. This values are dynamic. Here is two array conditionalLogic and conditionalLogic2 I want to assign those array key conditionalLogic2 exist and value should be assign to conditionalLogic. After assign conditionalLogic values into the conditionalLogic2 remove that key from my array list.
Check I have tried this way but not working -
// $data['values'] array I have posted above
foreach ($data['values'] as $products) {
foreach ($products['product_attributes'] as $product_choices) {
if (!empty($product_choices['conditionalLogic2']) && $product_choices['conditionalLogic'] == '') {
$product_choices['conditionalLogic'] = $product_choices['conditionalLogic2'];
unset($product_choices['conditionalLogic2']);
}
}
}
var_export($data['values']); exit;
Please help me and give me any solution how to replace the array value into another array.
What is the shortcut way to solve this problem?
It is usually better to avoid nested loops:
foreach ($data as &$datum) {
if (!isset($datum['product_attributes'])) {
continue;
}
$datum['product_attributes'] = array_map(function ($productAttribute) {
if (
!empty($productAttribute['conditionalLogic2'])
&& empty($productAttribute['conditionalLogic'])
) {
$productAttribute['conditionalLogic'] = $productAttribute['conditionalLogic2'];
unset($productAttribute['conditionalLogic2']);
}
return $productAttribute;
}, $datum['product_attributes']);
}
Here I used array_map() function to assign new arrays directly.
Here is working example.
Your code is almost right, but you're acting a local variables in foreach loops. You should bind them to original array items as follows:
foreach ($data['values'] as & $products) {
foreach ($products['product_attributes'] as & $product_choices) {
if (!empty($product_choices['conditionalLogic2']) && $product_choices['conditionalLogic'] == '') {
$product_choices['conditionalLogic'] = $product_choices['conditionalLogic2'];
unset($product_choices['conditionalLogic2']);
}
}
}
unset($products);
unset($product_choices);
If there is the end of current function scope, both unset may be omitted. But you may remove references from an array explicitly to avoid undesired affects in some code below in the same scope. I.e. $products = 10; somewhere below crushes your last branch of an array.
#chinu You are actually assigning or changing the local variables where scope is limited within for loop only so in this case, we should use pass by reference.
See the following code, it will work:
foreach ($data['values'] as &$products) {
foreach ($products['product_attributes'] as &$product_choices) {
if (!empty($product_choices['conditionalLogic2']) && $product_choices['conditionalLogic'] == '') {
$product_choices['conditionalLogic'] = $product_choices['conditionalLogic
Good morning everyone,
I'm trying to recreate a html page extracting data from an array.
This is the array
$MiniSiteStructureArray = array(
'section_1' => array(
'class' => 'main full',
'contents' => array(
'img' => array(
'class' => 'logo',
'src' => 'assets/images/logo-480x176.png'
),
'div' => array(
'class' => 'cover sfondo',
'img' => array(
'class' => 'cover-image',
'src' => 'assets/images/cover-img-header.png'
)
),
'div_1' => array(
'class' => 'cover-mob sfondo-mob',
'img' => array(
'class' => 'cover-image-mob',
'src' => 'assets/images/cover-img-mobile.jpg'
)
),
'a' => array(
'class' => 'button order light',
'div' => array(
'class' => 'data-min',
'div' => array(
'class' => 'label-holder',
'img' => array(
'src' => 'assets/images/sfondo-cta.jpg'
),
'p' => array(
'class' => 'label',
'strong' => 'text'
)
),
'div_1' => array(
'class' => 'price-holder'
)
)
),
'div_2' => array(
'class' => 'cta',
'p' => array(
'class' => 'main-title',
'a' => array(
'strong' => 'text'
)
)
),
'img_1' => array(
'class' => 'main-title',
'src' => 'assets/images/extra_1.png'
)
)
),
'section_2' => array(
'class' => 'gallery',
'id' => 'video',
'contents' => array(
'p' => array(
'class' => 'title video-title',
'span' => array(
'strong' => 'text'
)
),
'div' => array(
'class' => 'container',
'div' => array(
'class' => 'arrow-container prev',
'img' => array(
'class' => 'arrow',
'src' => 'assets/images/freccia-sx_1.png'
)
),
'div_1' => array(
'class' => 'arrow-container next',
'img' => array(
'class' => 'arrow',
'src' => 'assets/images/freccia-dx_1.png'
)
),
'div_2' => array(
'class' => 'gallery-holder',
'div' => array(
'class' => 'internal single',
'div' => array(
'class' => 'gallery-item video',
'div' => array(
'class' => 'wrapper video-wrapper',
'img' => array(
'class' => 'play-vid pointer thumb',
'src' => 'assets/images/img-spot-tv.png'
),
'img_1' => array(
'class' => 'play-icon hover',
'src' => 'assets/images/play.png'
)
)
)
)
)
)
)
),
'section_3' => array(
'class' => 'gallery',
'id' => 'image',
'contents' => array(
'p' => array(
'class' => 'title image-title',
'span' => array(
'strong' => array(
'strong' => 'text'
)
)
),
'div' => array(
'class' => 'container',
'div' => array(
'class' => 'arrow-container prev',
'img' => array(
'class' => 'arrow',
'src' => 'assets/images/freccia-sx_1.png'
)
),
'div_1' => array(
'class' => 'arrow-container next',
'img' => array(
'class' => 'arrow',
'src' => 'assets/images/freccia-dx_1.png'
)
),
'div_2' => array(
'class' => 'gallery-holder',
'div' => array(
'class' => 'internal single',
'div' => array(
'class' => 'gallery-item',
'div' => array(
'class' => 'wrapper image-wrapper',
'img' => array(
'class' => 'thumb',
'src' => 'assets/images/img-1.png'
),
'p' => array(
'class' => 'caption image-caption',
'span' => 'text'
)
)
)
),
'div_1' => array(
'class' => 'internal single',
'div' => array(
'class' => 'gallery-item',
'div' => array(
'class' => 'wrapper image-wrapper',
'img' => array(
'class' => 'thumb',
'src' => 'assets/images/img-2.png'
),
'p' => array(
'class' => 'caption image-caption',
'span' => 'text'
)
)
)
),
'div_2' => array(
'class' => 'internal single',
'div' => array(
'class' => 'gallery-item',
'div' => array(
'class' => 'wrapper image-wrapper',
'img' => array(
'class' => 'thumb',
'src' => 'assets/images/img-3.png'
),
'p' => array(
'class' => 'caption image-caption',
'span' => 'text'
)
)
)
),
'div_i' => array(
'class' => 'internal single',
'div' => array(
'class' => 'gallery-item',
'div' => array(
'class' => 'wrapper image-wrapper',
'img' => array(
'class' => 'thumb',
'src' => 'assets/images/img-i.png'
),
'p' => array(
'class' => 'caption image-caption',
'span' => 'text'
)
)
)
),
)
),
'div_1' => array(
'class' => 'counter'
)
)
),
'section_4' => array(
'class' => 'main',
'id' => 'info',
'contents' => array(
'div' => array(
'class' => 'cover sfondo',
'img' => array(
'class' => 'cover-image',
'src' => 'assets/images/collection-img.jpg'
)
),
'div' => array(
'class' => 'cover-mob sfondo-mob',
'img' => array(
'class' => 'cover-image-mob',
'src' => 'assets/images/collection-img-mobile.jpg'
)
),
'a' => array(
'class' => 'button order light',
'div' => array(
'class' => 'data-min',
'div' => array(
'class' => 'label-holder',
'img' => array(
'src' => 'assets/images/sfondo-cta.jpg'
),
'p' => array(
'class' => 'label',
'strong' => 'text'
)
),
'div_1' => array(
'class' => 'price-holder',
)
)
),
'p' => array(
'class' => 'text-numero-1',
'span' => array(
'strong' => '',
'strong_1' => 'text',
'strong_2' => 'text',
'strong_3' => array(
'class' => 'text-anziche',
'strike' => 'text'
)
)
)
)
),
'section_5' => array(
'class' => 'banner resize',
'id' => 'num1',
'contents' => array(
'div' => array(
'class' => 'cover'
),
'div_1' => array(
'class' => 'container',
'img' => array(
'class' => 'banner-image',
'src' => 'assets/images/number-1.png'
),
'p' => array(
'class' => 'cta num1-cta',
'span' => array(
'a' => 'text'
)
)
)
)
),
'section_6' => array(
'class' => 'gallery',
'id' => 'gifts',
'contents' => array(
'p' => array(
'class' => 'title gifts-title',
'span' => array(
'strong' => array(
'strong' => 'text'
)
)
),
'div' => array(
'class' => 'container',
'div' => array(
'class' => 'arrow-container prev',
'img' => array(
'class' => 'arrow',
'src' => 'assets/images/freccia-sx_1.png'
)
),
'div_1' => array(
'class' => 'arrow-container next',
'img' => array(
'class' => 'arrow',
'src' => 'assets/images/freccia-dx_1.png'
)
),
'div_2' => array(
'class' => 'gallery-holder',
'div' => array(
'class' => 'internal double',
'div' => array(
'class' => 'gallery-item',
'div' => array(
'class' => 'wrapper gifts-wrapper',
'img' => array(
'class' => 'thumb',
'src' => 'assets/images/gift-1.jpg'
),
'p' => array(
'class' => 'caption gifts-caption',
'span' => 'text'
)
)
),
'div_1' => array(
'class' => 'gallery-item',
'div' => array(
'class' => 'wrapper gifts-wrapper',
'img' => array(
'class' => 'thumb',
'src' => 'assets/images/gift-2.jpg'
),
'p' => array(
'class' => 'caption gifts-caption',
'span' => 'text'
)
)
)
)
)
),
'div_1' => array(
'class' => 'counter'
),
'p' => array(
'class' => 'disclaimer gifts-disclaimer',
'span' => array(
'span' => 'text'
)
)
)
),
'section_7' => array(
'class' => 'footer',
'contents' => array(
'div' => array(
'class' => 'container',
'div' => array(
'class' => 'box',
'div' => array(
'class' => 'wrapper',
'p' => array(
'class' => 'icon pointer',
'img' => array(
'src' => 'assets/images/icn-piano-opera.png'
)
),
'a' => array(
'class' => 'link',
'p' => array(
'class' => 'title',
'span' => 'text'
)
)
)
),
'div_1' => array(
'class' => 'box',
'div' => array(
'class' => 'wrapper',
'p' => array(
'class' => 'icon pointer',
'img' => array(
'src' => 'assets/images/icn-piano-opera.png'
)
),
'a' => array(
'class' => 'link gtm-externallinks',
'p' => array(
'class' => 'title',
'span' => 'text'
)
)
)
)
)
)
),
'section_8' => array(
'class' => 'partners resize',
'contents' => array(
'div' => array(
'class' => 'container',
'img' => array(
'class' => 'partner',
'src' => 'assets/images/logo-dinsey-lucasfilm_2_1.png'
),
'img_1' => array(
'class' => 'partner',
'src' => 'assets/images/logo-mondadori_1_1.png'
)
)
)
),
'section9' => array(
'class' => 'partners-light',
'contents' => array(
'div' => array(
'class' => 'container',
'img' => array(
'class' => 'partner',
'src' => 'assets/images/copyrightLucasLight.png'
)
)
)
));
foreach ($MiniSiteStructureArray as $section => $sectionStructure) {
foreach ($sectionStructure['contents'] as $tag => $contents) {
$tags[] = $tag;
}
$a = formatTag($tags);
$sections[] = $section;
}
$b = formatTag($sections);
as you can see html tags aren't well formed (es. div and div_1), so I have created this function
function formatTag($tags) {
$correctTags = array();
foreach ($tags as $tag) {
switch ($tag) {
case strpos($tag, "img"):
$tag = "img";
break;
case strpos($tag, "div"):
$tag = "div";
break;
case strpos($tag, "a"):
$tag = "a";
break;
case strpos($tag, "p"):
$tag = "p";
break;
case strpos($tag, "section"):
$tag = "section";
break;
}
array_push($correctTags, $tag);
}
return $correctTags;
}
So my idea is to recreate the array with new keys (well formed tag).
But now i'm stuck.
Supposing that the newKeysArray is done and supposing to create section_1.
How can I do?
Thanks
Edit : New array
$structureArray = array(
'tag' => 'section_8',
'class' => 'partners resize',
'contents' => array(
'tag' => 'div',
'class' => 'container',
'contents' => array(
'tag' => 'img',
'class' => 'partner',
'src' => 'assets/images/logo-dinsey-lucasfilm_2_1.png'
)
)
);
Better?
Edit_2 : NewNewArray
$structureArray = array(
'tag' => array(
'tagName' => 'section_1',
'class' => 'main full',
'contents' => array(
'tag' => array(
'tagName' => 'img',
'class' => 'logo',
'src' => 'assets/images/logo-480x176.png'
),
),
),
'tag_1' => array(
'tagName' => 'div',
'class' => 'cover sfondo',
'contents' => array(
'tag' => array(
'tagName' => 'img',
'class' => 'cover-image',
'src' => 'assets/images/cover-img-header.png'
)
),
),
);
This should be better, don't you think?
In this case I manually incremented key tag because in html page it not appears
Edit_3_I_hope: NewNewNewArray
$structureArray = array(
'tag' => array(
'tagName' => 'section_1',
'tagAttributes' => array(
'class' => 'main full',
),
'contents' => array(
'tag' => array(
'tagName' => 'img',
'tagAttributes' => array(
'class' => 'logo',
'src' => 'assets/images/logo-480x176.png'
)
),
),
),
'tag_1' => array(
'tagName' => 'div',
'tagAttributes' => array(
'class' => 'cover sfondo',
),
'contents' => array(
'tag' => array(
'tagName' => 'img',
'tagAttributes' => array(
'class' => 'cover-image',
'src' => 'assets/images/cover-img-header.png'
)
)
),
),
);
Now, it seems very good
My proposal for the array structure:
$htmlArray = ['tag' => ['name' => 'ul'],
'attrs' => [['name' => 'class','value' => 'beautiful_list'],
['name' => 'id', 'value' => 'unique_list']],
'text' => ['tag' => ['name' => 'li'
'text' => 'item 1'],
'tag' => ['name' => 'li'
'text' => 'item 2']]];
I hope this is somewhat clear?
These two is equivalent:
array()
[]
I am using wordpress for a News site.
There is place called Headlines with following ACF code. Which adds posts to headline of the website.
array (
'key' => 'field_53e3e2fc67dc4',
'label' => 'Headlines',
'name' => 'hp_headlines',
'prefix' => '',
'type' => 'repeater',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '',
'class' => '',
'id' => '',
),
'min' => '',
'max' => '',
'layout' => 'row',
'button_label' => 'Add Headline',
'sub_fields' => array (
array (
'key' => 'field_54621f720bfdc',
'label' => 'Headline Type',
'name' => 'hp_headline_type',
'prefix' => '',
'type' => 'radio',
'instructions' => '',
'required' => 1,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '',
'class' => '',
'id' => '',
),
'choices' => array (
'url' => 'URL',
'article' => 'Article',
),
'other_choice' => 0,
'save_other_choice' => 0,
'default_value' => 'url',
'layout' => 'horizontal',
),
array (
'key' => 'field_54621fa20bfdd',
'label' => 'URL',
'name' => 'hp_headline_url',
'prefix' => '',
'type' => 'url',
'instructions' => '',
'required' => 1,
'conditional_logic' => array (
array (
array (
'field' => 'field_54621f720bfdc',
'operator' => '==',
'value' => 'url',
),
),
),
'wrapper' => array (
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => 'http://',
),
array (
'key' => 'field_53e3e34067dc5',
'label' => 'Article',
'name' => 'hp_headline_article',
'prefix' => '',
'type' => 'post_object',
'instructions' => '',
'required' => 1,
'conditional_logic' => array (
array (
array (
'field' => 'field_54621f720bfdc',
'operator' => '==',
'value' => 'article',
),
),
),
'wrapper' => array (
'width' => '',
'class' => '',
'id' => '',
),
'post_type' => array (
0 => 'post',
),
'taxonomy' => '',
'allow_null' => 0,
'multiple' => 0,
'return_format' => 'id',
'ui' => 1,
),
),
Which creates a field to add already added posts to a list of headlines.
Now I want these fields to be added to category "xyz" automatically as I press the update button. And I have no Idea which file to edit.
You need use save_post action, add this code in your functions.php change cat ID wit your cat id's
function set_my_categories($post_ID){
if(wp_is_post_autosave($post_ID) || wp_is_post_revision($post_ID)) {
return $post_ID;
}
wp_set_post_categories( $post_ID, array(49,13) );
}
add_action('save_post', 'set_my_categories');
I am using the following code to add custom meta boxes to the admin of my custom post types.
<?php
$prefix = '_myType_';
global $meta_boxes;
$meta_boxes = array();
$meta_boxes[] = array(
'id' => 'myType',
'title' => 'myType Data',
'pages' => array( 'myType' ),
'context' => 'normal',
'priority' => 'high',
'fields' => array(
array(
'name' => 'Starts',
'id' => "{$prefix}starts",
'type' => 'date',
'js_options' => array(
'appendText' => '(yyyy-mm-dd)',
'dateFormat' => 'yy-mm-dd',
'changeMonth' => true,
'changeYear' => true,
'showButtonPanel' => true,
),
),
array(
'name' => 'Ends',
'id' => "{$prefix}ends",
'type' => 'date',
'js_options' => array(
'appendText' => '(yyyy-mm-dd)',
'dateFormat' => 'yy-mm-dd',
'changeMonth' => true,
'changeYear' => true,
'showButtonPanel' => true,
),
),
)
);
function YOUR_PREFIX_register_meta_boxes()
{
if ( !class_exists( 'RW_Meta_Box' ) )
return;
global $meta_boxes;
foreach ( $meta_boxes as $meta_box )
{
new RW_Meta_Box( $meta_box );
}
}
add_action( 'admin_init', 'YOUR_PREFIX_register_meta_boxes' );
I have quite a few fields and I need a way to group the items together with something like a hr tag.
And for some reason i thought this would work
array(
'id' => 'box_1_hr',
'name' => 'box_1_hr',
'type' => 'hr',
'options' => array(
'width' => '100%',
'color' => '#DFDFDF'
)
),
But it didnt!
Doesnt anyone have any ideas if this can be done?
Thanks