This is a great library.
I'm using your library on my project WordPress and a have a issue:
Do you have a solution for me? Thank you so much!
Hi @Huynhhuynh ,
Can you provide more information about your use case or a sample code, please?
Hi, @deqngeorgiev
I'm created a widget (please see image) with class 'Flintotheme_Widget_Branding' and 4 settings:
And now i want to use like it or something like that:
the_widget('Flintotheme_Widget_Branding', array(
'title' => '...',
'branding_gallery_data' => array(...),
'branding_gallery_column' => '...',
'open_on_new_window' => '...'
))
I hope it clean for you. Thanks!
You should add a _ at the beginning of the array keys (see the example below). Also, each of the values for the complex should be passed as a separate key => value pair to the array.
the_widget( 'Flintotheme_Widget_Branding', array(
'_title' => '...',
'_branding_gallery_data|image|0|0|value' => '', // First item image id
'_branding_gallery_data|name|0|0|value' => '', // First item name
'_branding_gallery_data|url|0|0|value' => '', // First item url
'_branding_gallery_data|image|1|0|value' => '', // Second item image id
'_branding_gallery_data|name|1|0|value' => '', // Second item name
'_branding_gallery_data|url|1|0|value' => '', // Second item url
'_branding_gallery_data|image|2|0|value' => '', // Third item image id
'_branding_gallery_data|name|2|0|value' => '', // Third item name
'_branding_gallery_data|url|2|0|value' => '', // Third item url
'_branding_gallery_column' => '...',
'_open_on_new_window' => '...'
) );
Thank you so much!, and more.
This library has support a function convert array to like this?
'_branding_gallery_data|image|0|0|value' => '', // First item image id
'_branding_gallery_data|name|0|0|value' => '', // First item name
'_branding_gallery_data|url|0|0|value' => '', // First item url
I believe it would be easier for you to create a custom function which will convert your array to array with these keys.
Okay, thank for your help! 馃殌