Created
August 12, 2012 05:56
-
-
Save evansolomon/3330025 to your computer and use it in GitHub Desktop.
Possibly the worst 18 lines of code ever written
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 | |
/* Get all our options from the database */ | |
global $options; | |
foreach ($options as $value) { | |
if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; | |
} else { $$value['id'] = get_settings( $value['id'] ); } | |
} | |
/* Get Portfolio category ID from the name */ | |
$ts_portfolio_cat = $wpdb->get_var("SELECT term_id FROM $wpdb->terms " | |
."WHERE name='$ts_portfolio_cat'"); | |
/* Get Blog page ID from the name */ | |
$ts_blogpage = $wpdb->get_var("SELECT `ID` FROM $wpdb->posts " | |
."WHERE post_title='$ts_blogpage' AND post_type='page' LIMIT 1"); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
love the description :)