New answers tagged

0

I ended up having to switch to arrays instead of objects. Even that hasn't worked out as well as I hoped.


0

444 would not stop a file being deleted. Deletion observes the permissions of the containing directory only. Whether the file is writable is irrelevant, because you're not writing to it. Other people have posted they results using the filter approach. I suggest you have a look through their follow ups. Please note that 1.x version of this plugin is being ...


1

Copying from the answer here regarding variable scope Variables inside a function are only available inside that function. Variables outside of functions are available anywhere outside of functions, but not inside any function. Because of that, you need to add your $translations array within the kvkoolitus_load_comment_validation function, like ...


3

To find the answer to this question, you just need to look at how WordPress retrieves the translations. Ultimately it is the load_textdomain() function that does this. When we take a look at its source we find that it creates a MO object and loads the translations from a .mo file into it. Then it stores that object in a global variable called $l10n, which is ...


0

Your check of the php version is not in a separate function. That's the point that you not have the control about the order of the flow of this functions. The follow example source should get more clarity about the stack. The order is depend on the hooks in the plugintest_init function. You can also use the same hook and a different priority, the third ...


0

Get a WPML plugin - https://wpml.org/ Seriously, get it - it's the most complete solution for multilingual WP site. You can write your own code to translate menu items, but it is not worth it.


0

I had the same problem. Twig files are not automatically recognized when you use Poedit to work on your translations. The section about Generating .po files using Poedit in the Timber Wiki might help you set it up to make it work. The Twig Gettext Extractor that is mentioned there didn’t work well for me. Definitely try the parser for Python, which is also ...



Top 50 recent answers are included