• Resolved Jules Colle

    (@jules-colle)


    Hi, could you guys please fix the action hook in class-pages-weglot.php at line 79?

    add_action( 'admin_bar_menu', array( $this, 'add_admin_bar_menu' ), PHP_INT_MAX );

    By setting the priority to PHP_INT_MAX you are preventing developers to customise the weglot menu in the admin bar.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Edson Galina Fortes

    (@glx77)

    Hi @jules-colle ,
    hope you’re fine?
    Thanks for the feedback,
    I’ll modify the code and add a filter to let you modifiy the PHP_INT_MAX
    It should be deploy on our next release

    Regards

    Thread Starter Jules Colle

    (@jules-colle)

    Glad to hear you are willing to make the change!

    I’m not sure that we understand each other 100%. The only thing I would like is that you change PHP_INT_MAX to an arbitrary large number like 200. It will have the same effect and it will allow plugin/theme developers to see the weglot menu in the admin_bar_menu hook if they set their priority higher than 200.

    Now it’s not possible because a plugin developer can’t set the priority higher than PHP_INT_MAX

    So: no need to add an extra hook, just set the priority on your hook to something lower than infinite ??

    Plugin Contributor Edson Galina Fortes

    (@glx77)

    Hi @jules-colle ,
    yes your right, we pan to push a new release next week and it will contain this fix.

    Thank you so much for your feedbacks it’s appreciate

    Regards

    Plugin Contributor Edson Galina Fortes

    (@glx77)

    Hi @jules-colle ,
    hope you’re fine. We’ve just release a 4.0.2 version of the plugin with the update.
    Once again thank you for your feedback it’s help ??

    Regards

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Fix PHP action hook’ is closed to new replies.