@@ -9,18 +9,25 @@ function register() {
99
1010function add () {
1111 \Sgdg \register_script ( 'sgdg_block ' , '/frontend/js/block.js ' , [ 'wp-blocks ' , 'wp-element ' ] );
12- wp_localize_script ( 'sgdg_block ' , 'sgdgBlockLocalize ' , [
13- 'block_name ' => esc_html__ ( 'Google Drive gallery ' , 'skaut-google-drive-gallery ' ),
14- 'block_description ' => esc_html__ ( 'A WordPress gallery using Google Drive as file storage ' , 'skaut-google-drive-gallery ' ),
15- 'root_name ' => esc_html__ ( 'Google Drive gallery ' , 'skaut-google-drive-gallery ' ),
16- 'ajax_url ' => admin_url ( 'admin-ajax.php ' ),
17- 'nonce ' => wp_create_nonce ( 'sgdg_editor_plugin ' ),
18- ]);
12+ wp_localize_script (
13+ 'sgdg_block ' ,
14+ 'sgdgBlockLocalize ' ,
15+ [
16+ 'block_name ' => esc_html__ ( 'Google Drive gallery ' , 'skaut-google-drive-gallery ' ),
17+ 'block_description ' => esc_html__ ( 'A WordPress gallery using Google Drive as file storage ' , 'skaut-google-drive-gallery ' ),
18+ 'root_name ' => esc_html__ ( 'Google Drive gallery ' , 'skaut-google-drive-gallery ' ),
19+ 'ajax_url ' => admin_url ( 'admin-ajax.php ' ),
20+ 'nonce ' => wp_create_nonce ( 'sgdg_editor_plugin ' ),
21+ ]
22+ );
1923 \Sgdg \enqueue_style ( 'sgdg_block ' , '/frontend/css/block.css ' );
20- register_block_type ( 'skaut-google-drive-gallery/gallery ' , [
21- 'editor_script ' => 'sgdg_block ' ,
22- 'render_callback ' => '\\Sgdg \\Frontend \\Block \\html ' ,
23- ] );
24+ register_block_type (
25+ 'skaut-google-drive-gallery/gallery ' ,
26+ [
27+ 'editor_script ' => 'sgdg_block ' ,
28+ 'render_callback ' => '\\Sgdg \\Frontend \\Block \\html ' ,
29+ ]
30+ );
2431}
2532
2633function html ( $ attributes ) {
0 commit comments