当前位置: 首页>>代码示例>>PHP>>正文


PHP bp_show_blog_signup_form函数代码示例

本文整理汇总了PHP中bp_show_blog_signup_form函数的典型用法代码示例。如果您正苦于以下问题:PHP bp_show_blog_signup_form函数的具体用法?PHP bp_show_blog_signup_form怎么用?PHP bp_show_blog_signup_form使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了bp_show_blog_signup_form函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: do_action

<?php 
/**
 * Fires before the display of the blog creation form.
 *
 * @since BuddyPress (1.1.0)
 */
do_action('bp_before_create_blog_content');
?>

<?php 
if (bp_blog_signup_enabled()) {
    ?>

  <?php 
    bp_show_blog_signup_form();
    ?>

<?php 
} else {
    ?>

  <div id="message" class="info">
    <p><?php 
    _e('Site registration is currently disabled', 'buddypress');
    ?>
</p>
  </div>

<?php 
}
开发者ID:hakkens,项目名称:davehakkens,代码行数:30,代码来源:create.php

示例2: bp_blogs_validate_blog_signup

function bp_blogs_validate_blog_signup() {
	global $wpdb, $current_user, $blogname, $blog_title, $errors, $domain, $path;

	if ( !check_admin_referer( 'bp_blog_signup_form' ) )
		return false;

	$current_user = wp_get_current_user();

	if( !is_user_logged_in() )
		die();

	$result = bp_blogs_validate_blog_form();
	extract($result);

	if ( $errors->get_error_code() ) {
		unset($_POST['submit']);
		bp_show_blog_signup_form( $blogname, $blog_title, $errors );
		return false;
	}

	$public = (int) $_POST['blog_public'];

	$meta = apply_filters( 'signup_create_blog_meta', array( 'lang_id' => 1, 'public' => $public ) ); // depreciated
	$meta = apply_filters( 'add_signup_meta', $meta );

	/* If this is a VHOST install, remove the username from the domain as we are setting this blog
	   up inside a user domain, not the root domain. */

	wpmu_create_blog( $domain, $path, $blog_title, $current_user->id, $meta, $wpdb->siteid );
	bp_blogs_confirm_blog_signup($domain, $path, $blog_title, $current_user->user_login, $current_user->user_email, $meta);
	return true;
}
开发者ID:n-sane,项目名称:zaroka,代码行数:32,代码来源:bp-blogs-templatetags.php

示例3: bp_blogs_validate_blog_signup

/**
 * Process a blog registration submission.
 *
 * Passes submitted values to {@link wpmu_create_blog()}.
 *
 * @return bool True on success, false on failure.
 */
function bp_blogs_validate_blog_signup()
{
    global $wpdb, $current_user, $blogname, $blog_title, $errors, $domain, $path, $current_site;
    if (!check_admin_referer('bp_blog_signup_form')) {
        return false;
    }
    $current_user = wp_get_current_user();
    if (!is_user_logged_in()) {
        die;
    }
    $result = bp_blogs_validate_blog_form();
    extract($result);
    if ($errors->get_error_code()) {
        unset($_POST['submit']);
        bp_show_blog_signup_form($blogname, $blog_title, $errors);
        return false;
    }
    $public = (int) $_POST['blog_public'];
    $meta = apply_filters('signup_create_blog_meta', array('lang_id' => 1, 'public' => $public));
    // depreciated
    /**
     * Filters the default values for Blog meta.
     *
     * @since BuddyPress (1.0.0)
     *
     * @param array $meta {
     *      string $value  Default blog language ID.
     *      string $public Default public status.
     * }
     */
    $meta = apply_filters('add_signup_meta', $meta);
    // If this is a subdomain install, set up the site inside the root domain.
    if (is_subdomain_install()) {
        $domain = $blogname . '.' . preg_replace('|^www\\.|', '', $current_site->domain);
    }
    wpmu_create_blog($domain, $path, $blog_title, $current_user->ID, $meta, $wpdb->siteid);
    bp_blogs_confirm_blog_signup($domain, $path, $blog_title, $current_user->user_login, $current_user->user_email, $meta);
    return true;
}
开发者ID:AceMedia,项目名称:BuddyPress,代码行数:46,代码来源:bp-blogs-template.php

示例4: bp_blogs_validate_blog_signup

function bp_blogs_validate_blog_signup()
{
    global $nxtdb, $current_user, $blogname, $blog_title, $errors, $domain, $path, $current_site;
    if (!check_admin_referer('bp_blog_signup_form')) {
        return false;
    }
    $current_user = nxt_get_current_user();
    if (!is_user_logged_in()) {
        die;
    }
    $result = bp_blogs_validate_blog_form();
    extract($result);
    if ($errors->get_error_code()) {
        unset($_POST['submit']);
        bp_show_blog_signup_form($blogname, $blog_title, $errors);
        return false;
    }
    $public = (int) $_POST['blog_public'];
    $meta = apply_filters('signup_create_blog_meta', array('lang_id' => 1, 'public' => $public));
    // depreciated
    $meta = apply_filters('add_signup_meta', $meta);
    // If this is a subdomain install, set up the site inside the root domain.
    if (is_subdomain_install()) {
        $domain = $blogname . '.' . preg_replace('|^www\\.|', '', $current_site->domain);
    }
    nxtmu_create_blog($domain, $path, $blog_title, $current_user->ID, $meta, $nxtdb->siteid);
    bp_blogs_confirm_blog_signup($domain, $path, $blog_title, $current_user->user_login, $current_user->user_email, $meta);
    return true;
}
开发者ID:nxtclass,项目名称:NXTClass,代码行数:29,代码来源:bp-blogs-template.php


注:本文中的bp_show_blog_signup_form函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。