ACF_Admin_Options_Preview::admin_menu
Adds the Options Pages menu item to the admin menu.
Method of the class: ACF_Admin_Options_Preview{}
No Hooks.
Returns
null. Nothing (null).
Usage
$ACF_Admin_Options_Preview = new ACF_Admin_Options_Preview(); $ACF_Admin_Options_Preview->admin_menu();
Changelog
| Since 6.2.2 | Introduced. |
ACF_Admin_Options_Preview::admin_menu() ACF Admin Options Preview::admin menu code ACF 6.8.8
public function admin_menu() {
if ( ! acf_get_setting( 'show_admin' ) ) {
return;
}
$page = add_submenu_page( 'edit.php?post_type=acf-field-group', __( 'Options Pages', 'acf' ), __( 'Options Pages', 'acf' ), acf_get_setting( 'capability' ), 'acf_options_preview', array( $this, 'render' ) );
add_action( 'load-' . $page, array( $this, 'load' ) );
}