Add & updated unit tests for localized slugs#939
Add & updated unit tests for localized slugs#939mauteri merged 10 commits intoGatherPress:developfrom
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.
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 NameandTaxonomy Singular Namelabels.Closes #How to test the Change
Changelog Entry
Credits
Props @carstingaxion @mauteri
Checklist: