Skip to content

Commit

Permalink
Fix v1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Soare-Robert-Daniel committed Aug 31, 2020
1 parent 6c31778 commit cf10f6b
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 23 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ node_modules/

# dotenv environment variables file
.env

.fake
.ionide
4 changes: 2 additions & 2 deletions block.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "soare-robert/qr-code-generator-simple-block",
"name": "soare-robert/simple-qr-code-generator-block",
"title": "QR Block Generator",
"category": "widgets",
"icon": "smiley",
"icon": "format-image",
"description": "A simple QR Code Generator.",
"textdomain": "soare-robert",
"supports": {
Expand Down
2 changes: 1 addition & 1 deletion build/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '262cd5a3e9974fb954fa72c9cbb9cc58');
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '1dd78a09b9a9d074e289002bfe2a0171');
2 changes: 1 addition & 1 deletion build/index.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "testing",
"version": "0.1.0",
"description": "Example block written with ESNext standard and JSX support – build step required.",
"author": "The WordPress Contributors",
"name": "simple-qr-code-generator",
"version": "1.1.2",
"description": "It generate a QR Code based on a giving text..",
"author": "soarerobert17",
"license": "GPL-2.0-or-later",
"main": "build/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: soarerobertdaniel17
Tags: block, qrcode, generator
Requires at least: 5.5.5
Tested up to: 5.5.0
Stable tag: 1.1.0
Stable tag: 1.1.2
Requires PHP: 7.0.0
License: GNU GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.en.html
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import attributes from './attributes.js';
*
* @see https://developer.wordpress.org/block-editor/developers/block-api/#registering-a-block
*/
registerBlockType( 'soare-robert/qr-code-generator-simple-block', {
registerBlockType( 'soare-robert/simple-qr-code-generator-block', {
/**
* This is the display title for your block, which can be translated with `i18n` functions.
* The block inserter will show this name.
Expand All @@ -59,7 +59,7 @@ registerBlockType( 'soare-robert/qr-code-generator-simple-block', {
* An icon property should be specified to make it easier to identify a block.
* These can be any of WordPress’ Dashicons, or a custom svg element.
*/
icon: 'smiley',
icon: 'format-image',

/**
* Optional block extended support features.
Expand Down
4 changes: 2 additions & 2 deletions src/obj/fsac.cache

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions testing.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Simple QR Code Generator Block
* Plugin URI: https://github.com/Soare-Robert-Daniel/QR-Code-Generator-Block
* Description: It generate a QR Code based on a giving text.
* Version: 1.1.0
* Version: 1.1.2
* Requires at least: 5.2
* Requires PHP: 7.2
* Author: Soare Robert Daniel
Expand All @@ -17,7 +17,7 @@
*
* @see https://developer.wordpress.org/block-editor/tutorials/block-tutorial/applying-styles-with-stylesheets/
*/
function create_block_testing_block_init() {
function simple_qr_code_generator_init() {
$dir = dirname( __FILE__ );

$script_asset_path = "$dir/build/index.asset.php";
Expand All @@ -29,32 +29,32 @@ function create_block_testing_block_init() {
$index_js = 'build/index.js';
$script_asset = require( $script_asset_path );
wp_register_script(
'create-block-testing-block-editor',
'simple-qr-code-generator-editor',
plugins_url( $index_js, __FILE__ ),
$script_asset['dependencies'],
$script_asset['version']
);

$editor_css = 'build/index.css';
wp_register_style(
'create-block-testing-block-editor',
'simple-qr-code-generator-editor',
plugins_url( $editor_css, __FILE__ ),
array(),
filemtime( "$dir/$editor_css" )
);

$style_css = 'build/style-index.css';
wp_register_style(
'create-block-testing-block',
'simple-qr-code-generator',
plugins_url( $style_css, __FILE__ ),
array(),
filemtime( "$dir/$style_css" )
);

register_block_type( 'soare-robert/qr-code-generator-simple-block', array(
'editor_script' => 'create-block-testing-block-editor',
'editor_style' => 'create-block-testing-block-editor',
'style' => 'create-block-testing-block',
register_block_type( 'soare-robert/simple-qr-code-generator-block', array(
'editor_script' => 'simple-qr-code-generator-editor',
'editor_style' => 'simple-qr-code-generator-editor',
'style' => 'simple-qr-code-generator',
) );
}
add_action( 'init', 'create_block_testing_block_init' );
add_action( 'init', 'simple_qr_code_generator_init' );

0 comments on commit cf10f6b

Please sign in to comment.