-
Notifications
You must be signed in to change notification settings - Fork 0
/
braine-dynamic-tags.php
69 lines (62 loc) · 2.23 KB
/
braine-dynamic-tags.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
/**
* Tag Dinâmicas Customizadas
*
* @package Tag Dinâmicas Customizadas
* @author Braine.dev
*
* @wordpress-plugin
* Plugin Name: Tag Dinâmicas Customizadas
* Description: Adiciona Tags ao site
* Version: 1.1
* Author: Braine.dev
* Author URI: https://braine.dev
*/
if (!defined('ABSPATH')) :
exit; // Exit if accessed directly.
endif;
/**
* Register New Dynamic Tag Group.
*
* Register new site group for site-related tags.
*
* @since 1.0.0
* @param \Elementor\Core\DynamicTags\Manager $dynamic_tags_manager Elementor dynamic tags manager.
* @return void
*/
function register_site_dynamic_tag_group($dynamic_tags_manager) {
$dynamic_tags_manager->register_group(
'braine',
[
'title' => 'Braine'
]
);
}
add_action('elementor/dynamic_tags/register', 'register_site_dynamic_tag_group');
/**
*
* Include dynamic tag file and register tag class.
*
* @since 1.0.0
* @param \Elementor\Core\DynamicTags\Manager $dynamic_tags_manager Elementor dynamic tags manager.
* @return void
*/
function register_custom__dynamic_tags_braine($dynamic_tags_manager) {
require_once __DIR__ . '/dynamic-tags/acf/acf-group-image.php';
require_once __DIR__ . '/dynamic-tags/acf/acf-group-text.php';
require_once __DIR__ . '/dynamic-tags/acf/acf-url.php';
require_once __DIR__ . '/dynamic-tags/acf/acf-group-url.php';
require_once __DIR__ . '/dynamic-tags/acf/acf-group-number-divider.php';
require_once __DIR__ . '/dynamic-tags/acf/acf-group-number-difference.php';
require_once __DIR__ . '/dynamic-tags/post-content.php';
require_once __DIR__ . '/dynamic-tags/page-anchor.php';
$dynamic_tags_manager->register(new \ACFGroupImage());
$dynamic_tags_manager->register(new \ACFGroupText());
$dynamic_tags_manager->register(new \ACFURL());
$dynamic_tags_manager->register(new \ACFGroupURL());
$dynamic_tags_manager->register(new \ACFGroupNumberDivider());
$dynamic_tags_manager->register(new \ACFGroupNumberDifference());
$dynamic_tags_manager->register(new \PostContentBraine());
$dynamic_tags_manager->register(new \PageAnchorBraine());
}
add_action('elementor/dynamic_tags/register', 'register_custom__dynamic_tags_braine');