re WordPress.Security.NonceVerification.Missing return sprintf( '
%3$s
', esc_attr( Blocks::classes( 'contact-form', $atts ) ), esc_url( get_the_permalink() ), esc_html__( 'Submit a form.', 'jetpack-forms' ) ); } self::load_view_scripts(); return Contact_Form::parse( $atts, do_blocks( $content ) ); } /** * Loads scripts */ public static function load_editor_scripts() { global $post; $handle = 'jp-forms-blocks'; Assets::register_script( $handle, '../../../dist/blocks/editor.js', __FILE__, array( 'in_footer' => true, 'textdomain' => 'jetpack-forms', 'enqueue' => true, ) ); $data = array( 'defaults' => array( 'to' => wp_get_current_user()->user_email, 'subject' => '[' . get_bloginfo( 'name' ) . ']' . ( isset( $post ) ? ' ' . esc_html( $post->post_title ) : '' ), ), ); wp_add_inline_script( $handle, 'window.jpFormsBlocks = ' . wp_json_encode( $data ) . ';', 'before' ); } /** * Loads scripts */ public static function load_view_scripts() { if ( is_admin() ) { // A block's view assets will not be required in wp-admin. return; } Assets::register_script( 'jp-forms-blocks', '../../../dist/blocks/view.js', __FILE__, array( 'in_footer' => true, 'textdomain' => 'jetpack-forms', 'enqueue' => true, ) ); } }
Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, class "Automattic\Jetpack\Extensions\Contact_Form\Contact_Form_Block" not found in /htdocs/wp-includes/class-wp-hook.php:324 Stack trace: #0 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(Object(Jetpack_Keyring_Service_Helper), Array) #1 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #2 /htdocs/wp-settings.php(704): do_action('init') #3 /htdocs/wp-config.php(85): require_once('/htdocs/wp-sett...') #4 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #5 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #6 /htdocs/index.php(17): require('/htdocs/wp-blog...') #7 {main} thrown in /htdocs/wp-includes/class-wp-hook.php on line 324