Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Here's it:
- in your theme (functions.php) / plugin (plugin-name.php) file drop this
- //wp error messages system function
- function PLUGIN_NAME_requirement_admin_notice() {
- ?>
- <div class="error">
- <p><?php _e( 'PLUGIN_NAME requires <a href="'.get_admin_url().'/plugin-install.php?tab=plugin-information&plugin=PLUGIN_ID&TB_iframe=true" class="thickbox" aria-label="More information about Unyson" data-title="Unyson">Unyson Framework</a>', 'YOUR_TEXT_DOMAIN' ); ?></p>
- </div>
- <?php
- }
- //check framework and show message
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
- if ( is_plugin_inactive('unyson/unyson.php') ) {
- add_action( 'admin_notices', 'PLUGIN_NAME_requirement_admin_notice' );
- }
- replace all PLUGIN_NAME with what it says
- replace all PLUGIN_ID with the exact plugin name, like unyson
- replace YOUR_TEXT_DOMAIN with your own
- Disable / enable the UNYSON plugin to check if this code works (it's perfect for me).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement