• i use code like this to write the style.css link

    wp_register_style('style-css', get_template_directory_uri() . '/style.css', filemtime( get_template_directory() . '/style.css' ), false, null);
    wp_enqueue_style('style-css');

    it outputs this
    <link rel='stylesheet' id='style-css-css' href='https://www.website.com/wp-content/themes/themename/style.css?ver=4.6.1' type='text/css' media='all' />

    In fact, when I view source, I see that my wordpress version number is used as the version for several things including:

    URL/wp-includes\/js\/wp-emoji-release.min.js?ver=4.6.1″}};
    <script type=’text/javascript’ src=’https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js?ver=4.6.1′></script&gt;
    URL/wp-includes/js/comment-reply.min.js?ver=4.6.1′></script>
    URL/wp-includes/js/wp-embed.min.js?ver=4.6.1′></script>

    any idea why my wordpress version # is being inserted instead of the filemtime?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘style.css and filemtime for versioning’ is closed to new replies.