Can't Remove Admin Notice
I am using TGMPA to require redux. Once installed it displays this notice
Redux Framework has an embedded demo. Click here to activate the sample config file.
The solution at https://docs.reduxframework.com/core/the-basics/removing-demo-mode-and-notices/ is also not working.
Please review: https://github.com/reduxframework/redux-framework/blob/master/CONTRIBUTING.md
You also probably show us what exactly you tried, since I have no way of knowing this.
First using TGMPA to require Redux Framework.
Then using the below code to include my Redux config file and extensions
// If Redux is available, include Redux config files and extensions
if ( class_exists( 'Redux' ) ) {
// Include Redux Configuration File
if ( ! isset( $mstoic_options ) && file_exists(trailingslashit( get_template_directory() ) . 'redux/mstoic-options/mstoic-config.php') ) {
require_once( trailingslashit( get_template_directory() ) . 'redux/mstoic-options/mstoic-config.php' );
}
// Include Redux Extensions
require_once( trailingslashit( get_template_directory() ) . 'redux/redux-extensions/extensions-init.php' );
}
My config file: http://paste.ofcode.org/nEhetjYDAhwF9bkaTY4NnR
Also using the below code to remove admin notices
function mstoic_remove_redux_demo_links() {
if ( class_exists('ReduxFrameworkPlugin') ) {
remove_filter( 'plugin_row_meta', array( ReduxFrameworkPlugin::instance(), 'plugin_metalinks'), null, 2 );
remove_action('admin_notices', array( ReduxFrameworkPlugin::instance(), 'admin_notices' ) );
}
}
add_action('init', 'mstoic_remove_redux_demo_links');
But after the Redux Framework is activated, this notice is shown to the user: https://dl.dropboxusercontent.com/u/37248667/Redux-Notice.png
Also, the redux option values are not available until the user loads any admin page.
I want that my Redux configuration file should come in effect once the user installs the plugin, and they must not see this notice.
Did you read what I asked you to read? Support URL? Please?
Not able to generate the support URL:
https://dl.dropboxusercontent.com/u/37248667/Redux-support-url-error.png
Please update to version 3.6.0.5 from this git repo and try again.
The support URL:
http://support.redux.io/?id=tnNrJZZhDka3m2%2BvIrsCO9CC5nPT3PZ6bl5gQN6RGJ6czVM9UrExvub%2B4pyarrCe8f3gXPd%2FWC2o13%2FqSR39zg%3D%3D
I can't replicate this so far. That message come sup when Redux is first installed, but disappears afterward. I can;t get it to show everytime.
Yes. It comes only when the plugin is installed. But I have the Redux config files in my theme, so, I don't want people to see that message.
As far as I am aware, there is no way to deactivate the initial message. It happens once at the activation of the plugin. That's by design. The filter to deactivate the demo mode from appearing in the plugin listing is completely separate. Unless @Dovy known of something I don't, that's the way it was setup to be.
Actually the issue here is you're running your code AFTER tgm and they might have recently updated their hooks. You may need to find what hook they're using and run the config to remove the alert.
Indeed our hook is meant to remove that message. If it doesn't have a chance to fire, I'd like to fix that. :)
Care to do some ground work for us and see if you can find a solution?
Is anything coming of this? If not, we need to close this. Thanks!
Closing. No activity.