Filter hook 'block_editor_no_javascript_message'

in WP Core File wp-admin/edit-form-blocks.php at line 421

View Source

block_editor_no_javascript_message

Filter Hook
Description
Filters the message displayed in the block editor interface when JavaScript is not enabled in the browser.

Hook Information

File Location wp-admin/edit-form-blocks.php View on GitHub
Hook Type Filter
Line Number 421

Hook Parameters

Type Name Description
string $message The message being displayed.
WP_Post $post The post being edited.
bool $installed Whether the classic editor is installed.

Usage Examples

Basic Usage
<?php
// Hook into block_editor_no_javascript_message
add_filter('block_editor_no_javascript_message', 'my_custom_filter', 10, 3);

function my_custom_filter($message, $post, $installed) {
    // Your custom filtering logic here
    return $message;
}

Source Code Context

wp-admin/edit-form-blocks.php:421 - How this hook is used in WordPress core
<?php
 416  		 *
 417  		 * @param string  $message   The message being displayed.
 418  		 * @param WP_Post $post      The post being edited.
 419  		 * @param bool    $installed Whether the classic editor is installed.
 420  		 */
 421  		$message = apply_filters( 'block_editor_no_javascript_message', $message, $post, $installed );
 422  		wp_admin_notice(
 423  			$message,
 424  			array(
 425  				'type' => 'error',
 426  			)

PHP Documentation

<?php
/**
		 * Filters the message displayed in the block editor interface when JavaScript is
		 * not enabled in the browser.
		 *
		 * @since 5.0.3
		 * @since 6.4.0 Added `$installed` parameter.
		 *
		 * @param string  $message   The message being displayed.
		 * @param WP_Post $post      The post being edited.
		 * @param bool    $installed Whether the classic editor is installed.
		 */
Quick Info
  • Hook Type: Filter
  • Parameters: 3
  • File: wp-admin/edit-form-blocks.php
Related Hooks

Related hooks will be displayed here in future updates.