/>

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




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

'; } $output .= '
' . "\n"; if ($value != '') { $remove = 'Remove'; $attachment_id = accesspress_get_attachment_id_from_url($value); $image_array = wp_get_attachment_image_src( $attachment_id, 'medium'); $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-mag'); $output .= ''; } } $output .= '
' . "\n"; echo $output; break; case 'icon' : add_thickbox(); ?>



'; // print_r($icon_class_array); // echo ''; ?>
'; } return strip_tags($new_field_value, $accesspress_mag_widgets_allowed_tags); // No allowed tags for all other fields } elseif ($accesspress_mag_widgets_field_type == 'iframe_textarea') { // Check if field array specifed allowed tags if (!isset($accesspress_mag_widgets_allowed_tags)) { // If not, fallback to default tags $accesspress_mag_widgets_allowed_tags = '