• <Website Content dont want being copied , but when logged as adminstrator, can copy content from website frontend?>

    Is there any plugin that is able to prevent copy and paste content from visitors , but when logged as administrator, then opened the website in frontend interface, can copy and paste content , as this type of configuration?

    Because i want to copy own content for speed up to do other channels development, if activated copy content plugin , will not let me copy and paste stuff, thanks

Viewing 1 replies (of 1 total)
  • Thread Starter Dan Fung

    (@danfung915)

    I tried this code from google search, not work.
    https://wordpress.stackexchange.com/questions/312326/disable-plugin-for-administrator?fbclid=IwAR1wa1e5PZTud7iR5esblXdFQmsZn_N5eoYLwqPLmQrCDiIAXIJ5itz8ch4

    /* copy content plugin – remove author */
    add_filter( ‘option_active_plugins’, ‘disable_logged_in_plugin’ );

    function disable_logged_in_plugin( $plugins ) {

    // The ‘option_active_plugins’ hook occurs before any user information get generated,
    // so we need to require this file early to be able to check for logged in status
    require (ABSPATH . WPINC . ‘/pluggable.php’);

    if ( current_user_can(‘administrator’) ) {

    // Use the plugin folder and main file name here.
    // is used here as an example
    $plugins_not_needed = array ( ‘wp-content-copy-protector/preventer-index.php’ );
    foreach ( $plugins_not_needed as $plugin ) {
    $key = array_search( $plugin, $plugins );
    if ( false !== $key ) {
    unset( $plugins[ $key ] );
    }
    }
    }

    return $plugins;
    }

Viewing 1 replies (of 1 total)
  • The topic ‘dont want being copied , but when logged as adminstrator, can copy content’ is closed to new replies.