'gutenberg-examples-01', ) ); if ( function_exists( 'wp_set_script_translations' ) ) { /** * May be extended to wp_set_script_translations( 'my-handle', 'my-domain', * plugin_dir_path( MY_PLUGIN ) . 'languages' ) ). For details see * https://make.wordpress.org/core/2018/11/09/new-javascript-i18n-support-in-wordpress/ */ wp_set_script_translations( 'gutenberg-examples-01', 'gutenberg-examples' ); } } add_action( 'init', 'gutenberg_examples_01_register_block' );