PATH:
home
/
bkunreyz
/
ps.fleetwoodislamiccentre.com
/
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/latest-posts` 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' );
[+]
group
[-] post-content.php
[edit]
[+]
list
[+]
post-template
[+]
freeform
[+]
post-terms
[+]
legacy-widget
[+]
site-logo
[+]
calendar
[+]
columns
[-] query-pagination-next.php
[edit]
[-] calendar.php
[edit]
[-] query-pagination-previous.php
[edit]
[+]
image
[+]
file
[-] post-excerpt.php
[edit]
[+]
pullquote
[-] site-title.php
[edit]
[+]
query-pagination-next
[+]
block
[+]
query-title
[+]
latest-comments
[+]
missing
[-] post-terms.php
[edit]
[-] file.php
[edit]
[+]
heading
[-] tag-cloud.php
[edit]
[-] legacy-widget.php
[edit]
[+]
query-pagination-previous
[+]
loginout
[+]
gallery
[+]
cover
[+]
query-pagination
[-] latest-posts.php
[edit]
[-] rss.php
[edit]
[+]
buttons
[+]
post-date
[+]
shortcode
[-] index.php
[edit]
[+]
spacer
[+]
post-title
[-] search.php
[edit]
[+]
quote
[+]
nextpage
[+]
search
[+]
tag-cloud
[-] site-tagline.php
[edit]
[-] post-template.php
[edit]
[+]
..
[+]
post-featured-image
[+]
text-columns
[+]
rss
[+]
embed
[-] loginout.php
[edit]
[-] query-pagination-numbers.php
[edit]
[+]
latest-posts
[+]
post-excerpt
[+]
preformatted
[+]
html
[-] social-link.php
[edit]
[-] categories.php
[edit]
[-] page-list.php
[edit]
[+]
query
[+]
media-text
[+]
social-link
[+]
video
[-] post-featured-image.php
[edit]
[-] shortcode.php
[edit]
[+]
more
[+]
post-content
[-] post-date.php
[edit]
[+]
social-links
[+]
query-pagination-numbers
[+]
separator
[+]
paragraph
[+]
site-tagline
[+]
audio
[+]
button
[+]
code
[+]
categories
[-] query-pagination.php
[edit]
[-] latest-comments.php
[edit]
[+]
table
[-] post-title.php
[edit]
[+]
page-list
[+]
verse
[+]
site-title
[+]
archives
[+]
column