WP Speed Of Light 开发者文档
本文档将帮助经验丰富的开发者将其他服务与我们的插件集成。以下是此插件的所有操作和过滤器,如果您需要更多信息,请随时在 专属论坛上提问。 感谢您使用我们的插件!
wpsol_clean_database
按类型清理数据库
参数:
string Type of database object cleaned (revisions, drafted, trash, comments, trackbacks, transient)
Return :
void
在文件中:
src/WpsolDatabaseCleanup.php 第 46 行
wpsol_purge_cache
缓存完全清除后执行的操作
参数:
array Extra informations, origine of clear call, total cache cleared
Return :
void
在文件中:
src/Cache/CleanCacheTime.php 第 119 行src/Configuration.php 第 221 行src/SpeedOptimization.php 第 226 行
wpsol_retrieve_page_analysis
在 WP Speed Of Light完成页面分析并处理页面洞察后,会调用此操作。
参数:
array Analysis result
Return :
void
在文件中:
src/SpeedAnalysis.php 第 214 行
wpsol_retrieve_raw_page_analysis
在 PageSpeed Insights 完成页面分析后调用的操作
参数:
array result from pagespeed
Return :
void
在文件中:
src/SpeedAnalysis.php 第 111 行
调试信息
添加或修改调试信息。插件或主题可能希望在不创建额外管理页面的情况下引入自己的调试信息——它们可以使用此过滤器来添加自己的部分或向现有部分添加更多数据。核心添加的部分的数组键均以 `wp-` 为前缀,插件和主题应使用自己的别名作为前缀,这样既能保持一致性,又能避免键冲突。请注意,数组键用作复制数据的标签。除 `$description` 可以包含内联 HTML 标签(见下文)外,所有字符串都应为纯文本。.
参数:
array $info Information
Return :
void
在文件中:
jufeedback/ju-check-debug-data.php 第 1075 行
wpsol_addon_do_defer_inline_script
WPSOL 延迟内联脚本
参数:
none
Return :
void
在文件中:
src/Minification/Scripts.php 第 604 行src/Minification/Scripts.php 第 641 行
wpsol_addon_do_defer_inline_script
WPSOL 延迟内联脚本
参数:
none
Return :
void
在文件中:
src/Minification/Scripts.php 第 604 行src/Minification/Scripts.php 第 641 行
wpsol_before_cache
在将 HTML 内容放入缓存文件之前对其进行过滤。您可以在页面内容保存到缓存文件之前对其进行修改。
参数:
string Content of page
Return :
string
在文件中:
src/Cache/file-page-cache.php 第 230 行
wpsol_cache_delayed
启用延迟缓存的过滤器
参数:
boolean
Return :
void
在文件中:
src/Minification/Cache.php 第 57 行
wpsol_cache_nogzip
启用缓存 nogzip 的过滤器
参数:
boolean
Return :
void
在文件中:
src/Minification/Cache.php 第 63 行
wpsol_cache_purge_interval
设置自动运行缓存清理器的时间间隔。.
参数:
integer Html raw and header
Return :
integer
在文件中:
src/Cache/CleanCacheTime.php 第 88 行
wpsol_css_inline_do_minify
我们是否应该压缩指定的内联 CSS 内容
参数:
true Default valuestring Css content
Return :
boolean
在文件中:
src/Minification/Styles.php 第 128 行
wpsol_css_inline_max_size
应用 CSS 内联尺寸过滤器
参数:
string wpsol_css_inline_max_sizeinteger Default value
Return :
integer
在文件中:
src/Minification/Styles.php 第 141 行
wpsol_css_url_do_minify
应用过滤器以允许或不允许压缩 CSS URL
参数:
boolean Default check minify valuestring Style url
Return :
boolean|string
在文件中:
src/Minification/Styles.php 第 347 行
wpsol_html_after_cdn
在 CDN 替换后过滤新的 HTML 内容。
参数:
string New html
Return :
string
在文件中:
src/Cdn/Rewrite.php 第 120 行
wpsol_html_do_minify
我们是否应该压缩指定的内联 HTML 内容
参数:
true Minify by default the contentstring Html content
Return :
boolean
在文件中:
src/Minification/Html.php 第 68 行
wpsol_html_minification_exclude_string
应用过滤器以添加要从 HTML 压缩中排除的字符串
参数:
array Default value
Return :
array
在文件中:
src/Minification/Html.php 第 47 行
wpsol_manage_options_capability
筛选功能和角色以显示菜单。.
参数:
string Capability name
Return :
string
在文件中:
src/Admin.php 第 82 行
wpsol_page_url_do_cache
我们是否应该缓存指定的 URL?过滤器应返回 true 以缓存页面,返回 false 则表示不应缓存。
参数:
true Cache the page by defaultstring Url of the page
Return :
boolean
在文件中:
src/Cache/file-page-cache.php 第 152 行
