This repository was archived by the owner on Nov 3, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathfunctions.php
More file actions
executable file
·97 lines (89 loc) · 3.49 KB
/
Copy pathfunctions.php
File metadata and controls
executable file
·97 lines (89 loc) · 3.49 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
<?php
/**
* Adapt functions and definitions.
*
* Sets up the theme and provides some helper functions
*
* When using a child theme (see http://codex.wordpress.org/Theme_Development
* and http://codex.wordpress.org/Child_Themes), you can override certain
* functions (those wrapped in a function_exists() call) by defining them first
* in your child theme's functions.php file. The child theme's functions.php
* file is included before the parent theme's file, so the child theme
* functions would be used.
*
*
* For more information on hooks, actions, and filters,
* see http://codex.wordpress.org/Plugin_API
*
* @package Adapt WordPress Theme
* @subpackage Functions
* @version 3.2
*/
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Get template dirs
$template_dir_uri = get_template_directory_uri();
$template_dir = get_template_directory();
/*--------------------------------------*/
/* Define Constants
/*--------------------------------------*/
define( 'WPEX_JS_DIR', $template_dir_uri . '/js' );
define( 'WPEX_CSS_DIR', $template_dir_uri . '/css' );
/*--------------------------------------*/
/* Include main functions
/*--------------------------------------*/
require_once $template_dir . '/admin/index.php';
require_once $template_dir . '/functions/helpers.php';
require_once $template_dir . '/functions/theme-setup.php';
require_once $template_dir . '/functions/image-sizes.php';
require_once $template_dir . '/functions/admin-options.php';
require_once $template_dir . '/functions/customizer/styling.php';
require_once $template_dir . '/functions/shortcodes.php';
require_once $template_dir . '/functions/widget-areas.php';
require_once $template_dir . '/functions/gallery-metabox/gallery-metabox.php';
if ( wp_validate_boolean( wpex_get_data( 'portfolio_post_type' , '1' ) ) ) {
require_once $template_dir . '/functions/post-types-taxonomies/register-portfolio.php';
}
if ( wp_validate_boolean( wpex_get_data( 'highlights_post_type' , '1' ) ) ) {
require_once $template_dir . '/functions/post-types-taxonomies/register-highlights.php';
}
if ( wp_validate_boolean( wpex_get_data( 'slides_post_type' , '1' ) ) ) {
require_once $template_dir . '/functions/post-types-taxonomies/register-slides.php';
}
require_once $template_dir . '/functions/post-types-taxonomies/taxonomies-labels.php';
require_once $template_dir . '/functions/post-types-taxonomies/post-type-labels.php';
if ( is_admin() ) {
require_once $template_dir . '/functions/meta/usage.php';
require_once( $template_dir .'/functions/meta/usage.php' );
} else {
require_once $template_dir . '/functions/scripts.php';
require_once $template_dir . '/functions/excerpts.php';
require_once $template_dir . '/functions/posts-per-page.php';
require_once $template_dir . '/functions/comments-callback.php';
}
/**
* Modify WP menu for dropdown styles
*/
class WPEX_Dropdown_Walker_Nav_Menu extends Walker_Nav_Menu {
function display_element($element, &$children_elements, $max_depth, $depth, $args, &$output) {
$id_field = $this->db_fields['id'];
if ( ! empty( $children_elements[ $element->$id_field ] ) && ( $depth == 0 ) ) {
$element->classes[] = 'dropdown';
$element->title .= ' <i class="fa fa-angle-down"></i>';
}
if ( ! empty( $children_elements[ $element->$id_field] ) && ( $depth > 0 ) ) {
$element->classes[] = 'dropdown';
$element->title .= ' <i class="fa fa-angle-right"></i>';
}
Walker_Nav_Menu::display_element(
$element,
$children_elements,
$max_depth,
$depth,
$args,
$output
);
}
}