Adds options to inner-options to take advantage of blocksy classes

This commit is contained in:
mateuswetah 2020-09-24 09:25:10 -03:00
parent ff672cb307
commit 872562f319
3 changed files with 8 additions and 6 deletions

View File

@ -153,8 +153,8 @@ function blocksy_tainacan_custom_post_types_single_options( $options, $post_type
], false);
if ( is_array($item_extra_options) ) {
$options['options'] = array_merge(
$options['options'],
$options['options'][$post_type . '_single_section_options']['inner-options'] = array_merge(
$options['options'][$post_type . '_single_section_options']['inner-options'],
$item_extra_options
);
}

View File

@ -11,8 +11,8 @@ if (! isset($enabled)) {
}
$options = [
$prefix . 'has_title_metadata' => [
'label' => __( 'Core title in the metadata list.', 'blocksy-tainacan' ),
$prefix . '_has_title_metadata' => [
'label' => __( 'Core title in the metadata list', 'blocksy-tainacan' ),
'type' => 'ct-switch',
'value' => $enabled,
'setting' => [ 'transport' => 'postMessage' ],

View File

@ -1,3 +1,6 @@
<?php
$prefix = blocksy_manager()->screen->get_prefix();
?>
<div>
<?php if ( get_theme_mod('tainacan_single_item_metadata_section_label', '') != '') : ?>
@ -24,9 +27,8 @@
'after_title' => '</h3>',
'before_value' => '<p>',
'after_value' => '</p></div>',
'exclude_title' => get_theme_mod('tainacan_single_item_hide_core_title_metadata', false)
'exclude_title' => (get_theme_mod($prefix . '_has_title_metadata', 'yes') === 'no')
);
//$field = null;
tainacan_the_metadata( $args );
?>
<?php do_action( 'blocksy-tainacan-single-item-metadata-end' ); ?>