Coding standards - #15
Open
spacedmonkey wants to merge 2 commits into
Open
Conversation
Author
|
For reference there are two warnings I did not fix |
spacedmonkey
commented
Dec 15, 2017
| $term_id = 0; | ||
| // @codingStandardsIgnoreStart | ||
| if ( isset( $_GET['tag_ID'] ) ) { | ||
| $term_id = (int) sanitize_text_field( wp_unslash( $_GET['tag_ID'] ) ); |
spacedmonkey
commented
Dec 15, 2017
| // Get the meta value | ||
| $value = $this->get_meta( $term_id ); | ||
| $hidden = empty( $value ) | ||
| ? ' display: none; ' |
Author
There was a problem hiding this comment.
Changed to remove style attr becauseesc_attr is used later.
spacedmonkey
commented
Dec 15, 2017
| } | ||
| // Bail if no taxonomy passed or not on the `meta_key` column | ||
| // @codingStandardsIgnoreStart | ||
| if ( empty( $_REQUEST['taxonomy'] ) || ( $this->meta_key !== $custom_column ) || ! empty( $empty ) ) { |
Author
There was a problem hiding this comment.
Ignore because of use of super global
spacedmonkey
commented
Dec 15, 2017
| ? $_POST[ $term_key ] | ||
| : ''; | ||
| // @codingStandardsIgnoreStart | ||
| $post = sanitize_text_field( wp_unslash( $_POST[ $term_key ] ) ); |
spacedmonkey
commented
Dec 15, 2017
| return false; | ||
| } ?> | ||
| // Bail if not the meta_key column on the `edit-tags` screen for a visible taxonomy | ||
| if ( ( $this->meta_key !== $column_name ) || ( 'edit-tags' !== $screen ) || ! in_array( $name, $this->taxonomies, true ) ) { |
spacedmonkey
commented
Dec 15, 2017
spacedmonkey
left a comment
Author
There was a problem hiding this comment.
Added some comments to changes
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.
So I want to use this pluigin on a VIP Go project, so I needed to run the code sniffing and linting that platform requires.
This PR, contains formatting done by running
phpcbf --standard=WordPress-VIP .. Other issues were fixed by hand. I have also added some manaul ignores, mostly for accesing super globals.