Git Product home page Git Product logo

autover's Introduction

Autover

Build Status

Description

Autover plugin will automatically version your CSS and JS files in the generated html page (e.g. style.css?ver=1359464809).

Installation

To install from github, you only need the src directory.

git clone [email protected]:Presslabs/autover
cd autover
cp -r src /path/to/site/wp-content/plugins/autover

autover's People

Contributors

cristianuibar avatar krodyrobi avatar pdobrescu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

autover's Issues

[feature] Avoid versioning remote libraries

As requested on https://wordpress.org/support/topic/feature-idea-avoid-versioning-remote-libraries/

Quote:

I’ve noticed that the plugin doesn’t remove the (wordpress default?) ?ver=4.9.6 from remote urls, like Google Fonts, jQuery, and so on.

I think that’s because it doesn’t find anything local to get filemtime for, so it throws up hands and returns without changing the src.

It’s possible that without this ?ver= param, loading from a canonical source, a viewer browser could have some libraries already in cache from another site. a mild perf boost.

Adding the following line to the top of the autover_version_filter function fixes this behavior, so that if it can’t find the file locally, it gets no ?ver= param at all.


	$src = remove_query_arg( 'ver', $src );
Arguably a defect in wp core, not autover, but seems like a nice opportunity to make this plugin even better…

Thanks,
Chris

Undefined variable: filetype

Using a local instance with autover installed this notice appeared:
Notice: Undefined variable: filetype in /vagrant/wp-content/plugins/autover/autover.php on line 134

Undefined variable: filetype

Getting this Notice when accessing the Gitium/commits page:

PHP Notice: Undefined variable: filetype in /www/wp-content/plugins/autover/autover.php on line 197 when calling autover_version_filter(), request: GET /wp-admin/admin.php?page=gitium/gitium-commits.php, request_id: b886268f9382083fbf7e23e2db1bef44

Better explain the examples from the plugin page

We need to explain that

add_action('wp_enqueue_scripts','autover_add_style_and_script');

adds the scripts and styles to the frontend and

add_action('admin_enqueue_scripts','autover_add_style_and_script');

adds the scripts and styles to wp-admin.

Some users tend to simply copy paste the examples without checking the entire code and they end up with weird styles on wp-admin.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.