PATH:
home
/
carfac
/
public_html
/
unitphotog
/
wp-includes
/
blocks
<?php /** * Server-side rendering of the `core/loginout` block. * * @package WordPress */ /** * Renders the `core/loginout` block on server. * * @param array $attributes The block attributes. * * @return string Returns the login-out link or form. */ function render_block_core_loginout( $attributes ) { // Build the redirect URL. $current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; $classes = is_user_logged_in() ? 'logged-in' : 'logged-out'; $contents = wp_loginout( isset( $attributes['redirectToCurrent'] ) && $attributes['redirectToCurrent'] ? $current_url : '', false ); // If logged-out and displayLoginAsForm is true, show the login form. if ( ! is_user_logged_in() && ! empty( $attributes['displayLoginAsForm'] ) ) { // Add a class. $classes .= ' has-login-form'; // Get the form. $contents = wp_login_form( array( 'echo' => false ) ); } $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) ); return '<div ' . $wrapper_attributes . '>' . $contents . '</div>'; } /** * Registers the `core/loginout` block on server. */ function register_block_core_loginout() { register_block_type_from_metadata( __DIR__ . '/loginout', array( 'render_callback' => 'render_block_core_loginout', ) ); } add_action( 'init', 'register_block_core_loginout' );
[-] template-part.php
[edit]
[-] page-list.php
[edit]
[+]
calendar
[-] page-list-item.php
[edit]
[+]
query-pagination-numbers
[-] post-author-biography.php
[edit]
[+]
social-links
[-] error_log
[edit]
[+]
html
[-] social-link.php
[edit]
[+]
embed
[+]
template-part
[-] query-pagination-next.php
[edit]
[+]
audio
[+]
comments-pagination-numbers
[-] site-tagline.php
[edit]
[+]
archives
[+]
navigation-submenu
[-] cover.php
[edit]
[-] file.php
[edit]
[+]
comments
[+]
image
[+]
site-tagline
[-] post-author.php
[edit]
[-] comment-reply-link.php
[edit]
[-] image.php
[edit]
[-] archives.php
[edit]
[+]
comments-pagination-next
[+]
query-no-results
[+]
separator
[-] post-featured-image.php
[edit]
[+]
legacy-widget
[-] post-content.php
[edit]
[+]
comment-date
[-] comment-content.php
[edit]
[+]
table
[+]
site-title
[-] post-navigation-link.php
[edit]
[-] comment-template.php
[edit]
[-] comment-author-name.php
[edit]
[-] index.php
[edit]
[+]
post-author
[-] rss.php
[edit]
[+]
list
[-] gallery.php
[edit]
[-] calendar.php
[edit]
[+]
comments-pagination
[-] widget-group.php
[edit]
[+]
query-title
[+]
comment-edit-link
[-] post-title.php
[edit]
[-] post-date.php
[edit]
[-] home-link.php
[edit]
[+]
pattern
[+]
site-logo
[+]
missing
[-] post-terms.php
[edit]
[-] shortcode.php
[edit]
[-] query.php
[edit]
[+]
post-navigation-link
[+]
preformatted
[-] read-more.php
[edit]
[+]
query-pagination-next
[+]
post-terms
[+]
gallery
[+]
block
[+]
latest-posts
[-] navigation-link.php
[edit]
[+]
more
[+]
rss
[+]
tag-cloud
[+]
paragraph
[+]
comment-content
[-] query-pagination-numbers.php
[edit]
[+]
query-pagination-previous
[-] post-template.php
[edit]
[+]
comments-pagination-previous
[-] comments-pagination-next.php
[edit]
[-] tag-cloud.php
[edit]
[-] comments.php
[edit]
[-] comment-edit-link.php
[edit]
[+]
post-author-name
[+]
widget-group
[-] query-pagination-previous.php
[edit]
[-] pattern.php
[edit]
[-] avatar.php
[edit]
[-] navigation.php
[edit]
[+]
comment-template
[+]
quote
[+]
code
[-] comments-pagination.php
[edit]
[-] latest-comments.php
[edit]
[-] require-static-blocks.php
[edit]
[-] query-title.php
[edit]
[+]
query
[+]
term-description
[-] admin.php
[edit]
[+]
page-list-item
[+]
latest-comments
[+]
post-author-biography
[+]
video
[+]
navigation
[+]
freeform
[+]
comment-author-name
[+]
comment-reply-link
[+]
footnotes
[+]
read-more
[-] comments-pagination-numbers.php
[edit]
[-] footnotes.php
[edit]
[+]
buttons
[-] comments-pagination-previous.php
[edit]
[-] navigation-submenu.php
[edit]
[+]
file
[+]
details
[+]
query-pagination
[+]
post-excerpt
[-] latest-posts.php
[edit]
[-] term-description.php
[edit]
[-] loginout.php
[edit]
[+]
text-columns
[-] query-pagination.php
[edit]
[+]
loginout
[+]
search
[+]
post-content
[-] heading.php
[edit]
[+]
heading
[+]
post-date
[-] require-dynamic-blocks.php
[edit]
[+]
avatar
[+]
columns
[+]
column
[+]
home-link
[+]
categories
[+]
nextpage
[-] search.php
[edit]
[-] post-comments-form.php
[edit]
[+]
media-text
[-] blocks-json.php
[edit]
[+]
cover
[+]
social-link
[-] comment-date.php
[edit]
[-] .htaccess
[edit]
[+]
post-title
[+]
navigation-link
[-] comments-title.php
[edit]
[+]
shortcode
[+]
post-featured-image
[-] post-excerpt.php
[edit]
[-] post-author-name.php
[edit]
[+]
list-item
[+]
post-template
[+]
button
[+]
spacer
[-] categories.php
[edit]
[+]
comments-title
[-] site-logo.php
[edit]
[-] block.php
[edit]
[+]
..
[-] legacy-widget.php
[edit]
[+]
group
[-] site-title.php
[edit]
[+]
pullquote
[+]
page-list
[+]
post-comments-form
[-] query-no-results.php
[edit]
[+]
verse