Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #328885

    Hi Kriesi & Co,

    With Enfold 3.0, there’s a new Demo Import button that imports various pre-designed templated.

    Personally I think this is awesome, but I also foresee my clients clicking on this button and messing stuff up. Is there anyway to hide this in the backend (E.g. through the functions file? For everyone except super admins?)

    #328898

    Hi TinyGiantStudios!

    Go to line 19 in ~\wp-content\themes\enfold\includes\admin\register-admin-options.php

    Replace the following:

    if(!current_theme_supports('avia_disable_import_export')){
    	$avia_pages[] = array( 'slug' => 'demo', 		'parent'=>'avia', 'icon'=>"doc_text_image.png", 'title' => __('Demo Import', 'avia_framework'));
    	$avia_pages[] = array( 'slug' => 'upload', 		'parent'=>'avia', 'icon'=>"import_export.png", 'title' => __('Import/Export', 'avia_framework'));
    }

    With this:

    if ( is_super_admin() ) {
    	if(!current_theme_supports('avia_disable_import_export')){
    	$avia_pages[] = array( 'slug' => 'demo', 		'parent'=>'avia', 'icon'=>"doc_text_image.png", 'title' => __('Demo Import', 'avia_framework'));
    	$avia_pages[] = array( 'slug' => 'upload', 		'parent'=>'avia', 'icon'=>"import_export.png", 'title' => __('Import/Export', 'avia_framework'));
    }
    }
    

    Cheers!
    Arvish

    #328974

    Thanks for the quick reply Arvish…

    Any ideas on when it’s a standalone WP install?

    #329009

    Hi!

    Try the function here: http://kriesi.at/documentation/enfold/remove-the-import-dummy-data-button/

    If you are using a child theme you can keep it in the child theme functions file and remove when needed manually.

    Cheers!
    Devin

    #435556
    This reply has been marked as private.
    #436823

    Hey!

    It’s working fine on my XAMPP setup. Your sure you added it to the child theme functions.php file? Also make sure your using the latest version of Enfold (3.1.3) and that all plugins are deactivated while testing.

    Regards,
    Elliott

    • This reply was modified 9 years, 8 months ago by Elliott.
    #436956

    Hi Elliott,
    Both of my sites are using 3.1.3. And I’ve turned off plugins to test. Still, the code

    add_theme_support(‘avia_disable_dummy_import’);

    placed within my enfold-child functions.php file isn’t removing the Demo Import button. In fact, I’ve created a clean install on a 3rd site using Enfold, and the above code isn’t changing anything.

    #437633

    Hey!

    Are you expecting it to remove the whole tab inside the Enfold options? It’s not going to do that. It will remove all of the demo import images inside that tab so you cannot click on them but the tab will stay in place.

    Cheers!
    Elliott

    #438240

    Awe, yes. Thanks for that clarification. It’s working. Sorry to bug you.

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Remove Demo Import Button’ is closed to new replies.