From 16223f4ee599b5ddcd0cb435465a53a4938d1762 Mon Sep 17 00:00:00 2001 From: mateuswetah Date: Fri, 17 May 2024 17:10:48 -0300 Subject: [PATCH] Add option to change the 'All items in repository' title. --- .../inc/options/archive-elements/page-header-simpler.php | 8 ++++++++ tainacan-blocksy/tainacan/archive-repository.php | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tainacan-blocksy/inc/options/archive-elements/page-header-simpler.php b/tainacan-blocksy/inc/options/archive-elements/page-header-simpler.php index f2a32a7..6e413e2 100644 --- a/tainacan-blocksy/inc/options/archive-elements/page-header-simpler.php +++ b/tainacan-blocksy/inc/options/archive-elements/page-header-simpler.php @@ -83,6 +83,14 @@ $options = [ 'h6' => 'H6', ] ) + ], + 'repository_items_title' => [ + 'label' => __( 'Repository items page title', 'tainacan-blocksy' ), + 'type' => 'text', + 'value' => __( 'All items in repository', 'tainacan' ), + 'sync' => [ + 'id' => $prefix . 'hero_elements_heading_tag', + ] ] ], diff --git a/tainacan-blocksy/tainacan/archive-repository.php b/tainacan-blocksy/tainacan/archive-repository.php index 9f0a299..ecd307f 100644 --- a/tainacan-blocksy/tainacan/archive-repository.php +++ b/tainacan-blocksy/tainacan/archive-repository.php @@ -62,7 +62,7 @@ $hero_elements = get_theme_mod( $elements = []; foreach ($hero_elements as $index => $single_hero_element) { if ( isset($single_hero_element['id']) && $single_hero_element['id'] == 'custom_title' && $single_hero_element['enabled']) { - $title = wp_strip_all_tags(get_the_archive_title()); + $title = wp_strip_all_tags(blocksy_akg('repository_items_title', $single_hero_element, __( 'All items in repository', 'tainacan' ))); if (! empty($title)) { $title = blocksy_html_tag(