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 customise the output of the WP image gallery shortcode from a plugin?
- Custom media upload content for inserting custom post shortcode
- Checking if an attribute exists in a shortcode
- All shortcodes not working on custom theme
- enqueue script only if it is not already enqueue
- Shortcode output appears before post body [duplicate]
- PHP Deprecated: Non-static method should not be called statically
- How to parse nested shortcodes?
- How to call shortcode function directly and pass $atts
- How to pass multiple values in shortcode?
- change plugin shortcode function [closed]
- Calling function from within functions.php returns unwanted value
- Dynamic HTML not displaying at respective place
- Plugin form unable to process
- Short code for Venues
- Frontend editing, Frontend user dashboard
- Can’t get custom posts of taxonomy to show
- Shortcode doesn’t work if I directly paste its function in a template file?
- May i Use ShortCode in Template?
- Pass variable to nested shortcode
- Add custom variable in Contact Form 7 mail body
- get shortcode value
- How to generate CSS from a shortcode within a plugin
- Storing Options in a Shortcode
- Prevent shortcode from being wrapped in tags
- How to remove html code in excel downloads using phpspreadsheet with wordpress plugins shortcode
- Plugin Handle URL With Custom Theme
- How to put JQuery/Ajax inside shortcode?
- Snippets: is it better to add them in functions.php or make site-specific plugins?
- Can someone please tell me what is wrong with my plugin?
- Trouble with editing template for “List category posts” plugin
- WordPress function not being called from jQuery method
- How to fix wrong attribute error for Visual Composer Grid Builder?
- Shortcode Plugin to dynamically build a shortcode via `do_shortcode` not working
- Making sure that a plugin’s scripts and stylesheets are included for dynamicaly loaded content
- Creating shortcodes in plugin
- How to Create a shortcode to this php function
- Inject HTML meta tag inside wordpress tag using add_shortcode
- Use $_GET inside a shortcode print empty Array
- Render Modula Plugin Shortcode On Ajax Request
- Shortcode to update user meta
- How to add a dvi tag to a shortcode then change a generated text using jQuery
- plugin shortcode not working on ajax request call
- Shortcode not working after move wordpress website files
- Shortcode not getting replaced
- How to activate a plugin on the activation of a theme?
- Return multiple values in a shortcode attribute
- IF condition based on wp_remote_get output
- shortcode not return any thing in Gutnburg
- Shortcode Attributes to Return different $_POST
- How to change shortcode’s default theme?
- Shortcode not working – quotes seems strange
- Get param from shortcode in plugin function
- Loop returns the current page’s permalink and guid instead of the post in the loop
- Inserting shortcode in href – any ideas or workarounds?
- Get Image Having the ID [closed]
- Add the_post_thumbnail_url to a shortcode in function.php
- Form Plugin for Api Requests which is used via Shortcode
- Echo out element to another page.
- Load CSS files in header of Bones theme?
- Adding a Tag Parameter / Filter to My Shortcode
- Filters on the_content with plugins, pages and shortcode
- Which is a better practice when writing shortcodes: pack lots of configuration parameters or just give an id?
- Help understanding dynamic endpoints based on where a shortcode is used
- How do I use a plugin’s shortcode attribute value in another function?
- Make the product page as homepage WooCommerce
- Shortcode show error while editing post
- Image path in childs theme
- Get Shortcode output to database for static post_content
- Shortcode function not showing up on mobile browser
- Get Current Post ID in WP Loop For GiveWP
- How to use plugin’s shortcode in custom design? [closed]
- Shortcode generated widget to appear on same line as heading text and button
- Page takes on two different formats
- WP Plugin CSS not being applied to page
- Sanitize AROUND shortcode
- Get not the full path
- Multiple calling javascript from shortcode in one page
- Sending post data over REST API, how to parse shortcodes in post_content?
- Query Shortcode from a multisite to appear on a different site?
- Find all strings between an enclosing shortcode
- Is there a function to search for a wildcard value when calling a shortcode?
- shortcode which is introduced into entry the blog, and appears in side bar
- Space in WordPress Attribute Causing Problems
- Shortcode registered from a plugin not recognized
- Strange get_the_* behavior with php 5.4
- How to load a plugin when doing an Ajax call? [duplicate]
- Is it right way to create shortcode?
- Convert usernames listed by the Groups plugin shortcode to displayed names?
- Creating Features List in WordPress Post
- Embedding BitBucket Code in Posting
- Do shortcodes affect page indexing by search engines?
- do_shortcodes() isn’t working
- How to show in front End images using Visual Composer attach_images?
- Seo Problems in My meta Discription [closed]
- I am experiencing difficulty fulfilling client request
- Shortcode to do math with url variables
- How to get URL param for pagination in shortcode?
- How can I add a zip code service availability checker in WordPress without Woocommerce? [closed]
- Shortcode cannot parse attributes within double quotes. ” is becoming ” breaking my shortcode