Automatic Upgrade Filters in Multisite

Maybe the hook init is to late for the class and method go(), the update functions run earlier? The hooks muplugins_loaded and update_option start before the init. I have not test your code, is only a hint, not a solution. Maybe also helpfull a analyse of the hook order in the screenshot, create via plugin.

How to use WordPress multisite with mixed HTTP and HTTPS sites?

Thanks to @Sorin for posting the trac. From there I found a solution using just filters in functions.php (so no editing the core) Thanks @mensmaximus for posting there: Link: https://core.trac.wordpress.org/ticket/33887#comment:3 <?php add_filter( ‘network_admin_url’, ‘mmx_network_admin_url’, 1, 2 ); function mmx_network_admin_url( $url, $path ){ $url = “https://my_master_domain/wp-admin/network/” . $path; return $url; } add_filter( ‘admin_url’, ‘mmx_admin_url’, 1, 3 … Read more

Multisite posts in categories on network

Found the answer, posting the code below so it may help future generations. <?php global $wpdb; $count_terms = $wpdb->get_var (“SELECT COUNT(*) FROM wp_2_term_taxonomy, wp_2_posts, wp_2_term_relationships WHERE wp_2_posts.ID = wp_2_term_relationships.object_id AND wp_2_term_relationships.term_taxonomy_id = wp_2_term_taxonomy.term_taxonomy_id AND wp_2_term_taxonomy.term_id = ’22’ AND wp_2_posts.post_type=”post” AND wp_2_posts.post_status=”publish” “); $count_terms1 = $wpdb->get_var (“SELECT COUNT(*) FROM wp_3_term_taxonomy, wp_3_posts, wp_3_term_relationships WHERE wp_3_posts.ID = wp_3_term_relationships.object_id … Read more

Is there an easy way to separate themes on network?

You’d have to make you site categories slug match your theme categories folder names. Here’s how to filter themes: Hide a theme on list of themes in wp-admin without editing core files And then, supposing a site has the category a-p and the themes are stored in themes/a-p/, this will filter them out: add_filter( ‘all_themes’, … Read more

WordPress 3 Multisite using subdomains.- DNS on Cpanel question

When you’re adding the wildcard subdomain, you need to make sure it is registered last in your ANAME records. Then make sure all of the static subdomains (webmail.domainname.com, cpanel.domainname.com, etc) appear before it. When using wildcard subdomains, the server starts at the top of the list and works its way down. If all you have … Read more

Different back-end colour scheme for the different sites of a multisite

Add to your functions.php file the following code, this will hook into your admin header section and will place the style you chose accordingly to the matching site. add_action(‘admin_enqueue_scripts’, ‘my_admin_background’); function my_admin_background() { wp_enqueue_style( ‘custom-style’, get_template_directory_uri() . ‘/css/custom_script.css’ ); global $blog_id; $color=””; if ($blog_id == 1) { $color=”white”; } elseif ($blog_id == 2) { $color=”red”; … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)