/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/e2e-tests/plugins/iframed-block.php
46 строк
1 KB
Ari Stathopoulos
Update WPCS to v3.0, and fix all reported Coding Standards issues (#53866)
13 сен 2023, 10:03
Не верифицирован
13 сен 2023, 10:03
b05bee7
Код
Авторство
О чём код?
<?php /** * Plugin Name: Gutenberg Test Iframed Block * Plugin URI: https://github.com/WordPress/gutenberg * Author: Gutenberg Team * * @package gutenberg-test-iframed-block */ add_action( 'setup_theme', static function () { add_theme_support( 'block-templates' ); } ); add_action( 'init', static function () { wp_register_script( 'iframed-block-jquery-test', plugin_dir_url( __FILE__ ) . 'iframed-block/jquery.test.js', array( 'jquery' ), filemtime( plugin_dir_path( __FILE__ ) . 'iframed-block/jquery.test.js' ) ); wp_register_script( 'iframed-block-editor', plugin_dir_url( __FILE__ ) . 'iframed-block/editor.js', array( 'wp-blocks', 'wp-block-editor', 'wp-element', 'wp-compose', 'iframed-block-jquery-test', ), filemtime( plugin_dir_path( __FILE__ ) . 'iframed-block/editor.js' ) ); wp_register_script( 'iframed-block-script', plugin_dir_url( __FILE__ ) . 'iframed-block/script.js', array( 'iframed-block-jquery-test' ), filemtime( plugin_dir_path( __FILE__ ) . 'iframed-block/script.js' ) ); register_block_type_from_metadata( __DIR__ . '/iframed-block' ); } );