ACF_Admin_Updates::admin_menupublicACF 5.0.0

admin_menu

Adds the admin menu subpage.

Method of the class: ACF_Admin_Updates{}

No Hooks.

Returns

null. Nothing (null).

Usage

$ACF_Admin_Updates = new ACF_Admin_Updates();
$ACF_Admin_Updates->admin_menu();

Changelog

Since 5.0.0 Introduced.

ACF_Admin_Updates::admin_menu() code ACF 6.8.8

function admin_menu() {

	// Bail early if no show_admin.
	if ( ! acf_get_setting( 'show_admin' ) ) {
		return;
	}

	// Bail early if the updates page is not visible.
	if ( ! acf_pro_is_updates_page_visible() ) {
		return;
	}

	// Add submenu.
	$page = add_submenu_page( 'edit.php?post_type=acf-field-group', __( 'Updates', 'acf' ), __( 'Updates', 'acf' ), acf_get_setting( 'capability' ), 'acf-settings-updates', array( $this, 'html' ) );

	// Add actions to page.
	add_action( "load-$page", array( $this, 'load' ) );
}