Skip to content

Expose wp_get_viewport_media_queries for custom block controls - #13561

Closed
tellthemachines wants to merge 1 commit into
WordPress:trunkfrom
tellthemachines:add/public-viewport-media-queries
Closed

tellthemachines wants to merge 1 commit into
WordPress:trunkfrom
tellthemachines:add/public-viewport-media-queries

Conversation

@tellthemachines

@tellthemachines tellthemachines commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Trac ticket: https://core.trac.wordpress.org/ticket/66150

Use of AI Tools

Changes from PR WordPress/gutenberg#82741 copied with copilot/Kimi 3.0


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@github-actions

Copy link
Copy Markdown

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

@tellthemachines tellthemachines self-assigned this Sep 21, 2026
@tellthemachines
tellthemachines marked this pull request as ready for review September 21, 2026 20:02
@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props isabel_brison, ramonopoly.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@tellthemachines
tellthemachines force-pushed the add/public-viewport-media-queries branch from 3311e5e to 0e936c8 Compare September 21, 2026 20:04
* }
* @return array Responsive media queries.
*/
function wp_get_viewport_media_queries( $viewport_settings = null, $options = array() ) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not sure if it's appropriate, should we direct users in the docs to prefer this function over the class method? E.g., something like:

* Use this instead of calling WP_Theme_JSON::get_viewport_media_queries() directly, which is not a public API

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It shouldn't be necessary because the whole class is documented as not public. I assume anyone who doesn't read the class docs also won't bother to look for this function 😅

@tellthemachines tellthemachines added the props-bot Adding this label triggers the Props Bot workflow for a PR. label Sep 23, 2026
@github-actions github-actions Bot removed the props-bot Adding this label triggers the Props Bot workflow for a PR. label Sep 23, 2026
@github-actions

Copy link
Copy Markdown

A commit was made that fixes the Trac ticket referenced in the description of this pull request.

SVN changeset: 63889
GitHub commit: f4c1a30

This PR will be closed, but please confirm the accuracy of this and reopen if there is more work to be done.

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.

2 participants