Submit
Path:
F:
/
Inetpub
/
vhosts
/
solasmarine.com.tr
/
httpdocs
/
wp-includes
/
blocks
/
File Content:
post-navigation-link.php
<?php /** * Server-side rendering of the `core/post-navigation-link` block. * * @package WordPress */ /** * Renders the `core/post-navigation-link` block on the server. * * @since 5.9.0 * * @param array $attributes Block attributes. * @param string $content Block default content. * * @return string Returns the next or previous post link that is adjacent to the current post. */ function render_block_core_post_navigation_link( $attributes, $content ) { if ( ! is_singular() ) { return ''; } // Get the navigation type to show the proper link. Available options are `next|previous`. $navigation_type = $attributes['type'] ?? 'next'; // Allow only `next` and `previous` in `$navigation_type`. if ( ! in_array( $navigation_type, array( 'next', 'previous' ), true ) ) { return ''; } $classes = "post-navigation-link-$navigation_type"; if ( isset( $attributes['textAlign'] ) ) { $classes .= " has-text-align-{$attributes['textAlign']}"; } $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes, ) ); // Set default values. $format = '%link'; $link = 'next' === $navigation_type ? _x( 'Next', 'label for next post link' ) : _x( 'Previous', 'label for previous post link' ); $label = ''; // Only use hardcoded values here, otherwise we need to add escaping where these values are used. $arrow_map = array( 'none' => '', 'arrow' => array( 'next' => '→', 'previous' => '←', ), 'chevron' => array( 'next' => '»', 'previous' => '«', ), ); // If a custom label is provided, make this a link. // `$label` is used to prepend the provided label, if we want to show the page title as well. if ( isset( $attributes['label'] ) && ! empty( $attributes['label'] ) ) { $label = "{$attributes['label']}"; $link = $label; } // If we want to also show the page title, make the page title a link and prepend the label. if ( isset( $attributes['showTitle'] ) && $attributes['showTitle'] ) { /* * If the label link option is not enabled but there is a custom label, * display the custom label as text before the linked title. */ if ( ! $attributes['linkLabel'] ) { if ( $label ) { $format = '<span class="post-navigation-link__label">' . wp_kses_post( $label ) . '</span> %link'; } $link = '%title'; } elseif ( isset( $attributes['linkLabel'] ) && $attributes['linkLabel'] ) { // If the label link option is enabled and there is a custom label, display it before the title. if ( $label ) { $link = '<span class="post-navigation-link__label">' . wp_kses_post( $label ) . '</span> <span class="post-navigation-link__title">%title</span>'; } else { /* * If the label link option is enabled and there is no custom label, * add a colon between the label and the post title. */ $label = 'next' === $navigation_type ? _x( 'Next:', 'label before the title of the next post' ) : _x( 'Previous:', 'label before the title of the previous post' ); $link = sprintf( '<span class="post-navigation-link__label">%1$s</span> <span class="post-navigation-link__title">%2$s</span>', wp_kses_post( $label ), '%title' ); } } } // Display arrows. if ( isset( $attributes['arrow'] ) && 'none' !== $attributes['arrow'] && isset( $arrow_map[ $attributes['arrow'] ] ) ) { $arrow = $arrow_map[ $attributes['arrow'] ][ $navigation_type ]; if ( 'next' === $navigation_type ) { $format = '%link<span class="wp-block-post-navigation-link__arrow-next is-arrow-' . $attributes['arrow'] . '" aria-hidden="true">' . $arrow . '</span>'; } else { $format = '<span class="wp-block-post-navigation-link__arrow-previous is-arrow-' . $attributes['arrow'] . '" aria-hidden="true">' . $arrow . '</span>%link'; } } /* * The dynamic portion of the function name, `$navigation_type`, * Refers to the type of adjacency, 'next' or 'previous'. * * @see https://developer.wordpress.org/reference/functions/get_previous_post_link/ * @see https://developer.wordpress.org/reference/functions/get_next_post_link/ */ $get_link_function = "get_{$navigation_type}_post_link"; if ( ! empty( $attributes['taxonomy'] ) ) { $content = $get_link_function( $format, $link, true, '', $attributes['taxonomy'] ); } else { $content = $get_link_function( $format, $link ); } return sprintf( '<div %1$s>%2$s</div>', $wrapper_attributes, $content ); } /** * Registers the `core/post-navigation-link` block on the server. * * @since 5.9.0 */ function register_block_core_post_navigation_link() { register_block_type_from_metadata( __DIR__ . '/post-navigation-link', array( 'render_callback' => 'render_block_core_post_navigation_link', ) ); } add_action( 'init', 'register_block_core_post_navigation_link' );
Edit
Rename
Chmod
Delete
FILE
DIR
INFO
CMD
Name
Size
Permission
Action
accordion
---
0777
accordion-heading
---
0777
accordion-item
---
0777
accordion-panel
---
0777
archives
---
0777
audio
---
0777
avatar
---
0777
block
---
0777
breadcrumbs
---
0777
button
---
0777
buttons
---
0777
calendar
---
0777
categories
---
0777
code
---
0777
column
---
0777
columns
---
0777
comment-author-name
---
0777
comment-content
---
0777
comment-date
---
0777
comment-edit-link
---
0777
comment-reply-link
---
0777
comment-template
---
0777
comments
---
0777
comments-pagination
---
0777
comments-pagination-next
---
0777
comments-pagination-numbers
---
0777
comments-pagination-previous
---
0777
comments-title
---
0777
cover
---
0777
details
---
0777
embed
---
0777
file
---
0777
footnotes
---
0777
freeform
---
0777
gallery
---
0777
group
---
0777
heading
---
0777
home-link
---
0777
html
---
0777
icon
---
0777
image
---
0777
latest-comments
---
0777
latest-posts
---
0777
legacy-widget
---
0777
list
---
0777
list-item
---
0777
loginout
---
0777
math
---
0777
media-text
---
0777
missing
---
0777
more
---
0777
navigation
---
0777
navigation-link
---
0777
navigation-overlay-close
---
0777
navigation-submenu
---
0777
nextpage
---
0777
page-list
---
0777
page-list-item
---
0777
paragraph
---
0777
pattern
---
0777
post-author
---
0777
post-author-biography
---
0777
post-author-name
---
0777
post-comments-count
---
0777
post-comments-form
---
0777
post-comments-link
---
0777
post-content
---
0777
post-date
---
0777
post-excerpt
---
0777
post-featured-image
---
0777
post-navigation-link
---
0777
post-template
---
0777
post-terms
---
0777
post-time-to-read
---
0777
post-title
---
0777
preformatted
---
0777
pullquote
---
0777
query
---
0777
query-no-results
---
0777
query-pagination
---
0777
query-pagination-next
---
0777
query-pagination-numbers
---
0777
query-pagination-previous
---
0777
query-title
---
0777
query-total
---
0777
quote
---
0777
read-more
---
0777
rss
---
0777
search
---
0777
separator
---
0777
shortcode
---
0777
site-logo
---
0777
site-tagline
---
0777
site-title
---
0777
social-link
---
0777
social-links
---
0777
spacer
---
0777
table
---
0777
tag-cloud
---
0777
template-part
---
0777
term-count
---
0777
term-description
---
0777
term-name
---
0777
term-template
---
0777
terms-query
---
0777
text-columns
---
0777
verse
---
0777
video
---
0777
widget-group
---
0777
accordion-item.php
3041bytes
0666
accordion.php
1147bytes
0666
archives.php
4385bytes
0666
avatar.php
5634bytes
0666
block.php
4186bytes
0666
blocks-json.php
199123bytes
0666
breadcrumbs.php
19057bytes
0666
button.php
1752bytes
0666
calendar.php
6075bytes
0666
categories.php
4938bytes
0666
comment-author-name.php
2133bytes
0666
comment-content.php
2459bytes
0666
comment-date.php
1863bytes
0666
comment-edit-link.php
1713bytes
0666
comment-reply-link.php
2075bytes
0666
comment-template.php
4494bytes
0666
comments-pagination-next.php
1924bytes
0666
comments-pagination-numbers.php
1632bytes
0666
comments-pagination-previous.php
1790bytes
0666
comments-pagination.php
1261bytes
0666
comments-title.php
2787bytes
0666
comments.php
6784bytes
0666
cover.php
7422bytes
0666
details.php
1498bytes
0666
file.php
1879bytes
0666
footnotes.php
3818bytes
0666
gallery.php
9067bytes
0666
heading.php
1301bytes
0666
home-link.php
5438bytes
0666
icon.php
4139bytes
0666
image.php
17661bytes
0666
index.php
5111bytes
0666
latest-comments.php
5488bytes
0666
latest-posts.php
8843bytes
0666
legacy-widget.php
4011bytes
0666
list.php
1273bytes
0666
loginout.php
1664bytes
0666
media-text.php
4298bytes
0666
navigation-link.php
16221bytes
0666
navigation-overlay-close.php
1765bytes
0666
navigation-submenu.php
11744bytes
0666
navigation.php
64817bytes
0666
page-list-item.php
361bytes
0666
page-list.php
15069bytes
0666
paragraph.php
1139bytes
0666
pattern.php
1788bytes
0666
post-author-biography.php
1524bytes
0666
post-author-name.php
1951bytes
0666
post-author.php
2734bytes
0666
post-comments-count.php
1275bytes
0666
post-comments-form.php
2805bytes
0666
post-comments-link.php
2237bytes
0666
post-content.php
2347bytes
0666
post-date.php
3655bytes
0666
post-excerpt.php
4315bytes
0666
post-featured-image.php
9248bytes
0666
post-navigation-link.php
4807bytes
0666
post-template.php
5687bytes
0666
post-terms.php
3640bytes
0666
post-time-to-read.php
6411bytes
0666
post-title.php
2138bytes
0666
query-no-results.php
1847bytes
0666
query-pagination-next.php
3676bytes
0666
query-pagination-numbers.php
4700bytes
0666
query-pagination-previous.php
3473bytes
0666
query-pagination.php
1176bytes
0666
query-title.php
2771bytes
0666
query-total.php
2471bytes
0666
query.php
5690bytes
0666
read-more.php
1830bytes
0666
require-dynamic-blocks.php
4978bytes
0666
require-static-blocks.php
520bytes
0666
rss.php
4609bytes
0666
search.php
23817bytes
0666
shortcode.php
735bytes
0666
site-logo.php
6334bytes
0666
site-tagline.php
1203bytes
0666
site-title.php
1864bytes
0666
social-link.php
67602bytes
0666
tag-cloud.php
1590bytes
0666
template-part.php
10446bytes
0666
term-count.php
1843bytes
0666
term-description.php
1770bytes
0666
term-name.php
2038bytes
0666
term-template.php
4518bytes
0666
video.php
2733bytes
0666
widget-group.php
2438bytes
0666