• Hello!

    I have tried to add a custom magic tag by using the provided filter neve_magic_tags_config. It works on the fly.

    However, there seems no way to add the related method to the do_magic_tag method.
    It refers to its internal method list. There is no filter or action for adding the methods of the additional magic tags.
    Am I missing something?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Mat

    (@mateithemeisle)

    Hello @simongcc ,

    Thanks for checking out our product!

    I really appreciate you taking the time to get under the hood and try to modify it. As of this time, however, helping our users with custom code isn’t a perfect fit for us.

    We do have some exciting products on our plate and should anything about the way a product works goes wrong, we are here to help you. Custom code is not one of them.

    To support these kinds of requests would mean that we can’t deliver updates, new features, and enhanced experience for the users.

    We wanted to make sure the experience is the best it can be for the vast majority of our customers, so supporting custom code would have held us back.

    If you have any other questions, just let me know and I’ll be happy to help.

    Thank you for your understanding and have an awesome day!

    Thread Starter 西門 正 Code Guy

    (@simongcc)

    Hi Mat,

    Thanks for your reply.

    I think instead of supporting my custom code that you might misunderstand, I would like to suggest that the do_magic_tag should also expose in order to work with the action neve_magic_tags_config together because it is designed to be extended but it is not yet completed or with the design incompletion.

    Because your current design means to execute the magic tag with preg_replace_callback and run the magic tag if it is a methods in the instance. But since there is no other way to just put a function into the class Magic_Tag in php. So your design only allow the do the upper half currently.

    For another half, you might consider to adding a filter to the return value of the do_magic_tags which will could work together with your original idea for extension.

    eg.
    $return = apply_filters( 'neve_do_magic_tags_callback_return', preg_replace_callback(
    '/\\{\s?\b(?:' . self::$magic_tag_regex . ')\b\s?\\}/',
    [
    $this,
    'do_magic_tag',
    ],
    $input
    ));`

    I have suggested some other plugins before for improvement and thanks for the author’s appreciation and updates accordingly and generously.
    Hope it also helps to make Neve even greater user experience for all.

    Thanks again for your time and making such an awesome product!

    Hi, @simongcc!

    Thanks for your feedback and for taking the time to leave us your suggestion! We try to constantly improve the experience of our users and feedback is very important in this process. Also, we are glad you enjoy Neve!

    Have a nice day!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘About magic tags config and callback pair’ is closed to new replies.