Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rafasashi committed Sep 8, 2016
1 parent ada4130 commit 2fc1676
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 11 additions & 4 deletions includes/class-user-session-synchronizer-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ public function add_settings_link ( $links ) {
*/
private function settings_fields () {

$settings['standard'] = array(
'title' => __( 'General Options', 'user-session-synchronizer' ),
$settings['keys'] = array(
'title' => __( 'Keys', 'user-session-synchronizer' ),
'description' => __( 'This plugin uses the user email address as a unique ID to synchronize the session between two wordpress installations.', 'user-session-synchronizer' ),
'fields' => array(
array(
Expand Down Expand Up @@ -198,7 +198,7 @@ private function settings_fields () {

/*
$settings['extra'] = array(
'title' => __( 'Extra', 'user-session-synchronizer' ),
'title' => __( 'Iframes', 'user-session-synchronizer' ),
'description' => __( 'These are some extra input fields that maybe aren\'t as common as the others.', 'user-session-synchronizer' ),
'fields' => array(
array(
Expand Down Expand Up @@ -246,14 +246,19 @@ private function settings_fields () {
* @return void
*/
public function register_settings () {

if ( is_array( $this->settings ) ) {

// Check posted/selected tab
$current_section = '';
if ( isset( $_POST['tab'] ) && $_POST['tab'] ) {

$current_section = $_POST['tab'];
} else {
}
else {

if ( isset( $_GET['tab'] ) && $_GET['tab'] ) {

$current_section = $_GET['tab'];
}
}
Expand All @@ -270,6 +275,7 @@ public function register_settings () {
// Validation callback for field
$validation = '';
if ( isset( $field['callback'] ) ) {

$validation = $field['callback'];
}

Expand All @@ -287,6 +293,7 @@ public function register_settings () {
}

public function settings_section ( $section ) {

$html = '<p> ' . $this->settings[ $section['id'] ]['description'] . '</p>' . "\n";
echo $html;
}
Expand Down
2 changes: 2 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ Installing "User Session Synchronizer" can be done either by searching for "User
1. Download the plugin via WordPress.org
2. Upload the ZIP file through the 'Plugins > Add New > Upload' screen in your WordPress dashboard
3. Activate the plugin through the 'Plugins' menu in WordPress
4. Set your first Secret Key throught the 'User Session Sync > Keys'
5. Repeat this installation process for every Wordpress you wish to sychnorize with the same Secret Key

== Screenshots ==

Expand Down

0 comments on commit 2fc1676

Please sign in to comment.