/** * Display the post ID */ function the_intelliwidget_ID() { echo get_the_intelliwidget_ID(); }
* @copyright 2014-2015 Lilaea Media LLC * @access public */ global $post; $iw_current_post_id = is_object($post) ? $post->ID : NULL; //have_posts() ? get_the_ID() : NULL; $iw_current_ancestors = isset($iw_current_post_id) ? get_post_ancestors($iw_current_post_id) : array(); $iw_current_parent = current($iw_current_ancestors); ?> <ul class="intelliwidget-menu"> <?php if ($selected->have_posts()) { while ($selected->have_posts()) { $selected->the_post(); $intelliwidget_post_id = get_the_intelliwidget_ID(); ?> <li id="intelliwidget_post_<?php echo $intelliwidget_post_id; ?> " class="intelliwidget-menu-item<?php echo ($iw_current_post_id == $intelliwidget_post_id ? ' intelliwidget-current-menu-item' : '') . (in_array($intelliwidget_post_id, $iw_current_ancestors) ? ' intelliwidget-current-menu-ancestor' : '') . ($intelliwidget_post_id == $iw_current_parent ? ' intelliwidget-current-menu-parent' : ''); ?> "> <?php if (has_intelliwidget_image() && 'none' != $instance['image_size']) { ?> <div class="intelliwidget-image-container intelliwidget-image-container-<?php echo $instance['image_size']; ?> intelliwidget-align-<?php
<?php } ?> <h3 id="intelliwidget_title_<?php the_intelliwidget_ID(); ?> " class="intelliwidget-title"> <?php the_intelliwidget_link(); ?> </h3> <div id="intelliwidget_excerpt_<?php the_intelliwidget_ID(); ?> " class="intelliwidget-excerpt"> <?php the_intelliwidget_excerpt(); ?> <span id="intelliwidget_more_link_<?php the_intelliwidget_ID(); ?> " class="intelliwidget-more-link"> <?php the_intelliwidget_link(get_the_intelliwidget_ID(), $instance['link_text']); ?> </span> </div> <div style="clear:both"></div> </div> <?php } }