- This topic has 1 reply, 2 voices, and was last updated 5 years, 11 months ago by
Steve.
Viewing 1 reply thread
-
AuthorPosts
-
-
February 16, 2016 at 6:47 pm #5938
wandevMemberHi all!
I am looking to re-develop a couple of my plugins on a new framework so all future plugins are on the same framework.
One of my plugins uses a repeatable color picker.
I wanted to know if it is possible to echo out each of the color values within the WordPress admin area.
This is a sample of what I currently do.
foreach($my_options['repeatable_tabbed_section']['my_color'] as $idx => $color){ echo " <div class='swatch' data-hex='". $color . "' data-toggle='tooltip' data-placement='left' data-original-title='".$color." copied to clipboard!'> <div class='swatchIcon' style='background-color:" . $color . "'></div> <div class='swatchHex'>" . $color . "</div> </div>";Is this sort of thing possible, if so do you have any examples of how to get the values from the array?
This framework looks great! Looking forward to using it.
-
February 20, 2016 at 6:57 pm #5969
SteveKeymaster@wandev– Welcome to the Piklist community!
This is absolutely possible.
Here’s the field:
piklist('field', array( 'type' => 'datepicker' ,'field' => 'demo_add_more_date' ,'label' => __('Date Picker', 'piklist-demo') ,'add_more' => true ));Then pull the values using get_post_meta(), and loop through them to display your HTML.
-
-
AuthorPosts
Viewing 1 reply thread
- You must be logged in to reply to this topic.