0, 'label' => '--choose--' ); $arg = array('posts_per_page' => -1); $accesspress_store_posts = get_posts($arg); foreach ($accesspress_store_posts as $accesspress_store_post) : $accesspress_store_postlist[$accesspress_store_post->ID] = array( 'value' => $accesspress_store_post->ID, 'label' => $accesspress_store_post->post_title ); endforeach; extract($widget_field); switch ($accesspress_store_widgets_field_type) { // Standard text field case 'text' : ?>




/>

'; foreach ($accesspress_store_widgets_field_options as $athm_option_name => $athm_option_title) { ?> />





get_field_id($accesspress_store_widgets_name); $class = ''; $int = ''; $value = $athm_field_value; $name = $instance->get_field_name($accesspress_store_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 .= '

' . __('Upgrade your version of WordPress for full media support.', 'accesspress-store') . '

'; } $output .= '
' . "\n"; if ($value != '') { $remove = 'Remove'; $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]; } // No output preview if it's not an image. $output .= ''; // Standard generic output if it's not an image. $title = __('View File', 'accesspress-store'); $output .= ''; } } $output .= '
' . "\n"; echo $output; break; case 'icon' : add_thickbox(); ?>



'; } return strip_tags($new_field_value, $accesspress_store_widgets_allowed_tags); // No allowed tags for all other fields } elseif ($accesspress_store_widgets_field_type == 'iframe_textarea') { // Check if field array specifed allowed tags if (!isset($accesspress_store_widgets_allowed_tags)) { // If not, fallback to default tags $accesspress_store_widgets_allowed_tags = '