Heray-Was-Here
Server : Apache
System : Linux mail.lomejor.cr 6.8.0-1059-azure #65~22.04.1-Ubuntu SMP Thu May 28 16:59:19 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.2.31
Disable Function : NONE
Directory :  /var/www/condoapp.info/wp-content/plugins/uncache-script/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/condoapp.info/wp-content/plugins/uncache-script/theme-options.php
<?php

defined( 'ABSPATH' ) OR exit;

add_action('admin_menu', 'scu_create_theme_options_page');
add_action('admin_init', 'scu_register_and_build_fields');

function scu_create_theme_options_page() {
   add_options_page('Uncache Script', 'Uncache Script', 'administrator', __FILE__, 'options_page_fn');
}

function scu_register_and_build_fields() {
   
   register_setting('tonjoo_uncache_script', 'tonjoo_uncache_script_version');

}

function options_page_fn() {
?>
   <div id="theme-options-wrap" class="widefat">
      <div class="icon32" id="icon-tools"></div>

      <h2>Uncache Script</h2>
      <p>Just hit the "Uncache Script" button to force your scripts and style to uncache !</p>
      <p><b>*Important : If you use W3Total Cache script/style cache you should disable this plugin </b></p>

      <form id="updateUncache" method="post" action="options.php" enctype="multipart/form-data">

         <?php 

            settings_fields('tonjoo_uncache_script'); 

            do_settings_sections( 'tonjoo_uncache_script' ); 

            $version = get_option('tonjoo_uncache_script_version');

            if(!$version)
            {

               $version = 1;
               $nextVersion = 1;

            }
            else
               $nextVersion = $version +1 ; 

         ?>

         <p>Current Version : <?php echo $version ?> </p>

         <input type='hidden' name='tonjoo_uncache_script_version' value="<?php echo $nextVersion ?>">



         <p class="submit">
            <input name="Submit" type="submit" class="button-primary" value="<?php esc_attr_e('Uncache Script'); ?>" />
         </p>
         <?php 
         
        // if(isset($_GET['act']) && $_GET['act'] == 'update' && !isset($_POST['tonjoo_uncache_script_version'])) { ?>
         
         <script type="text/javascript">
            // jQuery(function() { 
            //    jQuery(".submit input").click();
            // });
         </script>
         
         <?php 

     // } ?>
   </form>
</div>

<?php
}

Hry