Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-inclu...
File: class-simplepie.php
* @return SimplePie_Author|null
[2500] Fix | Delete
*/
[2501] Fix | Delete
public function get_contributor($key = 0)
[2502] Fix | Delete
{
[2503] Fix | Delete
$contributors = $this->get_contributors();
[2504] Fix | Delete
if (isset($contributors[$key]))
[2505] Fix | Delete
{
[2506] Fix | Delete
return $contributors[$key];
[2507] Fix | Delete
}
[2508] Fix | Delete
[2509] Fix | Delete
return null;
[2510] Fix | Delete
}
[2511] Fix | Delete
[2512] Fix | Delete
/**
[2513] Fix | Delete
* Get all contributors for the feed
[2514] Fix | Delete
*
[2515] Fix | Delete
* Uses `<atom:contributor>`
[2516] Fix | Delete
*
[2517] Fix | Delete
* @since 1.1
[2518] Fix | Delete
* @return array|null List of {@see SimplePie_Author} objects
[2519] Fix | Delete
*/
[2520] Fix | Delete
public function get_contributors()
[2521] Fix | Delete
{
[2522] Fix | Delete
$contributors = array();
[2523] Fix | Delete
foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'contributor') as $contributor)
[2524] Fix | Delete
{
[2525] Fix | Delete
$name = null;
[2526] Fix | Delete
$uri = null;
[2527] Fix | Delete
$email = null;
[2528] Fix | Delete
if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data']))
[2529] Fix | Delete
{
[2530] Fix | Delete
$name = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
[2531] Fix | Delete
}
[2532] Fix | Delete
if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data']))
[2533] Fix | Delete
{
[2534] Fix | Delete
$uri = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]));
[2535] Fix | Delete
}
[2536] Fix | Delete
if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data']))
[2537] Fix | Delete
{
[2538] Fix | Delete
$email = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
[2539] Fix | Delete
}
[2540] Fix | Delete
if ($name !== null || $email !== null || $uri !== null)
[2541] Fix | Delete
{
[2542] Fix | Delete
$contributors[] = $this->registry->create('Author', array($name, $uri, $email));
[2543] Fix | Delete
}
[2544] Fix | Delete
}
[2545] Fix | Delete
foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'contributor') as $contributor)
[2546] Fix | Delete
{
[2547] Fix | Delete
$name = null;
[2548] Fix | Delete
$url = null;
[2549] Fix | Delete
$email = null;
[2550] Fix | Delete
if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data']))
[2551] Fix | Delete
{
[2552] Fix | Delete
$name = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
[2553] Fix | Delete
}
[2554] Fix | Delete
if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data']))
[2555] Fix | Delete
{
[2556] Fix | Delete
$url = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]));
[2557] Fix | Delete
}
[2558] Fix | Delete
if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data']))
[2559] Fix | Delete
{
[2560] Fix | Delete
$email = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
[2561] Fix | Delete
}
[2562] Fix | Delete
if ($name !== null || $email !== null || $url !== null)
[2563] Fix | Delete
{
[2564] Fix | Delete
$contributors[] = $this->registry->create('Author', array($name, $url, $email));
[2565] Fix | Delete
}
[2566] Fix | Delete
}
[2567] Fix | Delete
[2568] Fix | Delete
if (!empty($contributors))
[2569] Fix | Delete
{
[2570] Fix | Delete
return array_unique($contributors);
[2571] Fix | Delete
}
[2572] Fix | Delete
[2573] Fix | Delete
return null;
[2574] Fix | Delete
}
[2575] Fix | Delete
[2576] Fix | Delete
/**
[2577] Fix | Delete
* Get a single link for the feed
[2578] Fix | Delete
*
[2579] Fix | Delete
* @since 1.0 (previously called `get_feed_link` since Preview Release, `get_feed_permalink()` since 0.8)
[2580] Fix | Delete
* @param int $key The link that you want to return. Remember that arrays begin with 0, not 1
[2581] Fix | Delete
* @param string $rel The relationship of the link to return
[2582] Fix | Delete
* @return string|null Link URL
[2583] Fix | Delete
*/
[2584] Fix | Delete
public function get_link($key = 0, $rel = 'alternate')
[2585] Fix | Delete
{
[2586] Fix | Delete
$links = $this->get_links($rel);
[2587] Fix | Delete
if (isset($links[$key]))
[2588] Fix | Delete
{
[2589] Fix | Delete
return $links[$key];
[2590] Fix | Delete
}
[2591] Fix | Delete
[2592] Fix | Delete
return null;
[2593] Fix | Delete
}
[2594] Fix | Delete
[2595] Fix | Delete
/**
[2596] Fix | Delete
* Get the permalink for the item
[2597] Fix | Delete
*
[2598] Fix | Delete
* Returns the first link available with a relationship of "alternate".
[2599] Fix | Delete
* Identical to {@see get_link()} with key 0
[2600] Fix | Delete
*
[2601] Fix | Delete
* @see get_link
[2602] Fix | Delete
* @since 1.0 (previously called `get_feed_link` since Preview Release, `get_feed_permalink()` since 0.8)
[2603] Fix | Delete
* @internal Added for parity between the parent-level and the item/entry-level.
[2604] Fix | Delete
* @return string|null Link URL
[2605] Fix | Delete
*/
[2606] Fix | Delete
public function get_permalink()
[2607] Fix | Delete
{
[2608] Fix | Delete
return $this->get_link(0);
[2609] Fix | Delete
}
[2610] Fix | Delete
[2611] Fix | Delete
/**
[2612] Fix | Delete
* Get all links for the feed
[2613] Fix | Delete
*
[2614] Fix | Delete
* Uses `<atom:link>` or `<link>`
[2615] Fix | Delete
*
[2616] Fix | Delete
* @since Beta 2
[2617] Fix | Delete
* @param string $rel The relationship of links to return
[2618] Fix | Delete
* @return array|null Links found for the feed (strings)
[2619] Fix | Delete
*/
[2620] Fix | Delete
public function get_links($rel = 'alternate')
[2621] Fix | Delete
{
[2622] Fix | Delete
if (!isset($this->data['links']))
[2623] Fix | Delete
{
[2624] Fix | Delete
$this->data['links'] = array();
[2625] Fix | Delete
if ($links = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'link'))
[2626] Fix | Delete
{
[2627] Fix | Delete
foreach ($links as $link)
[2628] Fix | Delete
{
[2629] Fix | Delete
if (isset($link['attribs']['']['href']))
[2630] Fix | Delete
{
[2631] Fix | Delete
$link_rel = (isset($link['attribs']['']['rel'])) ? $link['attribs']['']['rel'] : 'alternate';
[2632] Fix | Delete
$this->data['links'][$link_rel][] = $this->sanitize($link['attribs']['']['href'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($link));
[2633] Fix | Delete
}
[2634] Fix | Delete
}
[2635] Fix | Delete
}
[2636] Fix | Delete
if ($links = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'link'))
[2637] Fix | Delete
{
[2638] Fix | Delete
foreach ($links as $link)
[2639] Fix | Delete
{
[2640] Fix | Delete
if (isset($link['attribs']['']['href']))
[2641] Fix | Delete
{
[2642] Fix | Delete
$link_rel = (isset($link['attribs']['']['rel'])) ? $link['attribs']['']['rel'] : 'alternate';
[2643] Fix | Delete
$this->data['links'][$link_rel][] = $this->sanitize($link['attribs']['']['href'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($link));
[2644] Fix | Delete
[2645] Fix | Delete
}
[2646] Fix | Delete
}
[2647] Fix | Delete
}
[2648] Fix | Delete
if ($links = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'link'))
[2649] Fix | Delete
{
[2650] Fix | Delete
$this->data['links']['alternate'][] = $this->sanitize($links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($links[0]));
[2651] Fix | Delete
}
[2652] Fix | Delete
if ($links = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'link'))
[2653] Fix | Delete
{
[2654] Fix | Delete
$this->data['links']['alternate'][] = $this->sanitize($links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($links[0]));
[2655] Fix | Delete
}
[2656] Fix | Delete
if ($links = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'link'))
[2657] Fix | Delete
{
[2658] Fix | Delete
$this->data['links']['alternate'][] = $this->sanitize($links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($links[0]));
[2659] Fix | Delete
}
[2660] Fix | Delete
[2661] Fix | Delete
$keys = array_keys($this->data['links']);
[2662] Fix | Delete
foreach ($keys as $key)
[2663] Fix | Delete
{
[2664] Fix | Delete
if ($this->registry->call('Misc', 'is_isegment_nz_nc', array($key)))
[2665] Fix | Delete
{
[2666] Fix | Delete
if (isset($this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key]))
[2667] Fix | Delete
{
[2668] Fix | Delete
$this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key] = array_merge($this->data['links'][$key], $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key]);
[2669] Fix | Delete
$this->data['links'][$key] =& $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key];
[2670] Fix | Delete
}
[2671] Fix | Delete
else
[2672] Fix | Delete
{
[2673] Fix | Delete
$this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key] =& $this->data['links'][$key];
[2674] Fix | Delete
}
[2675] Fix | Delete
}
[2676] Fix | Delete
elseif (substr($key, 0, 41) === SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY)
[2677] Fix | Delete
{
[2678] Fix | Delete
$this->data['links'][substr($key, 41)] =& $this->data['links'][$key];
[2679] Fix | Delete
}
[2680] Fix | Delete
$this->data['links'][$key] = array_unique($this->data['links'][$key]);
[2681] Fix | Delete
}
[2682] Fix | Delete
}
[2683] Fix | Delete
[2684] Fix | Delete
if (isset($this->data['headers']['link']))
[2685] Fix | Delete
{
[2686] Fix | Delete
$link_headers = $this->data['headers']['link'];
[2687] Fix | Delete
if (is_string($link_headers)) {
[2688] Fix | Delete
$link_headers = array($link_headers);
[2689] Fix | Delete
}
[2690] Fix | Delete
$matches = preg_filter('/<([^>]+)>; rel='.preg_quote($rel).'/', '$1', $link_headers);
[2691] Fix | Delete
if (!empty($matches)) {
[2692] Fix | Delete
return $matches;
[2693] Fix | Delete
}
[2694] Fix | Delete
}
[2695] Fix | Delete
[2696] Fix | Delete
if (isset($this->data['links'][$rel]))
[2697] Fix | Delete
{
[2698] Fix | Delete
return $this->data['links'][$rel];
[2699] Fix | Delete
}
[2700] Fix | Delete
[2701] Fix | Delete
return null;
[2702] Fix | Delete
}
[2703] Fix | Delete
[2704] Fix | Delete
public function get_all_discovered_feeds()
[2705] Fix | Delete
{
[2706] Fix | Delete
return $this->all_discovered_feeds;
[2707] Fix | Delete
}
[2708] Fix | Delete
[2709] Fix | Delete
/**
[2710] Fix | Delete
* Get the content for the item
[2711] Fix | Delete
*
[2712] Fix | Delete
* Uses `<atom:subtitle>`, `<atom:tagline>`, `<description>`,
[2713] Fix | Delete
* `<dc:description>`, `<itunes:summary>` or `<itunes:subtitle>`
[2714] Fix | Delete
*
[2715] Fix | Delete
* @since 1.0 (previously called `get_feed_description()` since 0.8)
[2716] Fix | Delete
* @return string|null
[2717] Fix | Delete
*/
[2718] Fix | Delete
public function get_description()
[2719] Fix | Delete
{
[2720] Fix | Delete
if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'subtitle'))
[2721] Fix | Delete
{
[2722] Fix | Delete
return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', array($return[0]['attribs'])), $this->get_base($return[0]));
[2723] Fix | Delete
}
[2724] Fix | Delete
elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'tagline'))
[2725] Fix | Delete
{
[2726] Fix | Delete
return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', array($return[0]['attribs'])), $this->get_base($return[0]));
[2727] Fix | Delete
}
[2728] Fix | Delete
elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'description'))
[2729] Fix | Delete
{
[2730] Fix | Delete
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0]));
[2731] Fix | Delete
}
[2732] Fix | Delete
elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'description'))
[2733] Fix | Delete
{
[2734] Fix | Delete
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0]));
[2735] Fix | Delete
}
[2736] Fix | Delete
elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'description'))
[2737] Fix | Delete
{
[2738] Fix | Delete
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0]));
[2739] Fix | Delete
}
[2740] Fix | Delete
elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_11, 'description'))
[2741] Fix | Delete
{
[2742] Fix | Delete
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
[2743] Fix | Delete
}
[2744] Fix | Delete
elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_10, 'description'))
[2745] Fix | Delete
{
[2746] Fix | Delete
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
[2747] Fix | Delete
}
[2748] Fix | Delete
elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'summary'))
[2749] Fix | Delete
{
[2750] Fix | Delete
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0]));
[2751] Fix | Delete
}
[2752] Fix | Delete
elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'subtitle'))
[2753] Fix | Delete
{
[2754] Fix | Delete
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0]));
[2755] Fix | Delete
}
[2756] Fix | Delete
[2757] Fix | Delete
return null;
[2758] Fix | Delete
}
[2759] Fix | Delete
[2760] Fix | Delete
/**
[2761] Fix | Delete
* Get the copyright info for the feed
[2762] Fix | Delete
*
[2763] Fix | Delete
* Uses `<atom:rights>`, `<atom:copyright>` or `<dc:rights>`
[2764] Fix | Delete
*
[2765] Fix | Delete
* @since 1.0 (previously called `get_feed_copyright()` since 0.8)
[2766] Fix | Delete
* @return string|null
[2767] Fix | Delete
*/
[2768] Fix | Delete
public function get_copyright()
[2769] Fix | Delete
{
[2770] Fix | Delete
if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'rights'))
[2771] Fix | Delete
{
[2772] Fix | Delete
return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', array($return[0]['attribs'])), $this->get_base($return[0]));
[2773] Fix | Delete
}
[2774] Fix | Delete
elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'copyright'))
[2775] Fix | Delete
{
[2776] Fix | Delete
return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', array($return[0]['attribs'])), $this->get_base($return[0]));
[2777] Fix | Delete
}
[2778] Fix | Delete
elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'copyright'))
[2779] Fix | Delete
{
[2780] Fix | Delete
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
[2781] Fix | Delete
}
[2782] Fix | Delete
elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_11, 'rights'))
[2783] Fix | Delete
{
[2784] Fix | Delete
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
[2785] Fix | Delete
}
[2786] Fix | Delete
elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_10, 'rights'))
[2787] Fix | Delete
{
[2788] Fix | Delete
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
[2789] Fix | Delete
}
[2790] Fix | Delete
[2791] Fix | Delete
return null;
[2792] Fix | Delete
}
[2793] Fix | Delete
[2794] Fix | Delete
/**
[2795] Fix | Delete
* Get the language for the feed
[2796] Fix | Delete
*
[2797] Fix | Delete
* Uses `<language>`, `<dc:language>`, or @xml_lang
[2798] Fix | Delete
*
[2799] Fix | Delete
* @since 1.0 (previously called `get_feed_language()` since 0.8)
[2800] Fix | Delete
* @return string|null
[2801] Fix | Delete
*/
[2802] Fix | Delete
public function get_language()
[2803] Fix | Delete
{
[2804] Fix | Delete
if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'language'))
[2805] Fix | Delete
{
[2806] Fix | Delete
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
[2807] Fix | Delete
}
[2808] Fix | Delete
elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_11, 'language'))
[2809] Fix | Delete
{
[2810] Fix | Delete
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
[2811] Fix | Delete
}
[2812] Fix | Delete
elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_10, 'language'))
[2813] Fix | Delete
{
[2814] Fix | Delete
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
[2815] Fix | Delete
}
[2816] Fix | Delete
elseif (isset($this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0]['xml_lang']))
[2817] Fix | Delete
{
[2818] Fix | Delete
return $this->sanitize($this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0]['xml_lang'], SIMPLEPIE_CONSTRUCT_TEXT);
[2819] Fix | Delete
}
[2820] Fix | Delete
elseif (isset($this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0]['xml_lang']))
[2821] Fix | Delete
{
[2822] Fix | Delete
return $this->sanitize($this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0]['xml_lang'], SIMPLEPIE_CONSTRUCT_TEXT);
[2823] Fix | Delete
}
[2824] Fix | Delete
elseif (isset($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]['xml_lang']))
[2825] Fix | Delete
{
[2826] Fix | Delete
return $this->sanitize($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]['xml_lang'], SIMPLEPIE_CONSTRUCT_TEXT);
[2827] Fix | Delete
}
[2828] Fix | Delete
elseif (isset($this->data['headers']['content-language']))
[2829] Fix | Delete
{
[2830] Fix | Delete
return $this->sanitize($this->data['headers']['content-language'], SIMPLEPIE_CONSTRUCT_TEXT);
[2831] Fix | Delete
}
[2832] Fix | Delete
[2833] Fix | Delete
return null;
[2834] Fix | Delete
}
[2835] Fix | Delete
[2836] Fix | Delete
/**
[2837] Fix | Delete
* Get the latitude coordinates for the item
[2838] Fix | Delete
*
[2839] Fix | Delete
* Compatible with the W3C WGS84 Basic Geo and GeoRSS specifications
[2840] Fix | Delete
*
[2841] Fix | Delete
* Uses `<geo:lat>` or `<georss:point>`
[2842] Fix | Delete
*
[2843] Fix | Delete
* @since 1.0
[2844] Fix | Delete
* @link http://www.w3.org/2003/01/geo/ W3C WGS84 Basic Geo
[2845] Fix | Delete
* @link http://www.georss.org/ GeoRSS
[2846] Fix | Delete
* @return string|null
[2847] Fix | Delete
*/
[2848] Fix | Delete
public function get_latitude()
[2849] Fix | Delete
{
[2850] Fix | Delete
[2851] Fix | Delete
if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lat'))
[2852] Fix | Delete
{
[2853] Fix | Delete
return (float) $return[0]['data'];
[2854] Fix | Delete
}
[2855] Fix | Delete
elseif (($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim($return[0]['data']), $match))
[2856] Fix | Delete
{
[2857] Fix | Delete
return (float) $match[1];
[2858] Fix | Delete
}
[2859] Fix | Delete
[2860] Fix | Delete
return null;
[2861] Fix | Delete
}
[2862] Fix | Delete
[2863] Fix | Delete
/**
[2864] Fix | Delete
* Get the longitude coordinates for the feed
[2865] Fix | Delete
*
[2866] Fix | Delete
* Compatible with the W3C WGS84 Basic Geo and GeoRSS specifications
[2867] Fix | Delete
*
[2868] Fix | Delete
* Uses `<geo:long>`, `<geo:lon>` or `<georss:point>`
[2869] Fix | Delete
*
[2870] Fix | Delete
* @since 1.0
[2871] Fix | Delete
* @link http://www.w3.org/2003/01/geo/ W3C WGS84 Basic Geo
[2872] Fix | Delete
* @link http://www.georss.org/ GeoRSS
[2873] Fix | Delete
* @return string|null
[2874] Fix | Delete
*/
[2875] Fix | Delete
public function get_longitude()
[2876] Fix | Delete
{
[2877] Fix | Delete
if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'long'))
[2878] Fix | Delete
{
[2879] Fix | Delete
return (float) $return[0]['data'];
[2880] Fix | Delete
}
[2881] Fix | Delete
elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lon'))
[2882] Fix | Delete
{
[2883] Fix | Delete
return (float) $return[0]['data'];
[2884] Fix | Delete
}
[2885] Fix | Delete
elseif (($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim($return[0]['data']), $match))
[2886] Fix | Delete
{
[2887] Fix | Delete
return (float) $match[2];
[2888] Fix | Delete
}
[2889] Fix | Delete
[2890] Fix | Delete
return null;
[2891] Fix | Delete
}
[2892] Fix | Delete
[2893] Fix | Delete
/**
[2894] Fix | Delete
* Get the feed logo's title
[2895] Fix | Delete
*
[2896] Fix | Delete
* RSS 0.9.0, 1.0 and 2.0 feeds are allowed to have a "feed logo" title.
[2897] Fix | Delete
*
[2898] Fix | Delete
* Uses `<image><title>` or `<image><dc:title>`
[2899] Fix | Delete
*
[2900] Fix | Delete
* @return string|null
[2901] Fix | Delete
*/
[2902] Fix | Delete
public function get_image_title()
[2903] Fix | Delete
{
[2904] Fix | Delete
if ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'title'))
[2905] Fix | Delete
{
[2906] Fix | Delete
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
[2907] Fix | Delete
}
[2908] Fix | Delete
elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'title'))
[2909] Fix | Delete
{
[2910] Fix | Delete
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
[2911] Fix | Delete
}
[2912] Fix | Delete
elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'title'))
[2913] Fix | Delete
{
[2914] Fix | Delete
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
[2915] Fix | Delete
}
[2916] Fix | Delete
elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_DC_11, 'title'))
[2917] Fix | Delete
{
[2918] Fix | Delete
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
[2919] Fix | Delete
}
[2920] Fix | Delete
elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_DC_10, 'title'))
[2921] Fix | Delete
{
[2922] Fix | Delete
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
[2923] Fix | Delete
}
[2924] Fix | Delete
[2925] Fix | Delete
return null;
[2926] Fix | Delete
}
[2927] Fix | Delete
[2928] Fix | Delete
/**
[2929] Fix | Delete
* Get the feed logo's URL
[2930] Fix | Delete
*
[2931] Fix | Delete
* RSS 0.9.0, 2.0, Atom 1.0, and feeds with iTunes RSS tags are allowed to
[2932] Fix | Delete
* have a "feed logo" URL. This points directly to the image itself.
[2933] Fix | Delete
*
[2934] Fix | Delete
* Uses `<itunes:image>`, `<atom:logo>`, `<atom:icon>`,
[2935] Fix | Delete
* `<image><title>` or `<image><dc:title>`
[2936] Fix | Delete
*
[2937] Fix | Delete
* @return string|null
[2938] Fix | Delete
*/
[2939] Fix | Delete
public function get_image_url()
[2940] Fix | Delete
{
[2941] Fix | Delete
if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'image'))
[2942] Fix | Delete
{
[2943] Fix | Delete
return $this->sanitize($return[0]['attribs']['']['href'], SIMPLEPIE_CONSTRUCT_IRI);
[2944] Fix | Delete
}
[2945] Fix | Delete
elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'logo'))
[2946] Fix | Delete
{
[2947] Fix | Delete
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0]));
[2948] Fix | Delete
}
[2949] Fix | Delete
elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'icon'))
[2950] Fix | Delete
{
[2951] Fix | Delete
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0]));
[2952] Fix | Delete
}
[2953] Fix | Delete
elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'url'))
[2954] Fix | Delete
{
[2955] Fix | Delete
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0]));
[2956] Fix | Delete
}
[2957] Fix | Delete
elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'url'))
[2958] Fix | Delete
{
[2959] Fix | Delete
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0]));
[2960] Fix | Delete
}
[2961] Fix | Delete
elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'url'))
[2962] Fix | Delete
{
[2963] Fix | Delete
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0]));
[2964] Fix | Delete
}
[2965] Fix | Delete
[2966] Fix | Delete
return null;
[2967] Fix | Delete
}
[2968] Fix | Delete
[2969] Fix | Delete
[2970] Fix | Delete
/**
[2971] Fix | Delete
* Get the feed logo's link
[2972] Fix | Delete
*
[2973] Fix | Delete
* RSS 0.9.0, 1.0 and 2.0 feeds are allowed to have a "feed logo" link. This
[2974] Fix | Delete
* points to a human-readable page that the image should link to.
[2975] Fix | Delete
*
[2976] Fix | Delete
* Uses `<itunes:image>`, `<atom:logo>`, `<atom:icon>`,
[2977] Fix | Delete
* `<image><title>` or `<image><dc:title>`
[2978] Fix | Delete
*
[2979] Fix | Delete
* @return string|null
[2980] Fix | Delete
*/
[2981] Fix | Delete
public function get_image_link()
[2982] Fix | Delete
{
[2983] Fix | Delete
if ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'link'))
[2984] Fix | Delete
{
[2985] Fix | Delete
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0]));
[2986] Fix | Delete
}
[2987] Fix | Delete
elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'link'))
[2988] Fix | Delete
{
[2989] Fix | Delete
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0]));
[2990] Fix | Delete
}
[2991] Fix | Delete
elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'link'))
[2992] Fix | Delete
{
[2993] Fix | Delete
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0]));
[2994] Fix | Delete
}
[2995] Fix | Delete
[2996] Fix | Delete
return null;
[2997] Fix | Delete
}
[2998] Fix | Delete
[2999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function