-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjoomdev-wpc-functions.php
49 lines (42 loc) · 1.34 KB
/
joomdev-wpc-functions.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
<?php
function get_joomdev_wpc_options(){
global $JoomDev_wpc_options;
$JoomDev_wpc_options = array(
'box_background_color' => '#F9F9F9',
'disable_box_border' => 'no',
'box_border_style' => 'dashed',
'box_border_color' => '#27C110',
'box_border_width' => 2,
'button_color' => '#212121',
'button_text_color' => '#fff',
'button_shape' => 5,
'verdict_text_color' => '#000',
'verdict_font_size' => '22',
'icons_font_size' => '30'
);
$_joomdev_wpc_options = get_option('joomdev_wpc_options', array());
$JoomDev_wpc_options = shortcode_atts($JoomDev_wpc_options, $_joomdev_wpc_options);
return $JoomDev_wpc_options;
}
function joomdev_wpc_extract_shortcode($content){
// $pattern = get_shortcode_regex(array('joomdev-wpc-pros-cons', 'joomdev-wpc-pros', 'joomdev-wpc-cons'));
$pattern = get_shortcode_regex(array('joomdev-wpc-pros-cons'));
$r = array(
'disable_title' => 'no',
'title' => 'Title Here',
'pros_title' => 'Pros',
'cons_title' => 'Cons',
'button_text' => 'Get it now',
'verdict_text' => '',
'pros' => array(),
'cons' => array(),
'disable_button' => 'no',
'button_link' => '',
'button_link_target' => '_SELF',
'button_rel_attr' => 'nofollow',
'wpc_style' => 'wppc-view1',
'title_tag' => 'H3',
);
return $r;
}
// file ends here...