alpinebot = new PhotoTileForGooglePlusPrimary();
$bot = $this->alpinebot;
$widget_ops = array('classname' => $bot->get_private('id'), 'description' => __($bot->get_private('wdesc')));
$control_ops = array('width' => 550, 'height' => 350);
$this->__construct($bot->get_private('domain'), __($bot->get_private('name')), $widget_ops, $control_ops);
}
/**
* Widget
*
* @ Updated 1.2.5
*/
function widget( $args, $options ) {
$bot = new PhotoTileForGooglePlusBot();
extract($args);
// Set Important Widget Options
$bot->set_private('wid',$args['widget_id']);
$bot->set_private('options',$options);
$bot->do_alpine_method( 'update_global_options' );
$bot->do_alpine_method( 'enqueue_style_and_script' );
// Do the photo search
$bot->do_alpine_method( 'photo_retrieval' );
echo $before_widget . $before_title . $options['widget_title'] . $after_title;
echo $bot->get_active_result('hidden');
if( $bot->check_active_result('success') ){
if( isset($options['style_option']) && 'vertical' == $options['style_option'] ){
$bot->do_alpine_method( 'display_vertical' );
}elseif( isset($options['style_option']) && 'cascade' == $options['style_option'] ){
$bot->do_alpine_method( 'display_cascade' );
}else{
$bot->do_alpine_method( 'display_hidden' );
}
echo $bot->get_private('output');
}
// If user does not have necessary extensions
// or error occured before content complete, report such...
elseif( $bot->check_active_option('general_hide_message') ){
echo '';
}else{
echo 'Sorry:
'.$bot->get_active_result('message');
}
echo $after_widget;
}
/**
* Update
*
* @ Updated 1.2.5
*/
function update( $newoptions, $oldoptions ) {
$bot = new PhotoTileForGooglePlusAdmin();
$optiondetails = $bot->option_defaults();
foreach( $newoptions as $id=>$input ){
$options[$id] = $bot->MenuOptionsValidate( $input,$oldoptions[$id],$optiondetails[$id] );
}
return $options;
}
/**
* Form
*
* @ Updated 1.2.5
*/
function form( $options ) {
$bot = new PhotoTileForGooglePlusAdmin();
$widget_container = $this->get_field_id( 'AlpinePhotoTiles-container' ); ?>
| >MenuDisplayCallback($options,$option,$fieldname,$fieldid); ?> |