Plugin Directory

Changeset 911478


Ignore:
Timestamp:
05/10/2014 03:21:01 AM (12 years ago)
Author:
phikai
Message:

Added classes for easy styling of post content

Location:
runkeeper-activity-feed/trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • runkeeper-activity-feed/trunk/readme.txt

    r837766 r911478  
    44Tags: runkeeper, widget,
    55Requires at least: 3.5
    6 Tested up to: 3.8
    7 Stable tag: 1.7.1
     6Tested up to: 3.9.1
     7Stable tag: 1.7.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5959== Changelog ==
    6060
     61= 1.7.2 =
     62* Added classes for easy list styling
     63
    6164= 1.7.0 =
    6265* Updated Admin Interface, Thanks to HughbertD
  • runkeeper-activity-feed/trunk/runkeeper-wordpress-activity-feed.php

    r837766 r911478  
    66Description: A plugin to automatically draft posts of all your Runkeeper Activities.
    77Author: A. Kai Armstrong
    8 Version: 1.7.1
     8Version: 1.7.2
    99Author URI: http://www.kaiarmstrong.com
    1010*/
     
    402402    if ( !empty($post_options) ) {
    403403
    404         $post_import_content .= '<ul>';
     404        $post_import_content .= '<ul class="rk-list">';
    405405
    406406        if ( !empty($post_options['type']) ) {
    407407            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>';
    409409            } else {
    410410                //Do Nothing
     
    417417            if ( !empty($rkActivity_detailed_array['total_distance']) ) {
    418418                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 * Miles
     419                    $post_import_content .= '<li class="rk-distance">Distance: ' . round($rkActivity_detailed_array['total_distance']*0.00062137, 2) . ' mi</li>'; //Meters * Miles
    420420                } 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 / KM
     421                    $post_import_content .= '<li class="rk-distance">Distance: ' . round($rkActivity_detailed_array['total_distance']/1000, 2) . ' km</li>'; //Meters / KM
    422422                } else {
    423                     $post_import_content .= '<li>Distance: ' . round($rkActivity_detailed_array['total_distance']*0.00062137, 2) . ' mi</li>'; //Default to Standard
     423                    $post_import_content .= '<li class="rk-distance">Distance: ' . round($rkActivity_detailed_array['total_distance']*0.00062137, 2) . ' mi</li>'; //Default to Standard
    424424                }
    425425            } else {
     
    432432        if ( !empty($post_options['duration']) ) {
    433433            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>';
    435435            } else {
    436436                //Do Nothing
     
    449449                    $dps = round($rkActivity_detailed_array['total_distance'] * 0.00062137, 2) / $total_seconds;
    450450                    $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>';
    452452                } else if ( get_option('toz_rk_units') == 'metric' ) {
    453453                    $dps = round($rkActivity_detailed_array['total_distance'] / 1000, 2) / $total_seconds;
    454454                    $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>';
    456456                } else {
    457457                    $dps = round($rkActivity_detailed_array['total_distance'] * 0.00062137, 2) / $total_seconds;
    458458                    $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>';
    460460                }
    461461
     
    476476                    $pps = $total_seconds / round($rkActivity_detailed_array['total_distance'] * 0.00062137, 2);
    477477                    $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>';
    479479                } else if ( get_option('toz_rk_units') == 'metric' ) {
    480480                    $pps = $total_seconds / round($rkActivity_detailed_array['total_distance'] / 1000, 2);
    481481                    $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>';
    483483                } else {
    484484                    $pps = $total_seconds / round($rkActivity_detailed_array['total_distance'] * 0.00062137, 2);
    485485                    $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>';
    487487                }
    488488
     
    496496        if ( !empty($post_options['calories']) ) {
    497497            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>';
    499499            } else {
    500500                //Do Nothing
     
    506506        if ( !empty($post_options['heartrate']) ) {
    507507            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>';
    509509            } else {
    510510                //Do Nothing
     
    516516        if ( !empty($post_options['url']) ) {
    517517            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>';;
    519519            } else {
    520520                //Do Nothing
     
    526526        if ( !empty($post_options['time']) ) {
    527527            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>';
    529529            } else {
    530530                //Do Nothing
Note: See TracChangeset for help on using the changeset viewer.