acf_get_ui_options_page_from_request_args()ACF 6.2

Gets an ACF options page from request args and verifies nonce based on action.

No Hooks.

Returns

Array|true|false.

Usage

acf_get_ui_options_page_from_request_args( $action );
$action(string)
The action being performed.
Default: ''

Changelog

Since 6.2 Introduced.

acf_get_ui_options_page_from_request_args() code ACF 6.8.8

function acf_get_ui_options_page_from_request_args( $action = '' ) {
	$acf_use_options_page = (int) acf_request_arg( 'use_options_page', 0 );

	if ( ! $acf_use_options_page || ! wp_verify_nonce( acf_request_arg( '_wpnonce' ), $action . '-' . $acf_use_options_page ) ) {
		return false;
	}

	return acf_get_internal_post_type( $acf_use_options_page, 'acf-ui-options-page' );
}