Changeset 1167892
- Timestamp:
- 05/26/2015 06:33:38 PM (11 years ago)
- Location:
- dobsondev-shortcodes
- Files:
-
- 2 edited
- 7 copied
-
tags/1.1.4 (copied) (copied from dobsondev-shortcodes/trunk)
-
tags/1.1.4/changelog.txt (copied) (copied from dobsondev-shortcodes/trunk/changelog.txt)
-
tags/1.1.4/css (copied) (copied from dobsondev-shortcodes/trunk/css)
-
tags/1.1.4/dobsondev-shortcodes.php (copied) (copied from dobsondev-shortcodes/trunk/dobsondev-shortcodes.php) (7 diffs)
-
tags/1.1.4/js (copied) (copied from dobsondev-shortcodes/trunk/js)
-
tags/1.1.4/libs (copied) (copied from dobsondev-shortcodes/trunk/libs)
-
tags/1.1.4/readme.txt (copied) (copied from dobsondev-shortcodes/trunk/readme.txt) (1 diff)
-
trunk/dobsondev-shortcodes.php (modified) (7 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
dobsondev-shortcodes/tags/1.1.4/dobsondev-shortcodes.php
r1155546 r1167892 90 90 add_shortcode('embedGist', 'dobsondev_shrtcode_create_github_gist'); 91 91 92 92 93 /* Adds a shortcode for displaying GitHub README onto a page */ 93 94 function dobsondev_shrtcode_create_github_readme($atts) { … … 101 102 } else { 102 103 // check to see if we have a cached transient stored 103 if ( false === ( $readme_transient = get_transient( 'd obdev-t1-' . $cache_id) ) ) {104 if ( false === ( $readme_transient = get_transient( 'ddghr-' . md5( $owner . $repo . $cache_id ) ) ) ) { 104 105 // we do not have a transient stored so we have to make the API call 105 106 $curl = curl_init(); … … 118 119 if ( $cache_id !== "NULL" ) { 119 120 // 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 ); 122 122 } 123 123 return $output_readme; 124 124 } 125 125 // the transient was found so we will use it 126 // var_dump('DOBSONDEV T1 TRANSIENT USED | ID = ' . $cache_id);127 126 return $readme_transient; 128 127 } … … 144 143 } else { 145 144 // check to see if we have a cached transient stored 146 if ( false === ( $githubfile_transient = get_transient( 'd obdev-t2-' . $cache_id) ) ) {145 if ( false === ( $githubfile_transient = get_transient( 'ddghf-' . md5( $owner . $repo . $path . $cache_id ) ) ) ) { 147 146 // we do not have a transient stored so we have to make the API call 148 147 $curl = curl_init(); … … 162 161 if ( $cache_id !== "NULL" ) { 163 162 // 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 ); 166 164 } 167 165 return $output_md_file; … … 170 168 if ( $cache_id !== "NULL" ) { 171 169 // 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 ); 174 171 } 175 172 return $output_file; … … 177 174 } 178 175 // the transient was found so we will use it 179 // var_dump('DOBSONDEV T2 TRANSIENT USED | ID = ' . $cache_id);180 176 return $githubfile_transient; 181 177 } -
dobsondev-shortcodes/tags/1.1.4/readme.txt
r1155546 r1167892 166 166 * Fixed a return error in the GitHub README and GitHub File Contents shortcodes (1.1.2) 167 167 * 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) 168 169 169 170 = - 1.0 - = -
dobsondev-shortcodes/trunk/dobsondev-shortcodes.php
r1155546 r1167892 90 90 add_shortcode('embedGist', 'dobsondev_shrtcode_create_github_gist'); 91 91 92 92 93 /* Adds a shortcode for displaying GitHub README onto a page */ 93 94 function dobsondev_shrtcode_create_github_readme($atts) { … … 101 102 } else { 102 103 // check to see if we have a cached transient stored 103 if ( false === ( $readme_transient = get_transient( 'd obdev-t1-' . $cache_id) ) ) {104 if ( false === ( $readme_transient = get_transient( 'ddghr-' . md5( $owner . $repo . $cache_id ) ) ) ) { 104 105 // we do not have a transient stored so we have to make the API call 105 106 $curl = curl_init(); … … 118 119 if ( $cache_id !== "NULL" ) { 119 120 // 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 ); 122 122 } 123 123 return $output_readme; 124 124 } 125 125 // the transient was found so we will use it 126 // var_dump('DOBSONDEV T1 TRANSIENT USED | ID = ' . $cache_id);127 126 return $readme_transient; 128 127 } … … 144 143 } else { 145 144 // check to see if we have a cached transient stored 146 if ( false === ( $githubfile_transient = get_transient( 'd obdev-t2-' . $cache_id) ) ) {145 if ( false === ( $githubfile_transient = get_transient( 'ddghf-' . md5( $owner . $repo . $path . $cache_id ) ) ) ) { 147 146 // we do not have a transient stored so we have to make the API call 148 147 $curl = curl_init(); … … 162 161 if ( $cache_id !== "NULL" ) { 163 162 // 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 ); 166 164 } 167 165 return $output_md_file; … … 170 168 if ( $cache_id !== "NULL" ) { 171 169 // 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 ); 174 171 } 175 172 return $output_file; … … 177 174 } 178 175 // the transient was found so we will use it 179 // var_dump('DOBSONDEV T2 TRANSIENT USED | ID = ' . $cache_id);180 176 return $githubfile_transient; 181 177 } -
dobsondev-shortcodes/trunk/readme.txt
r1155546 r1167892 166 166 * Fixed a return error in the GitHub README and GitHub File Contents shortcodes (1.1.2) 167 167 * 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) 168 169 169 170 = - 1.0 - =
Note: See TracChangeset
for help on using the changeset viewer.