-
Notifications
You must be signed in to change notification settings - Fork 30
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
Add & updated unit tests for localized slugs #939
Add & updated unit tests for localized slugs #939
Conversation
PR Summary
|
Another unit-test curiosity, that isn't clear to me @mauteri : Why does this one test fail now? From an untouched file. |
$slug = _x( 'venue', 'Post Type Slug', 'gatherpress' ); | ||
$slug = sanitize_title( $slug ); | ||
$slug = _x( 'Venue', 'Post Type Singular Name', 'gatherpress' ); | ||
$slug = sanitize_title( $slug, 'save' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setting third argument as second argument. should be sanitize_title( $slug, '', 'save' );
Preview changes with PlaygroundYou can preview the recent changes for PR#939 with the following PHP versions: PHP Version 8.3
PHP Version 7.4
Download Made with 💙 from GatherPress & a little bit of WordPress Playground. Changes will not persist between sessions. |
Description of the Change
This PR adds new tests for existing methods which prepare the localized post type & taxonomy slugs, before saving them into GatherPress' options.
It also and additionally fixes one left-over from the development of the methods. The default strings used for the slugs were new, additional strings to translate. This PR replaces the default slugs, with the already existing
Post Type Singular Name
andTaxonomy Singular Name
labels.Closes #How to test the Change
Changelog Entry
Credits
Props @carstingaxion @mauteri
Checklist: