base = DFlip::get_instance(); add_action( 'admin_menu', array( $this, 'settings_menu' ) ); $this->fields = array_merge( array(), $this->base->defaults ); foreach ( $this->fields as $key => $value ) { if ( isset( $value['choices'] ) && is_array( $value['choices'] ) && isset( $value['choices']['global'] ) ) { unset( $this->fields[ $key ]['choices']['global'] ); } } // Load the metabox hooks and filters. // add_action('add_meta_boxes', array($this, 'add_meta_boxes'), 100); // Add action to save metabox config options. // add_action('save_post', array($this, 'save_meta_boxes'), 10, 2); } /** * Creates menu for the settings page * * @since 1.2 */ public function settings_menu() { global $submenu; $this->hook = add_submenu_page( 'edit.php?post_type=dflip', __( 'dFlip Global Settings', '3d-flipbook-dflip-lite' ), __( 'Global Settings', '3d-flipbook-dflip-lite' ), 'manage_options', $this->base->plugin_slug . '-settings', array( $this, 'settings_page' ) ); //The resulting page's hook_suffix, or false if the user does not have the capability required. if ( $this->hook ) { add_action( 'load-' . $this->hook, array( $this, 'update_settings' ) ); } $submenu['edit.php?post_type=dflip'][] = array('Upgrade DearFlip', 'manage_options', 'https://dearflip.com/go/wp-lite-upgrade-menu'); } /** * Callback to create the settings page * * @since 1.2 */ public function settings_page() { $tabs = array( 'general' => __( 'General', '3d-flipbook-dflip-lite' ), 'advanced' => __( 'Advanced', '3d-flipbook-dflip-lite' ) ); //create tabs and content ?>

$title ) { ?>
">
base->create_setting( 'viewerType' ); ?>
base->create_setting( 'selectiveScriptLoading' ); ?>