Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@KnowTheCodePro
Last active March 15, 2016 21:57
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/a1af80064c8f602a7657 to your computer and use it in GitHub Desktop.
Save KnowTheCodePro/a1af80064c8f602a7657 to your computer and use it in GitHub Desktop.
<?php
namespace KnowTheCode;
add_action( 'loop_start', __NAMESPACE__ . '\code_smell_example' );
function code_smell_example() {
return is_page() && ! is_user_logged_in();
// Or even this with the parentheses
return ( is_page() && ! is_user_logged_in() );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment