Transposh WordPress Translation
Transposh Pugin Callbacks (5 posts)

  1. andruhapx
    Posted 3 years ago #

    Can you please add do_action into Parser->fix_html() at function start and end
    do_action('transposh_fix_html_start') and do_action('transposh_fix_html_end')

    and add do_action into transposh_plugin->process_page:

    $buffer = $parse->fix_html($buffer);


  2. Ofer Wald
    Plugin Author

    Posted 3 years ago #


    Would appreciate the reasoning for this.

    And in the parser, probably not, because this is designed to be "wordpress free" but the process changes are fine, but do explain.


  3. andruhapx
    Posted 3 years ago #

    Its ok to leave only 'process_page' callback
    I just need to change error reporting level for parse->fix_html, because our server has old Centos version, admin cant update php here. And in old php version there is bug with warning suppressing using @

    Actually you can use apply_filter here and pass parser instance here, so it will be possible to change its parameters. And then use apply_filter to modify $buffer.

    $parse = apply_filter('transposh_process_page_start',..., $parse)
    $buffer = $parse->fix_html($buffer);
    $buffer = apply_filter('transposh_process_page_end',..., $buffer)
  4. Ofer Wald
    Plugin Author

    Posted 3 years ago #


    I will think about it, I am not sure this will prove really useful in most cases, and regarding those warnings, I'm adding those suppressions.

    Also, please make the case for the filter, why would one want to change the parameters? and what would she do with the results?

  5. andruhapx
    Posted 3 years ago #

    Hi, thanks for response

    First filter may be needed to use different parsing settings for some post types or even different pages.
    Second filter can be used to fix some translation errors etc.
    Plugin is very popupal and it will be very useful for developers to have some way to modify plugin input/output

    There are all required suppressions in plugin, but we just have old centos 5 server with old php version with warning suppression bug https://bugs.php.net/bug.php?id=39018,
    but hope we will update our server soon

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Transposh WordPress Translation
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic