Plugin Directory

Changeset 1167892


Ignore:
Timestamp:
05/26/2015 06:33:38 PM (11 years ago)
Author:
DobsonDev
Message:

Tagging version 1.1.4

Location:
dobsondev-shortcodes
Files:
2 edited
7 copied

Legend:

Unmodified
Added
Removed
  • dobsondev-shortcodes/tags/1.1.4/dobsondev-shortcodes.php

    r1155546 r1167892  
    9090add_shortcode('embedGist', 'dobsondev_shrtcode_create_github_gist');
    9191
     92
    9293/* Adds a shortcode for displaying GitHub README onto a page */
    9394function dobsondev_shrtcode_create_github_readme($atts) {
     
    101102  } else {
    102103    // check to see if we have a cached transient stored
    103     if ( false === ( $readme_transient = get_transient( 'dobdev-t1-' . $cache_id ) ) ) {
     104    if ( false === ( $readme_transient = get_transient( 'ddghr-' . md5( $owner . $repo . $cache_id ) ) ) ) {
    104105      // we do not have a transient stored so we have to make the API call
    105106      $curl = curl_init();
     
    118119      if ( $cache_id !== "NULL" ) {
    119120        // set the transient so we can use it later for faster loading times
    120         // var_dump('DOBSONDEV T1 TRANSIENT SET | ID = ' . $cache_id);
    121         set_transient( 'dobdev-t1-' . $cache_id, $output_readme, DAY_IN_SECONDS );
     121        set_transient(  'ddghr-' . md5( $owner . $repo . $cache_id ), $output_readme, DAY_IN_SECONDS );
    122122      }
    123123      return $output_readme;
    124124    }
    125125    // the transient was found so we will use it
    126     // var_dump('DOBSONDEV T1 TRANSIENT USED | ID = ' . $cache_id);
    127126    return $readme_transient;
    128127  }
     
    144143  } else {
    145144    // check to see if we have a cached transient stored
    146     if ( false === ( $githubfile_transient = get_transient( 'dobdev-t2-' . $cache_id ) ) ) {
     145    if ( false === ( $githubfile_transient = get_transient( 'ddghf-' . md5( $owner . $repo . $path . $cache_id ) ) ) ) {
    147146      // we do not have a transient stored so we have to make the API call
    148147      $curl = curl_init();
     
    162161        if ( $cache_id !== "NULL" ) {
    163162          // set the transient if the cache_id is set so we can use it later for faster loading time
    164           // var_dump('DOBSONDEV T2 TRANSIENT SET | ID = ' . $cache_id);
    165           set_transient( 'dobdev-t2-' . $cache_id, $output_md_file, DAY_IN_SECONDS );
     163          set_transient(  'ddghf-' . md5( $owner . $repo . $path . $cache_id ), $output_md_file, DAY_IN_SECONDS );
    166164        }
    167165        return $output_md_file;
     
    170168        if ( $cache_id !== "NULL" ) {
    171169          // set the transient if the cache_id is set so we can use it later for faster loading time
    172           // var_dump('DOBSONDEV T2 TRANSIENT SET | ID = ' . $cache_id);
    173           set_transient( 'dobdev-t2-' . $cache_id, $output_file, DAY_IN_SECONDS );
     170          set_transient( 'ddghf-' . md5( $owner . $repo . $path . $cache_id ), $output_file, DAY_IN_SECONDS );
    174171        }
    175172        return $output_file;
     
    177174    }
    178175    // the transient was found so we will use it
    179     // var_dump('DOBSONDEV T2 TRANSIENT USED | ID = ' . $cache_id);
    180176    return $githubfile_transient;
    181177  }
  • dobsondev-shortcodes/tags/1.1.4/readme.txt

    r1155546 r1167892  
    166166* Fixed a return error in the GitHub README and GitHub File Contents shortcodes (1.1.2)
    167167* Minified the CSS and JS scripts (1.1.3)
     168* Fixed a naming error for the WordPress transients used in the GitHub README and File shortcodes (1.1.4)
    168169
    169170= - 1.0 - =
  • dobsondev-shortcodes/trunk/dobsondev-shortcodes.php

    r1155546 r1167892  
    9090add_shortcode('embedGist', 'dobsondev_shrtcode_create_github_gist');
    9191
     92
    9293/* Adds a shortcode for displaying GitHub README onto a page */
    9394function dobsondev_shrtcode_create_github_readme($atts) {
     
    101102  } else {
    102103    // check to see if we have a cached transient stored
    103     if ( false === ( $readme_transient = get_transient( 'dobdev-t1-' . $cache_id ) ) ) {
     104    if ( false === ( $readme_transient = get_transient( 'ddghr-' . md5( $owner . $repo . $cache_id ) ) ) ) {
    104105      // we do not have a transient stored so we have to make the API call
    105106      $curl = curl_init();
     
    118119      if ( $cache_id !== "NULL" ) {
    119120        // set the transient so we can use it later for faster loading times
    120         // var_dump('DOBSONDEV T1 TRANSIENT SET | ID = ' . $cache_id);
    121         set_transient( 'dobdev-t1-' . $cache_id, $output_readme, DAY_IN_SECONDS );
     121        set_transient(  'ddghr-' . md5( $owner . $repo . $cache_id ), $output_readme, DAY_IN_SECONDS );
    122122      }
    123123      return $output_readme;
    124124    }
    125125    // the transient was found so we will use it
    126     // var_dump('DOBSONDEV T1 TRANSIENT USED | ID = ' . $cache_id);
    127126    return $readme_transient;
    128127  }
     
    144143  } else {
    145144    // check to see if we have a cached transient stored
    146     if ( false === ( $githubfile_transient = get_transient( 'dobdev-t2-' . $cache_id ) ) ) {
     145    if ( false === ( $githubfile_transient = get_transient( 'ddghf-' . md5( $owner . $repo . $path . $cache_id ) ) ) ) {
    147146      // we do not have a transient stored so we have to make the API call
    148147      $curl = curl_init();
     
    162161        if ( $cache_id !== "NULL" ) {
    163162          // set the transient if the cache_id is set so we can use it later for faster loading time
    164           // var_dump('DOBSONDEV T2 TRANSIENT SET | ID = ' . $cache_id);
    165           set_transient( 'dobdev-t2-' . $cache_id, $output_md_file, DAY_IN_SECONDS );
     163          set_transient(  'ddghf-' . md5( $owner . $repo . $path . $cache_id ), $output_md_file, DAY_IN_SECONDS );
    166164        }
    167165        return $output_md_file;
     
    170168        if ( $cache_id !== "NULL" ) {
    171169          // set the transient if the cache_id is set so we can use it later for faster loading time
    172           // var_dump('DOBSONDEV T2 TRANSIENT SET | ID = ' . $cache_id);
    173           set_transient( 'dobdev-t2-' . $cache_id, $output_file, DAY_IN_SECONDS );
     170          set_transient( 'ddghf-' . md5( $owner . $repo . $path . $cache_id ), $output_file, DAY_IN_SECONDS );
    174171        }
    175172        return $output_file;
     
    177174    }
    178175    // the transient was found so we will use it
    179     // var_dump('DOBSONDEV T2 TRANSIENT USED | ID = ' . $cache_id);
    180176    return $githubfile_transient;
    181177  }
  • dobsondev-shortcodes/trunk/readme.txt

    r1155546 r1167892  
    166166* Fixed a return error in the GitHub README and GitHub File Contents shortcodes (1.1.2)
    167167* Minified the CSS and JS scripts (1.1.3)
     168* Fixed a naming error for the WordPress transients used in the GitHub README and File shortcodes (1.1.4)
    168169
    169170= - 1.0 - =
Note: See TracChangeset for help on using the changeset viewer.