How to check whether Gutenberg editor is installed or not

Posted by Prem Tiwari | Updated on

One possible way to do this is to check whether a specific class or function that is included in the plugin is defined, with class_exists() or function_exists(), respectively.

For Gutenberg, you could check for register_block_type():

I would however side with Mark Kaplun to say this is not a good idea in most cases, and it is not even necessary if you follow best practices.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers