-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathfunctions.php
More file actions
113 lines (92 loc) · 2.5 KB
/
functions.php
File metadata and controls
113 lines (92 loc) · 2.5 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
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
105
106
107
108
109
110
111
112
113
<?php // Damn Gotti, you bold
// CONSTANTS
define( 'WPBP_DIR', get_template_directory() );
define( 'WPBP_VER', '1.0' );
// INCLUDES
require_once( WPBP_DIR . '/inc/helpers.php' );
require_once( WPBP_DIR . '/inc/customizer.php' );
// THEME SETUP
if ( ! function_exists( 'wpbp_setup' ) ) {
function wpbp_setup() {
#================
# THEME SUPPORTS
#================
add_theme_support( 'post-thumbnails' );
//add_theme_support( '' );
#=======
# MENUS
#=======
register_nav_menus( array(
'primary-menu' => esc_html__( 'Header Menu', 'wpbp' ),
//'' => esc_html__( '', 'wpbp' );
) );
#===================
# CUSTOM POST TYPES
#===================
/*
register_post_type( 'wpbp_',
array(
'labels' => array(
'name' => __( 'name', 'wpbp' ),
'singular_name' => __( 'singular_name', 'wpbp' ),
),
'supports' => array(
'title',
'editor',
'thumbnail',
),
'public' => true,
'has_archive' => true,
'menu_icon' => 'dashicons-',
)
);
*/
#===================
# REGISTER SIDEBARS
#===================
register_sidebar(
array(
'name' => 'Custom Widget Area',
'id' => 'custom_widget_area',
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
'after_title' => '',
)
);
}
}
add_action( 'after_setup_theme', 'wpbp_setup' );
#================
# ENQUEUE STYLES
#================
function wpbp_enqueue_styles() {
wp_enqueue_style( 'wpbp-default-style', get_stylesheet_uri() );
wp_enqueue_style( 'wpbp-main-style', wpbp_file( '/css/style.min.css' ), array( 'wpbp-default-style' ), WPBP_VER );
//wp_enqueue_style( '', wpbp_file( '/css/' ), array( '' ) );
}
add_action( 'wp_enqueue_scripts', 'wpbp_enqueue_styles' );
#=================
# ENQUEUE SCRIPTS
#=================
function wpbp_enqueue_scripts() {
wp_enqueue_script( 'jquery' );
wp_enqueue_script( 'wpbp-main-js', wpbp_file( '/js/wpbp.js' ), array( 'jquery' ), WPBP_VER, true );
//wp_enqueue_script( '', wpbp_file( '/js/' ), array( 'jquery' ), false, true );
}
add_action( 'wp_enqueue_scripts', 'wpbp_enqueue_scripts' );
#==================
# REGISTER WIDGETS
#==================
function wpbp_register_widgets() {
#==========
# INCLUDES
#==========
require_once( WPBP_DIR . '/inc/widgets/class-custom-widget.php' );
#==================
# REGISTER WIDGETS
#==================
register_widget( 'Custom_Widget' );
//register_widget( '' );
}
add_action( 'widgets_init', 'wpbp_register_widgets' );