bp_get_admin_url( string $path = '', string $scheme = 'admin' )

Return the correct admin URL based on BuddyPress and WordPress configuration.

Parameters Parameters


(string) (Optional) The sub-path under /wp-admin to be appended to the admin URL.

Default value: ''


(string) (Optional) The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl(). 'http' or 'https' can be passed to force those schemes.

Default value: 'admin'

Top ↑

Return Return

(string) Admin url link with optional path appended.

Source Source

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

	function bp_get_admin_url( $path = '', $scheme = 'admin' ) {

		// Links belong in network admin.
		if ( bp_core_do_network_admin() ) {
			$url = network_admin_url( $path, $scheme );

		// Links belong in site admin.
		} else {
			$url = admin_url( $path, $scheme );

		return $url;

Top ↑

Changelog Changelog

Version Description
1.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.