توضیحات
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.
بلوکها
این افزونه 1 بلوک ارائه میدهد.
- 4WP Smart Link Editor extensions for 4WP Smart Link on supported core blocks.
نصب
- Upload the plugin folder to
wp-content/plugins/or install the ZIP through Plugins Add New. - Activate 4WP Smart Link through the Plugins screen.
سوالات متداول
-
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.
نقد و بررسیها
نقد و بررسیای برای این افزونه یافت نشد.
توسعه دهندگان و همکاران
“4WP Smart Link” نرم افزار متن باز است. افراد زیر در این افزونه مشارکت کردهاند.
مشارکت کنندگانترجمه “4WP Smart Link” به زبان شما.
علاقه مند به توسعه هستید؟
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
گزارش تغییرات
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).