Plugin Directory

Changeset 2144119


Ignore:
Timestamp:
08/23/2019 12:08:17 AM (7 years ago)
Author:
geekysoft
Message:

Tag version 2.2.5

Location:
cache-control
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • cache-control/tags/2.2.5/admin.php

    r2143899 r2144119  
    11<?php
    22
    3 if ( !defined('ABSPATH') || !is_admin() || !current_user_can('manage_options')) {
     3if ( !defined('ABSPATH') || !is_admin() ) {
    44    header( 'HTTP/1.1 403 Forbidden' );
    55    exit(   'HTTP/1.1 403 Forbidden' );
     
    2828
    2929function cache_control_add_options_submenu_page() {
     30    if ( !current_user_can('manage_options') )
     31        return;
     32
    3033    add_submenu_page(
    3134        'options-general.php',        // append to Settings sub-menu
     
    6972
    7073function cache_control_options_page() {
     74    if ( !current_user_can('manage_options') )
     75        return;
     76
    7177    global $cache_control_options;
    7278    if ( ! isset( $_REQUEST['settings-updated'] ) )
     
    7581     <div class="wrap">
    7682           <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') ) {
    7884              foreach ($cache_control_options as $key => $option) {
    7985                  $option_keys = array( 'cache_control_' . $option['id'] . '_max_age',
     
    126132                              </table>
    127133                              <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"/>
    129135                              <input type="submit" value="Save" class="button-primary">
    130136                              <?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  
    396396
    397397
    398 if ( is_admin() )
     398function cache_control_add_admin_page() {
     399  if ( is_admin() )
    399400    require_once( dirname(__file__) . '/admin.php' );
    400 
     401}
     402
     403add_action( 'init', 'cache_control_add_admin_page' );
  • cache-control/tags/2.2.5/readme.txt

    r2144069 r2144119  
    44Requires at least: 4.4.1
    55Tested up to: 5.0.2
    6 Stable tag: 2.2.4
     6Stable tag: 2.2.5
    77Donate link: https://flattr.com/domain/daniel.priv.no
    88License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    7878== Changelog ==
    7979
     80= 2.2.5 =
     81
     82* Fix an issue an with how the plugin gets loaded in some situations.
     83
    8084= 2.2.4 =
    8185
  • cache-control/trunk/admin.php

    r2143899 r2144119  
    11<?php
    22
    3 if ( !defined('ABSPATH') || !is_admin() || !current_user_can('manage_options')) {
     3if ( !defined('ABSPATH') || !is_admin() ) {
    44    header( 'HTTP/1.1 403 Forbidden' );
    55    exit(   'HTTP/1.1 403 Forbidden' );
     
    2828
    2929function cache_control_add_options_submenu_page() {
     30    if ( !current_user_can('manage_options') )
     31        return;
     32
    3033    add_submenu_page(
    3134        'options-general.php',        // append to Settings sub-menu
     
    6972
    7073function cache_control_options_page() {
     74    if ( !current_user_can('manage_options') )
     75        return;
     76
    7177    global $cache_control_options;
    7278    if ( ! isset( $_REQUEST['settings-updated'] ) )
     
    7581     <div class="wrap">
    7682           <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') ) {
    7884              foreach ($cache_control_options as $key => $option) {
    7985                  $option_keys = array( 'cache_control_' . $option['id'] . '_max_age',
     
    126132                              </table>
    127133                              <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"/>
    129135                              <input type="submit" value="Save" class="button-primary">
    130136                              <?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  
    396396
    397397
    398 if ( is_admin() )
     398function cache_control_add_admin_page() {
     399  if ( is_admin() )
    399400    require_once( dirname(__file__) . '/admin.php' );
    400 
     401}
     402
     403add_action( 'init', 'cache_control_add_admin_page' );
  • cache-control/trunk/readme.txt

    r2144069 r2144119  
    44Requires at least: 4.4.1
    55Tested up to: 5.0.2
    6 Stable tag: 2.2.4
     6Stable tag: 2.2.5
    77Donate link: https://flattr.com/domain/daniel.priv.no
    88License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    7878== Changelog ==
    7979
     80= 2.2.5 =
     81
     82* Fix an issue an with how the plugin gets loaded in some situations.
     83
    8084= 2.2.4 =
    8185
Note: See TracChangeset for help on using the changeset viewer.