- This topic has 2 replies, 2 voices, and was last updated 6 years, 3 months ago by
erikkubica.
-
AuthorPosts
-
-
November 11, 2015 at 4:30 pm #4930
erikkubicaMemberHi,
Steve thank you for reply in article. I am still confused how it works on this new workflow(or what the workflow means, what it corresponds for)
I will be happy if someone will help me to migrate actual code to new structure.
Current structure for settings page(theme options) is:
piklist/parts/settings/zm_settings[_basic, _advanced, _socials,…].phpRegistering setting page i do like:
add_filter('piklist_admin_pages', 'piklist_theme_setting_pages'); function piklist_theme_setting_pages($pages) { $pages[] = array( 'page_title' => __('Theme Options') , 'menu_title' => __('Theme Options', 'piklist') , 'sub_menu' => 'themes.php' //Under Appearance menu , 'capability' => 'manage_options' , 'menu_slug' => 'zm_settings' , 'setting' => 'zm_theme_settings' , 'menu_icon' => plugins_url('piklist/parts/img/piklist-icon.png') , 'page_icon' => plugins_url('piklist/parts/img/piklist-page-icon-32.png') , 'single_line' => true , 'default_tab' => 'Basic' , 'save_text' => __('Save settings') ); return $pages; }content of zm_settings_*.php looks like this:
<?php /* Setting: zm_theme_settings Tab: Facebook API Tab Order: 2 */ piklist('field', array( 'type' => 'text' , 'field' => 'facebook_app_id' , 'label' => 'FB App ID' , 'description' => '' , 'help' => 'Id of app that is allowed for domain.' , 'value' => '' , 'attributes' => array( 'class' => 'text' ) )); ... other fieldsAs i see in docs, workflows is defined in ..parts/workflows so now i need to move things from settings to workflows? How I register these new setting page? Is there any different in accessing data?
/* Title: My Tab Order: 10 Flow: My Flow */Recommendation: I think docs for these trunk versions should be created. And add some select box to documentation to let users choose witch version they want to read.
Thank you
-
November 12, 2015 at 11:53 am #4941
SteveKeymaster@erikkubica– Real sorry for the confusion. Hopefully, this is the last time we manage two different versions of Piklist. Here’s the doc for Workflows in 0.9.9.x
Essentially, you do three things:
1) Create a Workflow Header file: This goes in the /workflows/ folder, and tells the entire Workflow which pages to display on.2) Create a Workflow tab: This also goes in the /workflows/ folder, and is just a tab assigned to the header.
3) Assign your settings sections: These stay in your /settings/ folder. You should just have to add two parameters to the commment block:
TabandFlow. Here’s an example:Tab: My Tab Flow: My Flow
Does that make more sense?
-
November 12, 2015 at 12:16 pm #4946
erikkubicaMemberYes, now it´s clear how these flows connects with tabs and pages,
Thank you
-
-
AuthorPosts
- The topic ‘Setting page on 0.9.9.6 with new flow’ is closed to new replies.