/**
 * Add a specific header and footer parts to single idea.
 *
 * @package WP Idea Stream
 * @subpackage core/template-loader
 *
 * @since 2.0.0
 * @since 2.3.0 buffer feedback message to eventually display them on the single idea
 *
 * @param  string $content the content of the idea
 * @uses   wp_idea_stream_buffer_template_part() to direclty buffer template parts in single idea
 * @return string $new_content the content of the idea
 */
function wp_idea_stream_buffer_single_idea($content = '')
{
    $new_content = '<div id="wp-idea-stream">';
    // Eventually include some feedback messages
    ob_start();
    wp_idea_stream_user_feedback();
    $new_content .= ob_get_clean();
    // add a header
    $new_content .= wp_idea_stream_buffer_template_part('idea', 'header', false);
    // keep the content unchanged
    $new_content .= $content;
    // add a footer
    $new_content .= wp_idea_stream_buffer_template_part('idea', 'footer', false);
    $new_content .= '</div>';
    return $new_content;
}
Ejemplo n.º 2
0
<?php

/**
 * IdeaStream's Idea plugin template
 *
 * @package WP Idea Stream
 * @subpackage templates
 *
 * @since 2.0.0
 */
?>
<div id="wp-idea-stream">

	<?php 
do_action('wp_idea_stream_ideas_before_plugin_content');
?>

	<?php 
wp_idea_stream_user_feedback();
?>

	<?php 
do_action('wp_idea_stream_ideas_plugin_content');
?>

</div>