How to test for Super Admin

I got it to work as follows — in mu-plugins directory, my superAdmin.php script looks like this: <?php function check_for_superAdmin($user_login, $user) { $current_user = get_userdatabylogin($user_login); if ( is_super_admin( $current_user->ID ) ) { // do these things } else { // do other things } } add_action( ‘wp_login’, ‘check_for_superAdmin’, 10, 2 ); ?> Hope this helps … Read more

WordPress Multisite: Have the same header and footer of main-blog on all sub-blogs

You could use the switch_to_blog() function Switches the active blog until the user calls the restore_current_blog() function. This function is useful if you need to pull posts, or other information, from other blogs, you can then switch back after using restore_current_blog(). Using this function will not load plugins that only run on the blog you … Read more

No Network/Super admin after enabling Network

I installed WordPress 3.2.1 fresh on a new domain, and then enabled Multi-Site, which functioned as documented. I could reach /wp-admin/network without problems. Comparing the database of this WP with the problem installation, in the wp_sitemeta table, admin_email was not set for the problem site. Also, wp_sitemeta > site_admins was different. The problem website had … Read more

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