function woo_display_feedback_entries($args = '') { $defaults = array('limit' => 5, 'orderby' => 'rand', 'order' => 'DESC', 'id' => 0, 'display_author' => true, 'display_url' => true, 'effect' => 'fade', 'pagination' => false, 'echo' => true); $args = wp_parse_args($args, $defaults); // Allow child themes/plugins to filter here. $args = apply_filters('woo_display_feedback_args', $args); $html = ''; woo_do_atomic('woo_feedback_before', $args); // The Query. $query = woo_get_feedback_entries($args); // The Display. if (!is_wp_error($query) && is_array($query) && count($query) > 0) { if ($args['effect'] != 'none') { $effect = ' ' . $args['effect']; } $html .= '<div class="feedback ' . $effect . '">' . "\n"; $html .= '<div class="feedback-list">' . "\n"; foreach ($query as $post) { setup_postdata($post); $author = ''; $author_text = ''; // If we need to display either the author, URL or both, get the data. if ($args['display_author'] == true || $args['display_url'] == true) { $meta = get_post_custom($post->ID); if (isset($meta['feedback_author']) && $meta['feedback_author'][0] != '' && $args['display_author'] == true) { $author .= '<cite class="feedback-author">' . $meta['feedback_author'][0] . '</cite><!--/.feedback-author-->' . "\n"; } if (isset($meta['feedback_url']) && $meta['feedback_url'][0] != '' && $args['display_url'] == true) { $author .= '<a href="' . esc_url($meta['feedback_url'][0]) . '" title="' . esc_attr($author_text) . '" class="feedback-url">' . esc_url($meta['feedback_url'][0]) . '</a>'; } } $html .= '<div id="quote-' . $post->ID . '" class="quote">' . "\n"; $html .= '<blockquote class="feedback-text">' . get_the_content() . '</blockquote>' . "\n"; $html .= $author; $html .= '</div>' . "\n"; } $html .= '</div><!--/.feedback-list-->' . "\n"; $html .= '<div class="fix"></div>' . "\n"; $html .= '</div><!--/.feedback-->' . "\n"; } // Allow child themes/plugins to filter here. $html = apply_filters('woo_feedback_html', $html, $query); if ($args['echo'] != true) { return $html; } // Should only run is "echo" is set to true. echo $html; woo_do_atomic('woo_feedback_after', $args); // Only if "echo" is set to true. wp_reset_query(); }
function woo_foot() { woo_do_atomic('woo_foot'); }
function bobellis_before_quick_nav() { woo_do_atomic('bobellis_before_quick_nav'); }
function woo_footer_right() { $settings = woo_get_dynamic_values(array('footer_right' => 'true', 'footer_right_text' => '[site_credit]')); woo_do_atomic('woo_footer_right_before'); $html = ''; if ('true' == $settings['footer_right']) { $html .= '<p>' . stripslashes($settings['footer_right_text']) . '</p>'; } else { $html .= '[site_credit]'; } $html = apply_filters('woo_footer_right', $html); echo $html; woo_do_atomic('woo_footer_right_after'); }
function woo_footer_right() { global $woo_options; woo_do_atomic('woo_footer_right_before'); $html = ''; if (isset($woo_options['woo_footer_right']) && $woo_options['woo_footer_right'] == 'true') { $html .= '<p>' . stripslashes($woo_options['woo_footer_right_text']) . '</p>'; } else { $html .= '[site_credit]'; } $html = apply_filters('woo_footer_right', $html); echo $html; woo_do_atomic('woo_footer_right_after'); }