Plugin Directory

Changeset 3469142


Ignore:
Timestamp:
02/25/2026 07:53:03 AM (6 weeks ago)
Author:
ashishajani
Message:

resolved time function filemtime warning

Location:
wp-simple-html-sitemap/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • wp-simple-html-sitemap/trunk/inc/wshs_documentation.php

    r3440922 r3469142  
    66
    77    function wshs_documentation() {
    8         wp_enqueue_style('wshs_front_css', WSHS_PLUGIN_CSS . 'wshs_style.css',array(),filemtime(WSHS_PLUGIN_CSS . 'wshs_style.css'), false);
    9         wp_enqueue_style('wshs_fancybox_css', WSHS_PLUGIN_CSS . 'jquery.fancybox.css',array(),filemtime(WSHS_PLUGIN_CSS . 'jquery.fancybox.css'), false);
    10         wp_enqueue_script('wshs_fancybox_js', WSHS_PLUGIN_JS . 'jquery.fancybox.min.js',array(),filemtime(WSHS_PLUGIN_JS . 'jquery.fancybox.min.js'), true);
     8        //~ wp_enqueue_style('wshs_front_css', WSHS_PLUGIN_CSS . 'wshs_style.css',array(),filemtime(WSHS_PLUGIN_CSS . 'wshs_style.css'), false);
     9        //~ wp_enqueue_style('wshs_fancybox_css', WSHS_PLUGIN_CSS . 'jquery.fancybox.css',array(),filemtime(WSHS_PLUGIN_CSS . 'jquery.fancybox.css'), false);
     10        //~ wp_enqueue_script('wshs_fancybox_js', WSHS_PLUGIN_JS . 'jquery.fancybox.min.js',array(),filemtime(WSHS_PLUGIN_JS . 'jquery.fancybox.min.js'), true);
     11       
     12
     13        $front_css_path     = WSHS_PLUGIN_PATH . 'css/wshs_style.css';
     14        $fancybox_css_path  = WSHS_PLUGIN_PATH . 'css/jquery.fancybox.css';
     15        $fancybox_js_path   = WSHS_PLUGIN_PATH . 'js/jquery.fancybox.min.js';
     16
     17        wp_enqueue_style(
     18            'wshs_front_css',
     19            WSHS_PLUGIN_URL . 'css/wshs_style.css',
     20            array(),
     21            file_exists($front_css_path) ? filemtime($front_css_path) : '1.0',
     22            false
     23        );
     24
     25        wp_enqueue_style(
     26            'wshs_fancybox_css',
     27            WSHS_PLUGIN_URL . 'css/jquery.fancybox.css',
     28            array(),
     29            file_exists($fancybox_css_path) ? filemtime($fancybox_css_path) : '1.0',
     30            false
     31        );
     32
     33        wp_enqueue_script(
     34            'wshs_fancybox_js',
     35            WSHS_PLUGIN_URL . 'js/jquery.fancybox.min.js',
     36            array('jquery'),
     37            file_exists($fancybox_js_path) ? filemtime($fancybox_js_path) : '1.0',
     38            true
     39        );
    1140        ?>
    1241        <div class="wrap wtl-main">
  • wp-simple-html-sitemap/trunk/inc/wshs_front_view.php

    r3440922 r3469142  
    1111
    1212    if (get_option('wshs_disable_plugin_styles') == '0') {
    13         wp_enqueue_style('wshs_front_css', WSHS_PLUGIN_CSS . 'wshs_front_style.css',array(),filemtime(WSHS_PLUGIN_CSS . 'wshs_front_style.css'), false);
     13        //wp_enqueue_style('wshs_front_css', WSHS_PLUGIN_CSS . 'wshs_front_style.css',array(),filemtime(WSHS_PLUGIN_CSS . 'wshs_front_style.css'), false);
     14       
     15       
     16        // Get the absolute path to the CSS file on the server
     17        $css_file = plugin_dir_path( __FILE__ ) . '../css/wshs_front_style.css';
     18
     19        // Check if the file exists to avoid warnings
     20        if ( file_exists( $css_file ) ) {
     21            $css_version = filemtime( $css_file ); // Use file modification time for versioning
     22        } else {
     23            $css_version = false; // fallback if file not found
     24        }
     25
     26        // Enqueue the CSS file
     27        wp_enqueue_style(
     28            'wshs_front_style', // handle
     29            plugins_url( '../css/wshs_front_style.css', __FILE__ ), // URL to CSS
     30            array(), // dependencies
     31            $css_version // version (for cache busting)
     32        );
     33   
     34   
    1435    }
    1536    if (get_option('wshs_disable_plugin_styles') == '1') {
  • wp-simple-html-sitemap/trunk/readme.txt

    r3440922 r3469142  
    66Tested up to: 6.9
    77Requires PHP: 7.4
    8 Stable tag: 3.7
     8Stable tag: 3.8
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    120120
    121121== Changelog ==
     122= 3.8 =
     123* Resolved a warning related to time function
    122124
    123125= 3.7 =
  • wp-simple-html-sitemap/trunk/wordpress_simple_html_sitemap.php

    r3440922 r3469142  
    55 * Description: Using Simple HTML Sitemap plugin, you can add HTML Sitemap anywhere on the website using Shortcode.
    66 * Author: Ashish Ajani
    7  * Version: 3.7
     7 * Version: 3.8
    88 * Author URI: http://freelancer-coder.com/
    99 * License: GPLv2 or later
Note: See TracChangeset for help on using the changeset viewer.