本文整理汇总了PHP中confirm_blog_signup函数的典型用法代码示例。如果您正苦于以下问题:PHP confirm_blog_signup函数的具体用法?PHP confirm_blog_signup怎么用?PHP confirm_blog_signup使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了confirm_blog_signup函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: validate_blog_signup
/**
* Validate new site signup
*
* @since MU
*
* @uses wpmu_validate_user_signup() to retrieve an array of the new user data and errors
* @uses wpmu_validate_blog_signup() to retrieve an array of the new site data and errors
* @uses apply_filters() to make signup $meta filterable
* @uses signup_user() to signup a new user
* @uses signup_blog() to signup a the new user to a new site
* @return bool True if the site signup was validated, false if error
*/
function validate_blog_signup()
{
// Re-validate user info.
$result = wpmu_validate_user_signup($_POST['user_name'], $_POST['user_email']);
extract($result);
if ($errors->get_error_code()) {
signup_user($user_name, $user_email, $errors);
return false;
}
$result = wpmu_validate_blog_signup($_POST['blogname'], $_POST['blog_title']);
extract($result);
if ($errors->get_error_code()) {
signup_blog($user_name, $user_email, $blogname, $blog_title, $errors);
return false;
}
$public = (int) $_POST['blog_public'];
$meta = array('lang_id' => 1, 'public' => $public);
//duplicate_hook
$meta = apply_filters('add_signup_meta', $meta);
wpmu_signup_blog($domain, $path, $blog_title, $user_name, $user_email, $meta);
confirm_blog_signup($domain, $path, $blog_title, $user_name, $user_email, $meta);
return true;
}
示例2: validate_blog_signup
/**
* Validate new site signup
*
* @since MU
*
* @return bool True if the site signup was validated, false if error
*/
function validate_blog_signup() {
// Re-validate user info.
$user_result = wpmu_validate_user_signup( $_POST['user_name'], $_POST['user_email'] );
$user_name = $user_result['user_name'];
$user_email = $user_result['user_email'];
$user_errors = $user_result['errors'];
if ( $user_errors->get_error_code() ) {
signup_user( $user_name, $user_email, $user_errors );
return false;
}
$result = wpmu_validate_blog_signup( $_POST['blogname'], $_POST['blog_title'] );
$domain = $result['domain'];
$path = $result['path'];
$blogname = $result['blogname'];
$blog_title = $result['blog_title'];
$errors = $result['errors'];
if ( $errors->get_error_code() ) {
signup_blog($user_name, $user_email, $blogname, $blog_title, $errors);
return false;
}
$public = (int) $_POST['blog_public'];
$signup_meta = array ('lang_id' => 1, 'public' => $public);
/** This filter is documented in wp-signup.php */
$meta = apply_filters( 'add_signup_meta', $signup_meta );
wpmu_signup_blog($domain, $path, $blog_title, $user_name, $user_email, $meta);
confirm_blog_signup($domain, $path, $blog_title, $user_name, $user_email, $meta);
return true;
}
示例3: validate_blog_signup
/**
* Validate new site signup
*
* @since MU
*
* @return bool True if the site signup was validated, false if error
*/
function validate_blog_signup()
{
// Re-validate user info.
$user_result = wpmu_validate_user_signup($_POST['user_name'], $_POST['user_email']);
$user_name = $user_result['user_name'];
$user_email = $user_result['user_email'];
$user_errors = $user_result['errors'];
if ($user_errors->get_error_code()) {
signup_user($user_name, $user_email, $user_errors);
return false;
}
$result = wpmu_validate_blog_signup($_POST['blogname'], $_POST['blog_title']);
$domain = $result['domain'];
$path = $result['path'];
$blogname = $result['blogname'];
$blog_title = $result['blog_title'];
$errors = $result['errors'];
if ($errors->get_error_code()) {
signup_blog($user_name, $user_email, $blogname, $blog_title, $errors);
return false;
}
$public = (int) $_POST['blog_public'];
$signup_meta = array('lang_id' => 1, 'public' => $public);
// Handle the language setting for the new site.
if (!empty($_POST['WPLANG'])) {
$languages = signup_get_available_languages();
if (in_array($_POST['WPLANG'], $languages)) {
$language = wp_unslash(sanitize_text_field($_POST['WPLANG']));
if ($language) {
$signup_meta['WPLANG'] = $language;
}
}
}
/** This filter is documented in wp-signup.php */
$meta = apply_filters('add_signup_meta', $signup_meta);
wpmu_signup_blog($domain, $path, $blog_title, $user_name, $user_email, $meta);
confirm_blog_signup($domain, $path, $blog_title, $user_name, $user_email, $meta);
return true;
}