__( "Display Pricing Table", 'ARPricelite') ); parent::__construct('arp_widget', __('ARPrice Lite', 'ARPricelite'), $widget_ops); } function form( $instance ) { global $arpricelite_class; $instance = wp_parse_args( (array) $instance, array('title' => false, 'table' => false) ); $table_drop_down = $arpricelite_class->table_dropdown_widget( $this->get_field_name('table'), $this->get_field_id('table'), $instance['table']); ?>

get_row( $wpdb->prepare("SELECT * FROM ".$wpdb->prefix."arplite_arprice WHERE ID = %d", $instance['table']) ); if( ! $table_data ) return; $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title']); echo $before_widget; echo '
'; if ( $title ) echo $before_title . stripslashes($title) . $after_title; $newvalues_enqueue = $arpricelite_form->get_table_enqueue_data( array($instance['table']) ); $formids = array(); $formids[] = $instance['table']; $newvalarr = array(); if(isset($formids) and is_array($formids) && count($formids) > 0) { foreach($formids as $newkey => $newval) { if(stripos($newval, ' ') !== false) { $partsnew = explode(" ",$newval); $newvalarr[] = $partsnew[0]; } else $newvalarr[] = $newval; } } if(is_array($newvalues_enqueue) && count($newvalues_enqueue) > 0) { $to_google_map = 0; $templates = array(); $is_template = 0; foreach($newvalues_enqueue as $newqnqueue) { if($newqnqueue['template_name'] != 0){ $templates[] = $newqnqueue['template_name']; }else{ $templates[] = $newvalarr[0]; } if(!empty($newqnqueue['is_template'])){ $is_template = $newqnqueue['is_template']; } } $templates = array_unique( $templates ); if( $templates ) { wp_enqueue_script( 'arplite_front_js'); wp_enqueue_style( 'arplite_front_css' ); wp_enqueue_style( 'arp_fontawesome_css' ); foreach($templates as $template) { if ($is_template) { wp_register_style('arplitetemplate_' . $template . '_css', ARPLITE_PRICINGTABLE_URL . '/css/templates/arplitetemplate_' . $template . '_v' . $arpricelite_img_css_version . '.css', array(), null); wp_enqueue_style('arplitetemplate_' . $template . '_css'); } else { wp_register_style('arplitetemplate_' . $template . '_css', ARPLITE_PRICINGTABLE_UPLOAD_URL . '/css/arplitetemplate_' . $template . '.css', array(), null); wp_enqueue_style('arplitetemplate_' . $template . '_css'); } } } } echo $arpricelite_analytics->arplite_Shortcode( array('id' => $instance['table'] ) ); echo '
'; echo $after_widget; } } ?>