/** * 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('widget_title', $instance['title']); echo $args['before_widget']; if (!empty($title)) { echo $args['before_title'] . $title . $args['after_title']; } echo get_pins_feed_list($instance['username'], $instance['photos']); echo $args['after_widget']; }
function widget($args, $instance) { extract($args, EXTR_SKIP); echo $before_widget; $title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']); $user_name = empty($instance['user_name']) ? ' ' : $instance['user_name']; $board_name = empty($instance['board_name']) ? '' : $instance['board_name']; $maxnumber = empty($instance['maxnumber']) ? ' ' : $instance['maxnumber']; $thumb_height = empty($instance['thumb_height']) ? ' ' : $instance['thumb_height']; $thumb_width = empty($instance['thumb_width']) ? ' ' : $instance['thumb_width']; $target = empty($instance['target']) ? ' ' : $instance['target']; $displaytitle = empty($instance['displaytitle']) ? ' ' : $instance['displaytitle']; $useenclosures = empty($instance['useenclosures']) ? ' ' : $instance['useenclosures']; $showfollow = empty($instance['showfollow']) ? ' ' : $instance['showfollow']; if (!empty($title)) { echo $before_title . $title . $after_title; } if (empty($board_name)) { $board_name = ''; } if (empty($target)) { $target = 'samewindow'; } if (empty($displaytitle)) { $displaytitle = 'no'; } if (empty($useenclosures)) { $useenclosures = 'yes'; } if (empty($thumb_width)) { $thumb_width = '150'; } if (empty($thumb_height)) { $thumb_height = '150'; } if (empty($showfollow)) { $showfollow = 'none'; } if (!empty($user_name)) { echo get_pins_feed_list($user_name, $board_name, $maxnumber, 'small', $displaytitle, $target, $useenclosures, $thumb_width, $thumb_height, $showfollow); ?> <div style="clear:both;"></div> <?php } echo $after_widget; }
<div id="pinterest-feed"> <h2><a target="_blank" rel="nofollow" href="https://www.pinterest.com/artk12books/"><i class="fa fa-pinterest"></i></a>Pinterest! <a target="_blank" rel="nofollow" href="https://www.pinterest.com/artk12books/"><span>See More!</span></a></h2> <div id="feed-one"> <?php echo get_pins_feed_list('artk12books', 'artk12-map-books', 6, 'artk12', 1, 'newwindow', 'yes', 207, 207, ''); ?> </div> <div id="feed-three"> <?php echo get_pins_feed_list('artk12books', 'childrens-art-history-books', 6, 'artk12z', 1, 'newwindow', 'yes', 207, 207, ''); ?> </div> <div id="feed-two"> <?php echo get_pins_feed_list('artk12books', 'american-art-history-semester-one', 6, 'artk12zz', 1, 'newwindow', 'yes', 207, 207, 'large'); ?> </div> </div> <h2>American Art History (Semester 2)</h2> <?php echo do_shortcode('[products ids="2673, 2685, 2694, 2696" orderby="id" order="asc"]'); ?>