Adds section label options.
This commit is contained in:
parent
02f6a36954
commit
f56691fd7b
|
@ -12,7 +12,7 @@ if (! isset($enabled)) {
|
||||||
|
|
||||||
$options = [
|
$options = [
|
||||||
$prefix . 'display_section_labels' => [
|
$prefix . 'display_section_labels' => [
|
||||||
'label' => __( 'Display section labels', 'blocksy' ),
|
'label' => __( 'Display section labels', 'blocksy-tainacan' ),
|
||||||
'type' => 'ct-panel',
|
'type' => 'ct-panel',
|
||||||
'switch' => true,
|
'switch' => true,
|
||||||
'value' => $enabled,
|
'value' => $enabled,
|
||||||
|
@ -20,16 +20,36 @@ $options = [
|
||||||
'prefix' => $prefix,
|
'prefix' => $prefix,
|
||||||
]),
|
]),
|
||||||
'inner-options' => [
|
'inner-options' => [
|
||||||
// $prefix . 'test_title_metadata' => [
|
$prefix . 'section_document_label' => [
|
||||||
// 'label' => __( 'Test title in the metadata list', 'blocksy-tainacan' ),
|
'label' => __( 'Label for the "Document" section', 'blocksy-tainacan' ),
|
||||||
// 'type' => 'ct-switch',
|
'desc' => __( 'Leave it blank for not displaying any label.', 'blocksy-tainacan' ),
|
||||||
// 'value' => 'yes',
|
'type' => 'text',
|
||||||
// 'setting' => [ 'transport' => 'postMessage' ],
|
'design' => 'block',
|
||||||
// 'desc' => __( 'Toggle to hide or not the core title from the metadada list, as it already appears on the page title.', 'blocksy' ),
|
'value' => __( 'Document', 'blocksy-tainacan' ),
|
||||||
// 'sync' => blocksy_sync_single_post_container([
|
'sync' => blocksy_sync_single_post_container([
|
||||||
// 'prefix' => $prefix
|
'prefix' => $prefix
|
||||||
// ])
|
])
|
||||||
// ]
|
],
|
||||||
|
$prefix . 'section_attachments_label' => [
|
||||||
|
'label' => __( 'Label for the "Attachments" section', 'blocksy-tainacan' ),
|
||||||
|
'desc' => __( 'Leave it blank for not displaying any label.', 'blocksy-tainacan' ),
|
||||||
|
'type' => 'text',
|
||||||
|
'design' => 'block',
|
||||||
|
'value' => __( 'Attachments', 'blocksy-tainacan' ),
|
||||||
|
'sync' => blocksy_sync_single_post_container([
|
||||||
|
'prefix' => $prefix
|
||||||
|
])
|
||||||
|
],
|
||||||
|
$prefix . 'section_metadata_label' => [
|
||||||
|
'label' => __( 'Label for the "Metadata" section', 'blocksy-tainacan' ),
|
||||||
|
'desc' => __( 'Leave it blank for not displaying any label.', 'blocksy-tainacan' ),
|
||||||
|
'type' => 'text',
|
||||||
|
'design' => 'block',
|
||||||
|
'value' => __( 'Metadata', 'blocksy-tainacan' ),
|
||||||
|
'sync' => blocksy_sync_single_post_container([
|
||||||
|
'prefix' => $prefix
|
||||||
|
])
|
||||||
|
]
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
|
@ -16,7 +16,7 @@ $options = [
|
||||||
'type' => 'ct-switch',
|
'type' => 'ct-switch',
|
||||||
'value' => $enabled,
|
'value' => $enabled,
|
||||||
'setting' => [ 'transport' => 'postMessage' ],
|
'setting' => [ 'transport' => 'postMessage' ],
|
||||||
'desc' => __( 'Toggle to show or not the item thumbnail on the metadada list.', 'blocksy' ),
|
'desc' => __( 'Toggle to show or not the item thumbnail on the metadada list.', 'blocksy-tainacan' ),
|
||||||
'sync' => blocksy_sync_single_post_container([
|
'sync' => blocksy_sync_single_post_container([
|
||||||
'prefix' => $prefix
|
'prefix' => $prefix
|
||||||
])
|
])
|
||||||
|
|
|
@ -289,6 +289,5 @@
|
||||||
right: 10px;
|
right: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -15,14 +15,14 @@
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
$prefix = blocksy_manager()->screen->get_prefix();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php if ( !empty( $attachments ) || ( get_theme_mod( 'tainacan_single_item_gallery_mode', false) && tainacan_has_document() )) : ?>
|
<?php if ( !empty( $attachments ) || ( get_theme_mod( 'tainacan_single_item_gallery_mode', false) && tainacan_has_document() )) : ?>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<?php if ( !get_theme_mod( 'tainacan_single_item_gallery_mode', false ) && get_theme_mod('tainacan_single_item_attachments_section_label', __( 'Attachments', 'blocksy-tainacan' )) != '') : ?>
|
<?php if ( get_theme_mod($prefix . '_display_section_labels', 'yes') == 'yes' && get_theme_mod($prefix . '_section_attachments_label', __( 'Attachments', 'blocksy-tainacan' )) != '' ) : ?>
|
||||||
<h2 class="title-content-items" id="single-item-attachments-label">
|
<h2 class="title-content-items" id="single-item-attachments-label">
|
||||||
<?php echo esc_html( get_theme_mod('tainacan_single_item_attachments_section_label', __( 'Attachments', 'blocksy-tainacan' )) ); ?>
|
<?php echo esc_html( get_theme_mod($prefix . '_section_attachments_label', __( 'Attachments', 'blocksy-tainacan' ) ) ); ?>
|
||||||
</h2>
|
</h2>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if ( get_theme_mod( 'tainacan_single_item_gallery_mode', false ) && get_theme_mod('tainacan_single_item_documents_section_label', __( 'Documents', 'blocksy-tainacan' )) != '') : ?>
|
<?php if ( get_theme_mod( 'tainacan_single_item_gallery_mode', false ) && get_theme_mod('tainacan_single_item_documents_section_label', __( 'Documents', 'blocksy-tainacan' )) != '') : ?>
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
|
<?php
|
||||||
|
$prefix = blocksy_manager()->screen->get_prefix();
|
||||||
|
?>
|
||||||
<?php if ( tainacan_has_document() && !get_theme_mod( 'tainacan_single_item_gallery_mode', false )) : ?>
|
<?php if ( tainacan_has_document() && !get_theme_mod( 'tainacan_single_item_gallery_mode', false )) : ?>
|
||||||
<div>
|
<div>
|
||||||
<?php if ( get_theme_mod('tainacan_single_item_document_section_label', __( 'Document', 'blocksy-tainacan' )) != '') : ?>
|
<?php if ( get_theme_mod($prefix . '_display_section_labels', 'yes') == 'yes' && get_theme_mod($prefix . '_section_document_label', __( 'Document', 'blocksy-tainacan' )) != '' ) : ?>
|
||||||
<h2 class="title-content-items" id="single-item-document-label">
|
<h2 class="title-content-items" id="single-item-document-label">
|
||||||
<?php echo esc_html( get_theme_mod('tainacan_single_item_document_section_label', __( 'Document', 'blocksy-tainacan' )) ); ?>
|
<?php echo esc_html( get_theme_mod($prefix . '_section_document_label', __( 'Document', 'blocksy-tainacan' ) ) ); ?>
|
||||||
</h2>
|
</h2>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<section class="tainacan-content single-item-collection margin-two-column">
|
<section class="tainacan-content single-item-collection margin-two-column">
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
$prefix = blocksy_manager()->screen->get_prefix();
|
$prefix = blocksy_manager()->screen->get_prefix();
|
||||||
?>
|
?>
|
||||||
<div>
|
<div>
|
||||||
<?php if ( get_theme_mod('tainacan_single_item_metadata_section_label', '') != '') : ?>
|
<?php if ( get_theme_mod($prefix . '_display_section_labels', 'yes') == 'yes' && get_theme_mod($prefix . '_section_metadata_label', __( 'Metadata', 'blocksy-tainacan' )) != '' ) : ?>
|
||||||
<h2 class="title-content-items" id="single-item-metadata-label">
|
<h2 class="title-content-items" id="single-item-metadata-label">
|
||||||
<?php echo esc_html( get_theme_mod('tainacan_single_item_metadata_section_label', '') ); ?>
|
<?php echo esc_html( get_theme_mod($prefix . '_section_metadata_label', __( 'Metadata', 'blocksy-tainacan' ) ) ); ?>
|
||||||
</h2>
|
</h2>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<section class="tainacan-content single-item-collection margin-two-column">
|
<section class="tainacan-content single-item-collection margin-two-column">
|
||||||
|
|
Loading…
Reference in New Issue