-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.php
More file actions
65 lines (57 loc) · 1.88 KB
/
Copy pathfunctions.php
File metadata and controls
65 lines (57 loc) · 1.88 KB
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
<?php
/**
* Skinny theme.
*
* This file is not required by WordPress nor Theme Check but use it for theme functional/features purpose.
*
* @package skinny
* @since 0.1
* @license http://opensource.org/licenses/MIT MIT
*/
if (!function_exists('skinnyEnqueueScripts')) {
/**
* Enqueue styles and scripts.
*/
function skinnyEnqueueScripts()
{
$theme = wp_get_theme();
$themeVersion = $theme->get('Version');
if (!is_string($themeVersion) || empty($themeVersion)) {
$themeVersion = false;
}
unset($theme);
wp_enqueue_style('stylesheet', get_stylesheet_uri(), [], $themeVersion);
wp_enqueue_style('design', get_stylesheet_directory_uri() . '/assets/css/design.css', [], $themeVersion);
unset($themeVersion);
}// skinnyEnqueueScripts
}
add_action('wp_enqueue_scripts', 'skinnyEnqueueScripts');
if (!function_exists('skinnyAddThemeSupport')) {
/**
* Add theme feature.
*/
function skinnyAddThemeSupport()
{
// `load_theme_textdomain()` is not required by WordPress nor Theme Check.
// `load_theme_textdomain()` is for load translation correctly.
load_theme_textdomain('skinny', get_template_directory() . '/languages');
add_theme_support('title-tag');// required by Theme Check.
add_theme_support('automatic-feed-links');// required by Theme Check.
}// skinnyAddThemeSupport
}
add_action('after_setup_theme', 'skinnyAddThemeSupport');
if (!function_exists('skinnyRegisterSidebars')) {
/**
* Register sidebars.
*
* This is not required by WordPress nor Theme Check.
*/
function skinnyRegisterSidebars()
{
register_sidebar([
'name' => __('Sidebar right', 'skinny'),
'id' => 'sidebar',
]);
}// skinnyRegisterSidebars
}
add_action('widgets_init', 'skinnyRegisterSidebars');