I think that your proposed solution, or plan of attack, is far more complicated than it needs to be. You can use a static variable to manage this. Proof of concept:
function shortcode_with_static_data($atts,$content) {
static $ids;
$ids[] = time();
var_dump($ids); // you should return a string not dump data in a real shortcode
}
add_shortcode('scwsc','shortcode_with_static_data');
You would need to create your own shortcode, similar to the above, and use it as a wrapper around the add data shortcode or related functions. Without seeing the plugin code I can’t really say exactly what that would look like.
Related Posts:
- Shortcode from a widget is wrapped in unwanted element
- How can I whitelist only specific shortcodes for processing in text widgets?
- When to use which plugin output method?
- Custom shortcode in widget forced to top of widget
- Shortcode in Text Widget not working
- Inserting shortcode [stream /] into a Text widget
- check for shortcode in post/pages AND widgets AND template files
- the_widget() and widget’s ID
- How the widget can be run by shortcode
- How do i display the built-in gallery inside a widget?
- Shortcode displays always first. Once again
- Create a widget to use shortcode?
- Check if the current shortcode is being used in a widget
- Display custom widget, added as a shortcode in the correct place
- Allow shortcode for custom widget
- Shortcode not working in widget
- call widget from within shortcode
- Problem with WP_Query loop and search term
- Transform php shortcode into a widget [duplicate]
- page url in shortcode
- How do I get shortcode, widget and template tag CSS to load in the head only as required? [duplicate]
- How can I use the built in WordPress “browse link” functionality?
- Code for Recent Posts Widget
- Modifying the default search widget
- Prevent widgets removal
- Is there a way to add more tags to the tag cloud?
- How to build widget with arrays inside arrays?
- How do I save data from submitted form from widget
- Why Can’t wp_editor Be Used in a Custom Widget?
- How to use control_callback when creating a widget via functions.php or plugin?
- Disable default WordPress widgets in sidebar
- Updating to Version 4.5 bumped my “main sidebar” widget out of place
- How can I delete all inactive widgets?
- Call sidebar from a template
- Adding classes to dynamic sidebar
- Need help adding additional controls to a custom widget
- Why do none of my widgets have a title?
- Where are widget configurations stored?
- Adding a widget to a string of HTML
- How to add a class to a link in text editor
- WordPress widget new instance creates content duplicates
- Remove/Unregister or hide a widget added by a plugin
- Check if widget is active
- Radio buttons in widget not saving
- How to check if a widget has no title
- AJAX Contact Form Issue
- Including PHP files doesn’t work outside of Localhost
- Display sidebar only if it has content
- Excluding specific widgets from default sidebar class
- How to truncate titles in Recent Posts widget?
- Can WordPress Read Its Own RSS Feed?
- Custom shortcode is not working in text widget
- Debug errors on sidebar
- Dynamic sidebar based on category
- Widget textarea input gets formatted
- Show widget differently depending on if it’s in the sidebar or footer
- Get posts after today (upcoming events)
- How to pass data from page to widget functions?
- Adding a rich text editor to a widget – specifically CKEditor
- Is it possible to display tag cloud widget by category?
- Widget page is missing from menu and default widgets are not showing
- wp_editor in widget breaks after save (no buttons and visual tab broken)
- How to use a dropdown to populate a list of post from CPT
- Registering a stylesheet inside my WordPress widget
- is_tax() not working in Widget Logic [closed]
- How to position custom dashboard widgets on side column
- How do I remove/reset all current widgets from the database?
- what is the difference between these two types of widget form method
- Change Woocommerce Product Categories Widget ‘Title’ based on Product Category
- Why isn’t my custom widget outputting any content?
- Make single widget area top level in 4.0 Customize Panel
- Sidebar widgets – dynamic CSS : problem with widget-title
- widget not displayed
- Dynamically creating multiple widgets from Mustache templates
- changing the style of sidebar
- Vimeo Feed gived dead link with RSS widget?
- Preset Widgets ONLY after site is initially created
- Is it possible to add a preview to custom developed Widget?
- How to enable [archives] short code
- How to change widget title in wordpress version 5.8.1?
- why the code html apear in this widget in footer
- A checkbox Option for description in Widget
- My widgets do not save
- How to move widget area to another section in WordPress Customizer
- Handling dozens of sidebars
- I cannot customize custom widgets anymore after moving WordPress website
- How can I only show a widget prior to a specific date?
- Add sidebar in inner pages
- Widget Areas Still Appearing in WP ADMIN When They Shouldn’t
- Dynamic Width of Widgets
- Inkness theme sidebar
- My Email Newsletter plugin will not configure when I try to import the widget
- How to show widget in frontend?
- How do I stop out of stock items from appearing on my WooCommerce site when using the Layered Nav widget [closed]
- Single Widget Multi Sidebar
- An issue with register_sidebar and the admin interface
- iframe/embed vid in text widget loads outside container and moves around when scrolling the page?
- Widget on home page displays wrong time compared to same widget on inside pages
- Widget logic not working
- Add widget/shortcode to sidebar OUTSIDE of the theme