Comment out testing of groups.
*/
public $groups = array();
+ /**
+ * Array to store previous fields.
+ */
+ public $saveFields = array();
+
/**
* Group Select
*
foreach ( $this->groupSelect as $groupSelected ) {
// Find the group
if ( isset( $this->groups[$groupSelected] ) && $this->groups[$groupSelected] ) {
- // trigger_error( print_r( $this->groups[$groupSelected], true ), E_USER_NOTICE );
+ trigger_error( print_r( $this->groups[$groupSelected], true ), E_USER_NOTICE );
if ( isset( $this->groups[$groupSelected]['fields'] ) && is_array( $this->groups[$groupSelected]['fields'] ) ) {
foreach ( $this->groups[$groupSelected]['fields'] as $fieldKey => $field ) {
- // trigger_error( print_r( $field, true ), E_USER_NOTICE );
+ trigger_error( print_r( $field, true ), E_USER_NOTICE );
$this->fields[] = $this->saveFields[$field['name']];
}
}
}
}
+ reset( $this->fields );
}
}
public function restoreFields()
{
- $this->fields = $this->saveFields;
- // $this->saveFields = false;
+ if ( isset( $this->saveFields ) && is_array( $this->saveFields ) && !empty( $this->saveFields ) ) {
+ $this->fields = $this->saveFields;
+ reset( $this->fields );
+ }
}
}
*/
// Load Members data abstract
-require_once GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/settings/dataSettingsGeneral.php' ;
+require_once GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/settings/dataSettingsGeneral.php';
/*
* This class performs the work for the default action of the "Members" menu
*/
class GlmMembersAdmin_management_index extends GlmDataSettingsGeneral
{
- public $prefixSlugs = array();
+ public $prefixSlugs = array();
public $requiredPages = array();
+ public $groupSelect = array();
/**
* WordPress Database Object
*
jQuery(document).ready(function($) {
- console.log( 'glmApiSettings', glmApiSettings.root );
- $.ajax({
- url: glmApiSettings.root + 'glm/v1/settings',
- method: 'GET',
- beforeSend: function( xhr ) {
- xhr.setRequestHeader( 'X-WP-Nonce', glmApiSettings.nonce );
- }
- }).done( function( response ){
- console.log( response );
- } );
+ // console.log( 'glmApiSettings', glmApiSettings.root );
+ // $.ajax({
+ // url: glmApiSettings.root + 'glm/v1/settings',
+ // method: 'GET',
+ // beforeSend: function( xhr ) {
+ // xhr.setRequestHeader( 'X-WP-Nonce', glmApiSettings.nonce );
+ // }
+ // }).done( function( response ){
+ // console.log( response );
+ // } );
/*
* Edit area tabs