Skip to content

Conversation

@galbus
Copy link
Contributor

@galbus galbus commented Nov 7, 2025

This pull request removes all logic related to the beyondwordsMarker attribute from both the PHP backend and JavaScript frontend. The attribute is no longer added to blocks, its controls and UI have been removed, and all related helper functions and code paths have been deleted. Additionally, new logic is introduced to ensure BeyondWords attributes and controls are only added to supported content blocks, preventing issues with internal or UI blocks.

Removal of beyondwordsMarker attribute and related logic:

  • Stopped adding the beyondwordsMarker attribute to Gutenberg blocks and removed the associated filter and rendering logic from BlockAttributes.php. The attribute is now deprecated and only kept for backward compatibility in registration. [1] [2] [3]
  • Removed all PHP methods for injecting the marker attribute into rendered HTML, including addMarkerAttribute, addMarkerAttributeWithHTMLTagProcessor, and addMarkerAttributeWithDOMDocument from PostContentUtils.php.
  • Updated post content rendering to no longer add marker attributes to block HTML output. [1] [2]
  • Deleted the unused getSegments method, which previously handled segmenting content by blocks and markers.

Frontend JavaScript cleanup and improvements:

  • Removed all marker attribute logic from the block attribute and control registration, including the getBlockMarkerAttribute helper and related filters. [1] [2] [3] [4] [5] [6] [7]
  • Introduced the isBeyondwordsSupportedBlock utility to ensure BeyondWords attributes and controls are only added to appropriate content blocks, skipping internal, UI, and container blocks.
  • Updated attribute and control registration logic to use this new utility, preventing issues with non-content blocks. [1] [2]

Documentation and comments:

  • Updated docblocks and inline comments to reflect the removal of marker logic and clarify the new supported block logic. [1] [2] [3] [4] [5]

These changes streamline the codebase, prevent potential UI issues, and clarify the plugin's behavior regarding block attributes.

@linear
Copy link

linear bot commented Nov 7, 2025

@galbus galbus added the wip Work in Progress label Nov 7, 2025
@galbus galbus added php Pull requests that update Php code javascript Pull requests that update Javascript code bug labels Nov 7, 2025
@galbus galbus self-assigned this Nov 7, 2025
@galbus galbus changed the title Assign markers in PHP to fix editor JS issues Remove segment marker assignment in WordPress Nov 10, 2025
@galbus galbus merged commit 08cc2c2 into main Nov 10, 2025
10 checks passed
@galbus galbus deleted the s-7711-wp-plugin-removing-block branch November 10, 2025 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug javascript Pull requests that update Javascript code php Pull requests that update Php code wip Work in Progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants