跳转到主要内容

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

在完成对页面速度见解的页面分析后调用的操作

参数:

array result from pagespeed

Return :

void

在文件中:

src/SpeedAnalysis.php 第 111 行

debug_information

添加或修改调试信息。插件或主题可能希望引入自己的调试信息,而不创建额外的管理页面,他们可以利用此过滤器引入自己的部分或向现有部分添加更多数据。核心添加的部分的数组键都是带前缀的对于“wp-”,插件和主题应该使用自己的 slug 作为前缀,既是为了一致性,也是为了避免按键冲突。请注意,数组键用作复制数据的标签。除了可以包含内联 HTML 标记的 $description 之外,所有字符串都应为纯文本(见下文)。

参数:

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

我们是否应该缓存指定的URLTHE滤波器应返回到“缓存”页面或false(如果不应该缓存)

参数:

true Cache the page by defaultstring Url of the page

Return :

boolean

在文件中:

src/Cache/file-page-cache.php 第 152 行