Priority File Manager

πŸ“ public_html
Base Directory:
/home/toolrmtm/crazyespresso.com/wp-includes/blocks
NameTypeSizeActions
πŸ“ .. Folder -
πŸ“ accordion Folder -
πŸ“ accordion-heading Folder -
πŸ“ accordion-item Folder -
πŸ“„ accordion-item.php File 2411
Edit Download
πŸ“ accordion-panel Folder -
πŸ“„ accordion.php File 1147
Edit Download
πŸ“ archives Folder -
πŸ“„ archives.php File 4415
Edit Download
πŸ“ audio Folder -
πŸ“ avatar Folder -
πŸ“„ avatar.php File 5745
Edit Download
πŸ“ block Folder -
πŸ“„ block.php File 4186
Edit Download
πŸ“„ blocks-json.php File 218576
Edit Download
πŸ“ button Folder -
πŸ“„ button.php File 1752
Edit Download
πŸ“ buttons Folder -
πŸ“ calendar Folder -
πŸ“„ calendar.php File 6075
Edit Download
πŸ“ categories Folder -
πŸ“„ categories.php File 4650
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 1261
Edit Download
πŸ“ comments-title Folder -
πŸ“„ comments-title.php File 2772
Edit Download
πŸ“„ comments.php File 6784
Edit Download
πŸ“ cover Folder -
πŸ“„ cover.php File 3175
Edit Download
πŸ“ details Folder -
πŸ“ embed Folder -
πŸ“ file Folder -
πŸ“„ file.php File 1879
Edit Download
πŸ“ footnotes Folder -
πŸ“„ footnotes.php File 3771
Edit Download
πŸ“ freeform Folder -
πŸ“ gallery Folder -
πŸ“„ gallery.php File 6439
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 13824
Edit Download
πŸ“„ index.php File 5111
Edit Download
πŸ“ latest-comments Folder -
πŸ“„ latest-comments.php File 5030
Edit Download
πŸ“ latest-posts Folder -
πŸ“„ latest-posts.php File 8734
Edit Download
πŸ“ legacy-widget Folder -
πŸ“„ legacy-widget.php File 4011
Edit Download
πŸ“ list Folder -
πŸ“ list-item Folder -
πŸ“„ list.php File 1273
Edit Download
πŸ“ loginout Folder -
πŸ“„ loginout.php File 1664
Edit Download
πŸ“ math Folder -
πŸ“ media-text Folder -
πŸ“„ media-text.php File 4383
Edit Download
πŸ“ missing Folder -
πŸ“ more Folder -
πŸ“ navigation Folder -
πŸ“ navigation-link Folder -
πŸ“„ navigation-link.php File 13961
Edit Download
πŸ“ navigation-submenu Folder -
πŸ“„ navigation-submenu.php File 9976
Edit Download
πŸ“„ navigation.php File 49550
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-count Folder -
πŸ“„ post-comments-count.php File 1275
Edit Download
πŸ“ post-comments-form Folder -
πŸ“„ post-comments-form.php File 2805
Edit Download
πŸ“ post-comments-link Folder -
πŸ“„ post-comments-link.php File 2237
Edit Download
πŸ“ post-content Folder -
πŸ“„ post-content.php File 2347
Edit Download
πŸ“ post-date Folder -
πŸ“„ post-date.php File 3632
Edit Download
πŸ“ post-excerpt Folder -
πŸ“„ post-excerpt.php File 3612
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-time-to-read Folder -
πŸ“„ post-time-to-read.php File 6493
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 3781
Edit Download
πŸ“ query-pagination-numbers Folder -
πŸ“„ query-pagination-numbers.php File 4770
Edit Download
πŸ“ query-pagination-previous Folder -
πŸ“„ query-pagination-previous.php File 3578
Edit Download
πŸ“„ query-pagination.php File 1176
Edit Download
πŸ“ query-title Folder -
πŸ“„ query-title.php File 2943
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 4700
Edit Download
πŸ“„ require-static-blocks.php File 558
Edit Download
πŸ“ rss Folder -
πŸ“„ rss.php File 4609
Edit Download
πŸ“ search Folder -
πŸ“„ search.php File 23817
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 1864
Edit Download
πŸ“ social-link Folder -
πŸ“„ social-link.php File 67735
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-count Folder -
πŸ“„ term-count.php File 1843
Edit Download
πŸ“ term-description Folder -
πŸ“„ term-description.php File 1770
Edit Download
πŸ“ term-name Folder -
πŸ“„ term-name.php File 2069
Edit Download
πŸ“ term-template Folder -
πŸ“„ term-template.php File 4468
Edit Download
πŸ“ terms-query Folder -
πŸ“ text-columns Folder -
πŸ“ verse Folder -
πŸ“ video Folder -
πŸ“„ video.php File 2733
Edit Download
πŸ“ widget-group Folder -
πŸ“„ widget-group.php File 2438
Edit Download

View File: post-comments-link.php

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

/**
 * Renders the `core/post-comments-link` block on the server.
 *
 * @since 6.9.0
 *
 * @param  array    $attributes Block attributes.
 * @param  string   $content    Block default content.
 * @param  WP_Block $block      Block instance.
 * @return string   Returns the rendered link.
 */
function render_block_core_post_comments_link( $attributes, $content, $block ) {
	if (
		! isset( $block->context['postId'] ) ||
		isset( $block->context['postId'] ) &&
		! comments_open( $block->context['postId'] )
	) {
		return '';
	}

	$classes = array();
	if ( isset( $attributes['textAlign'] ) ) {
		$classes[] = 'has-text-align-' . $attributes['textAlign'];
	}
	if ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) {
		$classes[] = 'has-link-color';
	}
	$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classes ) ) );
	$comments_number    = (int) get_comments_number( $block->context['postId'] );
	$comments_link      = get_comments_link( $block->context['postId'] );
	$post_title         = get_the_title( $block->context['postId'] );
	$comment_html       = '';

	if ( 0 === $comments_number ) {
		$comment_html = sprintf(
			/* translators: %s post title */
			__( 'No comments<span class="screen-reader-text"> on %s</span>' ),
			$post_title
		);
	} else {
		$comment_html = sprintf(
			/* translators: 1: Number of comments, 2: post title */
			_n(
				'%1$s comment<span class="screen-reader-text"> on %2$s</span>',
				'%1$s comments<span class="screen-reader-text"> on %2$s</span>',
				$comments_number
			),
			esc_html( number_format_i18n( $comments_number ) ),
			$post_title
		);
	}

	return '<div ' . $wrapper_attributes . '><a href=' . esc_url( $comments_link ) . '>' . $comment_html . '</a></div>';
}

/**
 * Registers the `core/post-comments-link` block on the server.
 *
 * @since 6.9.0
 */
function register_block_core_post_comments_link() {
	register_block_type_from_metadata(
		__DIR__ . '/post-comments-link',
		array(
			'render_callback' => 'render_block_core_post_comments_link',
		)
	);
}
add_action( 'init', 'register_block_core_post_comments_link' );