Changeset 992985
- Timestamp:
- 09/19/2014 02:33:22 AM (12 years ago)
- Location:
- protected-posts-logout-button
- Files:
-
- 2 edited
- 4 copied
-
tags/1.3.2.1 (copied) (copied from protected-posts-logout-button/trunk)
-
tags/1.3.2.1/logout.js (copied) (copied from protected-posts-logout-button/trunk/logout.js)
-
tags/1.3.2.1/pplb_logout_button.php (copied) (copied from protected-posts-logout-button/trunk/pplb_logout_button.php) (4 diffs)
-
tags/1.3.2.1/readme.txt (copied) (copied from protected-posts-logout-button/trunk/readme.txt) (2 diffs)
-
trunk/pplb_logout_button.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
protected-posts-logout-button/tags/1.3.2.1/pplb_logout_button.php
r992977 r992985 84 84 */ 85 85 function pplb_logout_js(){ 86 wp_register_script( 'pplb_logout_js', plugins_url( '/logout.js', __FILE__ ), array('jquery'), null );86 wp_register_script( 'pplb_logout_js', plugins_url( '/logout.js', __FILE__ ), array('jquery'), null, true ); 87 87 wp_enqueue_script( 'pplb_logout_js' ); 88 88 wp_localize_script( 'pplb_logout_js', 'pplb_ajax', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ) ); … … 94 94 function pplb_change_postpass_expires( $expire ){ 95 95 $new_expire = get_option( 'pplb_pass_expires', false ); 96 if ( $new_expire !== false ){96 if ( $new_expire !== false && is_numeric( $new_expire ) ) { 97 97 return time() + $new_expire; 98 98 } 99 else {99 else { 100 100 return $expire; 101 101 } … … 118 118 update_option('pplb_options', $options); 119 119 120 $expire = ( isset( $_POST['pplb_pass_expires'] ) && $_POST['pplb_pass_expires'] != '') ? $_POST['pplb_pass_expires']: false;120 $expire = ( isset( $_POST['pplb_pass_expires'] ) && !empty( $_POST['pplb_pass_expires'] ) ) ? $_POST['pplb_pass_expires']: false; 121 121 update_option('pplb_pass_expires', $expire ); 122 122 … … 160 160 <tr> 161 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> 162 </tr> 163 <tr> 164 <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> 164 165 </tr> 165 166 <tr> -
protected-posts-logout-button/tags/1.3.2.1/readme.txt
r992977 r992985 5 5 Requires at least: 2.8 6 6 Tested up to: 4.0 7 Stable tag: 1.3.2 7 Stable tag: 1.3.2.1 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.1 = 54 * Moving javascript to footers 55 * Checking to see if logout cookie option is numeric 56 53 57 = 1.3.2 = 54 58 * Added a optional debug to the send response to the console.log function ( only for debugging use should not be used in production. ) -
protected-posts-logout-button/trunk/pplb_logout_button.php
r992977 r992985 84 84 */ 85 85 function pplb_logout_js(){ 86 wp_register_script( 'pplb_logout_js', plugins_url( '/logout.js', __FILE__ ), array('jquery'), null );86 wp_register_script( 'pplb_logout_js', plugins_url( '/logout.js', __FILE__ ), array('jquery'), null, true ); 87 87 wp_enqueue_script( 'pplb_logout_js' ); 88 88 wp_localize_script( 'pplb_logout_js', 'pplb_ajax', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ) ); … … 94 94 function pplb_change_postpass_expires( $expire ){ 95 95 $new_expire = get_option( 'pplb_pass_expires', false ); 96 if ( $new_expire !== false ){96 if ( $new_expire !== false && is_numeric( $new_expire ) ) { 97 97 return time() + $new_expire; 98 98 } 99 else {99 else { 100 100 return $expire; 101 101 } … … 118 118 update_option('pplb_options', $options); 119 119 120 $expire = ( isset( $_POST['pplb_pass_expires'] ) && $_POST['pplb_pass_expires'] != '') ? $_POST['pplb_pass_expires']: false;120 $expire = ( isset( $_POST['pplb_pass_expires'] ) && !empty( $_POST['pplb_pass_expires'] ) ) ? $_POST['pplb_pass_expires']: false; 121 121 update_option('pplb_pass_expires', $expire ); 122 122 … … 160 160 <tr> 161 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> 162 </tr> 163 <tr> 164 <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> 164 165 </tr> 165 166 <tr> -
protected-posts-logout-button/trunk/readme.txt
r992977 r992985 5 5 Requires at least: 2.8 6 6 Tested up to: 4.0 7 Stable tag: 1.3.2 7 Stable tag: 1.3.2.1 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.1 = 54 * Moving javascript to footers 55 * Checking to see if logout cookie option is numeric 56 53 57 = 1.3.2 = 54 58 * Added a optional debug to the send response to the console.log function ( only for debugging use should not be used in production. )
Note: See TracChangeset
for help on using the changeset viewer.