';
while ( $r->have_posts() ) : $r->the_post();
//title
$page_title = get_the_title();
//image
$img = function_exists('apollo13framework_make_album_image') ? apollo13framework_make_album_image( get_the_ID(), array( 100, 100 ) ) : '';
echo '
';
endwhile;
echo '
';
print $after_widget;
// Reset the global $the_post as this query will have stomped on it
wp_reset_postdata();
endif;
$cache[ $args['widget_id'] ] = ob_get_flush();
wp_cache_set( 'widget_recent_albums', $cache, 'widget' );
}
function update( $new_instance, $old_instance ) {
$instance = $old_instance;
$instance['title'] = strip_tags( $new_instance['title'] );
$instance['number'] = (int) $new_instance['number'];
$this->flush_midget_cache();
$alloptions = wp_cache_get( 'alloptions', 'options' );
if ( isset( $alloptions['widget_recent_albums'] ) ) {
delete_option( 'widget_recent_albums' );
}
return $instance;
}
function flush_midget_cache() {
wp_cache_delete( 'widget_recent_albums', 'widget' );
}
function form( $instance ) {
$title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
$number = isset( $instance['number'] ) ? absint( $instance['number'] ) : 5;
?>
';
while ( $r->have_posts() ) : $r->the_post();
//title
$page_title = get_the_title();
//image
$img = function_exists('apollo13framework_make_work_image') ? apollo13framework_make_work_image( get_the_ID(), array( 100, 100 ) ) : '';
echo '
';
endwhile;
echo '
';
print $after_widget;
// Reset the global $the_post as this query will have stomped on it
wp_reset_postdata();
endif;
$cache[ $args['widget_id'] ] = ob_get_flush();
wp_cache_set( 'widget_recent_works', $cache, 'widget' );
}
function update( $new_instance, $old_instance ) {
$instance = $old_instance;
$instance['title'] = strip_tags( $new_instance['title'] );
$instance['number'] = (int) $new_instance['number'];
$this->flush_midget_cache();
$alloptions = wp_cache_get( 'alloptions', 'options' );
if ( isset( $alloptions['widget_recent_works'] ) ) {
delete_option( 'widget_recent_works' );
}
return $instance;
}
function flush_midget_cache() {
wp_cache_delete( 'widget_recent_works', 'widget' );
}
function form( $instance ) {
$title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
$number = isset( $instance['number'] ) ? absint( $instance['number'] ) : 5;
?>