When Titan Framework is activated in a WordPress site, we can readily use the framework functions in our code. If however, Titan Framework hasn’t been installed yet, your options won’t show up in the admin and errors might occur in the front end.
We can display an administration notice in the backend regarding the need to activate Titan Framework along with a link to install the framework from the WordPress plugin repository.
- Copy the script named
titan-framework-checker.phpfrom the Titan Framework codebase https://github.com/gambitph/Titan-Framework/blob/master/titan-framework-checker.php into your project.
- Afterwards, insert this code in your
functions.phpor your main plugin script:
require_once( 'titan-framework-checker.php' );
- Then proceed normally with creating your options.