X7ROOT File Manager
Current Path:
/home/okeydcqc/public_html/wp-content/plugins/jetpack/_inc/lib
home
/
okeydcqc
/
public_html
/
wp-content
/
plugins
/
jetpack
/
_inc
/
lib
/
ðŸ“
..
ðŸ“
admin-pages
📄
class-jetpack-ai-helper.php
(14.21 KB)
📄
class-jetpack-blog-stats-helper.php
(2.73 KB)
📄
class-jetpack-currencies.php
(4.73 KB)
📄
class-jetpack-instagram-gallery-helper.php
(2.92 KB)
📄
class-jetpack-mapbox-helper.php
(3.16 KB)
📄
class-jetpack-podcast-feed-locator.php
(3.47 KB)
📄
class-jetpack-podcast-helper.php
(20.23 KB)
📄
class-jetpack-recommendations.php
(15.24 KB)
📄
class-jetpack-top-posts-helper.php
(4.48 KB)
📄
class.color.php
(21.79 KB)
📄
class.core-rest-api-endpoints.php
(148.07 KB)
📄
class.jetpack-automatic-install-skin.php
(293 B)
📄
class.jetpack-iframe-embed.php
(3.1 KB)
📄
class.jetpack-password-checker.php
(32.45 KB)
📄
class.jetpack-search-performance-logger.php
(3.62 KB)
📄
class.media-extractor.php
(21.57 KB)
📄
class.media-summary.php
(15.43 KB)
📄
class.media.php
(15.56 KB)
📄
components.php
(3.04 KB)
ðŸ“
core-api
ðŸ“
debugger
📄
debugger.php
(872 B)
📄
icalendar-reader.php
(33.11 KB)
ðŸ“
markdown
📄
markdown.php
(344 B)
📄
plans.php
(1.89 KB)
📄
plugins.php
(209 B)
📄
tonesque.php
(6.85 KB)
📄
widgets.php
(26.19 KB)
Editing: class-jetpack-podcast-feed-locator.php
<?php /** * Extension of the SimplePie\Locator class, to detect podcast feeds * * @package automattic/jetpack */ /** * Class Jetpack_Podcast_Feed_Locator */ class Jetpack_Podcast_Feed_Locator extends SimplePie\Locator { /** * Overrides the locator is_feed function to check for * appropriate podcast elements. * * @param SimplePie\File $file The file being checked. * @param boolean $check_html Adds text/html to the mimetypes checked. */ public function is_feed( $file, $check_html = false ) { return parent::is_feed( $file, $check_html ) && $this->is_podcast_feed( $file ); } /** * Checks the contents of the file for elements that make * it a podcast feed. * * @param SimplePie\File $file The file being checked. */ private function is_podcast_feed( $file ) { // If we can't read the DOM assume it's a podcast feed, we'll work // it out later. if ( ! class_exists( 'DOMDocument' ) ) { return true; } $feed_dom = $this->safely_load_xml( $file->body ); // Do this as either/or but prioritise the itunes namespace. It's pretty likely // that it's a podcast feed we've found if that namespace is present. return $feed_dom && $this->has_itunes_ns( $feed_dom ) && $this->has_audio_enclosures( $feed_dom ); } /** * Safely loads an XML file * * @param string $xml A string of XML to load. * @return DOMDocument|false A restulting DOM document or `false` if there is an error. */ private function safely_load_xml( $xml ) { $disable_entity_loader = PHP_VERSION_ID < 80000; if ( $disable_entity_loader ) { // This function has been deprecated in PHP 8.0 because in libxml 2.9.0, external entity loading // is disabled by default, so this function is no longer needed to protect against XXE attacks. // phpcs:ignore Generic.PHP.DeprecatedFunctions.Deprecated, PHPCompatibility.FunctionUse.RemovedFunctions.libxml_disable_entity_loaderDeprecated $loader = libxml_disable_entity_loader( true ); } $errors = libxml_use_internal_errors( true ); $return = new DOMDocument(); if ( ! $return->loadXML( $xml ) ) { return false; } libxml_use_internal_errors( $errors ); if ( $disable_entity_loader && isset( $loader ) ) { // phpcs:ignore Generic.PHP.DeprecatedFunctions.Deprecated, PHPCompatibility.FunctionUse.RemovedFunctions.libxml_disable_entity_loaderDeprecated libxml_disable_entity_loader( $loader ); } return $return; } /** * Checks the RSS feed for the presence of the itunes podcast namespace. * It's pretty loose and just checks the URI for itunes.com * * @param DOMDocument $dom The XML document to check. * @return boolean Whether the itunes namespace is defined. */ private function has_itunes_ns( $dom ) { $xpath = new DOMXPath( $dom ); foreach ( $xpath->query( 'namespace::*' ) as $node ) { // phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase // nodeValue is not valid, but it's part of the DOM API that we don't control. if ( strstr( $node->nodeValue, 'itunes.com' ) ) { return true; } // phpcs:enable } return false; } /** * Checks the RSS feed for the presence of enclosures with an audio mimetype. * * @param DOMDocument $dom The XML document to check. * @return boolean Whether enclosures were found. */ private function has_audio_enclosures( $dom ) { $xpath = new DOMXPath( $dom ); $enclosures = $xpath->query( "//enclosure[starts-with(@type,'audio/')]" ); return ! $enclosures ? false : $enclosures->length > 0; } }
Upload File
Create Folder