| 开发者 | piftoworks |
|---|---|
| 更新时间 | 2026年6月9日 17:22 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
-10 to tighten the gap)#id#id#id) raises specificity to 0-3-0-0, beating typical theme selectors.!important is added on every declaration as a second line of defense.wp_footer at priority 9999, so they load after all other styles.!important would override @media rules).
Responsive breakpoints
widget-spacing-control folder to /wp-content/plugins/, or install via the Plugins screen in WordPress.It targets the classic widget system that uses in_widget_form and dynamic_sidebar_params. Block widgets in FSE themes are not the target use case.
No. The plugin uses inline styles, a high-specificity selector, and late-loaded <style> output, so it overrides theme CSS in all common cases.
No. The plugin only saves margin values (integers) in the widget instance options. No personal data is collected or transmitted.
Inside each widget's instance settings (under WordPress's standard widget_* options), with keys wsc_mt_pc, wsc_mt_sp, wsc_mb_pc, wsc_mb_sp.
pft-widget-spacing-control text domain. English source strings; translations welcome at https://translate.wordpress.org/projects/wp-plugins/pft-widget-spacing-control/wp_register_style() / wp_enqueue_style() and attached via wp_add_inline_style() (instead of being echoed directly).wp_enqueue_scripts by iterating widget instances, eliminating the prior wp_footer echo and the global variable used to accumulate styles.pftwsc_ prefix (Pifto Works WSC).dynamic_sidebar_params filter is now used only to inject id="{widget_id}" into widget HTML when the active theme does not provide one (so the precomputed selectors match).!important styles overrode @media rules. Inline style injection has been removed; styles are now applied exclusively via the #id#id#id !important selector inside <style>, so PC and mobile values work independently as intended.esc_html() to satisfy WordPress output-escaping standards.Requires at least / Tested up to headersesc_attr()!important for stronger CSS specificitywp_footer at priority 9999