Site logo

Archived topic

Disable GP Site Library

5 replies · Started by konceptuel on March 29, 2018

Viewing posts 1–6 of 6

Hey there,

how can I disable GP Site Library on live website?
I appreciate the feature very much, but I just want to prevent anyone from accidentally importing a new demo site once we're live.

I just updated and saw the new Sites. I tried following your instructions to disable it and nothing has changed. I'm using Code Snippets. Here's the code I built from your example.

add_filter( 'generate_disable_site_library', 'johlor_no_sites' );
function johlor_no_sites()
{ 
    return 'true';
}

What did I miss?

You might have to do this:

add_filter( 'generate_disable_site_library', '__return_true', 20 );

Let me know :)

Still there.

Alright, that means your Code Snippets plugin is firing before GP Premium.

So, let's do this:

add_action( 'after_setup_theme', 'tu_disable_site_library' );
function tu_disable_site_library() {
    add_filter( 'generate_disable_site_library', '__return_true' );
}
This archived topic is closed to new replies.