Changeset 347518
- Timestamp:
- 02/18/2011 10:32:22 PM (15 years ago)
- Location:
- twitter-api-shortcodes/trunk
- Files:
-
- 5 added
- 1 edited
-
functions.php (added)
-
tasforwp.class.inc.php (added)
-
tests (added)
-
tests/functionsTest.php (added)
-
tests/tasforwpTest.php (added)
-
twitter-api-shortcodes.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
twitter-api-shortcodes/trunk/twitter-api-shortcodes.php
r322578 r347518 11 11 require_once(ABSPATH . 'wp-content/plugins/twitter-api-shortcodes/twitter.api.wp.class.inc.php'); 12 12 require_once(ABSPATH . 'wp-content/plugins/twitter-api-shortcodes/libs/smarty/Smarty.class.php'); 13 14 define(TAS_VERSION, '0.0.1Alpha'); 13 require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); 14 require_once(ABSPATH . 'wp-content/plugins/twitter-api-shortcodes/functions.php'); 15 16 define(TAS_VERSION, '0.0.3Alpha'); 15 17 define(TAS_DB_VERSION, '0.0.3'); 16 18 define(TAS_ADMIN_OPTIONS_ID, '83a70cd3-3f32-456d-980d-309169c26ccf'); … … 35 37 36 38 // TODO: Need to add a schedule to update author avatar URL's on cached statuses. Also need to add deactivation. 37 38 39 function tas_install() { 39 40 global $wpdb; … … 44 45 $tasSearchName = $wpdb->prefix . 'tas_search'; 45 46 46 require_once(ABSPATH . 'wp-admin/includes/upgrade.php');47 47 update_option('tas_last_installed', date('c')); 48 48 … … 523 523 } 524 524 525 function jsonGenderBender($jsonStrOrObj, $output = 'json') {526 $inputIs = is_string($jsonStrOrObj) ? 'string' : 'json';527 if ($inputIs == strtolower($output)) {528 return $jsonStrOrObj;529 }530 531 // Since we're returning, the break statements are redundant, but whatever. :-)532 switch (strtolower($output)) {533 case 'json' :534 return json_decode($jsonStrOrObj);535 break;536 case 'string' :537 return json_encode($jsonStrOrObj);538 break;539 }540 }541 542 525 function have_twitter_oauth_token() { 543 526 $tas_oauth_gw_key = get_option('tas_oauth_gw_key', false);
Note: See TracChangeset
for help on using the changeset viewer.