Chunks are irrelevant. Just use output buffering to capture the entire output and then return the result at the end:
function buffered_source_to_table( $attrs )
{
ob_start();
for($row_values as $r) {
echo $r.'<br>';
}
return ob_get_clean();
}
After ob_start();
any output (from echo
, for example) is captured by the output buffer. You then just need to return the contents of the buffer for your shortcode.
Related Posts:
- How to add a shortcode button to the TinyMCE editor?
- How to include code only on specific pages?
- how to include other plugins css files in a shortcode?
- What characters are allowed as a shortcode tag and how should they be sanitized?
- PHP Deprecated: Non-static method should not be called statically
- Loading shortcode with ajax
- Cannot strip JW Player shortcode?
- How to pass multiple values in shortcode?
- append stylesheet via shortcode
- Calling function from within functions.php returns unwanted value
- plugin shortcodes not working on custom theme- unsure how to fix
- How to list all active and specific shortcodes in wordpress
- Nested shortcodes
- do_shortcode() doesn’t work if shortcode contained in variable, works if shortcode passed as string
- wp_specialchars and wp_specialchars_decode in a shortcode plugin
- Plugin shortcode won’t work on a custom template file [closed]
- shortcodes displaying outside of content area with echo statement, not what I wanted [duplicate]
- Trying to count the total number of paragraphs inside a blog article
- How Can I Pass the Shortcode’s $atts Variable to the Plugin’s Javascript Function
- Adding json as params to shortcode
- Shortcode is not working in homepage page template (custom front page)
- May i Use ShortCode in Template?
- Confused about shortcode and settings values
- Running jquery script after shortcode [closed]
- How can I create a custom shortcode that will return a custom post type by ID?
- Adding Shortcode to Text Widget
- AddToAny shortcode in the loop
- How to add an automatic refresh in WordPress for a Page/Post or an embedded OneDrive/Excel HTML Code?
- Making a Template for a CPT created by a plugin
- Nested shortcode functions accessing variable
- Calling an attribute from a plugin shortcode
- accessing wp.media api from a tinymce plugin
- Creating shortcodes in plugin
- Visual Composer shortcode for child theme dir
- get_post_title is not working on homepage
- How to create a custom shortcode based on the layout?
- Create shortcode to echo javascript
- Redirect to another page using contact form 7? [closed]
- Custom Shortcode Broken in WordPress 3.1
- Namespaced shortcode?
- Why shortcode always displayed after footer not in body
- Why am I unable to load scripts in head in plugin?
- Displayed content disappears when adding attributes to shortcode
- Where to find the code used to render a page that has a shortcode and a template defined?
- convert more tag to shortcode
- Shortcode does not expand in Facebook like
- Override/ignore CSS from active theme as not to interfere with my custom CSS
- How to use template inside plugin shortcode with variables for big HTML code
- strange shortcode error: does shortcodes requires any dependency?
- wp_localize_script not passing the data
- Get post content from outside the loop with plugin shortcode usability
- How to rewrite URL and get the values?
- Is there a good way to load tiny_mce_popup.js through editor.windowManager.open?
- How to prevent tabs from opening all at once
- Executing Javascript in Plugin
- Shortcode and variable
- How can I achieve this, using shortcodes
- Create Short code dynamically
- Get variable value based on string constant
- Creating New Dynamic Fields for a Certificate (Number Generation, Code Referencing, and more)
- How To Use do_shortcode with WooCommerce One Page Checkout
- WordPress load same script two times
- How to get current cart values using WC_Shortcodes?
- Can I add Short Code Of A Plugin In The Code Editor of WordPress?
- insert og image link in wordpress post
- How to check if short code is present in template?
- How to call function in WordPress on button click?
- Hide content for specific users with id
- Why is my shortcode not working?
- using WPPB shortcodes without the plugin
- save short-code in my custom plugin settings problem missed something
- WordPress show descriptions under images in gallery
- Modify Plugin PHP Class in Child Theme – Correct Method
- How to add HTML to a template only when user is logged out/ not registered
- How to pass value to a plugins shortcode?
- Meta box or shortcode help
- function of parent not working in childtheme
- Is it possible to get a shortcode generated by a plugin, then, using a function, create a new post using that shortcode?
- Hide some shortcodes on posts from back-end
- Trouble implementing python on WordPress
- Call/Run a Mathematica (.m) Shell Script from WordPress Page/Blog
- How to display single arbitrary facebook post with a shortcode?
- Custom shortcode with dynamic rewrite
- Posting code inside the post instead of in the template file using shortcode
- How to use shortcode of any plugin to show it visually where i want?
- apply_filters to content but ignore shortcodes
- Why function hooked using object are executing at all time?
- Need to change contact email depending where user is from
- Pulling RSS from site and display it in posts
- Trying to Understand Shortcodes.
- Shortcode return is printing a 1 afterward
- Any way to hook into WP after a page displays?
- Integrate Razorpay quick payments plugin with contact form7 plugin
- Display HTML5 jQuery Audio Player On Front Page
- Invalid argument supplied for foreach()
- cURL External API request displays content above other content on page
- Beginner question: Accessing js script in plugin
- Subtract Using GravityWP Count Plugin
- qTranslate‑X is not translating all shortcodes
- Display file contents within Plugin