Created
September 15, 2019 14:30
-
-
Save bilalmalkoc/e758c2f748fff0c8e1c46d2233a3d622 to your computer and use it in GitHub Desktop.
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
// Bu kod gayet akıllıca ve kısa. Fakat düzgün anlaşılmıyor. | |
isset( $var ) || $var = some_function(); | |
// Bu daha iyi ve anlaşılır. | |
if ( ! isset( $var ) ) { | |
$var = some_function(); | |
} | |
// Yanlış kullanım | |
if ( $data = $wpdb->get_var( '...' ) ) { | |
// Use $data | |
} | |
// Doğru kullanım | |
$data = $wpdb->get_var( '...' ); | |
if ( $data ) { | |
// Use $data | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment