| 开发者 | webdevramyash |
|---|---|
| 更新时间 | 2026年8月23日 12:19 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[rwrpt_recent_post] shortcoderw-recent-post folder to /wp-content/plugins/.[rwrpt_recent_post title="Recent Product" posted_date="false" number_of_post=10 post_type="product" view_style="list"]
title — Heading of the listing.posted_date — Show/hide the date (true/false).number_of_post — Number of posts to display (1–100).post_type — Any registered post type slug.view_style — grid, list, carousel, or omit for a simple bulleted list.columns — Number of grid columns: 2, 3, or 4 (grid view only).excerpt_length — Number of words in the excerpt, 0 to hide it (0–100).show_image — Show/hide the featured image (true/false).carousel_nav — Show/hide the carousel's prev/next navigation arrows (true/false, carousel view only).carousel_pagination — Show/hide the carousel's clickable pagination bullets (true/false, carousel view only).thumbnail setting (Settings → Media), which isn't the same dimensions or aspect ratio on every WordPress install — a site with a square or unusually-shaped thumbnail setting produced a visibly different, sometimes broken-looking layout than the site the plugin was built against.object-fit: cover, applied identically across all three view styles via one shared rule — so the layout looks the same regardless of what any given site's thumbnail setting produces.width/height HTML attributes (fetched via wp_get_attachment_image_src()) so the browser can reserve the correct space before the image loads, reducing layout shift — separate from, and in addition to, the fixed-ratio display box above.Failed to execute 'getComputedStyle' ... parameter 1 is not of type 'Element' on the live front end (not just the editor). Root cause: Swiper requires its .rwrpt-swiper-wrapper element to be a direct child of the element it's initialized on (it looks it up via element.children, not a deep query). The 2.5.0 fix for the "peeking slide" bug nested the wrapper one level deeper (inside a new .rwrpt-swiper-track element) without updating which element gets handed to Swiper, so Swiper could no longer find its own wrapper and crashed on the first style read it tried to do. Swiper is now correctly initialized on the track element itself. Verified against the real Swiper 14.1.0 bundle in a real DOM (not just code review) before shipping this fix.Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element' thrown by Swiper in the block editor. Caused by the editor canvas being an iframe — a script loaded there via the carousel block's live preview (ServerSideRender) could end up running against a different window/document than the elements it queried. The carousel's JS is now skipped during block-renderer REST requests (i.e. editor previews); the editor still shows the styled carousel markup, just non-interactive there, and the front end is unaffected.autoHeight, so the container height tracks the currently-visible slide(s) as you navigate instead of staying pinned to the tallest slide in the whole deck.carousel_nav option — show/hide the prev/next navigation arrows (default: shown).carousel_pagination option — show/hide clickable pagination bullets (default: hidden).rwrpt-swiper-*) and script/style handles, so it won't collide with a theme or another plugin that already loads its own copy of Swiper (or a different slider library) on the same page.esc_html, esc_attr, esc_url); all input sanitized and validated on read.rw-recent-post).uninstall.php cleanup for shortcode preset data.marquee attribute (feature was removed in 1.1.1 but the attribute lingered).