Class WPDA_Settings

The following plugin settings are supported through this class, each having its own tab:

  • Back-end Settings
  • Front-end Settings
  • Data Publisher Settings
  • Data Backup Settings
  • Uninstall Settings
  • Manage Repository

All tabs have the following similar structure:

  • If form was posted save options (show success or error message)
  • Read options
  • Show form with options for selected tab

Tabs Back-end Settings, Front-end Settings, Data Backup Settings and Uninstall Settings have reset buttons. When the reset button on a specific tab is clicked, the default values for the settings on that tab are taken from WPDA and stored in $pwdb->options.

When the users clicks on tab Manage Repository, the repository is validated and the status of the repository is shown. If the repository has errors, a button is offered to recreate the repository.

author Peter Schulz
since 1.0.0
package WPDataAccess\Settings

 Methods

WPDA_Settings constructor

__construct() 

Member $this->tabs is filled in the constructor to support i18n.

If a request was send for recreation of the repository, this is done in the constructor. This action must be performed before checking the user menu model, which is part of the constructor as well, necessary to inform the user if any errors were reported.

since 1.0.0

Add content to page

add_content() 
since 1.0.0

Add back-end tab content

add_content_backend() 

See class documentation for flow explanation.

since 1.0.0

Add data backup tab content

add_content_databackup() 

See class documentation for flow explanation.

since 2.0.7

Add data publisher tab content

add_content_datapublisher() 

See class documentation for flow explanation.

since 2.0.15

Add front-end tab content

add_content_frontend() 

See class documentation for flow explanation.

since 1.0.0

add_content_plugin()

add_content_plugin() 

Add repository tab content

add_content_repository() 

See class documentation for flow explanation.

since 1.0.0

Add roles tab content

add_content_roles() 

See class documentation for flow explanation.

since 2.7.0

Add system info tab content

add_content_system() 

See class documentation for flow explanation.

since 2.0.13

Add uninstall tab content

add_content_uninstall() 

See class documentation for flow explanation.

since 1.0.0

Add tabs to page

add_tabs() 
since 1.0.0

 Properties

 

Current tab name

$current_tab : string

Default

 

Menu slug of the current page

$page : string

Default

 

Available tabs on the page

$tabs : array

Default

 

Reference to wpda import object

$wpda_import : \WPDataAccess\Utilities\WPDA_Import

Default

 Constants

 

DROPBOX_CLIENT_ID

DROPBOX_CLIENT_ID = 'f6e7znb7qfwaqjh' 
 

DROPBOX_CLIENT_SECRET

DROPBOX_CLIENT_SECRET = '0vzaidexrtcede4' 
 

FRONTEND_LANG

FRONTEND_LANG = array('Afrikaans', 'Albanian', 'Amharic', 'Arabic', 'Armenian', 'Azerbaijan', 'Bangla', 'Basque', 'Belarusian', 'Bulgarian', 'Catalan', 'Chinese', 'Chinese-traditional', 'Croatian', 'Czech', 'Danish', 'Dutch', 'English', 'Esperanto', 'Estonian', 'Filipino', 'Finnish', 'French', 'Galician', 'Georgian', 'German', 'Greek', 'Gujarati', 'Hebrew', 'Hindi', 'Hungarian', 'Icelandic', 'Indonesian', 'Indonesian-Alternative', 'Irish', 'Italian', 'Japanese', 'Kazakh', 'Khmer', 'Korean', 'Kurdish', 'Kyrgyz', 'Lao', 'Latvian', 'Lithuanian', 'Macedonian', 'Malay', 'Mongolian', 'Nepali', 'Norwegian-Bokmal', 'Norwegian-Nynorsk', 'Pashto', 'Persian', 'Polish', 'Portuguese', 'Portuguese-Brasil', 'Romanian', 'Russian', 'Serbian', 'Serbian_latin', 'Sinhala', 'Slovak', 'Slovenian', 'Spanish', 'Swahili', 'Swedish', 'Tajik', 'Tamil', 'telugu', 'Thai', 'Turkish', 'Ukrainian', 'Urdu', 'Uzbek', 'Vietnamese', 'Welsh')