woof-print-content-before-redraw-zone
woof_print_content_before_redraw_zone
允许在AJAX过滤时,在重绘区域之前输出任意HTML内容。
Parameters
$content (string) — 默认为空字符串
Source File
views/woof.php
Code Example
add_filter('woof_print_content_before_redraw_zone', function($content) {
// Show a loading indicator before products redraw
return '' . esc_html__('Updating results...', 'woocommerce-products-filter') . '
';
});
Usage Notes
- 将此代码添加到您的主题的
functions.php文件或自定义插件中。 - 此hook在过滤过程中应用 — 更改会立即生效。
- 始终从回调函数返回预期值类型。