'widget_recent_work', 'description' => __( 'Show your some pages as recent work. Best for Business Top or Bottom sidebar.', 'accelerate' ), 'customize_selective_refresh' => true, ); $control_ops = array( 'width' => 200, 'height' =>250 ); parent::__construct( false, $name = __( 'TG: Featured Widget', 'accelerate' ), $widget_ops, $control_ops); } function form( $instance ) { $defaults = array(); $defaults[ 'title' ] = ''; $defaults[ 'text' ] = ''; for ( $i=0; $i<4; $i++ ) { $var = 'page_id'.$i; $defaults[$var] = ''; } $instance = wp_parse_args( (array) $instance, $defaults ); $title = esc_attr( $instance['title'] ); $text = esc_textarea($instance['text']); for ( $i=0; $i<4; $i++ ) { $var = 'page_id'.$i; $var = absint( $instance[ $var ] ); } ?>

' ','name' => $this->get_field_name( 'page_id'.$i ), 'selected' => $instance[ 'page_id'.$i ] ) ); ?>

-1, 'post_type' => array( 'page' ), 'post__in' => $page_array, 'orderby' => 'post__in' ) ); echo $before_widget; if ( !empty( $title ) ) { echo $before_title . esc_html( $title ) . $after_title; } if ( !empty( $text ) ) { echo '

'.esc_textarea( $text ).'

'; } $i = 1; while( $get_featured_pages->have_posts() ):$get_featured_pages->the_post(); $page_title = get_the_title(); if ( $i % 4 == 0 ) { $class = 'tg-one-fourth tg-one-fourth-last'.' tg-column-'.$i; } elseif( $i % 3 == 0 ) { $class= 'tg-one-fourth tg-after-two-blocks-clearfix'.' tg-column-'.$i; } else { $class = 'tg-one-fourth'.' tg-column-'.$i; } ?>
ID ); echo'
'.get_the_post_thumbnail( $post->ID, 'featured-recent-work', array( 'title' => esc_attr( $title_attribute ), 'alt' => esc_attr( $title_attribute ) ) ).'
'; } ?>
'.$page_title.''; ?>