Where can I find documentation on what characters are allowed in user names and why?

You can use spaces in usernames, no problem. Several users on wordpress.org have spaces in their usernames. Strict mode only allows these characters: a-z0-9<space>_.\-@ However WP doesn’t default to strict mode. Now, multisite has different restrictions, and it may strip spaces there. This is because usernames are used to create independent blogs and such on … Read more

Specific upload folder for PDFs in custom Post type in WP multisite

you might consider using if(get_post_mime_type($id) == ‘application/pdf’){ … } to check for pdf files. http://codex.wordpress.org/Function_Reference/get_post_mime_type You might also take a look at the code behind the wp_delete_attachment() function and you can hook into it with the delete attachment action. To remove the files you can use unlink() http://php.net/manual/en/function.unlink.php

How to use same email for multiple users

You can use wpmu_validate_user_signup filter to remove the error and then define WP_IMPORTING just to skip the email_exist() check in wp_insert_user() function: add_filter(‘wpmu_validate_user_signup’, ‘skip_email_exist’); function skip_email_exist($result){ if(isset($result[‘errors’]->errors[‘user_email’]) && ($key = array_search(__(‘Sorry, that email address is already used!’), $result[‘errors’]->errors[‘user_email’])) !== false) { unset($result[‘errors’]->errors[‘user_email’][$key]); if (empty($result[‘errors’]->errors[‘user_email’])) unset($result[‘errors’]->errors[‘user_email’]); } define( ‘WP_IMPORTING’, ‘SKIP_EMAIL_EXIST’ ); return $result; } UPDATE: for … Read more

How to add field for new site-wide option on Network Settings screen?

There’s a wpmu_options action that lets you append more HTML on the Network Settings page. If you want to add your own sub-menu/page to the Settings parent menu: add_action(‘network_admin_menu’, ‘add_my_netw_settings_page’); function add_my_netw_settings_page() { add_submenu_page( ‘settings.php’, ‘Co za asy’, ‘Co za asy’, ‘manage_network_options’, ‘my-netw-settings’, ‘your_form’ ); } function your_form(){ $options = get_site_option(‘your_plugin’); ?> <form action=”<?php echo … Read more

Site admin in a network install can’t edit users?

As explained in the description of the Network Admin Users screen, in a network install (multisite mode) users are added on a global basis to the entire network, then assigned to specific sites Normal administrators are not permitted to modify these global profiles, since their privileges extend only to their given site. This task is … Read more

Why are my roles not visible in a Multi-site/Network?

Determine your Multisite Blog ID. I will use 99 as an example Go into the database Go to this table: wp_##_options (wp_99_options) — you will have a table for each blog Find the record where option_name = wp_user_roles Change the text wp_user_roles to wp_##_user_roles (“wp_99_user_roles”) The table you are editing will have option_id, blog_id, option_name, … Read more

Remove the blog slug from WordPress Multisite root node

At blog site set Settings -> Permalinks -> Common Setting -> Default (Must select default only and don’t touch any thing, If you need to change category base, tag base set at Network Admin only) At Network Admin -> Sites -> (root site) Permalink Sturcture -> /%category%/%post_id% That it will remove /blog slug

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