Mini Shell

Direktori : /home/admin/web/mcpv.demarco.ddnsfree.com/public_html/wp-includes/blocks/
Upload File :
Current File : /home/admin/web/mcpv.demarco.ddnsfree.com/public_html/wp-includes/blocks/calendar.php

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

/**
 * Renders the `core/calendar` block on server.
 *
 * @param array $attributes The block attributes.
 *
 * @return string Returns the block content.
 */
function render_block_core_calendar( $attributes ) {
	global $monthnum, $year;

	// Calendar shouldn't be rendered
	// when there are no published posts on the site.
	if ( ! block_core_calendar_has_published_posts() ) {
		if ( is_user_logged_in() ) {
			return '<div>' . __( 'The calendar block is hidden because there are no published posts.' ) . '</div>';
		}
		return '';
	}

	$previous_monthnum = $monthnum;
	$previous_year     = $year;

	if ( isset( $attributes['month'] ) && isset( $attributes['year'] ) ) {
		$permalink_structure = get_option( 'permalink_structure' );
		if (
			str_contains( $permalink_structure, '%monthnum%' ) &&
			str_contains( $permalink_structure, '%year%' )
		) {
			// phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
			$monthnum = $attributes['month'];
			// phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
			$year = $attributes['year'];
		}
	}

	$color_block_styles = array();

	// Text color.
	$preset_text_color          = array_key_exists( 'textColor', $attributes ) ? "var:preset|color|{$attributes['textColor']}" : null;
	$custom_text_color          = _wp_array_get( $attributes, array( 'style', 'color', 'text' ), null );
	$color_block_styles['text'] = $preset_text_color ? $preset_text_color : $custom_text_color;

	// Background Color.
	$preset_background_color          = array_key_exists( 'backgroundColor', $attributes ) ? "var:preset|color|{$attributes['backgroundColor']}" : null;
	$custom_background_color          = _wp_array_get( $attributes, array( 'style', 'color', 'background' ), null );
	$color_block_styles['background'] = $preset_background_color ? $preset_background_color : $custom_background_color;

	// Generate color styles and classes.
	$styles        = wp_style_engine_get_styles( array( 'color' => $color_block_styles ), array( 'convert_vars_to_classnames' => true ) );
	$inline_styles = empty( $styles['css'] ) ? '' : sprintf( ' style="%s"', esc_attr( $styles['css'] ) );
	$classnames    = empty( $styles['classnames'] ) ? '' : ' ' . esc_attr( $styles['classnames'] );
	if ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) {
		$classnames .= ' has-link-color';
	}
	// Apply color classes and styles to the calendar.
	$calendar = str_replace( '<table', '<table' . $inline_styles, get_calendar( true, false ) );
	$calendar = str_replace( 'class="wp-calendar-table', 'class="wp-calendar-table' . $classnames, $calendar );

	$wrapper_attributes = get_block_wrapper_attributes();
	$output             = sprintf(
		'<div %1$s>%2$s</div>',
		$wrapper_attributes,
		$calendar
	);

	// phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
	$monthnum = $previous_monthnum;
	// phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
	$year = $previous_year;

	return $output;
}

/**
 * Registers the `core/calendar` block on server.
 */
function register_block_core_calendar() {
	register_block_type_from_metadata(
		__DIR__ . '/calendar',
		array(
			'render_callback' => 'render_block_core_calendar',
		)
	);
}

add_action( 'init', 'register_block_core_calendar' );

/**
 * Returns whether or not there are any published posts.
 *
 * Used to hide the calendar block when there are no published posts.
 * This compensates for a known Core bug: https://core.trac.wordpress.org/ticket/12016
 *
 * @return bool Has any published posts or not.
 */
function block_core_calendar_has_published_posts() {
	// Multisite already has an option that stores the count of the published posts.
	// Let's use that for multisites.
	if ( is_multisite() ) {
		return 0 < (int) get_option( 'post_count' );
	}

	// On single sites we try our own cached option first.
	$has_published_posts = get_option( 'wp_calendar_block_has_published_posts', null );
	if ( null !== $has_published_posts ) {
		return (bool) $has_published_posts;
	}

	// No cache hit, let's update the cache and return the cached value.
	return block_core_calendar_update_has_published_posts();
}

/**
 * Queries the database for any published post and saves
 * a flag whether any published post exists or not.
 *
 * @return bool Has any published posts or not.
 */
function block_core_calendar_update_has_published_posts() {
	global $wpdb;
	$has_published_posts = (bool) $wpdb->get_var( "SELECT 1 as test FROM {$wpdb->posts} WHERE post_type = 'post' AND post_status = 'publish' LIMIT 1" );
	update_option( 'wp_calendar_block_has_published_posts', $has_published_posts );
	return $has_published_posts;
}

// We only want to register these functions and actions when
// we are on single sites. On multi sites we use `post_count` option.
if ( ! is_multisite() ) {
	/**
	 * Handler for updating the has published posts flag when a post is deleted.
	 *
	 * @param int $post_id Deleted post ID.
	 */
	function block_core_calendar_update_has_published_post_on_delete( $post_id ) {
		$post = get_post( $post_id );

		if ( ! $post || 'publish' !== $post->post_status || 'post' !== $post->post_type ) {
			return;
		}

		block_core_calendar_update_has_published_posts();
	}

	/**
	 * Handler for updating the has published posts flag when a post status changes.
	 *
	 * @param string  $new_status The status the post is changing to.
	 * @param string  $old_status The status the post is changing from.
	 * @param WP_Post $post       Post object.
	 */
	function block_core_calendar_update_has_published_post_on_transition_post_status( $new_status, $old_status, $post ) {
		if ( $new_status === $old_status ) {
			return;
		}

		if ( 'post' !== get_post_type( $post ) ) {
			return;
		}

		if ( 'publish' !== $new_status && 'publish' !== $old_status ) {
			return;
		}

		block_core_calendar_update_has_published_posts();
	}

	add_action( 'delete_post', 'block_core_calendar_update_has_published_post_on_delete' );
	add_action( 'transition_post_status', 'block_core_calendar_update_has_published_post_on_transition_post_status', 10, 3 );
}

Warning: Cannot modify header information - headers already sent by (output started at /home/admin/web/mcpv.demarco.ddnsfree.com/public_html/wp-content/plugins/hello.php(3) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code:132) in /home/admin/web/mcpv.demarco.ddnsfree.com/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1768

Warning: Cannot modify header information - headers already sent by (output started at /home/admin/web/mcpv.demarco.ddnsfree.com/public_html/wp-content/plugins/hello.php(3) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code:132) in /home/admin/web/mcpv.demarco.ddnsfree.com/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1768

Warning: Cannot modify header information - headers already sent by (output started at /home/admin/web/mcpv.demarco.ddnsfree.com/public_html/wp-content/plugins/hello.php(3) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code:132) in /home/admin/web/mcpv.demarco.ddnsfree.com/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1768

Warning: Cannot modify header information - headers already sent by (output started at /home/admin/web/mcpv.demarco.ddnsfree.com/public_html/wp-content/plugins/hello.php(3) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code:132) in /home/admin/web/mcpv.demarco.ddnsfree.com/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1768

Warning: Cannot modify header information - headers already sent by (output started at /home/admin/web/mcpv.demarco.ddnsfree.com/public_html/wp-content/plugins/hello.php(3) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code:132) in /home/admin/web/mcpv.demarco.ddnsfree.com/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1768

Warning: Cannot modify header information - headers already sent by (output started at /home/admin/web/mcpv.demarco.ddnsfree.com/public_html/wp-content/plugins/hello.php(3) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code:132) in /home/admin/web/mcpv.demarco.ddnsfree.com/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1768

Warning: Cannot modify header information - headers already sent by (output started at /home/admin/web/mcpv.demarco.ddnsfree.com/public_html/wp-content/plugins/hello.php(3) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code:132) in /home/admin/web/mcpv.demarco.ddnsfree.com/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1768

Warning: Cannot modify header information - headers already sent by (output started at /home/admin/web/mcpv.demarco.ddnsfree.com/public_html/wp-content/plugins/hello.php(3) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code:132) in /home/admin/web/mcpv.demarco.ddnsfree.com/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1768
{"id":6133,"date":"2021-09-02T09:09:54","date_gmt":"2021-09-02T09:09:54","guid":{"rendered":"https:\/\/mcpv.demarco.ddnsfree.com\/?p=6133"},"modified":"2025-09-11T19:33:22","modified_gmt":"2025-09-11T19:33:22","slug":"my-favorite-half-about-this-genuine-leather-bag-is-the","status":"publish","type":"post","link":"https:\/\/mcpv.demarco.ddnsfree.com\/index.php\/2021\/09\/02\/my-favorite-half-about-this-genuine-leather-bag-is-the\/","title":{"rendered":"My favorite half about this Genuine Leather Bag is the"},"content":{"rendered":"

The Hard Reality About Pretend Designer Baggage In Turkey\n<\/p>\n

You can select between gold, rose gold and silver designs Replica Hermes Belt<\/a>, all for a similar price! Black, of course, goes nicely with everything Replica Hermes Constance<\/a>, thus you won\u2019t must assume too much what to put on these bracelets with. Although one thing formal can be the most applicable apparel, going casual also can look good.\n<\/p>\n

A high-quality Hermes bag dupe won’t compromise on these parts and provides you with a way of proudly owning a luxury product. From the enduring Birkin to the chic Kelly, Hermes handbags are a status image, signifying the epitome of luxury and elegance. However, with great fashion comes a considerable price level, making these coveted pieces out of attain for many. Featuring the same hardware that we are in a position to discover on the Kelly bag Replica Hermes Kelly<\/a>, this belt is yet one more iconic piece from the model, coveted for its ultra-luxurious look and quality materials. Easily adjustable and perfect for accessorizing numerous silhouettes, this leather belt will remain in your closet for many years to come back when cared for correctly.\n<\/p>\n

The hardware on the left strap of a Birkin and Kelly is engraved with HERMES_PARIS. To additional make sure the authenticity of a Hermes item, evaluate it with official product photos from the brand\u2019s web site or authorized retailers. Take notice of the design details Replica Hermes Kelly<\/a> Evelyne Replica bag<\/a>, similar to the form, measurement, and placement of hardware duplicate birkin baggage , in addition to any unique features or patterns.\n<\/p>\n

This blanket makes for a novel present and is a cute alternative to the Hermes blanket. For such a good price, you would get one for you and one for your hubby. Not solely are you getting an excellent dupe for the Hermes blanket, but you might be also supporting a small enterprise when you shop this dupe. With no over-extra elements and fancy logos, Picotin lock isn’t a gimmick; its leather-based selection is.. This lovable and stylish 25cm Kelly is constructed of beautiful, classic Epsom leather which is noted f..\n<\/p>\n

Crafted from luxe leather-based, it options adjustable side gussets and a elegant chain-link pendant for a decorative component. Want to browse pre-loved Herm\u00e8s luggage or promote your individual with confidence? Explore our luxurious assortment at SwapUp and experience second-hand buying accomplished right. Priced at beneath $100, these reproduction purses went viral on TikTok Replica Hermes Belt<\/a>0, though the third-party listings had been ultimately removed once all the colors and fashions bought out. The Hermes assortment of Kelly handbags is known for its timeless magnificence and high-end craftsmanship. My favorite half about this Genuine Leather Bag is the spectacular range of colors it\u2019s out there in, making it easy to seek out the next addition to your purse assortment.\n<\/p>\n

Simply go over with the tip of your finger and you may feel whether the proper aspect is over the left or whether it\u2019s the opposite way around. If there\u2019s no bar tack in existence, likelihood is you’ve a fake. Unless of course Replica Hermes Belts<\/a>, it\u2019s a vintage tie where they’ve come unfastened but in that case, the whole tie ought to have the ability to fold open and you\u2019ll have to repair it earlier than you possibly can wear it. When you touch the silk and go along with your fingers, you hear a sure sound. It\u2019s not a delicate silk, it\u2019s additionally not a super crisp silk, and it\u2019s by no means shiny. Honestly Replica Hermes<\/a>, it\u2019s onerous to describe in words and one thing you need to really feel to actually be ready to judge it.\n<\/p>\n

I’ve began my weblog over 5 years in the past to share my love for luxurious handbags with the world. Since then Replica Hermes Belts<\/a>, Fifth Avenue Girl has advanced into a high vacation spot for all issues luxurious style and style, with millions of readers globally. As one of the most desirable purses in the world replica birkin hermes<\/a>, the Herm\u00e8s Kelly isn\u2019t necessarily that straightforward to get ahold of. While your Herm\u00e8s SA can offer you a Kelly once you\u2019ve built a strong purchase history with the model, the supply isn’t really guaranteed.<\/p>\n","protected":false},"excerpt":{"rendered":"

The Hard Reality About Pretend Designer Baggage In Turkey You can select between gold, rose gold and silver designs Replica Hermes Belt, all for a similar price! Black, of course, goes nicely with everything Replica Hermes Constance, thus you won\u2019t must assume too much what to put on these bracelets with. Although one thing formal…<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/mcpv.demarco.ddnsfree.com\/index.php\/wp-json\/wp\/v2\/posts\/6133"}],"collection":[{"href":"https:\/\/mcpv.demarco.ddnsfree.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mcpv.demarco.ddnsfree.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mcpv.demarco.ddnsfree.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mcpv.demarco.ddnsfree.com\/index.php\/wp-json\/wp\/v2\/comments?post=6133"}],"version-history":[{"count":1,"href":"https:\/\/mcpv.demarco.ddnsfree.com\/index.php\/wp-json\/wp\/v2\/posts\/6133\/revisions"}],"predecessor-version":[{"id":6134,"href":"https:\/\/mcpv.demarco.ddnsfree.com\/index.php\/wp-json\/wp\/v2\/posts\/6133\/revisions\/6134"}],"wp:attachment":[{"href":"https:\/\/mcpv.demarco.ddnsfree.com\/index.php\/wp-json\/wp\/v2\/media?parent=6133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mcpv.demarco.ddnsfree.com\/index.php\/wp-json\/wp\/v2\/categories?post=6133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mcpv.demarco.ddnsfree.com\/index.php\/wp-json\/wp\/v2\/tags?post=6133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}