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

Rename wp_get_remote_patterns to wp_get_theme_directory_pattern_slugs #4640

Closed
wants to merge 1 commit into from
Closed

Rename wp_get_remote_patterns to wp_get_theme_directory_pattern_slugs #4640

wants to merge 1 commit into from

Conversation

oandregal
Copy link
Member

@oandregal oandregal commented Jun 19, 2023

Trac ticket https://core.trac.wordpress.org/ticket/58460
Part of WordPress/gutenberg#45171
Follow-up to #4543

This PR renames the recently landed wp_get_remote_patterns function to wp_get_theme_directory_pattern_slugs.

The rationale is to better provide context on what it does by avoiding the use of remote affix in the function name. Using remote may suggest the function actually does an external request, while it only provides metadata for the editor, which will take care of the request itself.

Commit

Rename `wp_get_remote_patterns` to `wp_get_theme_directory_pattern_slugs`.

Props dd32, ntsekouras.

Fixes #58460.

@oandregal
Copy link
Member Author

When/If this goes through, we also need to update Gutenberg to use the same naming.

Copy link

@ntsekouras ntsekouras left a comment

Choose a reason for hiding this comment

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

✅ This looks good, thank you! We'd just need to update GB too.

Copy link
Member

@dd32 dd32 left a comment

Choose a reason for hiding this comment

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

This new name definitely resolves all issues I had with the previous one. Thanks for working through this!

@oandregal
Copy link
Member Author

@oandregal oandregal closed this Jun 22, 2023
@oandregal oandregal deleted the rename/wp-get-remote-patterns-function branch June 22, 2023 07:16
@oandregal
Copy link
Member Author

Porting these changes back to Gutenberg in WordPress/gutenberg#51784

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.

3 participants