[Plugin: WP-Table Reloaded] Feature Request: Filter for table caption?
-
First of all, thanks for this awesome plugin. It makes it so much easier to let my clients manage data tables on their websites.
However, I have one minor request. I’ve been looking through the source for the plugin, and see that you’ve implemented a lot of great filters; but there seems to be one filter still missing: the “caption” filter. I’d like to see the following change made, if possible (I can submit a patch if you want). Thanks.
Change:
$caption = ''; if ( !empty( $this->output_options['edit_table_url'] ) ) { $edit_table_link = "<a href=\"{$this->output_options['edit_table_url']}\" title=\"" . __( 'Edit', 'default' ) . "\">" . __( 'Edit', 'default' ) . "</a>"; $caption = "<caption style=\"caption-side: bottom; text-align: left; border:none; background: none;\">{$edit_table_link}</caption>\n"; }to:
$caption = ''; $caption_text = apply_filters( 'wp_table_reloaded_table_caption_arg', '', $table['id'], $table ); if ( !empty( $this->output_options['edit_table_url'] ) ) { $edit_table_link = "<a href=\"{$this->output_options['edit_table_url']}\" title=\"" . __( 'Edit', 'default' ) . "\">" . __( 'Edit', 'default' ) . "</a>"; $caption_text .= $edit_table_link; } if ( ! empty( $caption_text ) ) { $caption = "<caption style=\"caption-side: bottom; text-align: left; border:none; background: none;\">{$caption_text}</caption>\n"; }That way, as users, we’d be able to add our own captions to the tables. Do you think this would be possible? Thanks.
The topic ‘[Plugin: WP-Table Reloaded] Feature Request: Filter for table caption?’ is closed to new replies.