forked from owncloud-archive/2017owncloudorg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
104 lines (89 loc) · 3.42 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<?php
/**
* Enqueue scripts and styles.
*/
function owncloud_scripts() {
// Theme stylesheet.
wp_enqueue_style( 'owncloud-style', get_stylesheet_uri() );
wp_enqueue_style( 'owncloud-main', get_theme_file_uri( '/assets/css/main.min.css' ), array( 'owncloud-style' ), '1.0' );
wp_enqueue_style( 'owncloud-style2', get_theme_file_uri( '/assets/css/styles.css' ), array( 'owncloud-style' ), '1.0' );
wp_enqueue_style( 'owncloud-fa', get_theme_file_uri( '/assets/css/font-awesome.min.css' ), array( 'owncloud-style' ), '1.0' );
if (is_front_page() ) {
wp_enqueue_style('owncloud-home', get_theme_file_uri('/assets/css/home.css'), array('owncloud-style'), '1.0');
}
wp_enqueue_script( 'owncloud-js', get_theme_file_uri( '/assets/js/scripts.min.js' ), array( 'jquery' ) );
}
add_action( 'wp_enqueue_scripts', 'owncloud_scripts' );
function owncloud_setup() {
/*
* Make theme available for translation.
* Translations can be filed at WordPress.org. See: https://translate.wordpress.org/projects/wp-themes/twentyseventeen
* If you're building a theme based on Twenty Seventeen, use a find and replace
* to change 'twentyseventeen' to the name of your theme in all the template files.
*/
load_theme_textdomain( 'owncloud' );
// Add default posts and comments RSS feed links to head.
add_theme_support( 'automatic-feed-links' );
/*
* Let WordPress manage the document title.
* By adding theme support, we declare that this theme does not use a
* hard-coded <title> tag in the document head, and expect WordPress to
* provide it for us.
*/
add_theme_support( 'title-tag' );
/*
* Enable support for Post Thumbnails on posts and pages.
*
* @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/
*/
add_theme_support( 'post-thumbnails' );
// This theme uses wp_nav_menu() in two locations.
register_nav_menus( array(
'top' => __( 'Top Menu', 'owncloud' ),
'about' => __( 'About Links Menu', 'owncloud' ),
'resources' => __( 'Resources Links Menu', 'owncloud' ),
'interact' => __( 'Interact Links Menu', 'owncloud' ),
) );
/*
* Switch default core markup for search form, comment form, and comments
* to output valid HTML5.
*/
add_theme_support( 'html5', array(
'comment-form',
'comment-list',
'gallery',
'caption',
) );
/*
* Enable support for Post Formats.
*
* See: https://codex.wordpress.org/Post_Formats
*/
add_theme_support( 'post-formats', array(
'aside',
'image',
'video',
'quote',
'link',
'gallery',
'audio',
) );
}
add_action( 'after_setup_theme', 'owncloud_setup' );
/**
* Register widget area.
*
* @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
*/
function owncloud_widgets_init() {
register_sidebar( array(
'name' => __( 'Sidebar', 'owncloud' ),
'id' => 'sidebar-1',
'description' => __( 'Add widgets here to appear in your sidebar.', 'owncloud' ),
'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
) );
}
add_action( 'widgets_init', 'owncloud_widgets_init' );