frozzare/wp-glide 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

frozzare/wp-glide

最新稳定版本:v1.0.0

Composer 安装命令:

composer require frozzare/wp-glide

包简介

Simple integration of Glide with WordPress

README 文档

README

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

统计信息

  • 总下载量: 5.25k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 18
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 18
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-03-12