Created
June 23, 2011 18:44
-
-
Save aphoenix/1043257 to your computer and use it in GitHub Desktop.
An example of bad ways to do php.
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
/// THIS IS WRONG | |
<?php ?> | |
<?php if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?> | |
<?php get_search_form(); ?> | |
<?php _e( 'Archives', 'twentyten' ); ?> | |
<?php wp_get_archives( 'type=monthly' ); ?> | |
<?php ?> | |
/// THIS IS OKAY | |
<?php | |
if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : | |
get_search_form(); | |
_e( 'Archives', 'twentyten' ); | |
wp_get_archives( 'type=monthly' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment