Submit
Path:
~
/
home
/
getwphos
/
public_html
/
srlgroup
/
wp-includes
/
File Content:
atomlib.php
<?php /** * Atom Syndication Format PHP Library * * @package AtomLib * @link http://code.google.com/p/phpatomlib/ * * @author Elias Torres <elias@torrez.us> * @version 0.4 * @since 2.3.0 */ /** * Structure that store common Atom Feed Properties * * @package AtomLib */ class AtomFeed { /** * Stores Links * @var array * @access public */ var $links = array(); /** * Stores Categories * @var array * @access public */ var $categories = array(); /** * Stores Entries * * @var array * @access public */ var $entries = array(); } /** * Structure that store Atom Entry Properties * * @package AtomLib */ class AtomEntry { /** * Stores Links * @var array * @access public */ var $links = array(); /** * Stores Categories * @var array * @access public */ var $categories = array(); } /** * AtomLib Atom Parser API * * @package AtomLib */ class AtomParser { var $NS = 'http://www.w3.org/2005/Atom'; var $ATOM_CONTENT_ELEMENTS = array('content','summary','title','subtitle','rights'); var $ATOM_SIMPLE_ELEMENTS = array('id','updated','published','draft'); var $debug = false; var $depth = 0; var $indent = 2; var $in_content; var $ns_contexts = array(); var $ns_decls = array(); var $content_ns_decls = array(); var $content_ns_contexts = array(); var $is_xhtml = false; var $is_html = false; var $is_text = true; var $skipped_div = false; var $FILE = "php://input"; var $feed; var $current; var $map_attrs_func; var $map_xmlns_func; var $error; var $content; /** * PHP5 constructor. */ function __construct() { $this->feed = new AtomFeed(); $this->current = null; $this->map_attrs_func = array( __CLASS__, 'map_attrs' ); $this->map_xmlns_func = array( __CLASS__, 'map_xmlns' ); } /** * PHP4 constructor. */ public function AtomParser() { self::__construct(); } /** * Map attributes to key="val" * * @param string $k Key * @param string $v Value * @return string */ public static function map_attrs($k, $v) { return "$k=\"$v\""; } /** * Map XML namespace to string. * * @param indexish $p XML Namespace element index * @param array $n Two-element array pair. [ 0 => {namespace}, 1 => {url} ] * @return string 'xmlns="{url}"' or 'xmlns:{namespace}="{url}"' */ public static function map_xmlns($p, $n) { $xd = "xmlns"; if( 0 < strlen($n[0]) ) { $xd .= ":{$n[0]}"; } return "{$xd}=\"{$n[1]}\""; } function _p($msg) { if($this->debug) { print str_repeat(" ", $this->depth * $this->indent) . $msg ."\n"; } } function error_handler($log_level, $log_text, $error_file, $error_line) { $this->error = $log_text; } function parse() { set_error_handler(array(&$this, 'error_handler')); array_unshift($this->ns_contexts, array()); if ( ! function_exists( 'xml_parser_create_ns' ) ) { trigger_error( __( "PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML extension." ) ); return false; } $parser = xml_parser_create_ns(); xml_set_element_handler($parser, array($this, "start_element"), array($this, "end_element")); xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0); xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,0); xml_set_character_data_handler($parser, array($this, "cdata")); xml_set_default_handler($parser, array($this, "_default")); xml_set_start_namespace_decl_handler($parser, array($this, "start_ns")); xml_set_end_namespace_decl_handler($parser, array($this, "end_ns")); $this->content = ''; $ret = true; $fp = fopen($this->FILE, "r"); while ($data = fread($fp, 4096)) { if($this->debug) $this->content .= $data; if(!xml_parse($parser, $data, feof($fp))) { /* translators: 1: Error message, 2: Line number. */ trigger_error(sprintf(__('XML Error: %1$s at line %2$s')."\n", xml_error_string(xml_get_error_code($parser)), xml_get_current_line_number($parser))); $ret = false; break; } } fclose($fp); if (PHP_VERSION_ID < 80000) { // xml_parser_free() has no effect as of PHP 8.0. xml_parser_free($parser); } unset($parser); restore_error_handler(); return $ret; } function start_element($parser, $name, $attrs) { $name_parts = explode(":", $name); $tag = array_pop($name_parts); switch($name) { case $this->NS . ':feed': $this->current = $this->feed; break; case $this->NS . ':entry': $this->current = new AtomEntry(); break; }; $this->_p("start_element('$name')"); #$this->_p(print_r($this->ns_contexts,true)); #$this->_p('current(' . $this->current . ')'); array_unshift($this->ns_contexts, $this->ns_decls); $this->depth++; if(!empty($this->in_content)) { $this->content_ns_decls = array(); if($this->is_html || $this->is_text) trigger_error("Invalid content in element found. Content must not be of type text or html if it contains markup."); $attrs_prefix = array(); // resolve prefixes for attributes foreach($attrs as $key => $value) { $with_prefix = $this->ns_to_prefix($key, true); $attrs_prefix[$with_prefix[1]] = $this->xml_escape($value); } $attrs_str = join(' ', array_map($this->map_attrs_func, array_keys($attrs_prefix), array_values($attrs_prefix))); if(strlen($attrs_str) > 0) { $attrs_str = " " . $attrs_str; } $with_prefix = $this->ns_to_prefix($name); if(!$this->is_declared_content_ns($with_prefix[0])) { array_push($this->content_ns_decls, $with_prefix[0]); } $xmlns_str = ''; if(count($this->content_ns_decls) > 0) { array_unshift($this->content_ns_contexts, $this->content_ns_decls); $xmlns_str .= join(' ', array_map($this->map_xmlns_func, array_keys($this->content_ns_contexts[0]), array_values($this->content_ns_contexts[0]))); if(strlen($xmlns_str) > 0) { $xmlns_str = " " . $xmlns_str; } } array_push($this->in_content, array($tag, $this->depth, "<". $with_prefix[1] ."{$xmlns_str}{$attrs_str}" . ">")); } else if(in_array($tag, $this->ATOM_CONTENT_ELEMENTS) || in_array($tag, $this->ATOM_SIMPLE_ELEMENTS)) { $this->in_content = array(); $this->is_xhtml = $attrs['type'] == 'xhtml'; $this->is_html = $attrs['type'] == 'html' || $attrs['type'] == 'text/html'; $this->is_text = !in_array('type',array_keys($attrs)) || $attrs['type'] == 'text'; $type = $this->is_xhtml ? 'XHTML' : ($this->is_html ? 'HTML' : ($this->is_text ? 'TEXT' : $attrs['type'])); if(in_array('src',array_keys($attrs))) { $this->current->$tag = $attrs; } else { array_push($this->in_content, array($tag,$this->depth, $type)); } } else if($tag == 'link') { array_push($this->current->links, $attrs); } else if($tag == 'category') { array_push($this->current->categories, $attrs); } $this->ns_decls = array(); } function end_element($parser, $name) { $name_parts = explode(":", $name); $tag = array_pop($name_parts); $ccount = count($this->in_content); # if we are *in* content, then let's proceed to serialize it if(!empty($this->in_content)) { # if we are ending the original content element # then let's finalize the content if($this->in_content[0][0] == $tag && $this->in_content[0][1] == $this->depth) { $origtype = $this->in_content[0][2]; array_shift($this->in_content); $newcontent = array(); foreach($this->in_content as $c) { if(count($c) == 3) { array_push($newcontent, $c[2]); } else { if($this->is_xhtml || $this->is_text) { array_push($newcontent, $this->xml_escape($c)); } else { array_push($newcontent, $c); } } } if(in_array($tag, $this->ATOM_CONTENT_ELEMENTS)) { $this->current->$tag = array($origtype, join('',$newcontent)); } else { $this->current->$tag = join('',$newcontent); } $this->in_content = array(); } else if($this->in_content[$ccount-1][0] == $tag && $this->in_content[$ccount-1][1] == $this->depth) { $this->in_content[$ccount-1][2] = substr($this->in_content[$ccount-1][2],0,-1) . "/>"; } else { # else, just finalize the current element's content $endtag = $this->ns_to_prefix($name); array_push($this->in_content, array($tag, $this->depth, "</$endtag[1]>")); } } array_shift($this->ns_contexts); $this->depth--; if($name == ($this->NS . ':entry')) { array_push($this->feed->entries, $this->current); $this->current = null; } $this->_p("end_element('$name')"); } function start_ns($parser, $prefix, $uri) { $this->_p("starting: " . $prefix . ":" . $uri); array_push($this->ns_decls, array($prefix,$uri)); } function end_ns($parser, $prefix) { $this->_p("ending: #" . $prefix . "#"); } function cdata($parser, $data) { $this->_p("data: #" . str_replace(array("\n"), array("\\n"), trim($data)) . "#"); if(!empty($this->in_content)) { array_push($this->in_content, $data); } } function _default($parser, $data) { # when does this gets called? } function ns_to_prefix($qname, $attr=false) { # split 'http://www.w3.org/1999/xhtml:div' into ('http','//www.w3.org/1999/xhtml','div') $components = explode(":", $qname); # grab the last one (e.g 'div') $name = array_pop($components); if(!empty($components)) { # re-join back the namespace component $ns = join(":",$components); foreach($this->ns_contexts as $context) { foreach($context as $mapping) { if($mapping[1] == $ns && strlen($mapping[0]) > 0) { return array($mapping, "$mapping[0]:$name"); } } } } if($attr) { return array(null, $name); } else { foreach($this->ns_contexts as $context) { foreach($context as $mapping) { if(strlen($mapping[0]) == 0) { return array($mapping, $name); } } } } } function is_declared_content_ns($new_mapping) { foreach($this->content_ns_contexts as $context) { foreach($context as $mapping) { if($new_mapping == $mapping) { return true; } } } return false; } function xml_escape($content) { return str_replace(array('&','"',"'",'<','>'), array('&','"',''','<','>'), $content ); } }
Submit
FILE
FOLDER
Name
Size
Permission
Action
ID3
---
0755
IXR
---
0755
PHPMailer
---
0755
Requests
---
0755
SimplePie
---
0755
Text
---
0755
abilities-api
---
0755
assets
---
0755
block-bindings
---
0755
block-patterns
---
0755
block-supports
---
0755
blocks
---
0755
certificates
---
0755
css
---
0755
customize
---
0755
fonts
---
0755
html-api
---
0755
images
---
0755
interactivity-api
---
0755
js
---
0755
l10n
---
0755
php-compat
---
0755
pomo
---
0755
rest-api
---
0755
sitemaps
---
0755
sodium_compat
---
0755
style-engine
---
0755
theme-compat
---
0755
widgets
---
0755
abilities-api.php
24369 bytes
0644
abilities.php
7983 bytes
0644
admin-bar.php
36966 bytes
0644
atomlib.php
12181 bytes
0644
author-template.php
19391 bytes
0644
block-bindings.php
7526 bytes
0644
block-editor.php
29282 bytes
0644
block-i18n.json
316 bytes
0644
block-patterns.php
13213 bytes
0644
block-template-utils.php
62484 bytes
0644
block-template.php
15359 bytes
0644
blocks.php
114739 bytes
0644
bookmark-template.php
12768 bytes
0644
bookmark.php
15427 bytes
0644
cache-compat.php
10078 bytes
0644
cache.php
13486 bytes
0644
canonical.php
34645 bytes
0644
capabilities.php
43652 bytes
0644
category-template.php
57045 bytes
0644
category.php
12829 bytes
0644
class-IXR.php
2616 bytes
0644
class-avif-info.php
29615 bytes
0644
class-feed.php
539 bytes
0644
class-http.php
367 bytes
0644
class-json.php
43676 bytes
0644
class-oembed.php
401 bytes
0644
class-phpass.php
6771 bytes
0644
class-phpmailer.php
664 bytes
0644
class-pop3.php
21121 bytes
0644
class-requests.php
2237 bytes
0644
class-simplepie.php
453 bytes
0644
class-smtp.php
457 bytes
0644
class-snoopy.php
37715 bytes
0644
class-walker-category-dropdown.php
2469 bytes
0644
class-walker-category.php
8477 bytes
0644
class-walker-comment.php
14221 bytes
0644
class-walker-nav-menu.php
12044 bytes
0644
class-walker-page-dropdown.php
2710 bytes
0644
class-walker-page.php
7612 bytes
0644
class-wp-admin-bar.php
17874 bytes
0644
class-wp-ajax-response.php
5266 bytes
0644
class-wp-application-passwords.php
17099 bytes
0644
class-wp-block-bindings-registry.php
8482 bytes
0644
class-wp-block-bindings-source.php
2992 bytes
0644
class-wp-block-editor-context.php
1350 bytes
0644
class-wp-block-list.php
4713 bytes
0644
class-wp-block-metadata-registry.php
11895 bytes
0644
class-wp-block-parser-block.php
2555 bytes
0644
class-wp-block-parser-frame.php
2017 bytes
0644
class-wp-block-parser.php
11516 bytes
0644
class-wp-block-pattern-categories-registry.php
5450 bytes
0644
class-wp-block-patterns-registry.php
11253 bytes
0644
class-wp-block-processor.php
69959 bytes
0644
class-wp-block-styles-registry.php
6497 bytes
0644
class-wp-block-supports.php
5626 bytes
0644
class-wp-block-template.php
2033 bytes
0644
class-wp-block-templates-registry.php
7193 bytes
0644
class-wp-block-type-registry.php
5030 bytes
0644
class-wp-block-type.php
17265 bytes
0644
class-wp-block.php
24812 bytes
0644
class-wp-classic-to-block-menu-converter.php
4070 bytes
0644
class-wp-comment-query.php
48804 bytes
0644
class-wp-comment.php
9437 bytes
0644
class-wp-customize-control.php
26119 bytes
0644
class-wp-customize-manager.php
203139 bytes
0644
class-wp-customize-nav-menus.php
58013 bytes
0644
class-wp-customize-panel.php
10710 bytes
0644
class-wp-customize-section.php
11209 bytes
0644
class-wp-customize-setting.php
29962 bytes
0644
class-wp-customize-widgets.php
72607 bytes
0644
class-wp-date-query.php
36147 bytes
0644
class-wp-dependencies.php
17004 bytes
0644
class-wp-dependency.php
2633 bytes
0644
class-wp-duotone.php
40783 bytes
0644
class-wp-editor.php
72335 bytes
0644
class-wp-embed.php
15931 bytes
0644
class-wp-error.php
7502 bytes
0644
class-wp-exception.php
253 bytes
0644
class-wp-fatal-error-handler.php
8150 bytes
0644
class-wp-feed-cache-transient.php
3304 bytes
0644
class-wp-feed-cache.php
969 bytes
0644
class-wp-hook.php
16674 bytes
0644
class-wp-http-cookie.php
7389 bytes
0644
class-wp-http-curl.php
13261 bytes
0644
class-wp-http-encoding.php
6689 bytes
0644
class-wp-http-ixr-client.php
3506 bytes
0644
class-wp-http-proxy.php
5980 bytes
0644
class-wp-http-requests-hooks.php
2022 bytes
0644
class-wp-http-requests-response.php
4400 bytes
0644
class-wp-http-response.php
2977 bytes
0644
class-wp-http-streams.php
16859 bytes
0644
class-wp-http.php
41570 bytes
0644
class-wp-image-editor-gd.php
20705 bytes
0644
class-wp-image-editor-imagick.php
36977 bytes
0644
class-wp-image-editor.php
17415 bytes
0644
class-wp-list-util.php
7443 bytes
0644
class-wp-locale-switcher.php
6776 bytes
0644
class-wp-locale.php
16883 bytes
0644
class-wp-matchesmapregex.php
1828 bytes
0644
class-wp-meta-query.php
30533 bytes
0644
class-wp-metadata-lazyloader.php
6833 bytes
0644
class-wp-navigation-fallback.php
9193 bytes
0644
class-wp-network-query.php
19887 bytes
0644
class-wp-network.php
12296 bytes
0644
class-wp-object-cache.php
17524 bytes
0644
class-wp-oembed-controller.php
6905 bytes
0644
class-wp-oembed.php
31670 bytes
0644
class-wp-paused-extensions-storage.php
5111 bytes
0644
class-wp-phpmailer.php
4348 bytes
0644
class-wp-plugin-dependencies.php
25315 bytes
0644
class-wp-post-type.php
30680 bytes
0644
class-wp-post.php
6491 bytes
0644
class-wp-query.php
163744 bytes
0644
class-wp-recovery-mode-cookie-service.php
6877 bytes
0644
class-wp-recovery-mode-email-service.php
11183 bytes
0644
class-wp-recovery-mode-key-service.php
4884 bytes
0644
class-wp-recovery-mode-link-service.php
3463 bytes
0644
class-wp-recovery-mode.php
11453 bytes
0644
class-wp-rewrite.php
63687 bytes
0644
class-wp-role.php
2523 bytes
0644
class-wp-roles.php
9394 bytes
0644
class-wp-script-modules.php
32917 bytes
0644
class-wp-scripts.php
34864 bytes
0644
class-wp-session-tokens.php
7319 bytes
0644
class-wp-simplepie-file.php
3552 bytes
0644
class-wp-simplepie-sanitize-kses.php
1910 bytes
0644
class-wp-site-query.php
31655 bytes
0644
class-wp-site.php
7467 bytes
0644
class-wp-speculation-rules.php
7527 bytes
0644
class-wp-styles.php
12843 bytes
0644
class-wp-tax-query.php
19577 bytes
0644
class-wp-taxonomy.php
18559 bytes
0644
class-wp-term-query.php
40953 bytes
0644
class-wp-term.php
5298 bytes
0644
class-wp-text-diff-renderer-inline.php
979 bytes
0644
class-wp-text-diff-renderer-table.php
18880 bytes
0644
class-wp-textdomain-registry.php
10481 bytes
0644
class-wp-theme-json-data.php
1809 bytes
0644
class-wp-theme-json-resolver.php
35738 bytes
0644
class-wp-theme-json-schema.php
7367 bytes
0644
class-wp-theme-json.php
164347 bytes
0644
class-wp-theme.php
65810 bytes
0644
class-wp-token-map.php
28618 bytes
0644
class-wp-url-pattern-prefixer.php
4802 bytes
0644
class-wp-user-meta-session-tokens.php
3011 bytes
0644
class-wp-user-query.php
44166 bytes
0644
class-wp-user-request.php
2305 bytes
0644
class-wp-user.php
23044 bytes
0644
class-wp-walker.php
13322 bytes
0644
class-wp-widget-factory.php
3347 bytes
0644
class-wp-widget.php
18429 bytes
0644
class-wp-xmlrpc-server.php
215447 bytes
0644
class-wp.php
26481 bytes
0644
class-wpdb.php
118627 bytes
0644
class.wp-dependencies.php
373 bytes
0644
class.wp-scripts.php
343 bytes
0644
class.wp-styles.php
338 bytes
0644
comment-template.php
103145 bytes
0644
comment.php
134069 bytes
0644
compat-utf8.php
19554 bytes
0644
compat.php
17830 bytes
0644
cron.php
42988 bytes
0644
date.php
400 bytes
0644
default-constants.php
11365 bytes
0644
default-filters.php
37910 bytes
0644
default-widgets.php
2295 bytes
0644
deprecated.php
192644 bytes
0644
embed-template.php
338 bytes
0644
embed.php
38911 bytes
0644
error-protection.php
4121 bytes
0644
feed-atom-comments.php
5504 bytes
0644
feed-atom.php
3121 bytes
0644
feed-rdf.php
2668 bytes
0644
feed-rss.php
1189 bytes
0644
feed-rss2-comments.php
4136 bytes
0644
feed-rss2.php
3799 bytes
0644
feed.php
25189 bytes
0644
fonts.php
9790 bytes
0644
formatting.php
354741 bytes
0644
functions.php
288600 bytes
0644
functions.wp-scripts.php
15311 bytes
0644
functions.wp-styles.php
8641 bytes
0644
general-template.php
173004 bytes
0644
global-styles-and-settings.php
21204 bytes
0644
http.php
25878 bytes
0644
https-detection.php
5857 bytes
0644
https-migration.php
4741 bytes
0644
kses.php
83693 bytes
0644
l10n.php
68797 bytes
0644
link-template.php
160117 bytes
0644
load.php
56510 bytes
0644
locale.php
162 bytes
0644
media-template.php
63197 bytes
0644
media.php
221247 bytes
0644
meta.php
66556 bytes
0644
ms-blogs.php
25845 bytes
0644
ms-default-constants.php
4921 bytes
0644
ms-default-filters.php
6636 bytes
0644
ms-deprecated.php
21759 bytes
0644
ms-files.php
2857 bytes
0644
ms-functions.php
91842 bytes
0644
ms-load.php
19887 bytes
0644
ms-network.php
3782 bytes
0644
ms-settings.php
4204 bytes
0644
ms-site.php
41717 bytes
0644
nav-menu-template.php
25990 bytes
0644
nav-menu.php
44347 bytes
0644
option.php
105035 bytes
0644
pluggable-deprecated.php
6324 bytes
0644
pluggable.php
127457 bytes
0644
plugin.php
36501 bytes
0644
post-formats.php
7102 bytes
0644
post-template.php
68648 bytes
0644
post-thumbnail-template.php
10879 bytes
0644
post.php
296072 bytes
0644
query.php
37095 bytes
0644
registration-functions.php
200 bytes
0644
registration.php
200 bytes
0644
rest-api.php
100654 bytes
0644
revision.php
30741 bytes
0644
rewrite.php
19490 bytes
0644
robots-template.php
5185 bytes
0644
rss-functions.php
255 bytes
0644
rss.php
23203 bytes
0644
script-loader.php
158344 bytes
0644
script-modules.php
9911 bytes
0644
session.php
258 bytes
0644
shortcodes.php
24050 bytes
0644
sitemaps.php
3238 bytes
0644
speculative-loading.php
8600 bytes
0644
spl-autoload-compat.php
441 bytes
0644
style-engine.php
7563 bytes
0644
taxonomy.php
177058 bytes
0644
template-canvas.php
544 bytes
0644
template-loader.php
4267 bytes
0644
template.php
36834 bytes
0644
theme-i18n.json
1730 bytes
0644
theme-previews.php
2910 bytes
0644
theme-templates.php
6238 bytes
0644
theme.json
8921 bytes
0644
theme.php
135008 bytes
0644
update.php
38353 bytes
0644
user.php
178062 bytes
0644
utf8.php
7260 bytes
0644
vars.php
6562 bytes
0644
version.php
1106 bytes
0644
widgets.php
71129 bytes
0644
wp-db.php
445 bytes
0644
wp-diff.php
799 bytes
0644
N4ST4R_ID | Naxtarrr