数字化技能提升教程,数字化时代生存宝典

数字化百科 / 产品文档 / WordPress:WPMU Functions/wpmu validate blog signup

WordPress:WPMU Functions/wpmu validate blog signup

查看全部产品文档命名空间:WordPress

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