Skip to content

Instantly share code, notes, and snippets.

@KnowTheCodePro
Last active March 15, 2016 21:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KnowTheCodePro/83a63512577eec5814c8 to your computer and use it in GitHub Desktop.
Save KnowTheCodePro/83a63512577eec5814c8 to your computer and use it in GitHub Desktop.
Smelly Code pattern
<?php
namespace KnowTheCode;
add_action( 'loop_start', __NAMESPACE__ . '\code_smell_example' );
function code_smell_example() {
if ( is_page() && ! is_user_logged_in() ) {
return true;
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment