The MainWP Custom Dashboard Extension is designed to contain your custom snippets for your MainWP Dashboard. By adding custom snippets to this plugin, you can easily extend your MainWP Dashboard functionality or change the way it looks.
This extension will help you to keep all your changes in one location and independent of the other components. This enables you to safely update your MainWP Dashboard plugin on your MainWP Dashboard site without worry of losing your modifications as well as deactivating your custom code if needed for troubleshooting.
The built-in code editor allows you to add y our code directly through the extension interface. No FTP access required.
Check out our Github repository where we keep example snippets that will help you get started:
How It Works
MainWP Custom Dashboard Extension saves your custom code to your MainWP Dashboard database instead containing code in PHP/CSS/JS file. For CSS and JS snippets, the extension will print saved code in the <head> element on your MainWP Dashboard site. Saved PHP Code Snippets will be executed by using the PHP function eval(). In case the eval() function is disabled on your host, please contact your host support and have them enable it for you.
In case you try to save PHP code with syntax error and cause PHP Fatal Error, the extension uses the wp_php_error_message filter provided by WordPress to prevent your MainWP Dashboard site from crashing. After saving bad code, you will see the error message and link to go back to fix the code:
MainWP Custom Dashboard Extension is used to apply custom code snippets to the MainWP Dashboard site ONLY! It doesn’t apply code to child sites. To apply custom code snippets to child sites, please see the MainWP Code Snippets Extension.