Giter Site home page Giter Site logo

glide's Introduction

WP Glide

No Maintenance Intended

Simple integration of Glide with WordPress.

Installation

composer require frozzare/wp-glide

Documentation

Default url path is /img/. So just change /wp-content/uploads/ to /img/ to use Glide.

For example:

Before: http://local.wordpress.dev/wp-content/uploads/2015/11/stf01381_1600x800.jpg
After:  http://local.wordpress.dev/img/2015/11/stf01381_1600x800.jpg

You can change the upload url path with pre_option_upload_url_path filter.

add_filter( 'pre_option_upload_url_path', function () {
  return site_url( '/img' );
} );

The base path can be changed with glide/base_url filter. To change any options for Glide you can do it with glide/options filter. The default options in WP Glide is:

'source'   => WP_CONTENT_DIR . '/uploads',
'cache'    => WP_CONTENT_DIR . '/cache/glide',
'base_url' => '/img/'

For more options see Glide setup.

Coding style

You can check if your contribution passes the styleguide by installing PHP CodeSniffer and running the following in your WP Glide directory:

vendor/bin/phpcs -s --extensions=php --standard=phpcs.xml src/

License

MIT © Fredrik Forsmo

glide's People

Contributors

frozzare avatar brumgb avatar

Watchers

Ian Bromwich avatar

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.