bp_core_register_page_js()

Load the JS for register page and populate conditional field

Description

Source

File: bp-core/bp-core-cssjs.php

function bp_core_register_page_js() {

	if ( bp_is_register_page() && bp_get_xprofile_member_type_field_id() > 0 ) {
		wp_enqueue_script( 'bp-register-page' );

		$data = array(
			'ajaxurl'        => bp_core_ajax_url(),
			'field_id'       => 'field_' . bp_get_xprofile_member_type_field_id(),
			'nonce'          => wp_create_nonce( 'bp-core-register-page-js' ),
			'mismatch_email' => __( 'Mismatch', 'buddyboss' ),
			'valid_email'    => __( 'Enter valid email', 'buddyboss' ),
			'required_field' => __( 'This is a required field.', 'buddyboss' ),
		);

		wp_localize_script( 'bp-register-page', 'BP_Register', apply_filters( 'bp_core_register_js_settings', $data ) );
	}

}

Changelog

Changelog
Version Description
BuddyBoss 1.1.6 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.