How to tell if a plugin is multisite compatible?

There are two types of multisite compatibility: Passive compatibility: doing nothing multisite specific, just works without breaking anything. Active compatibility: changing or extending multisite specific behavior. I guess you are out for 1. See my slides from WordCamp Prague 2015 for the second part. Plugins that do not say anything about multisite should not be … Read more

How to delete post revisions?

This is a much safer query to use and will remove related entries from the postmeta and term_relationship, unlike deathlocks query in his answer. Change the {id} to the id of each blog posts table. You can combine this query to run all the post tables at once, but try this on one table first. … Read more

Need help sorting “My Sites” Alphabetically

Easy one. <?php /* Plugin Name: Sort My-Sites Description: Sorts the My Sites listing on both the page and in the 3.3 admin bar dropdown Author: Otto */ add_filter(‘get_blogs_of_user’,’sort_my_sites’); function sort_my_sites($blogs) { $f = create_function(‘$a,$b’,’return strcasecmp($a->blogname,$b->blogname);’); uasort($blogs, $f); return $blogs; } Edit: If you want a PHP 7 version: add_filter(‘get_blogs_of_user’, function( $blogs ) { uasort( … Read more

How to set permalink structure via functions.php

You can set the permalink structure by calling on the set_permalink_structure() method of the global $wp_rewrite object. add_action( ‘init’, function() { global $wp_rewrite; $wp_rewrite->set_permalink_structure( ‘/%year%/%monthnum%/%postname%/’ ); } ); Here’s a PHP < 5.3 version of the code in case you’re getting errors. function reset_permalinks() { global $wp_rewrite; $wp_rewrite->set_permalink_structure( ‘/%year%/%monthnum%/%postname%/’ ); } add_action( ‘init’, ‘reset_permalinks’ );

deneme bonusu veren sitelerbahis casinomakrobetceltabetpinbahispolobetpolobet girişpinbahis girişmakrobet girişpulibet girişmobilbahis girişkolaybet giriş