0, 'label' => esc_html__('Select Categories','buzzstore') ); $buzzstore_posts = get_categories(); foreach ($buzzstore_posts as $buzzstore_post) : $buzzstore_category_list[$buzzstore_post->term_id] = array( 'value' => $buzzstore_post->term_id, 'label' => $buzzstore_post->name ); endforeach; extract($widget_field); switch ($buzzstore_widgets_field_type) { // Standard text field case 'text' : ?>




/>

'; foreach ($buzzstore_widgets_field_options as $buzzstore_option_name => $buzzstore_option_title) { ?> />





'; foreach ( $buzzstore_widgets_field_options as $buzzstore_option_name => $buzzstore_option_title) { if( isset( $buzzstore_field_value[$buzzstore_option_name] ) ) { $buzzstore_field_value[$buzzstore_option_name] = 1; }else{ $buzzstore_field_value[$buzzstore_option_name] = 0; } ?>

/>

'; if (isset($buzzstore_widgets_description)) { ?> get_field_id($buzzstore_widgets_name); $class = ''; $int = ''; $value = $buzzstore_field_value; $name = $instance->get_field_name($buzzstore_widgets_name); if ($value) { $class = ' has-file'; } $output .= '
'; $output .= '
'; $output .= '' . "\n"; if ( function_exists('wp_enqueue_media') ) { if (( $value == '')) { $output .= '' . "\n"; } else { $output .= '' . "\n"; } } else { $output .= '

' . esc_html__('Upgrade your version of WordPress for full media support.', 'buzzstore') . '

'; } $output .= '
' . "\n"; if ($value != '') { $remove = ''.esc_html__('Remove','buzzstore').''; $image = preg_match('/(^.*\.jpg|jpeg|png|gif|ico*)/i', $value); if ($image) { $output .= '' . $remove; } else { $parts = explode("/", $value); for ($i = 0; $i < sizeof($parts); ++$i) { $title = $parts[$i]; } $output .= ''; $title = esc_html__('View File', 'buzzstore'); $output .= ''; } } $output .= '
' . "\n"; echo $output; break; } } function buzzstore_widgets_updated_field_value($widget_field, $new_field_value) { extract($widget_field); if ($buzzstore_widgets_field_type == 'number') { return absint($new_field_value); } elseif ($buzzstore_widgets_field_type == 'textarea') { if (!isset($buzzstore_widgets_allowed_tags)) { $buzzstore_widgets_allowed_tags = '

'; } return wp_kses_data($new_field_value, $buzzstore_widgets_allowed_tags); } elseif ($buzzstore_widgets_field_type == 'url') { return esc_url_raw($new_field_value); } elseif ($buzzstore_widgets_field_type == 'title') { return wp_kses_post($new_field_value); } elseif ($buzzstore_widgets_field_type == 'multicheckboxes') { return wp_kses_post($new_field_value); } else { return wp_kses_data($new_field_value); } } /** * Load widget fields file. */ require buzzstore_file_directory('sparklethemes/buzzwidgets/buzzstore-widget.php'); /** * Load Blogs Posts widget area file. */ require buzzstore_file_directory('sparklethemes/buzzwidgets/buzzstore-blogs.php'); /** * Load About widget area file. */ require buzzstore_file_directory('sparklethemes/buzzwidgets/buzzstore-aboutus.php'); /** * Load Contact Info widget area file. */ require buzzstore_file_directory('sparklethemes/buzzwidgets/buzzstore-contactinfo.php'); /** * Load testimonial widget area file. */ require buzzstore_file_directory('sparklethemes/buzzwidgets/buzzstore-testimonial.php'); /** * Load Full promo widget area file. */ require buzzstore_file_directory('sparklethemes/buzzwidgets/buzzstore-fullpromo.php');