-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample-config.php
96 lines (84 loc) · 3.19 KB
/
example-config.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<?php
// Call this plugin in theme
if ( ! defined( 'TYPOGRAPHY_WP_URL' ) ) {
define('TYPOGRAPHY_WP_URL', trailingslashit( get_template_directory_uri() . '/typography-wp' ) );
}
if ( ! defined( 'TYPOGRAPHY_WP_PATH' ) ) {
define('TYPOGRAPHY_WP_PATH', trailingslashit( get_template_directory() . '/typography-wp') );
}
require( get_template_directory() . '/typography-wp/typography-wp.php' );
// Call inside After theme setup function
/**
* Just a example see how to use/config this plugin
*/
add_theme_support( 'typography_wp',
array(
'id' => 'body_typo',
'label' => 'Body Typography',
'selector' => 'body #page',
'priority' => 100,
'fields' => array(
'family' => '', // remove key if don't want to use
'category' => '',
'fontId' => '',
'fontType' => '',
'subsets' => '',
'variant' => '',
'textColor' => '', // remove key if don't want to use
'fontStyle' => '', // remove key if don't want to use
'fontWeight' => '', // remove key if don't want to use
'fontSize' => '', // remove key if don't want to use
'lineHeight' => '', // remove key if don't want to use
'letterSpacing' => '', // remove key if don't want to use
'textTransform' => '', // remove key if don't want to use
'textDecoration' => '', // remove key if don't want to use
)
),
array(
'id' => 'heading_typo',
'label' => 'Heading Typography',
'selector' => 'h1,h2,h3,h4,h5,h6',
'priority' => 15,
'fields' => array(
'family' => '',
'category' => '',
'fontId' => '',
'fontType' => '',
'subsets' => '',
'variant' => '',
'textColor' => '',
'fontStyle' => '',
'fontWeight' => '',
'fontSize' => '',
'lineHeight' => '',
'letterSpacing' => '',
'textTransform' => '',
'textDecoration' => '',
)
),
array(
'id' => 'test__heading_typo',
'label' => 'Test Default Typography',
'selector' => 'body .div.test',
'priority' => 15,
'fields' => array(
'family' => 'Open Sans', // remove key if don't want to use
'category' => '',
'fontId' => '',
'fontType' => '',
'subsets' => array(
'greek' => 'greek',
'vietnamese' => 'vietnamese',
),
'variant' => '700italic',
'textColor' => '#888888',
'fontStyle' => '',
'fontWeight' => 'bold',
'fontSize' => '17',
'lineHeight' => '26',
'letterSpacing' => '',
'textTransform' => 'uppercase',
'textDecoration' => '',
)
)
);