__( 'Shows a product or a list.', ATKP_PLUGIN_PREFIX), )
);
add_action('admin_footer', array($this, 'add_script_footer'));
}
function add_script_footer(){
?>
ID;
$product = ATKPTools::get_post_setting( $post_id, ATKP_PLUGIN_PREFIX.'_product');
}
}
}
if($product != '' && $product != 0) {
echo $args['before_widget'];
if ( ! empty( $title ) )
echo $args['before_title'] . $title . $args['after_title'];
try {
echo $output->get_product_output($product, $template, $content, 'notset', '', false, $elementcssclass, $containercssclass, false);
} catch(Exception $e) {
echo 'Exception: '. $e->getMessage();
}
echo $args['after_widget'];
} else if($list != '' && $list != 0) {
echo $args['before_widget'];
if ( ! empty( $title ) )
echo $args['before_title'] . $title . $args['after_title'];
//create list and output
try {
echo $output->get_list_output($list, $template, $content, 'notset', $elementcssclass, $containercssclass, $limit, $randomsort, false);
} catch(Exception $e) {
echo 'Exception: '. $e->getMessage();
}
echo $args['after_widget'];
}
}
// Widget Backend
public function form( $instance ) {
// Widget admin form
?>
:
>
id="get_field_id( ATKP_WIDGET.'_content' ); ?>" name="get_field_name( ATKP_WIDGET.'_content' ); ?>" type="text" value="" />
>