'Display Flickr Album Gallery', 'text_domain' ) // Args ); } /* * Front-end display of widget. * * @see WP_Widget::widget() * * @param array $args Widget arguments. @param array $instance Saved values from database. */ public function widget( $args, $instance ) { $Title = apply_filters( 'flickr_widget_title', $instance['Title'] ); echo $args['before_widget']; $FID = apply_filters( 'flickr_widget_shortcode', $instance['Shortcode'] ); if(is_numeric($FID)) { if ( ! empty( $instance['Title'] ) ) { echo $args['before_title'] . apply_filters( 'widget_title', $instance['Title'] ). $args['after_title']; } echo do_shortcode( '[FAG id='.$FID.']' ); } else { echo "
Sorry! No Flickr Album Gallery Shortcode Found.
"; } echo $args['after_widget']; wp_reset_query(); } /** * Back-end widget form. * * @see WP_Widget::form() * * @param array $instance Previously saved values from database. */ public function form( $instance ) { if ( isset( $instance[ 'Title' ] ) ) { $Title = $instance[ 'Title' ]; } else { $Title = "Flickr Album Gallery"; } if ( isset( $instance[ 'Shortcode' ] ) ) { $Shortcode = $instance[ 'Shortcode' ]; } else { $Shortcode = "Select Any Flickr Album Gallery"; } ?>
publish; global $All_Flickr; $All_Flickr = array('post_type' => $FLICKR_CPT_Name, 'orderby' => 'ASC', 'posts_per_page' => $FLICKR_All_Posts); $All_Flickr = new WP_Query( $All_Flickr ); ?>