Skip to:
Content

BuddyPress.org

Ticket #908: 908-jjj.patch

File 908-jjj.patch, 3.3 KB (added by johnjamesjacoby, 17 years ago)

bp_core_signup_signup_user change example

  • bp-core-signup.php

     
    190190        do_action('signup_finished');
    191191}
    192192
    193 function bp_core_signup_signup_user($user_name = '', $user_email = '', $errors = '') {
     193function bp_core_signup_signup_user($user_name = '', $user_email = '', $errors = '', $args = '') {
    194194        global $current_site, $active_signup;
    195195
    196196        $active_signup = get_site_option( 'registration' );
     
    209209        $user_email = $filtered_results['user_email'];
    210210        $errors = $filtered_results['errors'];
    211211
     212        // Allow for sign-up text to be changed
     213        $defaults = array(
     214                'intro_text' => __( 'If you want to create your first blog, select the option below and you\'ll be asked for a few more details.', 'buddypress' ), // Text for paragraph before sign up fields
     215                'create_blog_title' => __( 'Create a Blog?', 'buddypress' ), // Text for title if blogs are enabled
     216                'blog_help_text' => __( 'If you want to create your first blog, select the option below and you\'ll be asked for a few more details.', 'buddypress' ),
     217                'give_me_blog_text' => __( 'Gimme a blog!', 'buddypress' ), // Text for user requesting a blog
     218                'username_only_text' => __( 'Just a username, please.', 'buddypress' ), // Text for user not wanting a blog
     219                'next_text' => __('Next »'), // Text for next button
     220        );
     221
     222        $r = wp_parse_args( $args, $defaults );
     223        extract( $r, EXTR_SKIP );
    212224        ?>
    213225       
    214226        <form id="setupform" method="post" action="<?php echo site_url(BP_REGISTER_SLUG) ?>">
    215                 <p id="intro-text"><?php _e( 'Registering for a new account is easy, just fill in the form below and you\'ll be a new member in no time at all.', 'buddypress' ) ?></p>
     227                <p id="intro-text"><?php echo $intro_text ?></p>
    216228                <input type="hidden" name="stage" value="validate-user-signup" />
    217229                <?php do_action( "signup_hidden_fields" ); ?>
    218230               
     
    224236                        <input id="signupblog" type="hidden" name="signup_for" value="user" />
    225237                <?php } else { ?>
    226238                        <div id="blog-or-username">
    227                                 <h3><?php _e( 'Create a Blog?', 'buddypress' ) ?></h3>
    228                                 <p id="blog-help-text"><?php _e( 'If you want to create your first blog, select the option below and you\'ll be asked for a few more details.', 'buddypress' ) ?></p>
     239                                <h3><?php echo $create_blog_title ?></h3>
     240                                <p id="blog-help-text"><?php echo $blog_help_text ?></p>
    229241                               
    230242                                <div id="blog-or-username-fields">
    231243                                        <p>
    232244                                                <input id="signupblog" type="radio" name="signup_for" value="blog" <?php echo $signup['blog'] ?> />
    233                                                 <label class="checkbox" for="signupblog"><?php _e( 'Gimme a blog!', 'buddypress' ) ?></label>                   
     245                                                <label class="checkbox" for="signupblog"><?php echo $give_me_blog_text ?></label>
    234246                                        </p>
    235247                               
    236248                                        <p>
    237249                                                <input id="signupuser" type="radio" name="signup_for" value="user" <?php echo $signup['user'] ?> />                     
    238                                                 <label class="checkbox" for="signupuser"><?php _e( 'Just a username, please.', 'buddypress' ) ?></label>
     250                                                <label class="checkbox" for="signupuser"><?php echo username_only_text ?></label>
    239251                                        </p>
    240252                                </div>
    241253                        </div>
    242254                <?php } ?>
    243255
    244                 <input id="submit" type="submit" name="submit" class="submit" value="<?php _e('Next &raquo;') ?>"/>
     256                <input id="submit" type="submit" name="submit" class="submit" value="<?php echo $next_text ?>"/>
    245257        </form>
    246258        <?php
    247259}