'Amazon Master', 'description' => __('Amazon Master let\'s you can automatically display the hottest deals from Amazon making your wordpress a money making machine. ', 'amazon_master') );
$control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'amazon_master_widget' );
$this->WP_Widget( 'amazon_master_widget', __('Amazon Master', 'amazon_master'), $widget_ops, $control_ops );
}
function widget( $args, $instance ) {
extract( $args );
//Our variables from the widget settings.
$name = "Amazon Master";
$title = isset( $instance['title'] ) ? $instance['title'] :false;
$amazonspacer ="'";
$show_amazondeals = isset( $instance['show_amazondeals'] ) ? $instance['show_amazondeals'] :false;
$amazondeals_code = $instance['amazondeals_code'];
echo $before_widget;
// Display the widget title
if ( $title )
echo $before_title . $name . $after_title;
//Display Amazon Deals
if ( $show_amazondeals )
echo $amazondeals_code;
echo $after_widget;
}
//Update the widget
function update( $new_instance, $old_instance ) {
$instance = $old_instance;
//Strip tags from title and name to remove HTML
$instance['down_link_amazon'] = $new_instance['down_link_amazon'];
update_option('down_link_amazon', $new_instance['down_link_amazon']);
$instance['name'] = strip_tags( $new_instance['name'] );
$instance['title'] = strip_tags( $new_instance['title'] );
$instance['show_amazondeals'] = $new_instance['show_amazondeals'];
$instance['amazondeals_code'] = $new_instance['amazondeals_code'];
return $instance;
}
function form( $instance ) {
//Set up some default widget settings.
$defaults = array( 'name' => __('Amazon Master', 'amazon_master'), 'title' => true, 'show_amazondeals' => false, 'amazondeals_code' => false );
$instance = wp_parse_args( (array) $instance, $defaults );
?>
Check the buttons to be displayed:
id="get_field_id( 'title' ); ?>" name="get_field_name( 'title' ); ?>" />
id="get_field_id( 'show_amazondeals' ); ?>" name="get_field_name( 'show_amazondeals' ); ?>" />
Shortcode Framework
Amazon Master Website
Info Page Documentation RATE US *****
Advanced Version Updater