You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rename Rest API class to Event Rest API. This class is specific to events and should be named accordingly. If we add new rest endpoints that do not have to do with events it will make sense to add a new API class for those.
File and Class Rename for Better Specificity
The file class-rest-api.php has been renamed to class-event-rest-api.php, thus making its function in dealing with event-related REST API more apparent. The class and namespace references within the file have also been updated to match this change.
Update of Initial Settings
In the class-setup.php file, Event_Rest_Api has been added to the list of classes that are put into action. This ensures that the newly renamed class is initialized properly.
Test File Rename and Refactoring
Class and file class-test-rest-api.php related to testing has been renamed to class-test-event-rest-api.php, retaining consistency with the earlier mentioned renaming. Corresponding class and namespace references have been updated within this file too.
Update in Test Invocation
The test class Test_Event_Rest_Api no longer uses the generic Rest_Api. Instead, it now utilizes the specific Event_Rest_Api, enhancing the effectiveness and specificity of the tests.
⚠️ Note: The preview sites are created using WordPress Playground. You can add content, edit settings, and test the themes as you would on a real site, but please note that changes are not saved between sessions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the Change
Rename Rest API class to Event Rest API. This class is specific to events and should be named accordingly. If we add new rest endpoints that do not have to do with events it will make sense to add a new API class for those.
Closes #
How to test the Change
Changelog Entry
Credits
Props @mauteri
Checklist: