forked from M-R-K-Development/divi-child-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
executable file
·74 lines (59 loc) · 2.79 KB
/
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
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
<?php
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
}
/*
* Load social icons for Youtube and Linked In
*/
if ( ! function_exists( 'et_load_core_options' ) ) {
function et_load_core_options() {
global $shortname, $themename $options;
require_once get_template_directory() . esc_attr( "/options_{$shortname}.php" );
$newOptions = [];
foreach ($options as $i => $optionArray) {
$newOptions[] = $optionArray;
if (isset($optionArray['id']) && $optionArray['id'] == 'divi_show_google_icon') {
$newOptions[] = array(
"name" =>esc_html__( "Show Linked In Icon", $themename ),
"id" => $shortname."_show_linkedin_icon",
"type" => "checkbox2",
"std" => "on",
"desc" =>esc_html__( "Here you can choose to display the LINKED IN Icon. ", $themename ) );
$newOptions[] = array(
"name" =>esc_html__( "Show Youtube Icon", $themename ),
"id" => $shortname."_show_youtube_icon",
"type" => "checkbox2",
"std" => "on",
"desc" =>esc_html__( "Here you can choose to display the Youtube Icon. ", $themename ) );
$newOptions[] = array(
"name" =>esc_html__( "Show Instagram Icon", $themename ),
"id" => $shortname."_show_instagram_icon",
"type" => "checkbox2",
"std" => "on",
"desc" =>esc_html__( "Here you can choose to display the Instagram Icon. ", $themename ) );
}
if (isset($optionArray['id']) && $optionArray['id'] == 'divi_google_url') {
$newOptions[] = array( "name" =>esc_html__( "Linked In Profile Url", $themename ),
"id" => $shortname."_linkedin_url",
"std" => "#",
"type" => "text",
"validation_type" => "url",
"desc" =>esc_html__( "Enter the URL of your LinkedIn Profile. ", $themename ) );
$newOptions[] = array( "name" =>esc_html__( "Youtube Url", $themename ),
"id" => $shortname."_youtube_url",
"std" => "#",
"type" => "text",
"validation_type" => "url",
"desc" =>esc_html__( "Enter the URL of your Youtube Channel. ", $themename ) );
$newOptions[] = array( "name" =>esc_html__( "Instagram Profile Url", $themename ),
"id" => $shortname."_instagram_url",
"std" => "#",
"type" => "text",
"validation_type" => "url",
"desc" =>esc_html__( "Enter the URL of your Instagram Profile. ", $themename ) );
}
}
$options = $newOptions;
}
}