X7ROOT File Manager
Current Path:
/home/bloomi9/realworksadvisors.com/wp-includes/blocks
home
/
bloomi9
/
realworksadvisors.com
/
wp-includes
/
blocks
/
π
..
π
archives
π
archives.php
(2.92 KB)
π
audio
π
avatar
π
avatar.php
(5.61 KB)
π
block
π
block.php
(3.24 KB)
π
blocks-json.php
(189.4 KB)
π
button
π
button.php
(1.76 KB)
π
buttons
π
calendar
π
calendar.php
(5.93 KB)
π
categories
π
categories.php
(3.92 KB)
π
code
π
column
π
columns
π
comment-author-name
π
comment-author-name.php
(2.08 KB)
π
comment-content
π
comment-content.php
(2.4 KB)
π
comment-date
π
comment-date.php
(1.82 KB)
π
comment-edit-link
π
comment-edit-link.php
(1.67 KB)
π
comment-reply-link
π
comment-reply-link.php
(2.03 KB)
π
comment-template
π
comment-template.php
(4.39 KB)
π
comments
π
comments-pagination
π
comments-pagination-next
π
comments-pagination-next.php
(1.88 KB)
π
comments-pagination-numbers
π
comments-pagination-numbers.php
(1.59 KB)
π
comments-pagination-previous
π
comments-pagination-previous.php
(1.75 KB)
π
comments-pagination.php
(1.17 KB)
π
comments-title
π
comments-title.php
(2.71 KB)
π
comments.php
(6.61 KB)
π
cover
π
cover.php
(3.1 KB)
π
details
π
embed
π
file
π
file.php
(1.75 KB)
π
footnotes
π
footnotes.php
(3.68 KB)
π
freeform
π
gallery
π
gallery.php
(6.29 KB)
π
group
π
heading
π
heading.php
(1.27 KB)
π
home-link
π
home-link.php
(5.31 KB)
π
html
π
image
π
image.php
(11.74 KB)
π
index.php
(4.99 KB)
π
latest-comments
π
latest-comments.php
(4.92 KB)
π
latest-posts
π
latest-posts.php
(8.34 KB)
π
legacy-widget
π
legacy-widget.php
(3.9 KB)
π
list
π
list-item
π
list.php
(1.24 KB)
π
loginout
π
loginout.php
(1.38 KB)
π
media-text
π
media-text.php
(4.28 KB)
π
missing
π
more
π
navigation
π
navigation-link
π
navigation-link.php
(13.59 KB)
π
navigation-submenu
π
navigation-submenu.php
(9.71 KB)
π
navigation.php
(48.46 KB)
π
nextpage
π
page-list
π
page-list-item
π
page-list-item.php
(361 B)
π
page-list.php
(13.29 KB)
π
paragraph
π
pattern
π
pattern.php
(1.75 KB)
π
post-author
π
post-author-biography
π
post-author-biography.php
(1.49 KB)
π
post-author-name
π
post-author-name.php
(1.91 KB)
π
post-author.php
(2.67 KB)
π
post-comments-form
π
post-comments-form.php
(2.74 KB)
π
post-content
π
post-content.php
(2.11 KB)
π
post-date
π
post-date.php
(3.05 KB)
π
post-excerpt
π
post-excerpt.php
(3.37 KB)
π
post-featured-image
π
post-featured-image.php
(9.14 KB)
π
post-navigation-link
π
post-navigation-link.php
(4.72 KB)
π
post-template
π
post-template.php
(5.61 KB)
π
post-terms
π
post-terms.php
(3.55 KB)
π
post-title
π
post-title.php
(2.09 KB)
π
preformatted
π
pullquote
π
query
π
query-no-results
π
query-no-results.php
(1.8 KB)
π
query-pagination
π
query-pagination-next
π
query-pagination-next.php
(3.7 KB)
π
query-pagination-numbers
π
query-pagination-numbers.php
(4.66 KB)
π
query-pagination-previous
π
query-pagination-previous.php
(3.5 KB)
π
query-pagination.php
(1.15 KB)
π
query-title
π
query-title.php
(2.05 KB)
π
query-total
π
query-total.php
(2.48 KB)
π
query.php
(5.56 KB)
π
quote
π
read-more
π
read-more.php
(1.79 KB)
π
require-dynamic-blocks.php
(4.07 KB)
π
require-static-blocks.php
(501 B)
π
rss
π
rss.php
(3.98 KB)
π
search
π
search.php
(22.48 KB)
π
separator
π
shortcode
π
shortcode.php
(735 B)
π
site-logo
π
site-logo.php
(6.19 KB)
π
site-tagline
π
site-tagline.php
(1.17 KB)
π
site-title
π
site-title.php
(1.81 KB)
π
social-link
π
social-link.php
(63.65 KB)
π
social-links
π
spacer
π
table
π
tag-cloud
π
tag-cloud.php
(1.55 KB)
π
template-part
π
template-part.php
(9.92 KB)
π
term-description
π
term-description.php
(1.3 KB)
π
text-columns
π
verse
π
video
π
widget-group
π
widget-group.php
(2.38 KB)
Editing: rss.php
<?php /** * Server-side rendering of the `core/rss` block. * * @package WordPress */ /** * Renders the `core/rss` block on server. * * @since 5.2.0 * * @param array $attributes The block attributes. * * @return string Returns the block content with received rss items. */ function render_block_core_rss( $attributes ) { if ( in_array( untrailingslashit( $attributes['feedURL'] ), array( site_url(), home_url() ), true ) ) { 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>'; } $rss = fetch_feed( $attributes['feedURL'] ); if ( is_wp_error( $rss ) ) { return '<div class="components-placeholder"><div class="notice notice-error"><strong>' . __( 'RSS Error:' ) . '</strong> ' . esc_html( $rss->get_error_message() ) . '</div></div>'; } if ( ! $rss->get_item_quantity() ) { 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>'; } $rss_items = $rss->get_items( 0, $attributes['itemsToShow'] ); $list_items = ''; foreach ( $rss_items as $item ) { $title = esc_html( trim( strip_tags( $item->get_title() ) ) ); if ( empty( $title ) ) { $title = __( '(no title)' ); } $link = $item->get_link(); $link = esc_url( $link ); if ( $link ) { $title = "<a href='{$link}'>{$title}</a>"; } $title = "<div class='wp-block-rss__item-title'>{$title}</div>"; $date = ''; if ( $attributes['displayDate'] ) { $date = $item->get_date( 'U' ); if ( $date ) { $date = sprintf( '<time datetime="%1$s" class="wp-block-rss__item-publish-date">%2$s</time> ', esc_attr( date_i18n( 'c', $date ) ), esc_attr( date_i18n( get_option( 'date_format' ), $date ) ) ); } } $author = ''; if ( $attributes['displayAuthor'] ) { $author = $item->get_author(); if ( is_object( $author ) ) { $author = $author->get_name(); if ( ! empty( $author ) ) { $author = '<span class="wp-block-rss__item-author">' . sprintf( /* translators: byline. %s: author. */ __( 'by %s' ), esc_html( strip_tags( $author ) ) ) . '</span>'; } } } $excerpt = ''; $description = $item->get_description(); if ( $attributes['displayExcerpt'] && ! empty( $description ) ) { $excerpt = html_entity_decode( $description, ENT_QUOTES, get_option( 'blog_charset' ) ); $excerpt = esc_attr( wp_trim_words( $excerpt, $attributes['excerptLength'], ' […]' ) ); // Change existing [...] to […]. if ( '[...]' === substr( $excerpt, -5 ) ) { $excerpt = substr( $excerpt, 0, -5 ) . '[…]'; } $excerpt = '<div class="wp-block-rss__item-excerpt">' . esc_html( $excerpt ) . '</div>'; } $list_items .= "<li class='wp-block-rss__item'>{$title}{$date}{$author}{$excerpt}</li>"; } $classnames = array(); if ( isset( $attributes['blockLayout'] ) && 'grid' === $attributes['blockLayout'] ) { $classnames[] = 'is-grid'; } if ( isset( $attributes['columns'] ) && 'grid' === $attributes['blockLayout'] ) { $classnames[] = 'columns-' . $attributes['columns']; } if ( $attributes['displayDate'] ) { $classnames[] = 'has-dates'; } if ( $attributes['displayAuthor'] ) { $classnames[] = 'has-authors'; } if ( $attributes['displayExcerpt'] ) { $classnames[] = 'has-excerpts'; } $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classnames ) ) ); return sprintf( '<ul %s>%s</ul>', $wrapper_attributes, $list_items ); } /** * Registers the `core/rss` block on server. * * @since 5.2.0 */ function register_block_core_rss() { register_block_type_from_metadata( __DIR__ . '/rss', array( 'render_callback' => 'render_block_core_rss', ) ); } add_action( 'init', 'register_block_core_rss' );
Upload File
Create Folder