ities. So in that case we call * _wp_footnotes_kses_init_filters(). * * @access private * @since 6.3.2 * * @param string $arg Input argument of the filter. * @return string Input argument of the filter. */ function _wp_footnotes_force_filtered_html_on_import_filter( $arg ) { // If `force_filtered_html_on_import` is true, we need to init the global styles kses filters. if ( $arg ) { _wp_footnotes_kses_init_filters(); } return $arg; } /** * Exposes blocks with autoRegister flag for ServerSideRender in the editor. * * Detects blocks that have the autoRegister flag set in their supports * and passes them to JavaScript for auto-registration with ServerSideRender. * * @access private * @since 7.0.0 */ function _wp_enqueue_auto_register_blocks() { $auto_register_blocks = array(); $registered_blocks = WP_Block_Type_Registry::get_instance()->get_all_registered(); foreach ( $registered_blocks as $block_name => $block_type ) { if ( ! empty( $block_type->supports['autoRegister'] ) && ! empty( $block_type->render_callback ) ) { $auto_register_blocks[] = $block_name; } } if ( ! empty( $auto_register_blocks ) ) { wp_add_inline_script( 'wp-block-library', sprintf( 'window.__unstableAutoRegisterBlocks = %s;', wp_json_encode( $auto_register_blocks ) ), 'before' ); } }