• 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
    • Parameters
    • Return
    • Source
    • Changelog
    • Related
    Code Reference Classes BP_REST_Signup_Endpoint BP_REST_Signup_Endpoint::prepare_links()

    BP_REST_Signup_Endpoint::prepare_links( BP_Signup $signup )

    Prepare links for the request.

    Description

    Parameters

    $signup

    (BP_Signup) (Required) Signup object.

    Return

    (array) Links for the given plugin.

    Source

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

    	protected function prepare_links( $signup ) {
    		$base = sprintf( '/%s/%s/', $this->namespace, $this->rest_base );
    
    		// Entity meta.
    		$links = array(
    			'self'       => array(
    				'href' => rest_url( $base . $signup->user_login ),
    			),
    			'collection' => array(
    				'href' => rest_url( $base ),
    			),
    		);
    
    		if ( isset( $signup->active ) && empty( $signup->active ) ) {
    			$links['activate'] = array(
    				'href' => rest_url( $base . 'activate/' . $signup->user_login ),
    			);
    		}
    
    		/**
    		 * Filter links prepared for the REST response.
    		 *
    		 * @param array     $links  The prepared links of the REST response.
    		 * @param BP_Signup $signup Signup object.
    		 *
    		 * @since 0.1.0
    		 */
    		return apply_filters( 'bp_rest_signup_prepare_links', $links, $signup );
    	}
    

    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_prepare_links

    Filter links prepared for the REST response.

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

    Prepares signup to return as an object.

    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