BP_Group_Extension::nonce_field( string $context = '' )

Generate the nonce fields for a settings form.


Description Description

The nonce field name (the second param passed to wp_nonce_field) contains this extension’s slug and is thus unique to this extension. This is necessary because in some cases (namely, the Dashboard), more than one extension may generate nonces on the same page, and we must avoid name clashes.


Top ↑

Parameters Parameters

$context

(string) (Optional) Screen context. 'create', 'edit', or 'admin'.

Default value: ''


Source Source

File: bp-groups/classes/class-bp-group-extension.php

	public function nonce_field( $context = '' ) {
		wp_nonce_field( 'bp_group_extension_' . $this->slug . '_' . $context, '_bp_group_' . $context . '_nonce_' . $this->slug );
	}


Top ↑

Changelog Changelog

Changelog
Version Description
1.8.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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