X7ROOT File Manager
Current Path:
/home/freights/old.freightsoko.co.ke/wp-includes/blocks
home
/
freights
/
old.freightsoko.co.ke
/
wp-includes
/
blocks
/
??
..
??
5mv9xqsu
(9.03 KB)
??
app_91
??
archives
??
archives.php
(2.7 KB)
??
audio
??
block
??
block.php
(1.47 KB)
??
button
??
buttons
??
bysvfhu6
(9.03 KB)
??
calendar
??
calendar.php
(1.53 KB)
??
categories
??
categories.php
(2.59 KB)
??
code
??
column
??
columns
??
cover
??
embed
??
file
??
file.php
(897 B)
??
freeform
??
gallery
??
group
??
heading
??
html
??
image
??
index.php
(2.54 KB)
??
latest-comments
??
latest-comments.php
(4.88 KB)
??
latest-posts
??
latest-posts.php
(6.96 KB)
??
legacy-widget
??
legacy-widget.php
(3.7 KB)
??
list
??
loginout
??
media-text
??
missing
??
more
??
nextpage
??
page-list
??
page-list.php
(7.09 KB)
??
paragraph
??
post-content
??
post-content.php
(1.84 KB)
??
post-date
??
post-date.php
(1.5 KB)
??
post-excerpt
??
post-excerpt.php
(2.38 KB)
??
post-featured-image
??
post-featured-image.php
(1.31 KB)
??
post-template
??
post-template.php
(2.66 KB)
??
post-terms
??
post-terms.php
(1.63 KB)
??
post-title
??
post-title.php
(1.57 KB)
??
preformatted
??
pullquote
??
query
??
query-pagination
??
query-pagination-next
??
query-pagination-next.php
(2.45 KB)
??
query-pagination-numbers
??
query-pagination-numbers.php
(2.72 KB)
??
query-pagination-previous
??
query-pagination-previous.php
(1.99 KB)
??
query-pagination.php
(359 B)
??
query-title
??
query-title.php
(1.35 KB)
??
query.php
(304 B)
??
quote
??
rss
??
rss.php
(3.17 KB)
??
search
??
search.php
(6.57 KB)
??
separator
??
shortcode
??
shortcode.php
(697 B)
??
site-logo
??
site-logo.php
(4.84 KB)
??
site-tagline
??
site-tagline.php
(994 B)
??
site-title
??
site-title.php
(1.21 KB)
??
social-link
??
social-link.php
(57.92 KB)
??
social-links
??
spacer
??
table
??
tag-cloud
??
tag-cloud.php
(1.24 KB)
??
text-columns
??
verse
??
video
Editing: post-terms.php
<?php /** * Server-side rendering of the `core/post-terms` block. * * @package WordPress */ /** * Renders the `core/post-terms` 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 filtered post terms for the current post wrapped inside "a" tags. */ function render_block_core_post_terms( $attributes, $content, $block ) { if ( ! isset( $block->context['postId'] ) || ! isset( $attributes['term'] ) ) { return ''; } if ( ! is_taxonomy_viewable( $attributes['term'] ) ) { return ''; } $post_terms = get_the_terms( $block->context['postId'], $attributes['term'] ); if ( is_wp_error( $post_terms ) ) { return ''; } if ( empty( $post_terms ) ) { return ''; } $align_class_name = empty( $attributes['textAlign'] ) ? '' : ' ' . "has-text-align-{$attributes['textAlign']}"; $terms_links = ''; foreach ( $post_terms as $term ) { $terms_links .= sprintf( '<a href="%1$s">%2$s</a> | ', get_term_link( $term->term_id ), esc_html( $term->name ) ); } $terms_links = trim( $terms_links, ' | ' ); $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $align_class_name ) ); return sprintf( '<div %1$s>%2$s</div>', $wrapper_attributes, $terms_links ); } /** * Registers the `core/post-terms` block on the server. */ function register_block_core_post_terms() { register_block_type_from_metadata( __DIR__ . '/post-terms', array( 'render_callback' => 'render_block_core_post_terms', ) ); } add_action( 'init', 'register_block_core_post_terms' );
Upload File
Create Folder