Title: [Plugin: shortcodes] &#039;data&#039; attribute to the table shortcode stopped working
Last modified: August 20, 2016

---

# [Plugin: shortcodes] 'data' attribute to the table shortcode stopped working

 *  [sai.susarla](https://wordpress.org/support/users/saisusarla/)
 * (@saisusarla)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-shortcodes-data-attribute-to-the-table-shortcode-stopped-working/)
 * Hi,
    I use wp-table-reloaded plugin and I love it.
 * I use the “data” parameter to the ‘table’ shortcode to populate auto-generated
   tables like thus:
    global $activity_table; do_shortcode(“[table id=2 data=’activity_table’/]”);
   Recently I upgraded to wordpress 3.2.1 and to your version 1.9.2. All my tables
   are shown empty! Is the support for the ‘data’ field discontinued? I don’t see
   it described in your documentation anymore.
 * What is the alternative?
    Thanks, – Sai.
 * [http://wordpress.org/extend/plugins/shortcodes/](http://wordpress.org/extend/plugins/shortcodes/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [sai.susarla](https://wordpress.org/support/users/saisusarla/)
 * (@saisusarla)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-shortcodes-data-attribute-to-the-table-shortcode-stopped-working/#post-2329357)
 * Oops! I just realized that I had added that ‘data’ label support myself to the
   vanilla wp-table-reloaded plugin.
 * So my request is, could you please add the following support to wp-table-reloaded(
   modifying it as appropriate to suit your style)?
 * I wanted to add the ability to set the table data to the contents of an array
   supplied at runtime. To do so, I did the following:
 * Created a custom directory called wp-table-reloaded-custom under plugins.
 * Created a file called my-functions.php with the following content:
 * _[Code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome#Posting_Code).
   Please use the [pastebin](http://wordpress.pastebin.com/)]_
 * Made the following three modifications to controllers/controller-frontend.php:
 * Around line 15 (after “require_once(… base controller class …):
 *     ```
       $custom_functions = WP_TABLE_RELOADED_ABSPATH .
           '../wp-table-reloaded-custom/my-functions.php';
       if (file_exists($custom_functions)) {
           include_once($custom_functions);
       }
       ```
   
 * Around line 209, after
 *     ```
       $table = $this->load_table( $table_id );
       Added the following line:
               $table['data'] = apply_filters( 'wp_table_reloaded_fetch_data', $table['data'], $atts );
       ```
   
 * That’s it.
    It really helps if we generate table content dynamically but still
   want to use the power of wp-table-reloaded with all its beautiful way of rendering
   tables.
 * I’d really appreciate it if this type of functionality is added to a future version
   of this awesome plugin.
    – Sai.
 * _[Please post code snippets between backticks or use the code button.]_

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: shortcodes] 'data' attribute to the table shortcode stopped 
working’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/shortcodes.svg)
 * [shortcodes](https://wordpress.org/plugins/shortcodes/)
 * [Support Threads](https://wordpress.org/support/plugin/shortcodes/)
 * [Active Topics](https://wordpress.org/support/plugin/shortcodes/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shortcodes/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shortcodes/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [sai.susarla](https://wordpress.org/support/users/saisusarla/)
 * Last activity: [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-shortcodes-data-attribute-to-the-table-shortcode-stopped-working/#post-2329357)
 * Status: not resolved