Server : LiteSpeed
System : Linux quebec.us.hostns.io 5.14.0-687.42.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Aug 27 11:55:12 EDT 2026 x86_64
User : gazetufm ( 1431)
PHP Version : 8.1.35
Disable Function : NONE
Directory :  /home2/gazetufm/www/wp/wp-content/plugins/gutenberg/build/scripts/block-library/

📁 Create New:
⬆️ Upload File:
Current Dir [ Not Writable ] Root [ Writable ]


OR Upload from URL:
URL: Save as:

📄 File: form-input.php

Path: //home2/gazetufm/www/wp/wp-content/plugins/gutenberg/build/scripts/block-library/form-input.php

Size: 1.17 KB

Permissions: 0644

<?php
/**
 * Server-side rendering of the `core/form-input` block.
 *
 * @package WordPress
 */

/**
 * Renders the `core/form-input` block on server.
 *
 * @param array  $attributes The block attributes.
 * @param string $content The saved content.
 *
 * @return string The content of the block being rendered.
 */
function gutenberg_render_block_core_form_input( $attributes, $content ) {
	$visibility_permissions = 'all';
	if ( isset( $attributes['visibilityPermissions'] ) ) {
		$visibility_permissions = $attributes['visibilityPermissions'];
	}

	$user_logged_in = is_user_logged_in();

	if ( 'logged-in' === $visibility_permissions && ! $user_logged_in ) {
		return '';
	}
	if ( 'logged-out' === $visibility_permissions && $user_logged_in ) {
		return '';
	}
	return $content;
}

/**
 * Registers the `core/form-input` block on server.
 */
function gutenberg_register_block_core_form_input() {
	if ( ! gutenberg_is_experiment_enabled( 'gutenberg-form-blocks' ) ) {
		return;
	}
	register_block_type_from_metadata(
		__DIR__ . '/form-input',
		array(
			'render_callback' => 'gutenberg_render_block_core_form_input',
		)
	);
}
add_action( 'init', 'gutenberg_register_block_core_form_input', 20 );

← Back to Directory Edit File 🔒 Chmod

WP File Manager