• Hello.
    Is their a code snippets to exclude some websites from the media synch process (I need that some sites of my network work whith the default wordpress media system)?

    thanks !

Viewing 1 replies (of 1 total)
  • Thread Starter nicodweb

    (@nicodweb)

    Perhaps with something like:

    function msms_getBlogs() {
    global $wpdb;
    //return $wpdb->get_results(‘SELECT blog_id FROM wp_blogs’);
    return(array(1,2,4,37));
    }

    And:
    function multisite_mediasync_single_upload_dir( $dirs ) { //ICI peu eclure blog??
    $blog_id = get_current_blog_id();
    if( in_array($blog_id, msms_getBlogs()) ){
    $dirs[‘baseurl’] = network_site_url( ‘/wp-content/uploads’ );
    $dirs[‘basedir’] = ABSPATH . ‘wp-content/uploads’;
    $dirs[‘path’] = $dirs[‘basedir’] . $dirs[‘subdir’];
    $dirs[‘url’] = $dirs[‘baseurl’] . $dirs[‘subdir’];
    }
    return $dirs;
    }

    What do you thing?

Viewing 1 replies (of 1 total)

The topic ‘Exlude some website from sync’ is closed to new replies.