33 * Plugin Name: Simple QR Code Generator Block
44 * Plugin URI: https://github.com/Soare-Robert-Daniel/QR-Code-Generator-Block
55 * Description: It generate a QR Code based on a giving text.
6- * Version: 1.1.0
6+ * Version: 1.1.2
77 * Requires at least: 5.2
88 * Requires PHP: 7.2
99 * Author: Soare Robert Daniel
1717 *
1818 * @see https://developer.wordpress.org/block-editor/tutorials/block-tutorial/applying-styles-with-stylesheets/
1919 */
20- function create_block_testing_block_init () {
20+ function simple_qr_code_generator_init () {
2121 $ dir = dirname ( __FILE__ );
2222
2323 $ script_asset_path = "$ dir/build/index.asset.php " ;
@@ -29,32 +29,32 @@ function create_block_testing_block_init() {
2929 $ index_js = 'build/index.js ' ;
3030 $ script_asset = require ( $ script_asset_path );
3131 wp_register_script (
32- 'create-block-testing-block -editor ' ,
32+ 'simple-qr-code-generator -editor ' ,
3333 plugins_url ( $ index_js , __FILE__ ),
3434 $ script_asset ['dependencies ' ],
3535 $ script_asset ['version ' ]
3636 );
3737
3838 $ editor_css = 'build/index.css ' ;
3939 wp_register_style (
40- 'create-block-testing-block -editor ' ,
40+ 'simple-qr-code-generator -editor ' ,
4141 plugins_url ( $ editor_css , __FILE__ ),
4242 array (),
4343 filemtime ( "$ dir/ $ editor_css " )
4444 );
4545
4646 $ style_css = 'build/style-index.css ' ;
4747 wp_register_style (
48- 'create-block-testing-block ' ,
48+ 'simple-qr-code-generator ' ,
4949 plugins_url ( $ style_css , __FILE__ ),
5050 array (),
5151 filemtime ( "$ dir/ $ style_css " )
5252 );
5353
54- register_block_type ( 'soare-robert/qr-code-generator-simple -block ' , array (
55- 'editor_script ' => 'create-block-testing-block -editor ' ,
56- 'editor_style ' => 'create-block-testing-block -editor ' ,
57- 'style ' => 'create-block-testing-block ' ,
54+ register_block_type ( 'soare-robert/simple- qr-code-generator-block ' , array (
55+ 'editor_script ' => 'simple-qr-code-generator -editor ' ,
56+ 'editor_style ' => 'simple-qr-code-generator -editor ' ,
57+ 'style ' => 'simple-qr-code-generator ' ,
5858 ) );
5959}
60- add_action ( 'init ' , 'create_block_testing_block_init ' );
60+ add_action ( 'init ' , 'simple_qr_code_generator_init ' );
0 commit comments