Merged
Conversation
jtsternberg
reviewed
Feb 24, 2017
example-functions.php
Outdated
| // Don't show this metabox if it's not the front page template | ||
| if ( $cmb->object_id !== get_option( 'page_on_front' ) ) { | ||
| // Don't show this metabox if it's not the front page template. | ||
| if ( get_option( 'page_on_front' !== $cmb->object_id ) ) { |
Member
There was a problem hiding this comment.
This is not correct (and is broken)
jtsternberg
reviewed
Feb 24, 2017
example-functions.php
Outdated
| <p class="description"><?php echo $description; ?></p> | ||
| <div class="custom-field-row <?php echo esc_attr( $classes ); ?>"> | ||
| <p><label for="<?php echo esc_attr( $id ); ?>"><?php echo esc_html( $label ); ?></label></p> | ||
| <p><input id="<?php echo esc_attr( $id ); ?>" type="text" name="<?php echo esc_attr( $name ); ?>" value="<?php echo esc_attr( $value ); ?>"/></p> |
Member
There was a problem hiding this comment.
$value is already escaped, as it's taken from $field->escaped_value()
jtsternberg
reviewed
Feb 24, 2017
example-functions.php
Outdated
| <p><?php echo $field->escaped_value(); ?></p> | ||
| <p class="description"><?php echo $field->args( 'description' ); ?></p> | ||
| <div class="custom-column-display <?php echo esc_attr( $field->row_classes() ); ?>"> | ||
| <p><?php echo esc_html( $field->escaped_value() ); ?></p> |
Member
There was a problem hiding this comment.
esc_html is not needed on a call to $field->escaped_value()
jtsternberg
requested changes
Feb 24, 2017
Member
jtsternberg
left a comment
There was a problem hiding this comment.
Please update the requested lines.
Contributor
Author
|
The update was corrected |
PavelK27
commented
Feb 24, 2017
Member
|
It works, thanks! |
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.
Some PHPCS fixes for example-functions file