Light Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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#46
phatsk wants to merge 132 commits intothemarcusbattle:ticket/AOTECH-6694-data-validationfrom
jmichaelward:ticket/AOTECH-6694-data-validation

Conversation

Copy link
Collaborator

phatsk commented Feb 15, 2018

No description provided.

phatsk and others added 30 commits January 25, 2018 11:35
...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
...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 );
Copy link
Collaborator Author

phatsk Feb 15, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could replace the helper method with a call to wp_list_pluck( $terms, 'slug' )

Copy link

jmichaelward Feb 15, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Collaborator Author

phatsk Feb 15, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing @return

phatsk commented Feb 15, 2018

public function get_data() {
return array(
'count' => $this->get_count(),
Copy link
Collaborator Author

phatsk Feb 15, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: alignment

phatsk commented Feb 15, 2018
Copy link
Collaborator Author

phatsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Jeremy Ward added 10 commits February 15, 2018 16:29
...plementations of AbstractOutput for taxonomies.
Copy link

jmichaelward commented Feb 15, 2018

@phatsk This PR includes output for taxonomy count comparisons now.

phatsk commented Feb 16, 2018
*
* @param array $data Data to prepare for rendering.
*
*O
Copy link
Collaborator Author

phatsk Feb 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm seeing a weird character like a crossed-through zero.

Jeremy Ward added 11 commits February 15, 2018 23:38
...nate value to be colorized based on comparison.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

jrfoell Awaiting requested review from jrfoell

themarcusbattle Awaiting requested review from themarcusbattle

1 more reviewer

jmichaelward jmichaelward left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

phatsk

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants