Skip to content

Commit

Permalink
Upgrade Gutenberg APIs marked as deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed May 19, 2018
1 parent a661163 commit cba83b0
Show file tree
Hide file tree
Showing 15 changed files with 2,427 additions and 1,856 deletions.
2 changes: 1 addition & 1 deletion docs/_coverpage.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![logo](icon.svg)

# GCF <small>1.5.1</small>
# GCF <small>1.5.2</small>

> WordPress Custom Fields, the Gutenberg way.
Expand Down
2 changes: 1 addition & 1 deletion gutenberg-custom-fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Gutenberg Custom Fields
* Plugin URI: https://github.com/youknowriad/gcf
* Description: Custom Fields, The Gutenberg way
* Version: 1.5.1
* Version: 1.5.2
* Text Domain: gutenberg-custom-fields
* Domain Path: /languages
* Author: Riad Benguella
Expand Down
2 changes: 1 addition & 1 deletion lib/fields-script.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function gutenberg_custom_fields_fields_register() {
wp_register_script(
'gcf-fields',
gutenberg_custom_fields_url( 'scripts/fields/build/index.js' ),
array( 'wp-element', 'wp-blocks', 'wp-components', 'wp-utils', 'wp-date', 'wp-data', 'wp-i18n', 'gcf-i18n' ),
array( 'wp-element', 'wp-blocks', 'wp-editor', 'wp-components', 'wp-utils', 'wp-date', 'wp-data', 'wp-i18n', 'gcf-i18n' ),
filemtime( gutenberg_custom_fields_dir_path() . 'scripts/fields/build/index.js' ),
true
);
Expand Down
5 changes: 0 additions & 5 deletions lib/register-templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,6 @@ function register_gutenberg_custom_templates_blocks() {
json_encode($fields)
) );
wp_enqueue_style( 'gcf-fields' );

// Ensures the `wp-editor` loads after the template blocks are registered
global $wp_scripts;
$script = $wp_scripts->query( 'wp-editor', 'registered' );
$script->deps[] = 'gcf-fields';
}

add_action( 'enqueue_block_editor_assets', 'register_gutenberg_custom_templates_blocks' );
Loading

0 comments on commit cba83b0

Please sign in to comment.