Skip to content

Add nomention CSS class support to exclude links from Webmentions#599

Draft
pfefferle wants to merge 1 commit intomainfrom
fix/166-nomention-class
Draft

Add nomention CSS class support to exclude links from Webmentions#599
pfefferle wants to merge 1 commit intomainfrom
fix/166-nomention-class

Conversation

@pfefferle
Copy link
Copy Markdown
Owner

Summary

  • Adds support for a nomention CSS class on links (<a class="nomention">) to prevent Webmentions from being sent for those URLs
  • Filters out elements with the nomention class during URL extraction in webmention_extract_urls()
  • Adds a webmention_nomention_class filter so developers can customize the class name

Closes #166

Test plan

  • Create a post with a mix of normal links and links with class="nomention"
  • Verify that only the normal links trigger Webmentions
  • Verify that the webmention_nomention_class filter can override the default class name
  • Run composer lint to confirm coding standards compliance

Links with a `nomention` class will be skipped when extracting URLs
for sending Webmentions. A `webmention_nomention_class` filter allows
developers to customize the class name.

Closes #166
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prevent webmentions sending for specified links

1 participant