Changeset 2335901
- Timestamp:
- 07/06/2020 08:23:48 AM (6 years ago)
- Location:
- podigee
- Files:
-
- 4 edited
- 1 copied
-
tags/1.1 (copied) (copied from podigee/trunk)
-
tags/1.1/podigee-quick-publish.php (modified) (5 diffs)
-
tags/1.1/readme.txt (modified) (2 diffs)
-
trunk/podigee-quick-publish.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
podigee/tags/1.1/podigee-quick-publish.php
r2329267 r2335901 5 5 * Description: Let's you import metadata from your Podigee podcast feed right into the Wordpress post editor. Now also compatible to Gutenberg. Developed for Podigee by Jürgen Krauß (https://www.es-ist-ein-krauss.de/). 6 6 * Text Domain: podigee-quick-publish 7 * Version: 1. 07 * Version: 1.1 8 8 * Author: Podigee 9 9 * Author URI: https://podigee.com … … 229 229 global $_PFEX_DEBUG; 230 230 if( !session_id() ) session_start(); 231 if (isset($_GET['pfex-debug'])) $_SESSION = $_GET['pfex-debug']; 231 232 if (isset($_SESSION['pfex-debug']) && $_SESSION['pfex-debug'] == "1") $_PFEX_DEBUG = $_SESSION['pfex-debug']; 232 233 } … … 492 493 if ($_PFEX_DEBUG) pfex_log(true, "DOMdocument exists –> using it."); 493 494 $rss = new DOMDocument(); 494 @$rss->load ($url);495 @$rss->loadXML(pfex_url_get_contents($url)); 495 496 $feed = array(); 496 497 //echo $url."<br />"; … … 538 539 if ($_PFEX_DEBUG) pfex_log(true, "SimpleXML worked and retrieved ".count($feed)." feed entries.", array("url" => $url)); 539 540 } catch (Exception $e) { 540 if ($_PFEX_DEBUG) pfex_log( true, "SimpleXML threw an error.", array("error" => $e));541 if ($_PFEX_DEBUG) pfex_log(false, "SimpleXML threw an error.", array("error" => $e)); 541 542 wp_die('error'); 542 543 } … … 623 624 624 625 /* 626 * Had to add this download function to fix the few cases in which the XML would return empty. 627 */ 628 function pfex_url_get_contents ($Url) { 629 if (!function_exists('curl_init')){ 630 pfex_log(false, "CURL is not installed – try using file_get_contents instead"); 631 return file_get_contents(($url)); 632 } 633 $ch = curl_init(); 634 curl_setopt($ch, CURLOPT_URL, $Url); 635 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 636 $output = curl_exec($ch); 637 curl_close($ch); 638 return $output; 639 } 640 641 /* 625 642 * This is the class for our custom table that displays the feed items. 626 643 */ -
podigee/tags/1.1/readme.txt
r2329267 r2335901 5 5 Tested up to: 5.4.2 6 6 Requires PHP: 5.2.4 7 Stable tag: 1. 07 Stable tag: 1.1 8 8 License: MIT License 9 9 License URI: https://opensource.org/licenses/MIT … … 74 74 75 75 == Changelog == 76 = 1.1 = 77 * Fixed rare error where plugin would only read the first line of a podcast feed 78 76 79 = 1.0 = 77 80 * Added backend menu item -
podigee/trunk/podigee-quick-publish.php
r2329267 r2335901 5 5 * Description: Let's you import metadata from your Podigee podcast feed right into the Wordpress post editor. Now also compatible to Gutenberg. Developed for Podigee by Jürgen Krauß (https://www.es-ist-ein-krauss.de/). 6 6 * Text Domain: podigee-quick-publish 7 * Version: 1. 07 * Version: 1.1 8 8 * Author: Podigee 9 9 * Author URI: https://podigee.com … … 229 229 global $_PFEX_DEBUG; 230 230 if( !session_id() ) session_start(); 231 if (isset($_GET['pfex-debug'])) $_SESSION = $_GET['pfex-debug']; 231 232 if (isset($_SESSION['pfex-debug']) && $_SESSION['pfex-debug'] == "1") $_PFEX_DEBUG = $_SESSION['pfex-debug']; 232 233 } … … 492 493 if ($_PFEX_DEBUG) pfex_log(true, "DOMdocument exists –> using it."); 493 494 $rss = new DOMDocument(); 494 @$rss->load ($url);495 @$rss->loadXML(pfex_url_get_contents($url)); 495 496 $feed = array(); 496 497 //echo $url."<br />"; … … 538 539 if ($_PFEX_DEBUG) pfex_log(true, "SimpleXML worked and retrieved ".count($feed)." feed entries.", array("url" => $url)); 539 540 } catch (Exception $e) { 540 if ($_PFEX_DEBUG) pfex_log( true, "SimpleXML threw an error.", array("error" => $e));541 if ($_PFEX_DEBUG) pfex_log(false, "SimpleXML threw an error.", array("error" => $e)); 541 542 wp_die('error'); 542 543 } … … 623 624 624 625 /* 626 * Had to add this download function to fix the few cases in which the XML would return empty. 627 */ 628 function pfex_url_get_contents ($Url) { 629 if (!function_exists('curl_init')){ 630 pfex_log(false, "CURL is not installed – try using file_get_contents instead"); 631 return file_get_contents(($url)); 632 } 633 $ch = curl_init(); 634 curl_setopt($ch, CURLOPT_URL, $Url); 635 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 636 $output = curl_exec($ch); 637 curl_close($ch); 638 return $output; 639 } 640 641 /* 625 642 * This is the class for our custom table that displays the feed items. 626 643 */ -
podigee/trunk/readme.txt
r2329267 r2335901 5 5 Tested up to: 5.4.2 6 6 Requires PHP: 5.2.4 7 Stable tag: 1. 07 Stable tag: 1.1 8 8 License: MIT License 9 9 License URI: https://opensource.org/licenses/MIT … … 74 74 75 75 == Changelog == 76 = 1.1 = 77 * Fixed rare error where plugin would only read the first line of a podcast feed 78 76 79 = 1.0 = 77 80 * Added backend menu item
Note: See TracChangeset
for help on using the changeset viewer.