Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@vaurdan
Copy link

@vaurdan vaurdan commented Jul 6, 2021

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.php is still untouched, and I need to pull the changes from #157)

*
* @return string|void
*/
function syn_handle_multiple_error_notices( $message, $message_data ) { //phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals
Copy link
Contributor

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

Copy link
Author

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
Copy link
Contributor

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 ); ?>" />
Copy link
Contributor

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()

Copy link
Author

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 ); ?>" />
Copy link
Contributor

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.

Copy link
Author

Choose a reason for hiding this comment

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

Changed.

@vaurdan vaurdan requested a review from trepmal July 9, 2021 15:01
@vaurdan
Copy link
Author

vaurdan commented Jul 9, 2021

Thanks for the feedback, I have applied your suggestions.

I also added the missing PHPCS changes on the class-wp-push-syndication-server.php file, feel free to take a look!

@GaryJones GaryJones changed the base branch from master to develop February 11, 2024 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants