Enqueues extra metadata type components on item submission block.
This commit is contained in:
parent
6741a67fce
commit
d1dbfcb50c
|
@ -202,7 +202,7 @@
|
||||||
|
|
||||||
if (equal.length == currentValues.length && this.itemMetadatum.value.length <= equal.length)
|
if (equal.length == currentValues.length && this.itemMetadatum.value.length <= equal.length)
|
||||||
return;
|
return;
|
||||||
} else {
|
} else { // This will happen in taxonomy single valued on item submission, as there all term values appear as array.
|
||||||
if (this.itemMetadatum.value == currentValues)
|
if (this.itemMetadatum.value == currentValues)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -178,6 +178,7 @@ function tainacan_blocks_register_tainacan_item_submission_form(){
|
||||||
array('wp-blocks', 'wp-element', 'wp-components', 'wp-editor')
|
array('wp-blocks', 'wp-element', 'wp-components', 'wp-editor')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Registers Google ReCAPTCHA
|
||||||
wp_register_script(
|
wp_register_script(
|
||||||
'google-recaptcha-script',
|
'google-recaptcha-script',
|
||||||
'https://www.google.com/recaptcha/api.js',
|
'https://www.google.com/recaptcha/api.js',
|
||||||
|
@ -185,6 +186,11 @@ function tainacan_blocks_register_tainacan_item_submission_form(){
|
||||||
);
|
);
|
||||||
wp_enqueue_script('google-recaptcha-script');
|
wp_enqueue_script('google-recaptcha-script');
|
||||||
|
|
||||||
|
// Registers extra metadata type forms
|
||||||
|
$theme_helper = \Tainacan\Metadata_Types\Metadata_Type_Helper::get_instance();
|
||||||
|
if (isset($theme_helper))
|
||||||
|
$theme_helper->register_metadata_type_compoment();
|
||||||
|
|
||||||
wp_register_style(
|
wp_register_style(
|
||||||
'item-submission-form',
|
'item-submission-form',
|
||||||
$TAINACAN_BASE_URL . '/assets/css/tainacan-gutenberg-block-item-submission-form.css',
|
$TAINACAN_BASE_URL . '/assets/css/tainacan-gutenberg-block-item-submission-form.css',
|
||||||
|
|
Loading…
Reference in New Issue