Skip to content

Rename wp_get_remote_patterns to wp_get_theme_directory_pattern_slugs - #4640

Closed
oandregal wants to merge 1 commit into
WordPress:trunkfrom
oandregal:rename/wp-get-remote-patterns-function
Closed

oandregal wants to merge 1 commit into
WordPress:trunkfrom
oandregal:rename/wp-get-remote-patterns-function

Conversation

@oandregal

@oandregal oandregal commented Jun 19, 2023 •

Copy link
Copy Markdown
Member

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
Copy Markdown
Member Author

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

@ntsekouras ntsekouras left a comment

Copy link
Copy Markdown
Contributor

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.

@dd32 dd32 left a comment

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.

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

@oandregal

Copy link
Copy Markdown
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
Copy Markdown
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