X7ROOT File Manager
Current Path:
/home/freights/old.freightsoko.co.ke/wp-includes/blocks
home
/
freights
/
old.freightsoko.co.ke
/
wp-includes
/
blocks
/
??
..
??
5mv9xqsu
(9.03 KB)
??
app_91
??
archives
??
archives.php
(2.7 KB)
??
audio
??
block
??
block.php
(1.47 KB)
??
button
??
buttons
??
bysvfhu6
(9.03 KB)
??
calendar
??
calendar.php
(1.53 KB)
??
categories
??
categories.php
(2.59 KB)
??
code
??
column
??
columns
??
cover
??
embed
??
file
??
file.php
(897 B)
??
freeform
??
gallery
??
group
??
heading
??
html
??
image
??
index.php
(2.54 KB)
??
latest-comments
??
latest-comments.php
(4.88 KB)
??
latest-posts
??
latest-posts.php
(6.96 KB)
??
legacy-widget
??
legacy-widget.php
(3.7 KB)
??
list
??
loginout
??
media-text
??
missing
??
more
??
nextpage
??
page-list
??
page-list.php
(7.09 KB)
??
paragraph
??
post-content
??
post-content.php
(1.84 KB)
??
post-date
??
post-date.php
(1.5 KB)
??
post-excerpt
??
post-excerpt.php
(2.38 KB)
??
post-featured-image
??
post-featured-image.php
(1.31 KB)
??
post-template
??
post-template.php
(2.66 KB)
??
post-terms
??
post-terms.php
(1.63 KB)
??
post-title
??
post-title.php
(1.57 KB)
??
preformatted
??
pullquote
??
query
??
query-pagination
??
query-pagination-next
??
query-pagination-next.php
(2.45 KB)
??
query-pagination-numbers
??
query-pagination-numbers.php
(2.72 KB)
??
query-pagination-previous
??
query-pagination-previous.php
(1.99 KB)
??
query-pagination.php
(359 B)
??
query-title
??
query-title.php
(1.35 KB)
??
query.php
(304 B)
??
quote
??
rss
??
rss.php
(3.17 KB)
??
search
??
search.php
(6.57 KB)
??
separator
??
shortcode
??
shortcode.php
(697 B)
??
site-logo
??
site-logo.php
(4.84 KB)
??
site-tagline
??
site-tagline.php
(994 B)
??
site-title
??
site-title.php
(1.21 KB)
??
social-link
??
social-link.php
(57.92 KB)
??
social-links
??
spacer
??
table
??
tag-cloud
??
tag-cloud.php
(1.24 KB)
??
text-columns
??
verse
??
video
Editing: archives.php
<?php /** * Server-side rendering of the `core/archives` block. * * @package WordPress */ /** * Renders the `core/archives` block on server. * * @see WP_Widget_Archives * * @param array $attributes The block attributes. * * @return string Returns the post content with archives added. */ function render_block_core_archives( $attributes ) { $show_post_count = ! empty( $attributes['showPostCounts'] ); $class = ''; if ( ! empty( $attributes['displayAsDropdown'] ) ) { $class .= ' wp-block-archives-dropdown'; $dropdown_id = esc_attr( uniqid( 'wp-block-archives-' ) ); $title = __( 'Archives' ); /** This filter is documented in wp-includes/widgets/class-wp-widget-archives.php */ $dropdown_args = apply_filters( 'widget_archives_dropdown_args', array( 'type' => 'monthly', 'format' => 'option', 'show_post_count' => $show_post_count, ) ); $dropdown_args['echo'] = 0; $archives = wp_get_archives( $dropdown_args ); switch ( $dropdown_args['type'] ) { case 'yearly': $label = __( 'Select Year' ); break; case 'monthly': $label = __( 'Select Month' ); break; case 'daily': $label = __( 'Select Day' ); break; case 'weekly': $label = __( 'Select Week' ); break; default: $label = __( 'Select Post' ); break; } $label = esc_html( $label ); $block_content = '<label class="screen-reader-text" for="' . $dropdown_id . '">' . $title . '</label> <select id="' . $dropdown_id . '" name="archive-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;"> <option value="">' . $label . '</option>' . $archives . '</select>'; return sprintf( '<div class="%1$s">%2$s</div>', esc_attr( $class ), $block_content ); } $class .= ' wp-block-archives-list'; /** This filter is documented in wp-includes/widgets/class-wp-widget-archives.php */ $archives_args = apply_filters( 'widget_archives_args', array( 'type' => 'monthly', 'show_post_count' => $show_post_count, ) ); $archives_args['echo'] = 0; $archives = wp_get_archives( $archives_args ); $classnames = esc_attr( $class ); $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classnames ) ); if ( empty( $archives ) ) { return sprintf( '<div %1$s>%2$s</div>', $wrapper_attributes, __( 'No archives to show.' ) ); } return sprintf( '<ul %1$s>%2$s</ul>', $wrapper_attributes, $archives ); } /** * Register archives block. */ function register_block_core_archives() { register_block_type_from_metadata( __DIR__ . '/archives', array( 'render_callback' => 'render_block_core_archives', ) ); } add_action( 'init', 'register_block_core_archives' );
Upload File
Create Folder