SILENT KILLERPanel

Current Path: > home > codekrsu > > shopceylon.store > wp-includes > blocks


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: /home/codekrsu//shopceylon.store/wp-includes/blocks

NameTypeSizeLast ModifiedActions
archives Directory - -
audio Directory - -
avatar Directory - -
block Directory - -
button Directory - -
buttons Directory - -
calendar Directory - -
categories Directory - -
code Directory - -
column Directory - -
columns Directory - -
comment-author-name Directory - -
comment-content Directory - -
comment-date Directory - -
comment-edit-link Directory - -
comment-reply-link Directory - -
comment-template Directory - -
comments Directory - -
comments-pagination Directory - -
comments-pagination-next Directory - -
comments-pagination-numbers Directory - -
comments-pagination-previous Directory - -
comments-title Directory - -
cover Directory - -
details Directory - -
embed Directory - -
file Directory - -
footnotes Directory - -
freeform Directory - -
gallery Directory - -
group Directory - -
heading Directory - -
home-link Directory - -
html Directory - -
image Directory - -
latest-comments Directory - -
latest-posts Directory - -
legacy-widget Directory - -
list Directory - -
list-item Directory - -
loginout Directory - -
media-text Directory - -
missing Directory - -
more Directory - -
navigation Directory - -
navigation-link Directory - -
navigation-submenu Directory - -
nextpage Directory - -
page-list Directory - -
page-list-item Directory - -
paragraph Directory - -
pattern Directory - -
post-author Directory - -
post-author-biography Directory - -
post-author-name Directory - -
post-comments-form Directory - -
post-content Directory - -
post-date Directory - -
post-excerpt Directory - -
post-featured-image Directory - -
post-navigation-link Directory - -
post-template Directory - -
post-terms Directory - -
post-title Directory - -
preformatted Directory - -
pullquote Directory - -
query Directory - -
query-no-results Directory - -
query-pagination Directory - -
query-pagination-next Directory - -
query-pagination-numbers Directory - -
query-pagination-previous Directory - -
query-title Directory - -
query-total Directory - -
quote Directory - -
read-more Directory - -
rss Directory - -
search Directory - -
separator Directory - -
shortcode Directory - -
site-logo Directory - -
site-tagline Directory - -
site-title Directory - -
social-link Directory - -
social-links Directory - -
spacer Directory - -
table Directory - -
tag-cloud Directory - -
template-part Directory - -
term-description Directory - -
text-columns Directory - -
verse Directory - -
video Directory - -
widget-group Directory - -
archives.php File 2994 bytes May 23 2024 23:39:28.
avatar.php File 5745 bytes October 31 2024 08:09:28.
block.php File 3314 bytes March 03 2025 23:08:42.
blocks-json.php File 193945 bytes March 25 2025 17:02:24.
button.php File 1805 bytes June 11 2024 14:07:32.
calendar.php File 6075 bytes May 23 2024 23:39:28.
categories.php File 4010 bytes October 01 2024 05:18:28.
comment-author-name.php File 2133 bytes May 23 2024 23:39:28.
comment-content.php File 2459 bytes May 23 2024 23:39:28.
comment-date.php File 1863 bytes September 20 2024 05:55:36.
comment-edit-link.php File 1713 bytes May 23 2024 23:39:28.
comment-reply-link.php File 2075 bytes May 23 2024 23:39:28.
comment-template.php File 4494 bytes May 23 2024 23:39:28.
comments-pagination-next.php File 1924 bytes September 20 2024 05:55:36.
comments-pagination-numbers.php File 1632 bytes May 23 2024 23:39:28.
comments-pagination-previous.php File 1790 bytes September 20 2024 05:55:36.
comments-pagination.php File 1199 bytes May 23 2024 23:39:28.
comments-title.php File 2772 bytes May 23 2024 23:39:28.
comments.php File 6767 bytes May 31 2024 22:59:00.
cover.php File 3175 bytes February 07 2025 20:46:48.
error_log File 22612 bytes July 28 2025 22:36:44.
file.php File 1793 bytes September 23 2024 10:52:26.
footnotes.php File 3771 bytes February 27 2024 19:48:24.
gallery.php File 6438 bytes May 23 2024 23:39:28.
heading.php File 1301 bytes May 23 2024 23:39:28.
home-link.php File 5438 bytes February 07 2025 20:46:48.
image.php File 12023 bytes February 07 2025 20:46:48.
index.php File 5111 bytes October 03 2024 04:25:16.
latest-comments.php File 5040 bytes May 23 2024 23:39:28.
latest-posts.php File 8542 bytes October 31 2024 08:09:28.
legacy-widget.php File 3997 bytes May 23 2024 23:39:28.
list.php File 1273 bytes May 23 2024 23:56:08.
loginout.php File 2804 bytes May 23 2024 23:39:28.
media-text.php File 4383 bytes September 20 2024 06:07:12.
navigation-link.php File 13913 bytes February 07 2025 20:46:48.
navigation-submenu.php File 9943 bytes February 07 2025 20:46:48.
navigation.php File 49620 bytes March 03 2025 23:08:42.
page-list-item.php File 361 bytes May 23 2024 23:39:28.
page-list.php File 13611 bytes September 20 2024 05:55:36.
pattern.php File 1788 bytes February 07 2025 20:46:48.
post-author-biography.php File 1524 bytes May 23 2024 23:39:28.
post-author-name.php File 1951 bytes April 28 2025 20:47:40.
post-author.php File 2734 bytes April 28 2025 20:47:40.
post-comments-form.php File 2805 bytes May 23 2024 23:39:28.
post-content.php File 2156 bytes March 03 2025 23:08:42.
post-date.php File 3124 bytes September 20 2024 05:55:36.
post-excerpt.php File 3447 bytes May 23 2024 23:39:28.
post-featured-image.php File 9363 bytes May 23 2024 23:39:28.
post-navigation-link.php File 4837 bytes May 23 2024 23:39:28.
post-template.php File 5749 bytes September 23 2024 10:52:26.
post-terms.php File 3640 bytes February 07 2025 20:46:48.
post-title.php File 2138 bytes May 23 2024 23:39:28.
query-no-results.php File 1847 bytes May 23 2024 23:39:28.
query-pagination-next.php File 3787 bytes June 11 2024 14:07:32.
query-pagination-numbers.php File 4770 bytes May 23 2024 23:39:28.
query-pagination-previous.php File 3584 bytes February 07 2025 20:46:48.
query-pagination.php File 1176 bytes May 23 2024 23:39:28.
query-title.php File 2098 bytes May 23 2024 23:39:28.
query-total.php File 2535 bytes March 25 2025 16:54:22.
query.php File 5690 bytes February 07 2025 20:46:48.
read-more.php File 1830 bytes May 23 2024 23:39:28.
require-dynamic-blocks.php File 4163 bytes February 07 2025 20:46:48.
require-static-blocks.php File 501 bytes June 11 2024 14:07:32.
rss.php File 4073 bytes February 07 2025 20:46:48.
search.php File 23016 bytes February 07 2025 20:46:48.
shortcode.php File 735 bytes May 23 2024 23:39:28.
site-logo.php File 6334 bytes September 20 2024 05:55:36.
site-tagline.php File 1203 bytes May 23 2024 23:39:28.
site-title.php File 1853 bytes March 10 2025 23:47:40.
social-link.php File 65174 bytes March 03 2025 23:08:42.
tag-cloud.php File 1590 bytes September 20 2024 05:55:36.
template-part.php File 10154 bytes March 03 2025 23:08:42.
term-description.php File 1336 bytes May 23 2024 23:39:28.
widget-group.php File 2438 bytes May 23 2024 23:39:28.

Reading File: /home/codekrsu//shopceylon.store/wp-includes/blocks/post-featured-image.php

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

/**
 * Renders the `core/post-featured-image` block on the server.
 *
 * @since 5.8.0
 *
 * @param array    $attributes Block attributes.
 * @param string   $content    Block default content.
 * @param WP_Block $block      Block instance.
 * @return string Returns the featured image for the current post.
 */
function render_block_core_post_featured_image( $attributes, $content, $block ) {
	if ( ! isset( $block->context['postId'] ) ) {
		return '';
	}
	$post_ID = $block->context['postId'];

	$is_link        = isset( $attributes['isLink'] ) && $attributes['isLink'];
	$size_slug      = isset( $attributes['sizeSlug'] ) ? $attributes['sizeSlug'] : 'post-thumbnail';
	$attr           = get_block_core_post_featured_image_border_attributes( $attributes );
	$overlay_markup = get_block_core_post_featured_image_overlay_element_markup( $attributes );

	if ( $is_link ) {
		if ( get_the_title( $post_ID ) ) {
			$attr['alt'] = trim( strip_tags( get_the_title( $post_ID ) ) );
		} else {
			$attr['alt'] = sprintf(
				// translators: %d is the post ID.
				__( 'Untitled post %d' ),
				$post_ID
			);
		}
	}

	$extra_styles = '';

	// Aspect ratio with a height set needs to override the default width/height.
	if ( ! empty( $attributes['aspectRatio'] ) ) {
		$extra_styles .= 'width:100%;height:100%;';
	} elseif ( ! empty( $attributes['height'] ) ) {
		$extra_styles .= "height:{$attributes['height']};";
	}

	if ( ! empty( $attributes['scale'] ) ) {
		$extra_styles .= "object-fit:{$attributes['scale']};";
	}
	if ( ! empty( $attributes['style']['shadow'] ) ) {
		$shadow_styles = wp_style_engine_get_styles( array( 'shadow' => $attributes['style']['shadow'] ) );

		if ( ! empty( $shadow_styles['css'] ) ) {
			$extra_styles .= $shadow_styles['css'];
		}
	}

	if ( ! empty( $extra_styles ) ) {
		$attr['style'] = empty( $attr['style'] ) ? $extra_styles : $attr['style'] . $extra_styles;
	}

	$featured_image = get_the_post_thumbnail( $post_ID, $size_slug, $attr );

	// Get the first image from the post.
	if ( $attributes['useFirstImageFromPost'] && ! $featured_image ) {
		$content_post = get_post( $post_ID );
		$content      = $content_post->post_content;
		$processor    = new WP_HTML_Tag_Processor( $content );

		/*
		 * Transfer the image tag from the post into a new text snippet.
		 * Because the HTML API doesn't currently expose a way to extract
		 * HTML substrings this is necessary as a workaround. Of note, this
		 * is different than directly extracting the IMG tag:
		 * - If there are duplicate attributes in the source there will only be one in the output.
		 * - If there are single-quoted or unquoted attributes they will be double-quoted in the output.
		 * - If there are named character references in the attribute values they may be replaced with their direct code points. E.g. `&hellip;` becomes `…`.
		 * In the future there will likely be a mechanism to copy snippets of HTML from
		 * one document into another, via the HTML Processor's `get_outer_html()` or
		 * equivalent. When that happens it would be appropriate to replace this custom
		 * code with that canonical code.
		 */
		if ( $processor->next_tag( 'img' ) ) {
			$tag_html = new WP_HTML_Tag_Processor( '<img>' );
			$tag_html->next_tag();
			foreach ( $processor->get_attribute_names_with_prefix( '' ) as $name ) {
				$tag_html->set_attribute( $name, $processor->get_attribute( $name ) );
			}
			$featured_image = $tag_html->get_updated_html();
		}
	}

	if ( ! $featured_image ) {
		return '';
	}

	if ( $is_link ) {
		$link_target    = $attributes['linkTarget'];
		$rel            = ! empty( $attributes['rel'] ) ? 'rel="' . esc_attr( $attributes['rel'] ) . '"' : '';
		$height         = ! empty( $attributes['height'] ) ? 'style="' . esc_attr( safecss_filter_attr( 'height:' . $attributes['height'] ) ) . '"' : '';
		$featured_image = sprintf(
			'<a href="%1$s" target="%2$s" %3$s %4$s>%5$s%6$s</a>',
			get_the_permalink( $post_ID ),
			esc_attr( $link_target ),
			$rel,
			$height,
			$featured_image,
			$overlay_markup
		);
	} else {
		$featured_image = $featured_image . $overlay_markup;
	}

	$aspect_ratio = ! empty( $attributes['aspectRatio'] )
		? esc_attr( safecss_filter_attr( 'aspect-ratio:' . $attributes['aspectRatio'] ) ) . ';'
		: '';
	$width        = ! empty( $attributes['width'] )
		? esc_attr( safecss_filter_attr( 'width:' . $attributes['width'] ) ) . ';'
		: '';
	$height       = ! empty( $attributes['height'] )
		? esc_attr( safecss_filter_attr( 'height:' . $attributes['height'] ) ) . ';'
		: '';
	if ( ! $height && ! $width && ! $aspect_ratio ) {
		$wrapper_attributes = get_block_wrapper_attributes();
	} else {
		$wrapper_attributes = get_block_wrapper_attributes( array( 'style' => $aspect_ratio . $width . $height ) );
	}
	return "<figure {$wrapper_attributes}>{$featured_image}</figure>";
}

/**
 * Generate markup for the HTML element that will be used for the overlay.
 *
 * @since 6.1.0
 *
 * @param array $attributes Block attributes.
 *
 * @return string HTML markup in string format.
 */
function get_block_core_post_featured_image_overlay_element_markup( $attributes ) {
	$has_dim_background  = isset( $attributes['dimRatio'] ) && $attributes['dimRatio'];
	$has_gradient        = isset( $attributes['gradient'] ) && $attributes['gradient'];
	$has_custom_gradient = isset( $attributes['customGradient'] ) && $attributes['customGradient'];
	$has_solid_overlay   = isset( $attributes['overlayColor'] ) && $attributes['overlayColor'];
	$has_custom_overlay  = isset( $attributes['customOverlayColor'] ) && $attributes['customOverlayColor'];
	$class_names         = array( 'wp-block-post-featured-image__overlay' );
	$styles              = array();

	if ( ! $has_dim_background ) {
		return '';
	}

	// Apply border classes and styles.
	$border_attributes = get_block_core_post_featured_image_border_attributes( $attributes );

	if ( ! empty( $border_attributes['class'] ) ) {
		$class_names[] = $border_attributes['class'];
	}

	if ( ! empty( $border_attributes['style'] ) ) {
		$styles[] = $border_attributes['style'];
	}

	// Apply overlay and gradient classes.
	if ( $has_dim_background ) {
		$class_names[] = 'has-background-dim';
		$class_names[] = "has-background-dim-{$attributes['dimRatio']}";
	}

	if ( $has_solid_overlay ) {
		$class_names[] = "has-{$attributes['overlayColor']}-background-color";
	}

	if ( $has_gradient || $has_custom_gradient ) {
		$class_names[] = 'has-background-gradient';
	}

	if ( $has_gradient ) {
		$class_names[] = "has-{$attributes['gradient']}-gradient-background";
	}

	// Apply background styles.
	if ( $has_custom_gradient ) {
		$styles[] = sprintf( 'background-image: %s;', $attributes['customGradient'] );
	}

	if ( $has_custom_overlay ) {
		$styles[] = sprintf( 'background-color: %s;', $attributes['customOverlayColor'] );
	}

	return sprintf(
		'<span class="%s" style="%s" aria-hidden="true"></span>',
		esc_attr( implode( ' ', $class_names ) ),
		esc_attr( safecss_filter_attr( implode( ' ', $styles ) ) )
	);
}

/**
 * Generates class names and styles to apply the border support styles for
 * the Post Featured Image block.
 *
 * @since 6.1.0
 *
 * @param array $attributes The block attributes.
 * @return array The border-related classnames and styles for the block.
 */
function get_block_core_post_featured_image_border_attributes( $attributes ) {
	$border_styles = array();
	$sides         = array( 'top', 'right', 'bottom', 'left' );

	// Border radius.
	if ( isset( $attributes['style']['border']['radius'] ) ) {
		$border_styles['radius'] = $attributes['style']['border']['radius'];
	}

	// Border style.
	if ( isset( $attributes['style']['border']['style'] ) ) {
		$border_styles['style'] = $attributes['style']['border']['style'];
	}

	// Border width.
	if ( isset( $attributes['style']['border']['width'] ) ) {
		$border_styles['width'] = $attributes['style']['border']['width'];
	}

	// Border color.
	$preset_color           = array_key_exists( 'borderColor', $attributes ) ? "var:preset|color|{$attributes['borderColor']}" : null;
	$custom_color           = $attributes['style']['border']['color'] ?? null;
	$border_styles['color'] = $preset_color ? $preset_color : $custom_color;

	// Individual border styles e.g. top, left etc.
	foreach ( $sides as $side ) {
		$border                 = $attributes['style']['border'][ $side ] ?? null;
		$border_styles[ $side ] = array(
			'color' => isset( $border['color'] ) ? $border['color'] : null,
			'style' => isset( $border['style'] ) ? $border['style'] : null,
			'width' => isset( $border['width'] ) ? $border['width'] : null,
		);
	}

	$styles     = wp_style_engine_get_styles( array( 'border' => $border_styles ) );
	$attributes = array();
	if ( ! empty( $styles['classnames'] ) ) {
		$attributes['class'] = $styles['classnames'];
	}
	if ( ! empty( $styles['css'] ) ) {
		$attributes['style'] = $styles['css'];
	}
	return $attributes;
}

/**
 * Registers the `core/post-featured-image` block on the server.
 *
 * @since 5.8.0
 */
function register_block_core_post_featured_image() {
	register_block_type_from_metadata(
		__DIR__ . '/post-featured-image',
		array(
			'render_callback' => 'render_block_core_post_featured_image',
		)
	);
}
add_action( 'init', 'register_block_core_post_featured_image' );

SILENT KILLER Tool