-
-
Save KnowTheCodePro/83a63512577eec5814c8 to your computer and use it in GitHub Desktop.
Smelly Code pattern
This file contains 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
<?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