Changeset 911478
- Timestamp:
- 05/10/2014 03:21:01 AM (12 years ago)
- Location:
- runkeeper-activity-feed/trunk
- Files:
-
- 1 added
- 2 edited
-
assets-wp-repo (added)
-
readme.txt (modified) (2 diffs)
-
runkeeper-wordpress-activity-feed.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
runkeeper-activity-feed/trunk/readme.txt
r837766 r911478 4 4 Tags: runkeeper, widget, 5 5 Requires at least: 3.5 6 Tested up to: 3. 87 Stable tag: 1.7. 16 Tested up to: 3.9.1 7 Stable tag: 1.7.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 59 59 == Changelog == 60 60 61 = 1.7.2 = 62 * Added classes for easy list styling 63 61 64 = 1.7.0 = 62 65 * Updated Admin Interface, Thanks to HughbertD -
runkeeper-activity-feed/trunk/runkeeper-wordpress-activity-feed.php
r837766 r911478 6 6 Description: A plugin to automatically draft posts of all your Runkeeper Activities. 7 7 Author: A. Kai Armstrong 8 Version: 1.7. 18 Version: 1.7.2 9 9 Author URI: http://www.kaiarmstrong.com 10 10 */ … … 402 402 if ( !empty($post_options) ) { 403 403 404 $post_import_content .= '<ul >';404 $post_import_content .= '<ul class="rk-list">'; 405 405 406 406 if ( !empty($post_options['type']) ) { 407 407 if ( !empty($rkActivity_detailed_array['type']) ) { 408 $post_import_content .= '<li >Activity: ' . $rkActivity_detailed_array['type'] . '</li>';408 $post_import_content .= '<li class="rk-activity">Activity: ' . $rkActivity_detailed_array['type'] . '</li>'; 409 409 } else { 410 410 //Do Nothing … … 417 417 if ( !empty($rkActivity_detailed_array['total_distance']) ) { 418 418 if ( get_option('toz_rk_units') == 'standard' ) { 419 $post_import_content .= '<li >Distance: ' . round($rkActivity_detailed_array['total_distance']*0.00062137, 2) . ' mi</li>'; //Meters * Miles419 $post_import_content .= '<li class="rk-distance">Distance: ' . round($rkActivity_detailed_array['total_distance']*0.00062137, 2) . ' mi</li>'; //Meters * Miles 420 420 } else if ( get_option('toz_rk_units') == 'metric' ) { 421 $post_import_content .= '<li >Distance: ' . round($rkActivity_detailed_array['total_distance']/1000, 2) . ' km</li>'; //Meters / KM421 $post_import_content .= '<li class="rk-distance">Distance: ' . round($rkActivity_detailed_array['total_distance']/1000, 2) . ' km</li>'; //Meters / KM 422 422 } else { 423 $post_import_content .= '<li >Distance: ' . round($rkActivity_detailed_array['total_distance']*0.00062137, 2) . ' mi</li>'; //Default to Standard423 $post_import_content .= '<li class="rk-distance">Distance: ' . round($rkActivity_detailed_array['total_distance']*0.00062137, 2) . ' mi</li>'; //Default to Standard 424 424 } 425 425 } else { … … 432 432 if ( !empty($post_options['duration']) ) { 433 433 if ( !empty($rkActivity_detailed_array['duration']) ) { 434 $post_import_content .= '<li >Duration: ' . date('H:i:s', $rkActivity_detailed_array['duration']) . '</li>';434 $post_import_content .= '<li class="rk-duration">Duration: ' . date('H:i:s', $rkActivity_detailed_array['duration']) . '</li>'; 435 435 } else { 436 436 //Do Nothing … … 449 449 $dps = round($rkActivity_detailed_array['total_distance'] * 0.00062137, 2) / $total_seconds; 450 450 $sph = round($dps * 60 * 60, 2); 451 $post_import_content .= '<li >Average Speed: ' . $sph . ' mph</li>';451 $post_import_content .= '<li class="rk-avg-speed">Average Speed: ' . $sph . ' mph</li>'; 452 452 } else if ( get_option('toz_rk_units') == 'metric' ) { 453 453 $dps = round($rkActivity_detailed_array['total_distance'] / 1000, 2) / $total_seconds; 454 454 $sph = round($dps * 60 * 60, 2); 455 $post_import_content .= '<li >Average Speed: ' . $sph . ' kmh</li>';455 $post_import_content .= '<li class="rk-avg-speed">Average Speed: ' . $sph . ' kmh</li>'; 456 456 } else { 457 457 $dps = round($rkActivity_detailed_array['total_distance'] * 0.00062137, 2) / $total_seconds; 458 458 $sph = round($dps * 60 * 60, 2); 459 $post_import_content .= '<li >Average Speed: ' . $sph . ' mph</li>';459 $post_import_content .= '<li class="rk-avg-speed">Average Speed: ' . $sph . ' mph</li>'; 460 460 } 461 461 … … 476 476 $pps = $total_seconds / round($rkActivity_detailed_array['total_distance'] * 0.00062137, 2); 477 477 $ppm = date('i:s', $pps); 478 $post_import_content .= '<li >Average Pace: ' . $ppm . ' min/mi</li>';478 $post_import_content .= '<li class="rk-avg-pace">Average Pace: ' . $ppm . ' min/mi</li>'; 479 479 } else if ( get_option('toz_rk_units') == 'metric' ) { 480 480 $pps = $total_seconds / round($rkActivity_detailed_array['total_distance'] / 1000, 2); 481 481 $ppm = date('i:s', $pps); 482 $post_import_content .= '<li >Average Pace: ' . $ppm . ' min/km</li>';482 $post_import_content .= '<li class="rk-avg-pace">Average Pace: ' . $ppm . ' min/km</li>'; 483 483 } else { 484 484 $pps = $total_seconds / round($rkActivity_detailed_array['total_distance'] * 0.00062137, 2); 485 485 $ppm = date('i:s', $pps); 486 $post_import_content .= '<li >Average Pace: ' . $ppm . ' min/mi</li>';486 $post_import_content .= '<li class="rk-avg-pace">Average Pace: ' . $ppm . ' min/mi</li>'; 487 487 } 488 488 … … 496 496 if ( !empty($post_options['calories']) ) { 497 497 if ( !empty($rkActivity_detailed_array['total_calories']) ) { 498 $post_import_content .= '<li >Calories Burned: ' . $rkActivity_detailed_array['total_calories'] . '</li>';498 $post_import_content .= '<li class="rk-calories">Calories Burned: ' . $rkActivity_detailed_array['total_calories'] . '</li>'; 499 499 } else { 500 500 //Do Nothing … … 506 506 if ( !empty($post_options['heartrate']) ) { 507 507 if ( !empty($rkActivity_detailed_array['average_heart_rate']) ) { 508 $post_import_content .= '<li >Heart Rate: ' . $rkActivity_detailed_array['average_heart_rate'] . '</li>';508 $post_import_content .= '<li class="rk-heart-rate">Heart Rate: ' . $rkActivity_detailed_array['average_heart_rate'] . '</li>'; 509 509 } else { 510 510 //Do Nothing … … 516 516 if ( !empty($post_options['url']) ) { 517 517 if ( !empty($rkActivity_detailed_array['activity']) ) { 518 $post_import_content .= '<li >Activity Link: <a href="' . $rkActivity_detailed_array['activity'] . '">' . $rkActivity_detailed_array['activity'] . '</a></li>';;518 $post_import_content .= '<li class="rk-activity-link">Activity Link: <a href="' . $rkActivity_detailed_array['activity'] . '">' . $rkActivity_detailed_array['activity'] . '</a></li>';; 519 519 } else { 520 520 //Do Nothing … … 526 526 if ( !empty($post_options['time']) ) { 527 527 if ( !empty($rkActivity_detailed_array['start_time']) ) { 528 $post_import_content .= '<li >Start Time: ' . $rkActivity_detailed_array['start_time'] . '</li>';528 $post_import_content .= '<li class="rk-start-time">Start Time: ' . $rkActivity_detailed_array['start_time'] . '</li>'; 529 529 } else { 530 530 //Do Nothing
Note: See TracChangeset
for help on using the changeset viewer.