- 
        Couldn't load subscription status. 
- Fork 67
feat: added enqueue_frontend_assets_for_content static function #3634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Open
      
      
            bfintal
  wants to merge
  2
  commits into
  develop
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
feat/enqueue_assets_function
  
      
      
   
  
    
  
  
  
 
  
      
    base: develop
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
  
     Open
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            2 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      
    File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              
      
      Oops, something went wrong.
        
    
  
  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.
  
    
  
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify the regex pattern and trailing dash trimming logic.
The regex
/<!-- wp:stackable\/([a-zA-Z_-]+)/captures block names, and line 290 trims trailing dashes "since it may have '--' in the end if the post content is compressed." This seems like a workaround for a specific edge case.Ensure that:
You can verify the block name extraction logic with this script:
🏁 Script executed:
Length of output: 0
Now I need to search the codebase directly to find the actual block names and verify the regex pattern:Let me run shell scripts to search the codebase directly for block definitions and usage:
🏁 Script executed:
Length of output: 442
🏁 Script executed:
Length of output: 3397
🏁 Script executed:
Length of output: 572
🏁 Script executed:
Length of output: 1463
Let me verify if there are any block names with underscores or uppercase letters:
🏁 Script executed:
Length of output: 1576
🏁 Script executed:
Length of output: 1926
🏁 Script executed:
Length of output: 2369
🏁 Script executed:
Length of output: 1280
Improve regex pattern to match WordPress block naming conventions.
The regex
/<!-- wp:stackable\/([a-zA-Z_-]+)/at line 286 includes uppercase letters[A-Z]and underscores[_]which don't appear in any actual Stackable block names and violate WordPress block naming standards. All 50+ Stackable blocks use only lowercase letters and hyphens (e.g.,button-group,call-to-action,icon-button).The trimming at line 290 is a valid workaround but indicates the regex lacks proper boundary detection. Recommended fix:
This uses the correct character class
[a-z0-9-]and adds an explicit boundary(?:\s|-->)to eliminate reliance on trim as a corrective measure. The trim call becomes redundant but can remain for safety.🤖 Prompt for AI Agents