Toggle Side Panel
BuddyBoss Resources
  • Knowledge Base
    • All Articles
    • BuddyBoss Platform
    • BuddyBoss Theme
    • BuddyBoss App
    • Integrations
    • Advanced Setup
    • Troubleshooting
    • Release Notes
      • BuddyBoss Platform
      • BuddyBoss Platform Pro
      • BuddyBoss Theme
      • BuddyBoss App
      • BuddyBoss App Plugin
      • Other Products
  • Developers
    • Developer Tutorials
      • Web Development
      • App Development
    • Code Reference
      • Functions
      • Hooks
      • Classes
      • Methods
      • Commands
      • App Codex
    • REST API
      • BuddyBoss Platform
      • BuddyBoss App
    • Font Cheatsheet
    • Github Project
  • Roadmap
  • Go to BuddyBoss
More options
    Contact Support
    Filter
    • Knowledge Base
      • All Articles
      • BuddyBoss Platform
      • BuddyBoss Theme
      • BuddyBoss App
      • Integrations
      • Advanced Setup
      • Troubleshooting
      • Release Notes
        • BuddyBoss Platform
        • BuddyBoss Platform Pro
        • BuddyBoss Theme
        • BuddyBoss App
        • BuddyBoss App Plugin
        • Other Products
    • Developers
      • Developer Tutorials
        • Web Development
        • App Development
      • Code Reference
        • Functions
        • Hooks
        • Classes
        • Methods
        • Commands
        • App Codex
      • REST API
        • BuddyBoss Platform
        • BuddyBoss App
      • Font Cheatsheet
      • Github Project
    • Roadmap
    • Go to BuddyBoss
    Filter
    Close search
    Filter

    Contents

    • Description
    • Parameters
    • Return
    • Source
    • Changelog
    • Related
    Code Reference Classes BP_REST_Signup_Endpoint BP_REST_Signup_Endpoint::get_endpoint_args_for_item_schema()

    BP_REST_Signup_Endpoint::get_endpoint_args_for_item_schema( string $method = WP_REST_Server::CREATABLE )

    Edit the type of the some properties for the CREATABLE & EDITABLE methods.

    Description

    Parameters

    $method

    (Optional) HTTP method of the request.

    Default value: WP_REST_Server::CREATABLE

    Return

    (array) Endpoint arguments.

    Source

    File: bp-members/classes/class-bp-rest-signup-endpoint.php

    	public function get_endpoint_args_for_item_schema( $method = WP_REST_Server::CREATABLE ) {
    		$args = WP_REST_Controller::get_endpoint_args_for_item_schema( $method );
    		$key  = 'get_item';
    
    		if ( WP_REST_Server::CREATABLE === $method ) {
    			$key = 'create_item';
    
    			if ( ! function_exists( 'bp_xprofile_nickname_field_id' ) ) {
    				$args['signup_username'] = array(
    					'context'           => array( 'edit' ),
    					'description'       => __( 'New user Username .', 'buddyboss' ),
    					'type'              => 'string',
    					'required'          => true,
    					'sanitize_callback' => 'sanitize_user',
    					'validate_callback' => 'rest_validate_request_arg',
    				);
    			}
    
    			$args['signup_email'] = array(
    				'context'           => array( 'edit' ),
    				'description'       => __( 'New user email address.', 'buddyboss' ),
    				'type'              => 'string',
    				'required'          => true,
    				'sanitize_callback' => 'sanitize_email',
    				'validate_callback' => 'rest_validate_request_arg',
    			);
    
    			if ( function_exists( 'bp_register_confirm_email' ) && true === bp_register_confirm_email() ) {
    				$args['signup_email_confirm'] = array(
    					'context'           => array( 'edit' ),
    					'description'       => __( 'New user confirm email address.', 'buddyboss' ),
    					'type'              => 'string',
    					'required'          => true,
    					'sanitize_callback' => 'sanitize_email',
    					'validate_callback' => 'rest_validate_request_arg',
    				);
    			}
    
    			$args['signup_password'] = array(
    				'context'           => array( 'edit' ),
    				'description'       => __( 'New user account password.', 'buddyboss' ),
    				'type'              => 'string',
    				'required'          => true,
    				'sanitize_callback' => 'sanitize_text_field',
    				'validate_callback' => 'rest_validate_request_arg',
    			);
    
    			if (
    				( function_exists( 'bp_register_confirm_password' ) && false !== bp_register_confirm_password() )
    				|| ! function_exists( 'bp_register_confirm_password' )
    			) {
    				$args['signup_password_confirm'] = array(
    					'context'           => array( 'edit' ),
    					'description'       => __( 'New user confirm account password.', 'buddyboss' ),
    					'type'              => 'string',
    					'required'          => true,
    					'sanitize_callback' => 'sanitize_text_field',
    					'validate_callback' => 'rest_validate_request_arg',
    				);
    			}
    
    			if ( bp_get_blog_signup_allowed() ) {
    				$args['signup_with_blog'] = array(
    					'context'           => array( 'edit' ),
    					'description'       => __( 'If user likes to create a new site.', 'buddyboss' ),
    					'type'              => 'boolean',
    					'sanitize_callback' => 'rest_sanitize_boolean',
    					'validate_callback' => 'rest_validate_request_arg',
    				);
    
    				$args['signup_blog_url'] = array(
    					'context'           => array( 'edit' ),
    					'description'       => __( 'New Site URL.', 'buddyboss' ),
    					'type'              => 'string',
    					'sanitize_callback' => 'sanitize_text_field',
    					'validate_callback' => 'rest_validate_request_arg',
    				);
    
    				$args['signup_blog_title'] = array(
    					'context'           => array( 'edit' ),
    					'description'       => __( 'New Site Title.', 'buddyboss' ),
    					'type'              => 'string',
    					'sanitize_callback' => 'sanitize_text_field',
    					'validate_callback' => 'rest_validate_request_arg',
    				);
    
    				$args['signup_blog_privacy'] = array(
    					'context'           => array( 'edit' ),
    					'description'       => __( 'If user would like to site appear in search engines, and in public listings around this network.', 'buddyboss' ),
    					'type'              => 'string',
    					'enum'              => array( 'public', 'private' ),
    					'sanitize_callback' => 'sanitize_text_field',
    					'validate_callback' => 'rest_validate_request_arg',
    				);
    			}
    		} elseif ( WP_REST_Server::EDITABLE === $method ) {
    			$key = 'update_item';
    		} elseif ( WP_REST_Server::DELETABLE === $method ) {
    			$key = 'delete_item';
    		}
    
    		/**
    		 * Filters the method query arguments.
    		 *
    		 * @param array  $args   Query arguments.
    		 * @param string $method HTTP method of the request.
    		 *
    		 * @since 0.1.0
    		 */
    		return apply_filters( "bp_rest_signup_{$key}_query_arguments", $args, $method );
    	}
    

    Expand full source code Collapse full source code

    Changelog

    Changelog
    Version Description
    0.1.0 Introduced.

    Related

    Uses

    Uses
    Uses Description
    bp-members/classes/class-bp-rest-signup-endpoint.php: bp_rest_signup_{$key}_query_arguments

    Filters the method query arguments.

    bp-core/bp-core-options.php: bp_register_confirm_email()

    Display email confirmation field in registrations.

    bp-core/bp-core-options.php: bp_register_confirm_password()

    Display password confirmation field in registrations.

    bp-core/bp-core-template.php: bp_get_blog_signup_allowed()

    Is blog signup allowed?

    Used By
    Used By Description
    bp-members/classes/class-bp-rest-signup-endpoint.php: BP_REST_Signup_Endpoint::register_routes()

    Register the component routes.

    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.

    © 2025 • BuddyBoss