Repository navigation
Conversation
A WordPress page holding the Shortcodes for BuddyPress posting form is not a BuddyPress screen, so the CSS/JS never enqueued and pasted links got no preview. Singular pages whose content has the activity-listing shortcode now load them; the bp_activity_link_preview_load_assets filter stays the override.
The script read the global ajaxurl, which only exists when another plugin or theme prints it, while the PHP already localises bp_activity_link_preview.ajaxurl.
Each keystroke queued its own parse 500ms later, so a half-typed URL was fetched and its 'Preview is not available' notice stayed beside the real preview. One timer per composer now restarts on each keystroke, and a rendered preview removes any earlier error notice.
The old slug/title/pages[].file shape crashed the docs lint. Sections now carry name, folder, a landing description and the reading order, and the three guides that were missing from the order (how-it-works, supported-platforms, rest-api) are listed. Lint: 0 errors, 0 warnings.
The zip was built only by grunt copy patterns, which re-ran no gates. The build script checks a clean tree, version agreement, the docs lint and the zip contents (no dev files, required files present); local CI runs php -l, WPCS errors, a JS syntax check, the docs lint, core-first and gate-check. Also stop tracking the root .DS_Store.
Post From Anywhere places the activity post form in a shortcode, block or widget on any page, so the page-type gate never loaded the preview script there. Assets now also enqueue on bp_before_activity_post_form, which every BuddyPress post form fires, with bp_activity_link_preview_load_assets still able to turn them off. Scripts print in the footer, so the late enqueue is in time. Manifest line numbers refreshed.
The post-submit clean-up listener was scoped to #buddypress #aw-whats-new-submit, so a post form embedded elsewhere (Post From Anywhere) kept the link card after posting and could send it again.
The X that removes the link preview or its image was an icon-only link with just a title, announced as "link". Give it the existing Cancel strings as aria-label, role=button, and hide the icon glyph, matching the previous/next image buttons.
The composer and comment-reply image buttons had four copies of the same step logic. stepImage() now handles all four, and skips quietly when no preview is stored. Checked in the browser: composer at 1440, comment reply at 390, both directions and the first-image bound.
BuddyBoss filters the same activity twice on its permalink; a per-request static 'already processed' guard returned the second call without the card. The existing 'content already has a preview' check prevents doubling.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release 1.7.7. Branch tip 12ad7e5 = QA-passed 858dba3 plus the Stable tag bump.