'An efficient way to display author information on your WordPress blog.', 'text_domain' ) // Args ); } /* * Front-end display of widget. */ public function widget( $args, $instance ) { $Title = apply_filters( 'Abt_widget_title', $instance['Title'] ); echo $args['before_widget']; $ABTId = apply_filters( 'abt_widget_shortcode', $instance['Shortcode'] ); if(is_numeric($ABTId)) { if ( ! empty( $instance['Title'] ) ) { echo $args['before_title'] . apply_filters( 'widget_title', $instance['Title'] ). $args['after_title']; } echo do_shortcode( '[ABTM id='.$ABTId.']' ); } else { echo "

Sorry! No About Author Shortcode Found.

"; } echo $args['after_widget']; wp_reset_query(); } /** * Back-end widget form. */ public function form( $instance ) { if ( isset( $instance[ 'Title' ] ) ) { $Title = $instance[ 'Title' ]; } else { $Title = "About Author"; } if ( isset( $instance[ 'Shortcode' ] ) ) { $Shortcode = $instance[ 'Shortcode' ]; } else { $Shortcode = "Select Any About Author Shortcode"; } ?>

publish; global $All_ABTM; $All_ABTM = array('post_type' => $ABT_CPT_Name, 'orderby' => 'ASC', 'posts_per_page' => $ABT_All_Posts); $All_ABTM = new WP_Query( $All_ABTM ); ?>