How to set add question capability for author role in wp pro quiz plugin

A much more efficient way that doesn’t require editing the source code: install and activate wpfront User role editor, go to all roles, edit the author role, scroll down to the ‘other capabilities’ section, check the following capabilities: wpProQuiz_show, wpProQuiz_add_quiz, wpProQuiz_edit_quiz Save. The authors on your site should now be able to add and edit … Read more

How to retain table data in wordpress phpunit tests

Usually, you don’t want to do this, as it might inadvertently affect tests that run after the test that creates the data. If there is some data that you need to be available to several of your tests in a single testcase, you can create it with wpSetUpBeforeClass(), and then remove it again in wpTearDownAfterClass(). … Read more

Using plugin functions/methods within templates

Premature optimization is the root of all evil (ok, waste of programing time). Why would you care how many times a function is called? it is not like the memory or CPU is getting “weaker” by overusing it. It is more important that the code you produce will be self documenting as much as possible … Read more