at path:ROOT / wp-includes / blocks / rss.php
run:R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
2.35 KB
2026-03-11 16:18:52
R W Run
1.12 KB
2026-03-11 16:18:52
R W Run
4.31 KB
2026-03-11 16:18:52
R W Run
5.61 KB
2026-03-11 16:18:51
R W Run
4.09 KB
2026-03-11 16:18:52
R W Run
213.43 KB
2026-03-11 16:18:51
R W Run
1.71 KB
2026-03-11 16:18:51
R W Run
5.93 KB
2026-03-11 16:18:51
R W Run
4.54 KB
2026-03-11 16:18:52
R W Run
2.08 KB
2026-03-11 16:18:52
R W Run
2.4 KB
2026-03-11 16:18:52
R W Run
1.82 KB
2026-03-11 16:18:52
R W Run
1.67 KB
2026-03-11 16:18:52
R W Run
2.03 KB
2026-03-11 16:18:51
R W Run
4.39 KB
2026-03-11 16:18:52
R W Run
1.88 KB
2026-03-11 16:18:51
R W Run
1.59 KB
2026-03-11 16:18:51
R W Run
1.75 KB
2026-03-11 16:18:51
R W Run
1.23 KB
2026-03-11 16:18:52
R W Run
2.71 KB
2026-03-11 16:18:51
R W Run
6.63 KB
2026-03-11 16:18:52
R W Run
3.1 KB
2026-03-11 16:18:52
R W Run
1.83 KB
2026-03-11 16:18:52
R W Run
3.68 KB
2026-03-11 16:18:51
R W Run
6.29 KB
2026-03-11 16:18:52
R W Run
1.27 KB
2026-03-11 16:18:52
R W Run
5.31 KB
2026-03-11 16:18:52
R W Run
13.5 KB
2026-03-11 16:18:52
R W Run
4.99 KB
2026-03-11 16:18:52
R W Run
4.91 KB
2026-03-11 16:18:52
R W Run
8.53 KB
2026-03-11 16:18:51
R W Run
3.92 KB
2026-03-11 16:18:51
R W Run
1.24 KB
2026-03-11 16:18:51
R W Run
1.63 KB
2026-03-11 16:18:51
R W Run
4.28 KB
2026-03-11 16:18:51
R W Run
13.63 KB
2026-03-11 16:18:51
R W Run
9.74 KB
2026-03-11 16:18:52
R W Run
48.39 KB
2026-03-11 16:18:52
R W Run
361 By
2026-03-11 16:18:52
R W Run
13.29 KB
2026-03-11 16:18:51
R W Run
1.75 KB
2026-03-11 16:18:52
R W Run
1.49 KB
2026-03-11 16:18:51
R W Run
1.91 KB
2026-03-11 16:18:52
R W Run
2.67 KB
2026-03-11 16:18:51
R W Run
1.25 KB
2026-03-11 16:18:52
R W Run
2.74 KB
2026-03-11 16:18:52
R W Run
2.18 KB
2026-03-11 16:18:52
R W Run
2.29 KB
2026-03-11 16:18:52
R W Run
3.55 KB
2026-03-11 16:18:51
R W Run
3.53 KB
2026-03-11 16:18:51
R W Run
9.14 KB
2026-03-11 16:18:52
R W Run
4.72 KB
2026-03-11 16:18:51
R W Run
5.61 KB
2026-03-11 16:18:52
R W Run
3.55 KB
2026-03-11 16:18:51
R W Run
6.34 KB
2026-03-11 16:18:52
R W Run
2.09 KB
2026-03-11 16:18:51
R W Run
1.8 KB
2026-03-11 16:18:52
R W Run
3.69 KB
2026-03-11 16:18:52
R W Run
4.66 KB
2026-03-11 16:18:52
R W Run
3.49 KB
2026-03-11 16:18:52
R W Run
1.15 KB
2026-03-11 16:18:51
R W Run
2.87 KB
2026-03-11 16:18:51
R W Run
2.48 KB
2026-03-11 16:18:52
R W Run
5.56 KB
2026-03-11 16:18:51
R W Run
1.79 KB
2026-03-11 16:18:52
R W Run
4.59 KB
2026-03-11 16:18:51
R W Run
558 By
2026-03-11 16:18:52
R W Run
4.5 KB
2026-03-11 16:18:52
R W Run
23.26 KB
2026-03-11 16:18:52
R W Run
735 By
2026-03-11 16:18:52
R W Run
6.19 KB
2026-03-11 16:18:51
R W Run
1.17 KB
2026-03-11 16:18:51
R W Run
1.82 KB
2026-03-11 16:18:52
R W Run
66.15 KB
2026-03-11 16:18:52
R W Run
1.55 KB
2026-03-11 16:18:51
R W Run
9.92 KB
2026-03-11 16:18:52
R W Run
1.8 KB
2026-03-11 16:18:52
R W Run
1.73 KB
2026-03-11 16:18:52
R W Run
2.02 KB
2026-03-11 16:18:52
R W Run
4.41 KB
2026-03-11 16:18:52
R W Run
2.67 KB
2026-03-11 16:18:51
R W Run
2.38 KB
2026-03-11 16:18:52
R W Run
error_log
📄rss.php
1<?php
2/**
3 * Server-side rendering of the `core/rss` block.
4 *
5 * @package WordPress
6 */
7
8/**
9 * Renders the `core/rss` block on server.
10 *
11 * @since 5.2.0
12 *
13 * @param array $attributes The block attributes.
14 *
15 * @return string Returns the block content with received rss items.
16 */
17function render_block_core_rss( $attributes ) {
18 if ( in_array( untrailingslashit( $attributes['feedURL'] ), array( site_url(), home_url() ), true ) ) {
19 return '<div class="components-placeholder"><div class="notice notice-error">' . __( 'Adding an RSS feed to this site’s homepage is not supported, as it could lead to a loop that slows down your site. Try using another block, like the <strong>Latest Posts</strong> block, to list posts from the site.' ) . '</div></div>';
20 }
21
22 $rss = fetch_feed( $attributes['feedURL'] );
23
24 if ( is_wp_error( $rss ) ) {
25 return '<div class="components-placeholder"><div class="notice notice-error"><strong>' . __( 'RSS Error:' ) . '</strong> ' . esc_html( $rss->get_error_message() ) . '</div></div>';
26 }
27
28 if ( ! $rss->get_item_quantity() ) {
29 return '<div class="components-placeholder"><div class="notice notice-error">' . __( 'An error has occurred, which probably means the feed is down. Try again later.' ) . '</div></div>';
30 }
31
32 $rss_items = $rss->get_items( 0, $attributes['itemsToShow'] );
33 $list_items = '';
34
35 $open_in_new_tab = ! empty( $attributes['openInNewTab'] );
36 $rel = ! empty( $attributes['rel'] ) ? trim( $attributes['rel'] ) : '';
37
38 $link_attributes = '';
39
40 if ( $open_in_new_tab ) {
41 $link_attributes .= ' target="_blank"';
42 }
43
44 if ( '' !== $rel ) {
45 $link_attributes .= ' rel="' . esc_attr( $rel ) . '"';
46 }
47
48 foreach ( $rss_items as $item ) {
49 $title = esc_html( trim( strip_tags( html_entity_decode( $item->get_title() ) ) ) );
50
51 if ( empty( $title ) ) {
52 $title = __( '(no title)' );
53 }
54 $link = $item->get_link();
55 $link = esc_url( $link );
56
57 if ( $link ) {
58 $title = "<a href='{$link}'{$link_attributes}>{$title}</a>";
59 }
60 $title = "<div class='wp-block-rss__item-title'>{$title}</div>";
61
62 $date_markup = '';
63 if ( ! empty( $attributes['displayDate'] ) ) {
64 $timestamp = $item->get_date( 'U' );
65
66 if ( $timestamp ) {
67 $gmt_offset = get_option( 'gmt_offset' );
68 $timestamp += (int) ( (float) $gmt_offset * HOUR_IN_SECONDS );
69
70 $date_markup = sprintf(
71 '<time datetime="%1$s" class="wp-block-rss__item-publish-date">%2$s</time> ',
72 esc_attr( date_i18n( 'c', $timestamp ) ),
73 esc_html( date_i18n( get_option( 'date_format' ), $timestamp ) )
74 );
75 }
76 }
77
78 $author = '';
79 if ( $attributes['displayAuthor'] ) {
80 $author = $item->get_author();
81 if ( is_object( $author ) ) {
82 $author = $author->get_name();
83 if ( ! empty( $author ) ) {
84 $author = '<span class="wp-block-rss__item-author">' . sprintf(
85 /* translators: byline. %s: author. */
86 __( 'by %s' ),
87 esc_html( strip_tags( $author ) )
88 ) . '</span>';
89 }
90 }
91 }
92
93 $excerpt = '';
94 $description = $item->get_description();
95 if ( $attributes['displayExcerpt'] && ! empty( $description ) ) {
96 $excerpt = html_entity_decode( $description, ENT_QUOTES, get_option( 'blog_charset' ) );
97 $excerpt = esc_attr( wp_trim_words( $excerpt, $attributes['excerptLength'], ' [&hellip;]' ) );
98
99 // Change existing [...] to [&hellip;].
100 if ( '[...]' === substr( $excerpt, -5 ) ) {
101 $excerpt = substr( $excerpt, 0, -5 ) . '[&hellip;]';
102 }
103
104 $excerpt = '<div class="wp-block-rss__item-excerpt">' . esc_html( $excerpt ) . '</div>';
105 }
106
107 $list_items .= "<li class='wp-block-rss__item'>{$title}{$date_markup}{$author}{$excerpt}</li>";
108 }
109
110 $classnames = array();
111 if ( isset( $attributes['blockLayout'] ) && 'grid' === $attributes['blockLayout'] ) {
112 $classnames[] = 'is-grid';
113 }
114 if ( isset( $attributes['columns'] ) && 'grid' === $attributes['blockLayout'] ) {
115 $classnames[] = 'columns-' . $attributes['columns'];
116 }
117 if ( $attributes['displayDate'] ) {
118 $classnames[] = 'has-dates';
119 }
120 if ( $attributes['displayAuthor'] ) {
121 $classnames[] = 'has-authors';
122 }
123 if ( $attributes['displayExcerpt'] ) {
124 $classnames[] = 'has-excerpts';
125 }
126
127 $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classnames ) ) );
128
129 return sprintf( '<ul %s>%s</ul>', $wrapper_attributes, $list_items );
130}
131
132/**
133 * Registers the `core/rss` block on server.
134 *
135 * @since 5.2.0
136 */
137function register_block_core_rss() {
138 register_block_type_from_metadata(
139 __DIR__ . '/rss',
140 array(
141 'render_callback' => 'render_block_core_rss',
142 )
143 );
144}
145add_action( 'init', 'register_block_core_rss' );
146
Ui Ux Design – Teachers Night Out

Get in Touch

© 2024 Teachers Night Out. All Rights Reserved.