Ticket/aotech 6694 data validation#46
Open
phatsk wants to merge 132 commits intothemarcusbattle:ticket/AOTECH-6694-data-validationfrom
jmichaelward:ticket/AOTECH-6694-data-validation
Open
Ticket/aotech 6694 data validation#46phatsk wants to merge 132 commits intothemarcusbattle:ticket/AOTECH-6694-data-validationfrom jmichaelward:ticket/AOTECH-6694-data-validation
phatsk wants to merge 132 commits intothemarcusbattle:ticket/AOTECH-6694-data-validationfrom
jmichaelward:ticket/AOTECH-6694-data-validation
Conversation
…rcusbattle/press-sync into ticket/AOTECH-6694-data-validation
This is a first attempt at something working and somewhat dynamic, and attempting to split responsibility for different roles into separate classes.
- Move API-related files for validation into PSR-4 file structure - Split out user validation methods into their own class - Create an AbstractRoute class that extends the WP_REST_Controller, which will be used by our custom API routes
…an be used in more than one route.
…validation Ticket/aotech 6713 taxonomy validation
phatsk
commented
Feb 15, 2018
|
|
||
| foreach ( get_taxonomies() as $taxonomy ) { | ||
| $terms = get_terms( array( 'taxonomy' => $taxonomy ) ); | ||
| $data[ $taxonomy ]['terms'] = $this->get_term_slugs( $terms ); |
Collaborator
Author
There was a problem hiding this comment.
You could replace the helper method with a call to wp_list_pluck( $terms, 'slug' )
There was a problem hiding this comment.
Someday I'll remember when and how to use this function. Fixed.
phatsk
commented
Feb 15, 2018
| } | ||
|
|
||
| /** | ||
| * Get the number of users in the WordPress install. |
phatsk
commented
Feb 15, 2018
|
|
||
| public function get_data() { | ||
| return array( | ||
| 'count' => $this->get_count(), |
phatsk
commented
Feb 15, 2018
Collaborator
Author
phatsk
left a comment
There was a problem hiding this comment.
This generally looks good. There are a couple notes to both myself and @jmichaelward but overall this is fairly solid. Testing locally shows expected results for posts.
added 10 commits
February 15, 2018 16:29
…for consistency with other recent change.
…plementations of AbstractOutput for taxonomies.
… AbstractOutput class.
|
@phatsk This PR includes output for taxonomy count comparisons now. |
phatsk
commented
Feb 16, 2018
| * | ||
| * @param array $data Data to prepare for rendering. | ||
| * | ||
| *Ø |
Collaborator
Author
There was a problem hiding this comment.
I'm seeing a weird character like a crossed-through zero.
added 11 commits
February 15, 2018 23:38
…differ between sites.
…nate value to be colorized based on comparison.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.