Priority File Manager

📁 public_html
Base Directory:
/home/ecedu/public_html/wp-includes/blocks
NameTypeSizeActions
📁 .. Folder -
📁 archives Folder -
📄 archives.php File 2994
Edit Download
📁 audio Folder -
📁 avatar Folder -
📄 avatar.php File 5745
Edit Download
📁 block Folder -
📄 block.php File 3314
Edit Download
📄 blocks-json.php File 193945
Edit Download
📁 button Folder -
📄 button.php File 1805
Edit Download
📁 buttons Folder -
📁 calendar Folder -
📄 calendar.php File 6075
Edit Download
📁 categories Folder -
📄 categories.php File 4010
Edit Download
📁 code Folder -
📁 column Folder -
📁 columns Folder -
📁 comment-author-name Folder -
📄 comment-author-name.php File 2133
Edit Download
📁 comment-content Folder -
📄 comment-content.php File 2459
Edit Download
📁 comment-date Folder -
📄 comment-date.php File 1863
Edit Download
📁 comment-edit-link Folder -
📄 comment-edit-link.php File 1713
Edit Download
📁 comment-reply-link Folder -
📄 comment-reply-link.php File 2075
Edit Download
📁 comment-template Folder -
📄 comment-template.php File 4494
Edit Download
📁 comments Folder -
📁 comments-pagination Folder -
📁 comments-pagination-next Folder -
📄 comments-pagination-next.php File 1924
Edit Download
📁 comments-pagination-numbers Folder -
📄 comments-pagination-numbers.php File 1632
Edit Download
📁 comments-pagination-previous Folder -
📄 comments-pagination-previous.php File 1790
Edit Download
📄 comments-pagination.php File 1199
Edit Download
📁 comments-title Folder -
📄 comments-title.php File 2772
Edit Download
📄 comments.php File 6767
Edit Download
📁 cover Folder -
📄 cover.php File 3175
Edit Download
📁 details Folder -
📁 embed Folder -
📁 file Folder -
📄 file.php File 1793
Edit Download
📁 footnotes Folder -
📄 footnotes.php File 3771
Edit Download
📁 freeform Folder -
📁 gallery Folder -
📄 gallery.php File 6438
Edit Download
📁 group Folder -
📁 heading Folder -
📄 heading.php File 1301
Edit Download
📁 home-link Folder -
📄 home-link.php File 5438
Edit Download
📁 html Folder -
📁 image Folder -
📄 image.php File 12023
Edit Download
📄 index.php File 5111
Edit Download
📁 latest-comments Folder -
📄 latest-comments.php File 5040
Edit Download
📁 latest-posts Folder -
📄 latest-posts.php File 8542
Edit Download
📁 legacy-widget Folder -
📄 legacy-widget.php File 3997
Edit Download
📁 list Folder -
📁 list-item Folder -
📄 list.php File 1273
Edit Download
📁 loginout Folder -
📄 loginout.php File 1418
Edit Download
📁 media-text Folder -
📄 media-text.php File 4383
Edit Download
📁 missing Folder -
📁 more Folder -
📁 navigation Folder -
📁 navigation-link Folder -
📄 navigation-link.php File 13913
Edit Download
📁 navigation-submenu Folder -
📄 navigation-submenu.php File 9943
Edit Download
📄 navigation.php File 49620
Edit Download
📁 nextpage Folder -
📁 page-list Folder -
📁 page-list-item Folder -
📄 page-list-item.php File 361
Edit Download
📄 page-list.php File 13611
Edit Download
📁 paragraph Folder -
📁 pattern Folder -
📄 pattern.php File 1788
Edit Download
📁 post-author Folder -
📁 post-author-biography Folder -
📄 post-author-biography.php File 1524
Edit Download
📁 post-author-name Folder -
📄 post-author-name.php File 1951
Edit Download
📄 post-author.php File 2734
Edit Download
📁 post-comments-form Folder -
📄 post-comments-form.php File 2805
Edit Download
📁 post-content Folder -
📄 post-content.php File 2156
Edit Download
📁 post-date Folder -
📄 post-date.php File 3124
Edit Download
📁 post-excerpt Folder -
📄 post-excerpt.php File 3447
Edit Download
📁 post-featured-image Folder -
📄 post-featured-image.php File 9363
Edit Download
📁 post-navigation-link Folder -
📄 post-navigation-link.php File 4837
Edit Download
📁 post-template Folder -
📄 post-template.php File 5749
Edit Download
📁 post-terms Folder -
📄 post-terms.php File 3640
Edit Download
📁 post-title Folder -
📄 post-title.php File 2138
Edit Download
📁 preformatted Folder -
📁 pullquote Folder -
📁 query Folder -
📁 query-no-results Folder -
📄 query-no-results.php File 1847
Edit Download
📁 query-pagination Folder -
📁 query-pagination-next Folder -
📄 query-pagination-next.php File 3787
Edit Download
📁 query-pagination-numbers Folder -
📄 query-pagination-numbers.php File 4770
Edit Download
📁 query-pagination-previous Folder -
📄 query-pagination-previous.php File 3584
Edit Download
📄 query-pagination.php File 1176
Edit Download
📁 query-title Folder -
📄 query-title.php File 2098
Edit Download
📁 query-total Folder -
📄 query-total.php File 2535
Edit Download
📄 query.php File 5690
Edit Download
📁 quote Folder -
📁 read-more Folder -
📄 read-more.php File 1830
Edit Download
📄 require-dynamic-blocks.php File 4163
Edit Download
📄 require-static-blocks.php File 501
Edit Download
📁 rss Folder -
📄 rss.php File 4073
Edit Download
📁 search Folder -
📄 search.php File 23016
Edit Download
📁 separator Folder -
📁 shortcode Folder -
📄 shortcode.php File 735
Edit Download
📁 site-logo Folder -
📄 site-logo.php File 6334
Edit Download
📁 site-tagline Folder -
📄 site-tagline.php File 1203
Edit Download
📁 site-title Folder -
📄 site-title.php File 1853
Edit Download
📁 social-link Folder -
📄 social-link.php File 65174
Edit Download
📁 social-links Folder -
📁 spacer Folder -
📁 table Folder -
📁 tag-cloud Folder -
📄 tag-cloud.php File 1590
Edit Download
📁 template-part Folder -
📄 template-part.php File 10154
Edit Download
📁 term-description Folder -
📄 term-description.php File 1336
Edit Download
📁 text-columns Folder -
📁 verse Folder -
📁 video Folder -
📁 widget-group Folder -
📄 widget-group.php File 2438
Edit Download

View File: archives.php

<?php
/**
 * Server-side rendering of the `core/archives` block.
 *
 * @package WordPress
 */

/**
 * Renders the `core/archives` block on server.
 *
 * @since 5.0.0
 *
 * @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'] );
	$type            = isset( $attributes['type'] ) ? $attributes['type'] : 'monthly';

	$class = 'wp-block-archives-list';

	if ( ! empty( $attributes['displayAsDropdown'] ) ) {

		$class = 'wp-block-archives-dropdown';

		$dropdown_id = wp_unique_id( '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'            => $type,
				'format'          => 'option',
				'show_post_count' => $show_post_count,
			)
		);

		$dropdown_args['echo'] = 0;

		$archives = wp_get_archives( $dropdown_args );

		$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $class ) );

		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;
		}

		$show_label = empty( $attributes['showLabel'] ) ? ' screen-reader-text' : '';

		$block_content = '<label for="' . $dropdown_id . '" class="wp-block-archives__label' . $show_label . '">' . esc_html( $title ) . '</label>
		<select id="' . $dropdown_id . '" name="archive-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;">
		<option value="">' . esc_html( $label ) . '</option>' . $archives . '</select>';

		return sprintf(
			'<div %1$s>%2$s</div>',
			$wrapper_attributes,
			$block_content
		);
	}

	/** This filter is documented in wp-includes/widgets/class-wp-widget-archives.php */
	$archives_args = apply_filters(
		'widget_archives_args',
		array(
			'type'            => $type,
			'show_post_count' => $show_post_count,
		)
	);

	$archives_args['echo'] = 0;

	$archives = wp_get_archives( $archives_args );

	$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $class ) );

	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.
 *
 * @since 5.0.0
 */
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' );