| 1 |
<?php |
| 2 |
// include individual modules |
| 3 |
function wppb_include_default_fields_files() { |
| 4 |
$wppb_generalSettings = get_option('wppb_general_settings', 'not_found' ); |
| 5 |
if ( ( $wppb_generalSettings != 'not_found' ) && ( $wppb_generalSettings['loginWith'] != 'email' ) ) |
| 6 |
include_once( WPPB_PLUGIN_DIR.'/front-end/default-fields/username/username.php' ); |
| 7 |
else{ |
| 8 |
add_filter( 'wppb_output_display_form_field', 'wppb_remove_username_field_when_login_with_email', 10, 5 ); |
| 9 |
function wppb_remove_username_field_when_login_with_email( $bool, $field, $form_type, $role, $user_id ){ |
| 10 |
if( $field['field'] == 'Default - Username' ) |
| 11 |
return false; |
| 12 |
|
| 13 |
return $bool; |
| 14 |
} |
| 15 |
} |
| 16 |
|
| 17 |
include_once( WPPB_PLUGIN_DIR.'/front-end/default-fields/first-name/first-name.php' ); |
| 18 |
include_once( WPPB_PLUGIN_DIR.'/front-end/default-fields/last-name/last-name.php' ); |
| 19 |
include_once( WPPB_PLUGIN_DIR.'/front-end/default-fields/password/password.php' ); |
| 20 |
include_once( WPPB_PLUGIN_DIR.'/front-end/default-fields/password-repeat/password-repeat.php' ); |
| 21 |
|
| 22 |
// Default contact methods were removed in WP 3.6. A filter dictates contact methods. |
| 23 |
if ( apply_filters( 'wppb_remove_default_contact_methods', get_site_option( 'initial_db_version' ) < 23588 ) ){ |
| 24 |
include_once( WPPB_PLUGIN_DIR.'/front-end/default-fields/aim/aim.php' ); |
| 25 |
include_once( WPPB_PLUGIN_DIR.'/front-end/default-fields/yim/yim.php' ); |
| 26 |
include_once( WPPB_PLUGIN_DIR.'/front-end/default-fields/jabber/jabber.php' ); |
| 27 |
} |
| 28 |
|
| 29 |
include_once( WPPB_PLUGIN_DIR.'/front-end/default-fields/nickname/nickname.php' ); |
| 30 |
include_once( WPPB_PLUGIN_DIR.'/front-end/default-fields/description/description.php' ); |
| 31 |
include_once( WPPB_PLUGIN_DIR.'/front-end/default-fields/website/website.php' ); |
| 32 |
include_once( WPPB_PLUGIN_DIR.'/front-end/default-fields/email/email.php' ); |
| 33 |
include_once( WPPB_PLUGIN_DIR.'/front-end/default-fields/display-name/display-name.php' ); |
| 34 |
include_once( WPPB_PLUGIN_DIR.'/front-end/default-fields/headings/name.php' ); |
| 35 |
include_once( WPPB_PLUGIN_DIR.'/front-end/default-fields/headings/contact-info.php' ); |
| 36 |
include_once( WPPB_PLUGIN_DIR.'/front-end/default-fields/headings/about-yourself.php' ); |
| 37 |
if ( wppb_can_users_signup_blog() ) { |
| 38 |
include_once(WPPB_PLUGIN_DIR . '/front-end/default-fields/blog-details/blog-details.php'); |
| 39 |
} |
| 40 |
|
| 41 |
/* added recaptcha and user role field since version 2.6.2 */ |
| 42 |
include_once( WPPB_PLUGIN_DIR.'/front-end/default-fields/recaptcha/recaptcha.php' ); |
| 43 |
include_once( WPPB_PLUGIN_DIR.'/front-end/default-fields/user-role/user-role.php' ); |
| 44 |
} |
| 45 |
wppb_include_default_fields_files(); |