|
| 1 | +<?php |
| 2 | +/* |
| 3 | +Plugin Name: BeAPI Default - WP Grid Builder |
| 4 | +Version: 1.0.0 |
| 5 | +Plugin URI: https://beapi.fr |
| 6 | +Description: Add default settings for WP Grid Builder |
| 7 | +Author: Be API |
| 8 | +Author URI: https://beapi.fr |
| 9 | +
|
| 10 | +---- |
| 11 | +
|
| 12 | +Copyright 2024 Be API Technical team (humans@beapi.fr) |
| 13 | +
|
| 14 | +This program is free software; you can redistribute it and/or modify |
| 15 | +it under the terms of the GNU General Public License as published by |
| 16 | +the Free Software Foundation; either version 2 of the License, or |
| 17 | +(at your option) any later version. |
| 18 | +
|
| 19 | +This program is distributed in the hope that it will be useful, |
| 20 | +but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 21 | +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 22 | +GNU General Public License for more details. |
| 23 | +
|
| 24 | +You should have received a copy of the GNU General Public License |
| 25 | +along with this program; if not, write to the Free Software |
| 26 | +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 27 | +
|
| 28 | +*/ |
| 29 | + |
| 30 | +namespace BEAPI\Plugin_Defaults\WP_Grid_Builder; |
| 31 | + |
| 32 | +if ( ! defined( 'ABSPATH' ) ) { |
| 33 | + die( 'Cannot access pages directly.' ); |
| 34 | +} |
| 35 | + |
| 36 | +add_filter( 'wp_grid_builder/facet/title_tag', __NAMESPACE__ . '\\facet_title_tag', 10, 1 ); |
| 37 | + |
| 38 | +/** |
| 39 | + * Change the title tag for facets labels in front office (by default h2) |
| 40 | + * See https://docs.wpgridbuilder.com/resources/filter-facet-title-tag/ |
| 41 | + * |
| 42 | + * @param string $title_tag |
| 43 | + * |
| 44 | + * @return string |
| 45 | + */ |
| 46 | +function facet_title_tag( string $title_tag ): string { |
| 47 | + return 'p'; |
| 48 | +} |
0 commit comments