Changeset 2144119
- Timestamp:
- 08/23/2019 12:08:17 AM (7 years ago)
- Location:
- cache-control
- Files:
-
- 6 edited
- 1 copied
-
tags/2.2.5 (copied) (copied from cache-control/trunk)
-
tags/2.2.5/admin.php (modified) (5 diffs)
-
tags/2.2.5/cache-control.php (modified) (1 diff)
-
tags/2.2.5/readme.txt (modified) (2 diffs)
-
trunk/admin.php (modified) (5 diffs)
-
trunk/cache-control.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cache-control/tags/2.2.5/admin.php
r2143899 r2144119 1 1 <?php 2 2 3 if ( !defined('ABSPATH') || !is_admin() || !current_user_can('manage_options')) {3 if ( !defined('ABSPATH') || !is_admin() ) { 4 4 header( 'HTTP/1.1 403 Forbidden' ); 5 5 exit( 'HTTP/1.1 403 Forbidden' ); … … 28 28 29 29 function cache_control_add_options_submenu_page() { 30 if ( !current_user_can('manage_options') ) 31 return; 32 30 33 add_submenu_page( 31 34 'options-general.php', // append to Settings sub-menu … … 69 72 70 73 function cache_control_options_page() { 74 if ( !current_user_can('manage_options') ) 75 return; 76 71 77 global $cache_control_options; 72 78 if ( ! isset( $_REQUEST['settings-updated'] ) ) … … 75 81 <div class="wrap"> 76 82 <h2><?php echo esc_html( get_admin_page_title() ); ?></h2> 77 <?php if ( isset( $_POST ) && count( $_POST ) > 11 && wp_verify_nonce( $_POST['nonce'], 'cache_control_update_settings') ) {83 <?php if ( isset( $_POST ) && count( $_POST ) > 11 && wp_verify_nonce( $_POST['nonce'], 'cache_control_update_settings') ) { 78 84 foreach ($cache_control_options as $key => $option) { 79 85 $option_keys = array( 'cache_control_' . $option['id'] . '_max_age', … … 126 132 </table> 127 133 <br/> 128 <input type="hidden" value="<?php print( wp_create_nonce('cache_control_update_settings')); ?>" type="hidden" name="nonce"/>134 <input type="hidden" value="<?php print( wp_create_nonce('cache_control_update_settings') ); ?>" type="hidden" name="nonce"/> 129 135 <input type="submit" value="Save" class="button-primary"> 130 136 <?php if ( isset( $_POST ) && count( $_POST ) > 10 ) { ?><p style="color:green;display:inline;margin-left: 16px;">Saved.</p> <?php } ?> -
cache-control/tags/2.2.5/cache-control.php
r2143903 r2144119 396 396 397 397 398 if ( is_admin() ) 398 function cache_control_add_admin_page() { 399 if ( is_admin() ) 399 400 require_once( dirname(__file__) . '/admin.php' ); 400 401 } 402 403 add_action( 'init', 'cache_control_add_admin_page' ); -
cache-control/tags/2.2.5/readme.txt
r2144069 r2144119 4 4 Requires at least: 4.4.1 5 5 Tested up to: 5.0.2 6 Stable tag: 2.2. 46 Stable tag: 2.2.5 7 7 Donate link: https://flattr.com/domain/daniel.priv.no 8 8 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 78 78 == Changelog == 79 79 80 = 2.2.5 = 81 82 * Fix an issue an with how the plugin gets loaded in some situations. 83 80 84 = 2.2.4 = 81 85 -
cache-control/trunk/admin.php
r2143899 r2144119 1 1 <?php 2 2 3 if ( !defined('ABSPATH') || !is_admin() || !current_user_can('manage_options')) {3 if ( !defined('ABSPATH') || !is_admin() ) { 4 4 header( 'HTTP/1.1 403 Forbidden' ); 5 5 exit( 'HTTP/1.1 403 Forbidden' ); … … 28 28 29 29 function cache_control_add_options_submenu_page() { 30 if ( !current_user_can('manage_options') ) 31 return; 32 30 33 add_submenu_page( 31 34 'options-general.php', // append to Settings sub-menu … … 69 72 70 73 function cache_control_options_page() { 74 if ( !current_user_can('manage_options') ) 75 return; 76 71 77 global $cache_control_options; 72 78 if ( ! isset( $_REQUEST['settings-updated'] ) ) … … 75 81 <div class="wrap"> 76 82 <h2><?php echo esc_html( get_admin_page_title() ); ?></h2> 77 <?php if ( isset( $_POST ) && count( $_POST ) > 11 && wp_verify_nonce( $_POST['nonce'], 'cache_control_update_settings') ) {83 <?php if ( isset( $_POST ) && count( $_POST ) > 11 && wp_verify_nonce( $_POST['nonce'], 'cache_control_update_settings') ) { 78 84 foreach ($cache_control_options as $key => $option) { 79 85 $option_keys = array( 'cache_control_' . $option['id'] . '_max_age', … … 126 132 </table> 127 133 <br/> 128 <input type="hidden" value="<?php print( wp_create_nonce('cache_control_update_settings')); ?>" type="hidden" name="nonce"/>134 <input type="hidden" value="<?php print( wp_create_nonce('cache_control_update_settings') ); ?>" type="hidden" name="nonce"/> 129 135 <input type="submit" value="Save" class="button-primary"> 130 136 <?php if ( isset( $_POST ) && count( $_POST ) > 10 ) { ?><p style="color:green;display:inline;margin-left: 16px;">Saved.</p> <?php } ?> -
cache-control/trunk/cache-control.php
r2143903 r2144119 396 396 397 397 398 if ( is_admin() ) 398 function cache_control_add_admin_page() { 399 if ( is_admin() ) 399 400 require_once( dirname(__file__) . '/admin.php' ); 400 401 } 402 403 add_action( 'init', 'cache_control_add_admin_page' ); -
cache-control/trunk/readme.txt
r2144069 r2144119 4 4 Requires at least: 4.4.1 5 5 Tested up to: 5.0.2 6 Stable tag: 2.2. 46 Stable tag: 2.2.5 7 7 Donate link: https://flattr.com/domain/daniel.priv.no 8 8 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 78 78 == Changelog == 79 79 80 = 2.2.5 = 81 82 * Fix an issue an with how the plugin gets loaded in some situations. 83 80 84 = 2.2.4 = 81 85
Note: See TracChangeset
for help on using the changeset viewer.