Skip to content
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

Fix PHP Coding Standards errors #463

Merged
merged 11 commits into from Dec 5, 2017
Merged

Conversation

@Ismail-elkorchi
Copy link
Contributor

Ismail-elkorchi commented Nov 20, 2017

This PR is a follow up of #333.

This PR has to do only with the plugins. To ease the review process, I pushed in each commit the changes made to one plugin, except the last commit, in which I fixed some errors that I discovered while I reviewed the changes I made.

$string = 'searchengine';
} elseif( isset( $_SERVER[ 'HTTP_REFERER' ] ) && $_SERVER[ 'HTTP_REFERER' ] != '' ) {
if( is_array( $passingthrough ) == false )
} elseif ( isset( $_SERVER['HTTP_REFERER'] ) && '' === $_SERVER['HTTP_REFERER'] ) {

This comment has been minimized.

Copy link
@donnchawp

donnchawp Nov 30, 2017

Contributor

This should be "!==" instead of "===" I think.

wp_nonce_field('wp-cache');
echo '<p><strong>' . sprintf( __( 'WPTouch support is now %s', 'wp-super-cache' ), $status ) . '</strong></p>';
}
echo '<div class="submit"><input class="button-primary" ' . SUBMITDISABLED . 'type="submit" value="' . __( 'Update', 'wp-super-cache' ) . '" /></div>';

This comment has been minimized.

Copy link
@donnchawp

donnchawp Nov 30, 2017

Contributor

Should these two lines be indented one tab less?

return true;
if ( ( isset( $_COOKIE['wptouch_switch_toggle'] ) && 'normal' === $_COOKIE['wptouch_switch_toggle'] ) ||
( isset( $_COOKIE['wptouch-pro-view'] ) && 'desktop' === $_COOKIE['wptouch-pro-view'] ) ) {
return true;

This comment has been minimized.

Copy link
@donnchawp

donnchawp Nov 30, 2017

Contributor

Indented one tab too much?

@donnchawp

This comment has been minimized.

Copy link
Contributor

donnchawp commented Nov 30, 2017

Looks great, except for a few small things I've commented on above. What d'you think?

@Ismail-elkorchi

This comment has been minimized.

Copy link
Contributor Author

Ismail-elkorchi commented Dec 4, 2017

@donnchawp I think that all the suggestions you made make sens. 😃 I adjusted the code based on your feedback and added some small fixes.

Add a space where none was before.
@donnchawp donnchawp merged commit fca6f71 into Automattic:master Dec 5, 2017
@Ismail-elkorchi Ismail-elkorchi deleted the Ismail-elkorchi:plugins-wpcs branch Dec 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.