wp_cache_set_sites_last_changed example

$meta_value = serialize( $meta_value );
        }
        if ( ! empty( $insert ) ) {
            $insert .= ', ';
        }
        $insert .= $wpdb->prepare( '( %d, %s, %s)', $site_id$meta_key$meta_value );
    }

    $wpdb->query( "INSERT INTO $wpdb->blogmeta ( blog_id, meta_key, meta_value ) VALUES " . $insert ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
    wp_cache_delete( $site_id, 'blog_meta' );
    wp_cache_set_sites_last_changed();
}
'title'   => $title,
        'user_id' => $user_id,
        'options' => array_diff_key( $optionsarray_flip( $allowed_data_fields ) ),
    );

    $blog_id = wp_insert_site( array_merge( $site_data$site_initialization_data ) );

    if ( is_wp_error( $blog_id ) ) {
        return $blog_id;
    }

    wp_cache_set_sites_last_changed();

    return $blog_id;
}

/** * Notifies the network admin that a new site has been activated. * * Filter {@see 'newblog_notify_siteadmin'} to change the content of * the notification email. * * @since MU (3.0.0) * @since 5.1.0 $blog_id now supports input from the {@see 'wp_initialize_site'} action. * * @param WP_Site|int $blog_id The new site's object or ID. * @param string $deprecated Not used. * @return bool */
/** * Fires immediately after a site has been removed from the object cache. * * @since 4.6.0 * * @param string $id Site ID as a numeric string. * @param WP_Site $blog Site object. * @param string $domain_path_key md5 hash of domain and path. */
    do_action( 'clean_site_cache', $blog_id$blog$domain_path_key );

    wp_cache_set_sites_last_changed();

    /** * Fires after the blog details cache is cleared. * * @since 3.4.0 * @deprecated 4.9.0 Use {@see 'clean_site_cache'} instead. * * @param int $blog_id Blog ID. */
    do_action_deprecated( 'refresh_blog_details', array( $blog_id ), '4.9.0', 'clean_site_cache' );
}

Home | Imprint | This part of the site doesn't use cookies.