Skip to content

Patch for nested shortcode issues #214

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

Closed
wants to merge 0 commits into from
Closed

Conversation

lightbulbman
Copy link
Contributor

As per issues raised on wordpress repo link below, I have amended the shortcode processing code. I did want to retain the functionality added as without it literal shortcodes i.e. [code_snippet id=x] placed in a HTML snippet won't do anything and I think its a valuable enough feature to add.

To summarise. the changes made were to retain the code I added and add the removed code back this way we can do both check for literal shortcodes aswell as handle php code in the HTML snippet where a shortcode may be generated within it

https://wordpress.org/support/topic/3-6-7-broke-shortcode-evaluation/#post-18269725

@imantsk
Copy link
Member

imantsk commented Jan 29, 2025

📦 code-snippets.3.6.8.zip

@imantsk imantsk added bug Something isn't working support General question or request for help labels Jan 29, 2025

// Ensure $atts is an array to avoid errors.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shortcode_parse_atts should always return an array – if we want to improve resiliency, we should be checking whether $matches[1] exists in the correct form before passing it.

@imantsk imantsk closed this Feb 14, 2025
@imantsk imantsk force-pushed the shortcode-patch/core branch from b634094 to 7b4f731 Compare February 14, 2025 13:48
@sheabunge
Copy link
Member

@imantsk what happened here? A force push? Weren't we going to revisit this?

@imantsk
Copy link
Member

imantsk commented Feb 20, 2025

@sheabunge this PR diverged from the core branch creating a merge conflict.
To not keep the PR pending i reconciled the branch with core using a force push.
we will surely revisit this but in a new branch and new PR.

@lightbulbman lightbulbman deleted the shortcode-patch/core branch March 14, 2025 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working support General question or request for help
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants