'sydney_latest_news_widget', 'description' => __( 'Show the latest news from your blog.', 'sydney') ); parent::__construct(false, $name = __('Sydney FP: Latest News', 'sydney'), $widget_ops); $this->alt_option_name = 'sydney_latest_news_widget'; } function form($instance) { $title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : ''; $category = isset( $instance['category'] ) ? esc_attr( $instance['category'] ) : ''; $see_all_text = isset( $instance['see_all_text'] ) ? esc_html( $instance['see_all_text'] ) : ''; ?>

id; } extract($args); $title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : ''; $title = apply_filters( 'widget_title', $title, $instance, $this->id_base ); $category = isset( $instance['category'] ) ? esc_attr($instance['category']) : ''; $see_all_text = isset( $instance['see_all_text'] ) ? esc_html($instance['see_all_text']) : __( 'See all our news', 'sydney' ); if ($see_all_text == '') { $see_all_text = __( 'See all our news', 'sydney' ); } $r = new WP_Query( array( 'no_found_rows' => true, 'post_status' => 'publish', 'posts_per_page' => 3, 'category_name' => $category ) ); echo $args['before_widget']; if ($r->have_posts()) : ?> have_posts() ) : $r->the_post(); ?>
', esc_url( get_permalink() ) ), '' ); ?>