Hi Per,
1. No, this is not possible. TablePress does not keep records about the modifications, so that it can not present them here ??
2. Using Shortcodes in the mail text should be possible, but you might have to add a wrapping do_shortcode()
function call around the email text. This will however not work for the [table]
Shortcode as it’s not registered in this context. To do that, you could modify the code to
add_action( 'tablepress_event_saved_table', 'pabrady_tablepress_save_notification', 10, 1 );
function pabrady_tablepress_save_notification( $table_id ) {
$frontend_controller = $TablePress::load_controller( 'frontend' );
$frontend_controller->init_shortcodes();
$table_html = do_shortcode( "[table id={$table_id} /]" );
$mail_text = "The table with the ID {$table_id} was saved: {$table_html}.";
wp_mail(
'[email protected]',
'TablePress table was saved',
$mail_text
);
}
Regards,
Tobias