Skip to content
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

Update block programmatically? #12960

Closed
manake opened this issue Dec 17, 2018 · 2 comments
Closed

Update block programmatically? #12960

manake opened this issue Dec 17, 2018 · 2 comments
Labels
[Type] Help Request Help with setup, implementation, or "How do I?" questions.

Comments

@manake
Copy link

manake commented Dec 17, 2018

Is there a way to update a block programmatically?

This is related to this problem #12333

I want to trigger "remove data-align="full"" on page load to fix that bug.

If someone could post a list of all methods/operations that we can do (if any) programmatically that would be useful to have.

@swissspidy swissspidy added the [Type] Help Request Help with setup, implementation, or "How do I?" questions. label Dec 18, 2018
@swissspidy
Copy link
Member

So you want to update the block markup in PHP, right? You could use the render_block filter to remove data-align="full" for a specific block.

@manake
Copy link
Author

manake commented Dec 24, 2018

Ok, I was thinking incorrectly about this issue. I was trying to disable wide alignments before the block's HTML is generated. That's not the right way of doing this. Never mind.

render_block is a good solution. Thank you.

@manake manake closed this as completed Dec 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Help Request Help with setup, implementation, or "How do I?" questions.
Projects
None yet
Development

No branches or pull requests

2 participants