-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"AdminPageFramework_Properties::getAllSettings" #12
Comments
I don't see the necessity of it as field default values are defined by the user. You may be talking about a different one so can you show an example how you would use it? [Edit] |
I have a 5-tab settings page, This is my public function do_Read_Offline_Settings() {
submit_button();
echo $this->oDebug->getArray( get_option( 'Read_Offline_Settings' ) );
} If I'm on settings tab 1, it will only save the settings on that page (i.e. the user must save on each tab page). If I had a method that returned all default settings, I could compare them with the settings saved ( btw, here's a dump of my settings (went through all settings tabs and click the save button to store them): Array
(
[read_offline_epub] => Array
(
[epub] => Array
(
[cover_image] =>
[style_editor] =>
)
)
[read_offline_pdf] => Array
(
[header_footer] => Array
(
[select_mixed] => Array
(
[left] =>
[center] =>
[right] =>
)
[select_footer] => Array
(
[left] =>
[center] =>
[right] =>
)
)
[pdf_watermark] => Array
(
[pdf_watermark_text] =>
[pdf_watermark_image] =>
[pdf_watermark_tranparency] => 0
)
[pdf_protection] => Array
(
[pdf_protection_password_owner] =>
[pdf_protection_password_user] =>
[pdf_protection_can_do] => Array
(
[copy] => 0
[print] => 0
[modify] => 0
)
)
)
[read_offline_options] => Array
(
[what] => Array
(
[formats] => Array
(
[pdf] => 1
[epub] => 1
[mobi] => 1
[docx] => 0
)
)
[where] => Array
(
[placements] => Array
(
[top] => 1
[bottom] => 1
)
[post_types] => Array
(
[post] => 1
[page] => 1
[acf] => 0
[apf_posts] => 0
)
)
[how] => Array
(
[link_text] => Read Offline:
[icons_only] => 0
)
[misc] => Array
(
[google] => 1
)
)
) |
I see. I'll see how it can be achieved. |
…gardless of the page where the user submits the form. * Changed: it to store all added sections and fields into the property object regardless of they belong to currently loading page and with some other conditions. * Added: the getDefaultOptions() method. Resolves #12.
In v3 beta, default option values in other tabs/pages will be merged when the user submit a form in one of the tabs/pages of the framework. The method is |
AdminPageFramework_Properties::getOptions() only get saved settings , I'd like to get the default settings.
The text was updated successfully, but these errors were encountered: