Support » Plugin: Gutenberg Template Library & Redux Framework » Remove embedded demo on the first activate

  • Resolved congthien

    (@congthien)


    When I activate the plugin, it shows: Redux Framework has an embedded demo. Click here to activate the sample config file.

    How can I disable this from theme by a hook?

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Dōvy Paukstys

    (@dovyp)

    /** REMOVE REDUX MESSAGES */
    function remove_redux_messages() {
    	if(class_exists('ReduxFramework')){
    		remove_action( 'admin_notices', array( get_redux_instance('YOUR_OPT_NAME'), '_admin_notices' ), 99);
    	}
    }
    
    /** HOOK TO REMOVE REDUX MESSAGES */
    add_action('init', 'remove_redux_messages');

    Replace YOUR_OPT_NAME with your opt-name. 🙂

    Thread Starter congthien

    (@congthien)

    Hi @dovyp

    Thank you, but it does not work. See my screenshot: https://cl.ly/33d97f9fa7f0

    I added your code and replace with my opt-name:

    /** REMOVE REDUX MESSAGES */
    function remove_redux_messages() {
    	if(class_exists('ReduxFramework')){
    			remove_action( 'admin_notices', array( get_redux_instance('wpc_options'), '_admin_notices' ), 99);
    	}
    }
    
    /** HOOK TO REMOVE REDUX MESSAGES */
    add_action('init', 'remove_redux_messages');
    Plugin Author Dōvy Paukstys

    (@dovyp)

    In version 4 this will be fixed. I’d have to dig out the code and find out why it doesn’t work again. Oy. The ad-block extension resolves this I believe.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Remove embedded demo on the first activate’ is closed to new replies.