redux-framework icon indicating copy to clipboard operation
redux-framework copied to clipboard

Can't Remove Admin Notice

Open mstoic opened this issue 10 years ago • 12 comments

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.

mstoic avatar May 28 '16 19:05 mstoic

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.

kprovance avatar May 28 '16 20:05 kprovance

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.

mstoic avatar May 28 '16 20:05 mstoic

Did you read what I asked you to read? Support URL? Please?

kprovance avatar May 28 '16 20:05 kprovance

Not able to generate the support URL:

https://dl.dropboxusercontent.com/u/37248667/Redux-support-url-error.png

mstoic avatar May 28 '16 20:05 mstoic

Please update to version 3.6.0.5 from this git repo and try again.

kprovance avatar May 28 '16 23:05 kprovance

The support URL:

http://support.redux.io/?id=tnNrJZZhDka3m2%2BvIrsCO9CC5nPT3PZ6bl5gQN6RGJ6czVM9UrExvub%2B4pyarrCe8f3gXPd%2FWC2o13%2FqSR39zg%3D%3D

mstoic avatar May 29 '16 07:05 mstoic

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.

kprovance avatar May 30 '16 03:05 kprovance

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.

mstoic avatar May 30 '16 06:05 mstoic

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.

kprovance avatar May 30 '16 06:05 kprovance

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?

dovy avatar May 31 '16 20:05 dovy

Is anything coming of this? If not, we need to close this. Thanks!

kprovance avatar Jun 11 '16 20:06 kprovance

Closing. No activity.

kprovance avatar Jun 19 '16 05:06 kprovance