Hot answers tagged

4

Some of the more archaic code is still present in WordPress, notably globalising variables inside functions. A good example of thise is get_current_blog_id(), which is present in wp-load.php: /** * Retrieve the current blog ID. * * @since 3.1.0 * * @global int $blog_id * * @return int Blog id */ function get_current_blog_id() { global ...


3

domain_exists() is something you probably won´t call by yourself. It is used in the registration/creation process of new sites in a Multisite installation. There it´s used to check if a specific blog URL is already in use: if ( domain_exists($mydomain, $path, $current_site->id) ) $errors->add( 'blogname', __( 'Sorry, that site already exists!' ...


2

This Plugin gives you a list of posts for each Site already, but it does not exactly do what you want to do. Basically, it gives you a list of all posts in your network. What you need to do afterwards is sort them by site_id and create an output for that. I do not know if this is the best version - but as WP_Query returns an one-dimensional array, you need ...


2

As cdn.mydomain.com is not part of your WordPress network, it wont be affected by your settings. The COOKIE_DOMAIN constant should only be used if you want to serve cookies from a single domain for all your sites in the network. If you omit the constant or set it to an empty value, cookies will belong to the domain their requested from. Thats the ...


1

As I was migrating from a multisite install, the problem was due to the fact that roles are named based on table names. So I solved my problem when I named option wp_7_user_roles to wp_user_roles.



Only top voted, non community-wiki answers of a minimum length are eligible