• 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
    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
    Filter

    Contents

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

    BP_REST_Signup_Endpoint::get_item_schema()

    Get the signup schema, conforming to JSON Schema.

    Description

    Return

    (array)

    Source

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

    	public function get_item_schema() {
    		$schema = array(
    			'$schema'    => 'http://json-schema.org/draft-04/schema#',
    			'title'      => 'bp_signup',
    			'type'       => 'object',
    			'properties' => array(
    				'id'             => array(
    					'context'     => array( 'view', 'edit' ),
    					'description' => __( 'A unique numeric ID for the signup.', 'buddyboss' ),
    					'readonly'    => true,
    					'type'        => 'integer',
    				),
    				'user_login'     => array(
    					'context'     => array( 'view', 'edit' ),
    					'description' => __( 'The username of the user the signup is for.', 'buddyboss' ),
    					'required'    => true,
    					'type'        => 'string',
    					'readonly'    => true,
    				),
    				'user_name'      => array(
    					'context'     => array( 'view', 'edit' ),
    					'description' => __( 'The full name of the user the signup is for.', 'buddyboss' ),
    					'type'        => 'string',
    					'readonly'    => true,
    					'arg_options' => array(
    						'sanitize_callback' => 'sanitize_text_field',
    					),
    				),
    				'user_email'     => array(
    					'context'     => array( 'edit' ),
    					'description' => __( 'The email for the user the signup is for.', 'buddyboss' ),
    					'type'        => 'string',
    					'readonly'    => true,
    				),
    				'activation_key' => array(
    					'context'     => array( 'edit' ),
    					'description' => __( 'Activation key of the signup.', 'buddyboss' ),
    					'type'        => 'string',
    					'readonly'    => true,
    				),
    				'registered'     => array(
    					'context'     => array( 'view', 'edit' ),
    					'description' => __( 'The registered date for the user, in the site\'s timezone.', 'buddyboss' ),
    					'type'        => 'string',
    					'readonly'    => true,
    					'format'      => 'date-time',
    				),
    			),
    		);
    
    		/**
    		 * Filters the signup schema.
    		 *
    		 * @param array $schema The endpoint schema.
    		 */
    		return apply_filters( 'bp_rest_signup_schema', $this->add_additional_fields_schema( $schema ) );
    	}
    

    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_schema

    Filters the signup schema.

    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.

    © 2022 • BuddyBoss