WordPress:WPMU Functions/wpmu validate blog signup

来自站长百科
跳转至: 导航、​ 搜索

Makes some verifications about new blog. Located : 'wp-includes\wpmu-functions.php'

Blog ID Verifications[ ]

  • If not empty
  • If not illegal names like :
    "www", "web", "root", "admin", "main", "invite", "administrator"
  • If only lowercase letters and numbers
  • Number of letters, at least 4 characters
  • If is not contain "underscore", the _ character
  • If is not only contain number
  • If already exists in DB
  • If reserved

Blog Title verifications[ ]

  • If not empty

Usage[ ]

To get the blog name, you would use the following:

 $blog_id    = 'newblog'; //the url given to the new blog E.g. newblog.domain.com
 $blog_title = 'New Blog'; //the title given to the new blog
 $result = wpmu_validate_blog_signup($blog_id, $blog_title);

Return to WPMU_Functions