Hi,
I was using this in the template:
{% set buttonLink = function('get_page_url_for_custom_post_type', 'recette') %}
But I get this warning:
Deprecated: La fonction get_custom_post_type_for_page est obsolète depuis la version 1.0.0 ! Utilisez \n5s\PageForCustomPostType\get_custom_post_type_for_page() à la place.
I wasn't sure how to use namespace directly inside Twig because when I tried it didn't work.
Then I asked Claude and it gave me this. Apparently I needed to escape the backslash by using double backslash.
The chance of collision are pretty small.
{% set buttonLink = function('n5s\\PageForCustomPostType\\get_page_url_for_custom_post_type', 'recette') %}
Is there a reason why we absolutely NEED to include the namespace when inside template ?
Hi,
I was using this in the template:
But I get this warning:
I wasn't sure how to use namespace directly inside Twig because when I tried it didn't work.
Then I asked Claude and it gave me this. Apparently I needed to escape the backslash by using double backslash.
The chance of collision are pretty small.
Is there a reason why we absolutely NEED to include the namespace when inside template ?