-
Notifications
You must be signed in to change notification settings - Fork 45
PHPCS Fixes #160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
PHPCS Fixes #160
Conversation
| * | ||
| * @return string|void | ||
| */ | ||
| function syn_handle_multiple_error_notices( $message, $message_data ) { //phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this ignore necessary? Looks like syn was added as an allowed prefix in .phpcs.xml.dist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I forgot to remove it when I added the prefix to .phpcs.xml.dist. Removed.
| @@ -1,18 +1,72 @@ | |||
| <?php | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes here discussed in #159
| </p> | ||
| <p> | ||
| <input type="text" name="feed_url" id="feed_url" size="100" value="<?php esc_attr_e( $feed_url ); ?>" /> | ||
| <input type="text" name="feed_url" id="feed_url" size="100" value="<?php echo esc_url_raw( $feed_url ); ?>" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should still use esc_attr()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes! I changed it back to esc_attr.
| </p> | ||
| <p> | ||
| <input type="text" class="widefat" name="site_url" id="site_url" size="100" value="<?php echo esc_html( $site_url ); ?>" /> | ||
| <input type="text" class="widefat" name="site_url" id="site_url" size="100" value="<?php echo esc_url_raw( $site_url ); ?>" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd have used esc_attr() here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed.
|
Thanks for the feedback, I have applied your suggestions. I also added the missing PHPCS changes on the |
Initial extensive PHPCS clean-up on the codebase. I tried to address all the WordPress standards where possible and ignored the ones that are valid use cases.
I didn't invest much time in the documentation warnings.
This PR is forked from #159, so it includes the OpenSSL implementation for encryption.
I also added a few TODOs along with the code where we should invest some time to improve (mostly missing nonces and class naming).
(WIP,
class-wp-push-syndication-server.phpis still untouched, and I need to pull the changes from #157)