function supernova_page_list($supernova_page_type, $supernova_pagelist_settings, $selected_option) { global $wpdb; $page_results = $wpdb->get_results("SELECT * FROM {$wpdb->posts} WHERE post_type='{$supernova_page_type}' AND post_status='publish' ORDER BY menu_order", 'OBJECT'); $html = ''; $html .= '<select name="' . $supernova_pagelist_settings . '" class="supernova_admin_select" data-placeholder="------select ' . $supernova_page_type . '------">'; $html .= '<option value=""></option>'; if ($page_results) { foreach ($page_results as $pages) { $selected = $pages->ID == $selected_option ? 'selected' : ''; $html .= '<option ' . $selected . ' value="' . $pages->ID . '">'; $html .= supernova_chopper($pages->post_title, 40); $html .= '</option>'; } } $html .= '</select>'; return $html; }
} } if (!$post_id && !$slider_image) { break; } ?> <li> <?php if ($post_id) { ?> <div class="featured_content"> <?php echo '<a href="' . get_permalink($post_id) . '">'; echo "<h3>" . supernova_chopper(get_the_title($post_id), $heading_length) . "</h3>"; if ($option != '3') { if ($option == '1') { echo "<p>" . get_the_time('F jS, Y', $post_id) . "</p>"; } elseif ($option == '2') { echo supernova_get_excerpt_by_id($post_id, $length); } } echo '</a>'; ?> </div><!--featured content --> <?php } if ($slider_image) { echo '<img src="' . $slider_image . '" alt="' . get_the_title($post_id) . '" />';