Changeset 1265965
- Timestamp:
- 10/14/2015 03:54:24 PM (10 years ago)
- Location:
- dobsondev-shortcodes
- Files:
-
- 3 edited
- 7 copied
-
tags/1.1.9 (copied) (copied from dobsondev-shortcodes/trunk)
-
tags/1.1.9/changelog.txt (copied) (copied from dobsondev-shortcodes/trunk/changelog.txt) (1 diff)
-
tags/1.1.9/css (copied) (copied from dobsondev-shortcodes/trunk/css)
-
tags/1.1.9/dobsondev-shortcodes.php (copied) (copied from dobsondev-shortcodes/trunk/dobsondev-shortcodes.php) (5 diffs)
-
tags/1.1.9/js (copied) (copied from dobsondev-shortcodes/trunk/js)
-
tags/1.1.9/libs (copied) (copied from dobsondev-shortcodes/trunk/libs)
-
tags/1.1.9/readme.txt (copied) (copied from dobsondev-shortcodes/trunk/readme.txt) (4 diffs)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/dobsondev-shortcodes.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dobsondev-shortcodes/tags/1.1.9/changelog.txt
r1219299 r1265965 9 9 Bug Fixes 10 10 11 * Found a bug where the GitHub Readme and GitHub File Contents shortcodes would not return anything because cURL was unable to verify the certificate provided by the server. This can now be avoided using the insecure="true" attribute on the shortcode. Thanks to [JacobD10](https://profiles.wordpress.org/jacobd10/) for finding the error. (1.1.9) 12 * More substantial error handling has been added to both the GitHub Readme and GitHub File Contents shortcodes which should help users identify what kind of cURL error they are getting. (1.1.9) 11 13 * Tested up to WordPress 4.3 (1.1.8) 12 14 * Added the tags for tested up to WordPress 4.2.4 (1.1.7) -
dobsondev-shortcodes/tags/1.1.9/dobsondev-shortcodes.php
r1219299 r1265965 4 4 * Plugin URI: http://dobsondev.com/portfolio/dobsondev-shortcodes/ 5 5 * Description: A collection of helpful shortcodes. 6 * Version: 1.1. 86 * Version: 1.1.9 7 7 * Author: Alex Dobson 8 8 * Author URI: http://dobsondev.com/ … … 97 97 'repo' => "NULL", 98 98 'cache_id' => "NULL", 99 'insecure' => "NULL", 99 100 ), $atts)); 100 101 if ($owner == "NULL" || $repo == "NULL") { … … 105 106 // we do not have a transient stored so we have to make the API call 106 107 $curl = curl_init(); 107 curl_setopt_array($curl, array( 108 CURLOPT_RETURNTRANSFER => 1, 109 CURLOPT_URL => 'https://api.github.com/repos/' . $owner . '/' . $repo . '/readme', 110 CURLOPT_USERAGENT => $repo, 111 CURLOPT_HEADER => false 112 )); 108 if ( $insecure == "true" || $insecure == "TRUE" || $insecure == "yes" || $insecure == "YES" ) { 109 // we have an insecure connection so we have to let cURL know that 110 curl_setopt_array($curl, array( 111 CURLOPT_RETURNTRANSFER => 1, 112 CURLOPT_URL => 'https://api.github.com/repos/' . $owner . '/' . $repo . '/readme', 113 CURLOPT_USERAGENT => $repo, 114 CURLOPT_HEADER => false, 115 CURLOPT_SSL_VERIFYPEER => false 116 )); 117 } else { 118 // we are using the regular secure connection 119 curl_setopt_array($curl, array( 120 CURLOPT_RETURNTRANSFER => 1, 121 CURLOPT_URL => 'https://api.github.com/repos/' . $owner . '/' . $repo . '/readme', 122 CURLOPT_USERAGENT => $repo, 123 CURLOPT_HEADER => false 124 )); 125 } 113 126 $response = curl_exec($curl); 114 127 // var_dump($response); 128 if ( FALSE === $response ) { 129 $output_error = '<strong>cURL ERROR</strong>: <span style="color: red">' . curl_error($curl) . '</span><br />'; 130 $output_error .= '<strong>Error #</strong>: <span style="color: red">' . curl_errno($curl) . '</span><br /><br />'; 131 $output_error .= 'If your error reads something like "SSL certificate problem: unable to get local issuer certificate" then please add the <strong>insecure="true"</strong> attribute to your shortcode.'; 132 return $output_error; 133 } 115 134 $response_array = json_decode($response); 116 135 // var_dump($response_array); … … 138 157 'markdown' => "no", 139 158 'cache_id' => "NULL", 159 'insecure' => "NULL", 140 160 ), $atts)); 141 161 if ($owner == "NULL" || $repo == "NULL" || $path == "NULL") { … … 146 166 // we do not have a transient stored so we have to make the API call 147 167 $curl = curl_init(); 148 curl_setopt_array($curl, array( 149 CURLOPT_RETURNTRANSFER => 1, 150 CURLOPT_URL => 'https://api.github.com/repos/' . $owner . '/' . $repo . '/contents/' . $path, 151 CURLOPT_USERAGENT => $repo, 152 CURLOPT_HEADER => false 153 )); 168 if ( $insecure == "true" || $insecure == "TRUE" || $insecure == "yes" || $insecure == "YES" ) { 169 // we have an insecure connection so we have to let cURL know that 170 curl_setopt_array($curl, array( 171 CURLOPT_RETURNTRANSFER => 1, 172 CURLOPT_URL => 'https://api.github.com/repos/' . $owner . '/' . $repo . '/readme', 173 CURLOPT_USERAGENT => $repo, 174 CURLOPT_HEADER => false, 175 CURLOPT_SSL_VERIFYPEER => false 176 )); 177 } else { 178 // we are using the regular secure connection 179 curl_setopt_array($curl, array( 180 CURLOPT_RETURNTRANSFER => 1, 181 CURLOPT_URL => 'https://api.github.com/repos/' . $owner . '/' . $repo . '/readme', 182 CURLOPT_USERAGENT => $repo, 183 CURLOPT_HEADER => false 184 )); 185 } 154 186 $response = curl_exec($curl); 155 187 // var_dump($response); 188 if ( FALSE === $response ) { 189 $output_error = '<strong>cURL ERROR</strong>: <span style="color: red">' . curl_error($curl) . '</span><br />'; 190 $output_error .= '<strong>Error #</strong>: <span style="color: red">' . curl_errno($curl) . '</span><br /><br />'; 191 $output_error .= 'If your error reads something like "SSL certificate problem: unable to get local issuer certificate" then please add the <strong>insecure="true"</strong> attribute to your shortcode.'; 192 return $output_error; 193 } 156 194 $response_array = json_decode($response); 157 195 // var_dump($response_array); -
dobsondev-shortcodes/tags/1.1.9/readme.txt
r1219299 r1265965 7 7 Requires at least: 2.5 8 8 Tested up to: 4.3 9 Stable tag: 1.1. 89 Stable tag: 1.1.9 10 10 11 11 Add a collection of helpful shortcodes to your site. … … 56 56 If you want to take advantage of WordPress' transient API for caching, simply enter an ID for the cache_id argument. Note that this ID can be anything other than "NULL", it doesn't necessarily have to be a number. Once entered this will cause the shortcode to cache the results of the API call for 24 hours. This means the shortcode will use those cached results and speed up the load times for 24 hours, at which point it will then call the API again to get any updates and use those cached results for another 24 hours. 57 57 58 If you're receiving an error similar to "SSL certificate : unable to get local issuer certificate" then please add the attribute insecure="true" to your shortcode. This stops cURL from verifying the peer's certificate which may be required in some cases depending on your server. If you would rather you can instead sdd the root CA (the CA signing the server certificate) to etc/ssl/certs/ca-certificates.crt which will allow secure connections to work. By default the shortcode will use secure connections. 59 58 60 **Embed GitHub Repo File Contents** 59 61 … … 63 65 64 66 If you want to take advantage of WordPress' transient API for caching, simply enter an ID for the cache_id argument. Note that this ID can be anything other than "NULL", it doesn't necessarily have to be a number. Once entered this will cause the shortcode to cache the results of the API call for 24 hours. This means the shortcode will use those cached results and speed up the load times for 24 hours, at which point it will then call the API again to get any updates and use those cached results for another 24 hours. 67 68 If you're receiving an error similar to "SSL certificate : unable to get local issuer certificate" then please add the attribute insecure="true" to your shortcode. This stops cURL from verifying the peer's certificate which may be required in some cases depending on your server. If you would rather you can instead sdd the root CA (the CA signing the server certificate) to etc/ssl/certs/ca-certificates.crt which will allow secure connections to work. By default the shortcode will use secure connections. 65 69 66 70 **Embed Twitch Stream** … … 161 165 Bug Fixes 162 166 167 * Found a bug where the GitHub Readme and GitHub File Contents shortcodes would not return anything because cURL was unable to verify the certificate provided by the server. This can now be avoided using the insecure="true" attribute on the shortcode. Thanks to [JacobD10](https://profiles.wordpress.org/jacobd10/) for finding the error. (1.1.9) 168 * More substantial error handling has been added to both the GitHub Readme and GitHub File Contents shortcodes which should help users identify what kind of cURL error they are getting. (1.1.9) 163 169 * Tested up to WordPress 4.3 (1.1.8) 164 170 * Added the tags for tested up to WordPress 4.2.4 (1.1.7) -
dobsondev-shortcodes/trunk/changelog.txt
r1219299 r1265965 9 9 Bug Fixes 10 10 11 * Found a bug where the GitHub Readme and GitHub File Contents shortcodes would not return anything because cURL was unable to verify the certificate provided by the server. This can now be avoided using the insecure="true" attribute on the shortcode. Thanks to [JacobD10](https://profiles.wordpress.org/jacobd10/) for finding the error. (1.1.9) 12 * More substantial error handling has been added to both the GitHub Readme and GitHub File Contents shortcodes which should help users identify what kind of cURL error they are getting. (1.1.9) 11 13 * Tested up to WordPress 4.3 (1.1.8) 12 14 * Added the tags for tested up to WordPress 4.2.4 (1.1.7) -
dobsondev-shortcodes/trunk/dobsondev-shortcodes.php
r1219299 r1265965 4 4 * Plugin URI: http://dobsondev.com/portfolio/dobsondev-shortcodes/ 5 5 * Description: A collection of helpful shortcodes. 6 * Version: 1.1. 86 * Version: 1.1.9 7 7 * Author: Alex Dobson 8 8 * Author URI: http://dobsondev.com/ … … 97 97 'repo' => "NULL", 98 98 'cache_id' => "NULL", 99 'insecure' => "NULL", 99 100 ), $atts)); 100 101 if ($owner == "NULL" || $repo == "NULL") { … … 105 106 // we do not have a transient stored so we have to make the API call 106 107 $curl = curl_init(); 107 curl_setopt_array($curl, array( 108 CURLOPT_RETURNTRANSFER => 1, 109 CURLOPT_URL => 'https://api.github.com/repos/' . $owner . '/' . $repo . '/readme', 110 CURLOPT_USERAGENT => $repo, 111 CURLOPT_HEADER => false 112 )); 108 if ( $insecure == "true" || $insecure == "TRUE" || $insecure == "yes" || $insecure == "YES" ) { 109 // we have an insecure connection so we have to let cURL know that 110 curl_setopt_array($curl, array( 111 CURLOPT_RETURNTRANSFER => 1, 112 CURLOPT_URL => 'https://api.github.com/repos/' . $owner . '/' . $repo . '/readme', 113 CURLOPT_USERAGENT => $repo, 114 CURLOPT_HEADER => false, 115 CURLOPT_SSL_VERIFYPEER => false 116 )); 117 } else { 118 // we are using the regular secure connection 119 curl_setopt_array($curl, array( 120 CURLOPT_RETURNTRANSFER => 1, 121 CURLOPT_URL => 'https://api.github.com/repos/' . $owner . '/' . $repo . '/readme', 122 CURLOPT_USERAGENT => $repo, 123 CURLOPT_HEADER => false 124 )); 125 } 113 126 $response = curl_exec($curl); 114 127 // var_dump($response); 128 if ( FALSE === $response ) { 129 $output_error = '<strong>cURL ERROR</strong>: <span style="color: red">' . curl_error($curl) . '</span><br />'; 130 $output_error .= '<strong>Error #</strong>: <span style="color: red">' . curl_errno($curl) . '</span><br /><br />'; 131 $output_error .= 'If your error reads something like "SSL certificate problem: unable to get local issuer certificate" then please add the <strong>insecure="true"</strong> attribute to your shortcode.'; 132 return $output_error; 133 } 115 134 $response_array = json_decode($response); 116 135 // var_dump($response_array); … … 138 157 'markdown' => "no", 139 158 'cache_id' => "NULL", 159 'insecure' => "NULL", 140 160 ), $atts)); 141 161 if ($owner == "NULL" || $repo == "NULL" || $path == "NULL") { … … 146 166 // we do not have a transient stored so we have to make the API call 147 167 $curl = curl_init(); 148 curl_setopt_array($curl, array( 149 CURLOPT_RETURNTRANSFER => 1, 150 CURLOPT_URL => 'https://api.github.com/repos/' . $owner . '/' . $repo . '/contents/' . $path, 151 CURLOPT_USERAGENT => $repo, 152 CURLOPT_HEADER => false 153 )); 168 if ( $insecure == "true" || $insecure == "TRUE" || $insecure == "yes" || $insecure == "YES" ) { 169 // we have an insecure connection so we have to let cURL know that 170 curl_setopt_array($curl, array( 171 CURLOPT_RETURNTRANSFER => 1, 172 CURLOPT_URL => 'https://api.github.com/repos/' . $owner . '/' . $repo . '/readme', 173 CURLOPT_USERAGENT => $repo, 174 CURLOPT_HEADER => false, 175 CURLOPT_SSL_VERIFYPEER => false 176 )); 177 } else { 178 // we are using the regular secure connection 179 curl_setopt_array($curl, array( 180 CURLOPT_RETURNTRANSFER => 1, 181 CURLOPT_URL => 'https://api.github.com/repos/' . $owner . '/' . $repo . '/readme', 182 CURLOPT_USERAGENT => $repo, 183 CURLOPT_HEADER => false 184 )); 185 } 154 186 $response = curl_exec($curl); 155 187 // var_dump($response); 188 if ( FALSE === $response ) { 189 $output_error = '<strong>cURL ERROR</strong>: <span style="color: red">' . curl_error($curl) . '</span><br />'; 190 $output_error .= '<strong>Error #</strong>: <span style="color: red">' . curl_errno($curl) . '</span><br /><br />'; 191 $output_error .= 'If your error reads something like "SSL certificate problem: unable to get local issuer certificate" then please add the <strong>insecure="true"</strong> attribute to your shortcode.'; 192 return $output_error; 193 } 156 194 $response_array = json_decode($response); 157 195 // var_dump($response_array); -
dobsondev-shortcodes/trunk/readme.txt
r1219299 r1265965 7 7 Requires at least: 2.5 8 8 Tested up to: 4.3 9 Stable tag: 1.1. 89 Stable tag: 1.1.9 10 10 11 11 Add a collection of helpful shortcodes to your site. … … 56 56 If you want to take advantage of WordPress' transient API for caching, simply enter an ID for the cache_id argument. Note that this ID can be anything other than "NULL", it doesn't necessarily have to be a number. Once entered this will cause the shortcode to cache the results of the API call for 24 hours. This means the shortcode will use those cached results and speed up the load times for 24 hours, at which point it will then call the API again to get any updates and use those cached results for another 24 hours. 57 57 58 If you're receiving an error similar to "SSL certificate : unable to get local issuer certificate" then please add the attribute insecure="true" to your shortcode. This stops cURL from verifying the peer's certificate which may be required in some cases depending on your server. If you would rather you can instead sdd the root CA (the CA signing the server certificate) to etc/ssl/certs/ca-certificates.crt which will allow secure connections to work. By default the shortcode will use secure connections. 59 58 60 **Embed GitHub Repo File Contents** 59 61 … … 63 65 64 66 If you want to take advantage of WordPress' transient API for caching, simply enter an ID for the cache_id argument. Note that this ID can be anything other than "NULL", it doesn't necessarily have to be a number. Once entered this will cause the shortcode to cache the results of the API call for 24 hours. This means the shortcode will use those cached results and speed up the load times for 24 hours, at which point it will then call the API again to get any updates and use those cached results for another 24 hours. 67 68 If you're receiving an error similar to "SSL certificate : unable to get local issuer certificate" then please add the attribute insecure="true" to your shortcode. This stops cURL from verifying the peer's certificate which may be required in some cases depending on your server. If you would rather you can instead sdd the root CA (the CA signing the server certificate) to etc/ssl/certs/ca-certificates.crt which will allow secure connections to work. By default the shortcode will use secure connections. 65 69 66 70 **Embed Twitch Stream** … … 161 165 Bug Fixes 162 166 167 * Found a bug where the GitHub Readme and GitHub File Contents shortcodes would not return anything because cURL was unable to verify the certificate provided by the server. This can now be avoided using the insecure="true" attribute on the shortcode. Thanks to [JacobD10](https://profiles.wordpress.org/jacobd10/) for finding the error. (1.1.9) 168 * More substantial error handling has been added to both the GitHub Readme and GitHub File Contents shortcodes which should help users identify what kind of cURL error they are getting. (1.1.9) 163 169 * Tested up to WordPress 4.3 (1.1.8) 164 170 * Added the tags for tested up to WordPress 4.2.4 (1.1.7)
Note: See TracChangeset
for help on using the changeset viewer.