Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi!

    Thanks for your post and sorry for the trouble!

    TablePress doesn’t do anything special to the content, it just parses a Shrotcode and returns the output.

    My feeling is that WP Offload Media could deal with that (and would by doing so also cover very many other plugins that use Shortcodes) by using a priority in their the_content filter hook handler that runs after Shortcodes are evaluated.

    That said, it should also be possible to make this work with a slightly different approach, by using a filter hook in TablePress. For that, you can try adding this to the theme’s “functions.php” file or a small custom plugin:

    add_filter( 'tablepress_table_output', 'tp_wp_offload_media_filter', 10, 3 );
    function tp_wp_offload_media_filter( $output, $table, $render_options ) {
      return apply_filters( 'as3cf_filter_post_local_to_provider', $output );
    }

    Regards,
    Tobias

    Thread Starter ixpubs

    (@ixpubs)

    Thank you so much for the quick response! This is very helpful.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress in the plugin directory. Thanks!

    Thread Starter ixpubs

    (@ixpubs)

    Hi again,

    So, I tried adding this block to the theme’s “functions.php”, and it didn’t seem to have any effect. Any thoughts on why, or next steps I could try?

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    you might have to clear the table’s cache (simply by clicking “Save changes” on its “Edit” screen) for this to work.

    If it still doesn’t work, we could try a different filter hook, with this code instead:

    add_filter( 'tablepress_cell_content', 'tp_wp_offload_media_filter', 10, 4 );
    function tp_wp_offload_media_filter( $output, $table_id, $row_no, $column_no ) {
      return apply_filters( 'as3cf_filter_post_local_to_provider', $output );
    }

    If that also doesn’t work, I’m not sure what else we could try. In that case, it might make more sense for WP Offload Media to change when they run their filters on the page content (as briefly mentioned above).

    Regards,
    Tobias

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Compatibility with Offload Media Plugin’ is closed to new replies.