This is a problem with your code. You shouldn’t be using create_function(), instead use anonymous functions.
If you find the snippet that uses create_function() and post the relevant part here, I can show you how to update it.
Thank you Shea, and sorry for my topic here. This is NOT a Code Snippet-fault!
The deprecated funktion was used in code i used for sorting the sites:
function sort_my_sites($blogs) {
$f = create_function(‘$a,$b’,’return strcasecmp($a->blogname,$b->blogname);’);
uasort($blogs, $f);
return $blogs;
}
add_filter(‘get_blogs_of_user’,’sort_my_sites’);
Sorry, my php skills are very bad.
Here’s how you could rewrite that to work with newer versions of PHP:
add_filter( 'get_blogs_of_user', function ( $blogs ) {
uasort( $blogs, function ( $a, $b ) {
return strcasecmp( $a->blogname, $b->blogname );
} );
return $blogs;
} );
thx – your snippet works fine on my multisite now!