Forum Replies Created
-
AuthorPosts
-
carassius
ParticipantOnce per plugin, but across multiple plugins
carassius
ParticipantOk so I tried going the parent route
these are my main functions to add the menu pages and the fields
// Create Extensions Page function bl_extensions_options_page( $settings_pages ) { $settings_pages[] = array( 'id' => 'builder-extensions', 'option_name' => 'builder_extensions', 'menu_title' => __( 'Page Builder Extensions', 'fl-builder' ), 'icon_url' => 'dashicons-images-alt', 'submenu_title' => __( 'General', 'fl-builder' ), // Note this ); return $settings_pages; } add_filter( 'mb_settings_pages', 'bl_extensions_options_page' ); // Add Fields to Extensions Page function bl_extensions_options_meta_boxes( $meta_boxes ) { $meta_boxes[] = array( 'id' => 'options', 'title' => __( 'Extensions Options', 'fl-builder' ), 'settings_pages' => 'builder-extensions', 'fields' => array( array( 'name' => __( 'Panel Name', 'fl-builder' ), 'id' => 'branding', 'type' => 'text', 'std' => 'Extensions', ), array( 'name' => __( 'Enable Bootstrap', 'fl-builder' ), 'id' => 'bootstrap', 'type' => 'checkbox', ), ), ); return $meta_boxes; } add_filter( 'rwmb_meta_boxes', 'bl_extensions_options_meta_boxes' );and then to try an extend it I added this to the next plugin
// Create Extensions Page function animated_text_settings_page( $settings_pages ) { $settings_pages[] = array( 'id' => 'animated-text-module', 'option_name' => 'builder_extensions', 'menu_title' => __( 'Animated Text', 'fl-builder' ), 'parent' => 'builder-extensions', ); return $settings_pages; } add_filter( 'mb_settings_pages', 'animated_text_settings_page' ); // Add Fields to Extensions Page function animate_module_fields( $meta_boxes ) { $meta_boxes[] = array( 'id' => 'animated_text', 'title' => __( 'Animated Text Options', 'fl-builder' ), 'settings_pages' => 'animated-text-module', 'fields' => array( array( 'name' => __( 'Custom Field', 'fl-builder' ), 'id' => 'my_custom_field', 'type' => 'text', ), ), ); return $meta_boxes; } add_filter( 'rwmb_meta_boxes', 'animate_module_fields' );The issue with this setup is that the Animated Text appears as a sub menu to the parent item, but when I click on it, it takes me to a 404 page like this for example
http://mydomain.com/wp-admin/animated-text-modulecarassius
ParticipantWhilst you are around, is there a way to make the tabs extensible?
I was trying this
$meta_boxes[] = array( 'id' => 'options', 'title' => __( 'Extensions Options', 'fl-builder' ), 'settings_pages' => 'builder-extensions', 'tabs' => array( 'general' => array( 'label' => __( 'General', 'fl-builder' ), 'icon' => 'dashicons-admin-tools', ), 'popup' => array( 'label' => __( 'OnClick Popup', 'fl-builder' ), 'icon' => 'dashicons-admin-plugins', ), do_action('extensions_tabs'), ),carassius
ParticipantWell, the issue only occurs for themes it seems, because it does not have an issue when I use settings in plugins.
carassius
ParticipantDid you ever get DesktopServer working to configure metabox to work with it?
On my Linux system I have switched over to VVV, but still using DS on my office Windows machinecarassius
Participantawesome, cheers
carassius
ParticipantWell, think I will switch to using customizer controls for now seems as doesnt work with DS
carassius
ParticipantIf I can work out how to get a LAMP stack or VVV running on Arch Linux, I would probably ditch Windows and DS for good...
But I am not that smart lol
carassius
ParticipantYeah runs xampplite I believe, could it be a php version issue?
carassius
ParticipantI did that with no luck, but I have found the problem but not sure if I can fix it
I just uploaded the theme to a live site and it worked, so it appears to be an issue when working locally within DesktopServer...
Any thoughts on what the conflict may be then?
carassius
ParticipantI have no errors with debug set true if that is what you mean
carassius
ParticipantAnd the the settings.php file I have functions in are working because if I add it to the main functions.php it errors due to conflict as expected
carassius
ParticipantYeah, plugins are activated, could it be because it is a child theme?
carassius
ParticipantI have purchased the Developers bundle via PayPal
Your transaction ID for this payment is: 24V91406WY9524913.
carassius
ParticipantSo how much to upgrade to the new Developers bundle?
-
AuthorPosts