定制 humanmade/replace-files 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

humanmade/replace-files

最新稳定版本:1.0.0

Composer 安装命令:

composer require humanmade/replace-files

包简介

Plugin which allows you to upload a replacement for an existing attachment.

README 文档

README

This plugin allows you to upload a replacement for an existing attachment.

Cache Busting

Replacements use the same filename as the original, allowing existing links to continue working. However, this may require busting the cache to expose the new image. You can use the replace_files.merge_replacement.replaced action to handle this:

add_action( 'replace_files.merge_replacement.replaced', function ( $post_id ) {
	// Purge the server's cache.
	wp_remote_request( wp_get_attachment_url( $post_id ), [
		'method' => 'PURGE',
	]);
});

统计信息

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

GitHub 信息

  • Stars: 7
  • Watchers: 22
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2023-10-05