Changeset 992977
- Timestamp:
- 09/19/2014 02:04:48 AM (12 years ago)
- Location:
- protected-posts-logout-button
- Files:
-
- 6 edited
- 1 copied
-
tags/1.3.2 (copied) (copied from protected-posts-logout-button/trunk)
-
tags/1.3.2/logout.js (modified) (1 diff)
-
tags/1.3.2/pplb_logout_button.php (modified) (5 diffs)
-
tags/1.3.2/readme.txt (modified) (2 diffs)
-
trunk/logout.js (modified) (1 diff)
-
trunk/pplb_logout_button.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
protected-posts-logout-button/tags/1.3.2/logout.js
r951684 r992977 6 6 7 7 $.post( pplb_ajax.ajaxurl, data, function( response ) { 8 if( response.log == 1 && typeof console == "object" && typeof console.log != 'undefined'){ 9 console.log( response ); 10 } 8 11 if( response.status == 0 ){ 9 12 // nothing hanppens -
protected-posts-logout-button/tags/1.3.2/pplb_logout_button.php
r951684 r992977 4 4 Plugin URI: http://omfgitsnater.com/protected-posts-logout-button/ 5 5 Description: A plugin built to add a logout button automatically to protected posts. 6 Version: 1.3. 16 Version: 1.3.2 7 7 Author: Nate Reist 8 8 Author URI: http://omfgitsnater.com … … 61 61 $options = get_option('pplb_options'); 62 62 $pplb_alert = (array_key_exists('pplb_alert', $options)) ? $options['pplb_alert'] : 'no'; 63 $log = isset( $options['pplb_debug'] ) ? $options['pplb_debug'] : 0; 63 64 64 65 $response = array( 65 66 'status' => 0, 66 'message' => '' 67 'message' => '', 68 'log' => $log 67 69 ); 68 70 … … 101 103 add_filter( 'post_password_expires','pplb_change_postpass_expires', 10, 1 ); 102 104 103 /* 104 The settings page in admin 105 */ 106 function pplb_settings_page(){ 107 if ( isset( $_POST['pplb_action'] ) ) { 105 add_action( 'admin_init', 'pplb_options_save' ); 106 107 /* 108 Save on admin init 109 */ 110 function pplb_options_save(){ 111 if ( isset( $_POST['pplb_action'] ) ) { 108 112 //update the option. 109 113 $options = array(); 110 114 $options['pplb_alert'] = ( array_key_exists('pplb_alert', $_POST) ) ? $_POST['pplb_alert']: 'no'; 111 115 $options['pplb_message'] = esc_js( $_POST['pplb_message'] ); 116 $options['pplb_debug'] = ( array_key_exists('pplb_debug', $_POST) ) ? $_POST['pplb_debug']: 0; 112 117 $options['pplb_button_class'] = esc_attr($_POST['pplb_button_class']); 113 118 update_option('pplb_options', $options); … … 118 123 $filter = isset($_POST['pplb_button_filter']) ? $_POST['pplb_button_filter']: 'yes'; 119 124 update_option('pplb_button_filter', $filter); 120 } 125 $redirect = add_query_arg( array( 'message' => 1 ) ); 126 wp_redirect( $redirect ); 127 exit(); 128 } 129 } 130 /* 131 The settings page in admin 132 */ 133 function pplb_settings_page(){ 134 121 135 $new_options = get_option('pplb_options'); 136 if ( isset( $_GET['message'] ) && $_GET['message'] == 1 ){ 137 ?> 138 <div class="message updated"> 139 <p>Settings updated</p> 140 </div> 141 <?php 142 } 143 122 144 if ( is_array($new_options ) ) { 123 extract($new_options); 145 146 $pplb_debug = isset( $new_options['pplb_debug'] ) ? $new_options['pplb_debug'] : 0; 147 $pplb_alert = isset( $new_options['pplb_alert'] ) ? $new_options['pplb_alert'] : 0; 148 $pplb_message = isset( $new_options['pplb_message'] ) ? $new_options['pplb_message'] : ''; 149 $pplb_button_class = isset( $new_options['pplb_button_class'] ) ? $new_options['pplb_button_class'] : ''; 150 124 151 } 125 152 ?> … … 133 160 <tr> 134 161 <th><label>Alert user log out was successful?</label></th><td><input type="checkbox" name="pplb_alert" value="yes" <?php checked($pplb_alert, 'yes'); ?> /></td> 162 </tr><tr> 163 <th><label>Turn on console debugging in javascript ( for developers )?</label></th><td><input type="checkbox" name="pplb_debug" value="1" <?php checked($pplb_debug, 1); ?> /></td> 135 164 </tr> 136 165 <tr> -
protected-posts-logout-button/tags/1.3.2/readme.txt
r951684 r992977 4 4 Tags: logout, password protected posts logout button, wordpress security 5 5 Requires at least: 2.8 6 Tested up to: 3.9.17 Stable tag: 1.3. 16 Tested up to: 4.0 7 Stable tag: 1.3.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 51 51 52 52 == Changelog == 53 = 1.3.2 = 54 * Added a optional debug to the send response to the console.log function ( only for debugging use should not be used in production. ) 55 * Added a check to see the `message` is not of type "undefined" 56 * Added an option to the options page for turning on or off debug. 57 * Tested with version 4.0! 53 58 54 59 = 1.3.1 = -
protected-posts-logout-button/trunk/logout.js
r951684 r992977 6 6 7 7 $.post( pplb_ajax.ajaxurl, data, function( response ) { 8 if( response.log == 1 && typeof console == "object" && typeof console.log != 'undefined'){ 9 console.log( response ); 10 } 8 11 if( response.status == 0 ){ 9 12 // nothing hanppens -
protected-posts-logout-button/trunk/pplb_logout_button.php
r951684 r992977 4 4 Plugin URI: http://omfgitsnater.com/protected-posts-logout-button/ 5 5 Description: A plugin built to add a logout button automatically to protected posts. 6 Version: 1.3. 16 Version: 1.3.2 7 7 Author: Nate Reist 8 8 Author URI: http://omfgitsnater.com … … 61 61 $options = get_option('pplb_options'); 62 62 $pplb_alert = (array_key_exists('pplb_alert', $options)) ? $options['pplb_alert'] : 'no'; 63 $log = isset( $options['pplb_debug'] ) ? $options['pplb_debug'] : 0; 63 64 64 65 $response = array( 65 66 'status' => 0, 66 'message' => '' 67 'message' => '', 68 'log' => $log 67 69 ); 68 70 … … 101 103 add_filter( 'post_password_expires','pplb_change_postpass_expires', 10, 1 ); 102 104 103 /* 104 The settings page in admin 105 */ 106 function pplb_settings_page(){ 107 if ( isset( $_POST['pplb_action'] ) ) { 105 add_action( 'admin_init', 'pplb_options_save' ); 106 107 /* 108 Save on admin init 109 */ 110 function pplb_options_save(){ 111 if ( isset( $_POST['pplb_action'] ) ) { 108 112 //update the option. 109 113 $options = array(); 110 114 $options['pplb_alert'] = ( array_key_exists('pplb_alert', $_POST) ) ? $_POST['pplb_alert']: 'no'; 111 115 $options['pplb_message'] = esc_js( $_POST['pplb_message'] ); 116 $options['pplb_debug'] = ( array_key_exists('pplb_debug', $_POST) ) ? $_POST['pplb_debug']: 0; 112 117 $options['pplb_button_class'] = esc_attr($_POST['pplb_button_class']); 113 118 update_option('pplb_options', $options); … … 118 123 $filter = isset($_POST['pplb_button_filter']) ? $_POST['pplb_button_filter']: 'yes'; 119 124 update_option('pplb_button_filter', $filter); 120 } 125 $redirect = add_query_arg( array( 'message' => 1 ) ); 126 wp_redirect( $redirect ); 127 exit(); 128 } 129 } 130 /* 131 The settings page in admin 132 */ 133 function pplb_settings_page(){ 134 121 135 $new_options = get_option('pplb_options'); 136 if ( isset( $_GET['message'] ) && $_GET['message'] == 1 ){ 137 ?> 138 <div class="message updated"> 139 <p>Settings updated</p> 140 </div> 141 <?php 142 } 143 122 144 if ( is_array($new_options ) ) { 123 extract($new_options); 145 146 $pplb_debug = isset( $new_options['pplb_debug'] ) ? $new_options['pplb_debug'] : 0; 147 $pplb_alert = isset( $new_options['pplb_alert'] ) ? $new_options['pplb_alert'] : 0; 148 $pplb_message = isset( $new_options['pplb_message'] ) ? $new_options['pplb_message'] : ''; 149 $pplb_button_class = isset( $new_options['pplb_button_class'] ) ? $new_options['pplb_button_class'] : ''; 150 124 151 } 125 152 ?> … … 133 160 <tr> 134 161 <th><label>Alert user log out was successful?</label></th><td><input type="checkbox" name="pplb_alert" value="yes" <?php checked($pplb_alert, 'yes'); ?> /></td> 162 </tr><tr> 163 <th><label>Turn on console debugging in javascript ( for developers )?</label></th><td><input type="checkbox" name="pplb_debug" value="1" <?php checked($pplb_debug, 1); ?> /></td> 135 164 </tr> 136 165 <tr> -
protected-posts-logout-button/trunk/readme.txt
r951684 r992977 4 4 Tags: logout, password protected posts logout button, wordpress security 5 5 Requires at least: 2.8 6 Tested up to: 3.9.17 Stable tag: 1.3. 16 Tested up to: 4.0 7 Stable tag: 1.3.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 51 51 52 52 == Changelog == 53 = 1.3.2 = 54 * Added a optional debug to the send response to the console.log function ( only for debugging use should not be used in production. ) 55 * Added a check to see the `message` is not of type "undefined" 56 * Added an option to the options page for turning on or off debug. 57 * Tested with version 4.0! 53 58 54 59 = 1.3.1 =
Note: See TracChangeset
for help on using the changeset viewer.