- This topic has 5 replies, 2 voices, and was last updated 5 years, 6 months ago by
Steve.
-
AuthorPosts
-
-
July 28, 2016 at 5:10 pm #7051
cullyParticipantI have an admin page for some settings. The page has several tabs. The problem I’m having is that if there is a space in the tab name (e.g.
General Test), then the tab name is output asGeneral_test. I attached a screenshot of the result. I have the same issue on a number of different projects, but they all follow the same setup as below. Am I leaving something out, or is this a bug?My admin page setup looks like:
add_filter('piklist_admin_pages', function ($pages) { $pages []= [ 'page_title' => 'Test Settings', 'menu_title' => 'Test Settings', 'capability' => 'manage_options', 'menu_slug' => 'test_settings', 'setting' => 'test_settings', 'menu_icon' => WordPress::assetUrl("assets/images/icon-16x16.png"), 'page_icon' => WordPress::assetUrl("assets/images/icon-32x32.png"), 'single_line' => true, 'default_tab' => 'General', 'save_text' => 'Save Settings', ]; return $pages; });I have a few tabs. The settings file headers look like:
my_plugin/parts/settings/general.php:
/* Title: General Tab: General Test Tab Order: 100 Setting: test_settings Order: 20 */my_plugin/parts/settings/sort.php:
/* Title: Another Tab: Another Tab Tab Order: 300 Setting: test_settings Order: 20 */Attachments:
You must be logged in to view attached files. -
August 3, 2016 at 9:01 pm #7074
-
August 4, 2016 at 4:04 pm #7080
cullyParticipant@Steve It happens when no other plugins are installed, and also with quite a few installed. The same thing happens in every project I’m using Piklist on. I don’t have a Workflow defined (I was under the impression I don’t need one for settings). Would that be a problem?
-
August 4, 2016 at 4:05 pm #7081
-
August 5, 2016 at 5:10 pm #7099
cullyParticipantAdding a Workflow fixed it. Seems strange that everything would basically work exactly the same before/after adding a Workflow, except for the tab names. Lots of extra overhead (creating all the workflow/tab files). Anyway, thanks for the great help!
-
August 8, 2016 at 2:29 pm #7117
SteveKeymasterGlad you got it working!
-
-
AuthorPosts
- The topic ‘Underscores in tab title, instead of spaces’ is closed to new replies.