Descripción
4WP Smart Link adds inspector controls and toolbar shortcuts so editors can:
- Attach a custom URL to a Cover block output.
- Use a dynamic “current post” permalink inside Query Loop contexts.
Frontend markup wraps the rendered Cover block in a standards-compliant anchor when a URL resolves.
Frontend markup
When a link is output, the plugin wraps the Cover block with an <a> element:
- Base class:
forwp-smart-link-wrapper - Block modifier (Cover):
forwp-smart-link-wrapper--cover - Machine-readable hint:
data-forwp-smart-link="cover"
Themes may style .forwp-smart-link-wrapper globally or scope overrides per modifier.
Developer / pre-release checklist
Before uploading banners or screenshots:
- Manual QA in the block editor: custom URL, reset, dynamic “Post Link” inside a Query Loop, open-in-new-tab, nofollow / relation field, accessibility label.
- Frontend: confirm
<a>href,relwhen target is_blank, and no empty wrapper when URL resolves empty.
Bloques
Este plugin proporciona 1 bloque.
- 4WP Smart Link Editor extensions for 4WP Smart Link on supported core blocks.
Instalación
- Upload the plugin folder to
wp-content/plugins/or install the ZIP through Plugins Add New. - Activate 4WP Smart Link through the Plugins screen.
FAQ
-
Does this replace native Cover linking?
-
Cover does not provide the same link semantics; 4WP Smart Link layers an
<a>wrapper server-side. -
Does it depend on other 4WP plugins?
-
No. It runs standalone.
-
Will the editor preview match the front end?
-
The link wrapper is applied on the front end only (via
render_block). The block canvas does not wrap Cover in the same<a>, so spacing or theme link styles might differ slightly until you preview the published page. -
Accessibility: card-as-one-link pattern
-
Wrapping the whole Cover in an
<a>is valid when inner blocks do not contain other links or interactive controls. Nested<a>elements are invalid HTML and hurt accessibility—avoid links/buttons inside a Cover that already has Smart Link enabled. -
SEO `rel` when opening in a new tab
-
For
target="_blank"the plugin addsnoopenerandnoreferrertorelif missing, while preserving yournofollowand other tokens.
Reseñas
No hay reseñas para este plugin.
Colaboradores y desarrolladores
«4WP Smart Link» es un software de código abierto. Las siguientes personas han colaborado con este plugin.
ColaboradoresTraduce «4WP Smart Link» a tu idioma.
¿Interesado en el desarrollo?
Revisa el código , echa un vistazo al repositorio SVN o suscríbete al registro de desarrollo por RSS.
Registro de cambios
1.0.0
- Initial release with Cover block support (custom URL, dynamic Query Loop link, toolbar + inspector).
- Documented stable frontend classes (
forwp-smart-link-wrapper+--cover,data-forwp-smart-link); editor usesforwp-smart-link-cover-panel*classes. - Translation template:
languages/4wp-smart-link.pot. - Frontend stylesheet for predictable
:focus-visibleon the link wrapper (assets/forwp-smart-link-frontend.css).