![]() Server : LiteSpeed System : Linux premium84.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 User : claqxcrl ( 523) PHP Version : 8.1.32 Disable Function : NONE Directory : /home/claqxcrl/anfangola.com/wp-content/plugins/sportspress/includes/ |
<?php /** * SportsPress Feeds Class * * @class SP_Feeds * @version 2.6.5 * @package SportsPress/Classes * @category Class * @author ThemeBoy */ class SP_Feeds { /** @var array Array of feeds */ private $data; /** * Constructor for the feeds class - defines all preset feeds. * * @access public * @return void */ public function __construct() { $data = array( 'calendar' => array( 'ical' => array( 'apple' => array( 'name' => esc_attr__( 'Apple Calendar', 'sportspress' ), 'protocol' => 'webcal', ), 'outlook' => array( 'name' => esc_attr__( 'Outlook', 'sportspress' ), 'protocol' => 'webcal', ), 'google' => array( 'name' => esc_attr__( 'Google', 'sportspress' ), 'protocol' => 'webcal', 'prefix' => 'http://www.google.com/calendar/render?cid=', ), ), ), ); $this->data = apply_filters( 'sportspress_feeds', $data ); foreach ( $data as $post_type => $feeds ) { foreach ( $feeds as $slug => $formats ) { add_feed( 'sp-' . $slug, array( $this, $slug . '_feed' ) ); } } } public function __get( $key ) { return ( array_key_exists( $key, $this->data ) ? $this->data[ $key ] : null ); } public function __set( $key, $value ) { $this->data[ $key ] = $value; } public static function ical_feed() { $feed_template = SP()->plugin_path() . '/feeds/ical.php'; load_template( $feed_template ); } }