-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.php
More file actions
70 lines (54 loc) · 2.62 KB
/
Copy pathfunctions.php
File metadata and controls
70 lines (54 loc) · 2.62 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
<?php
/*********** CORE DIRECTIVES - DO NOT MODIFY ***********/
// Custom defines
if (!defined('THEME_DIR')){ define('THEME_DIR', get_template_directory()); }
if (!defined('THEME_DIR_URI')) { define('THEME_DIR_URI', get_template_directory_uri()); }
// Global version
if(!defined('_S_VERSION')){define('_S_VERSION','1.0.0');}
// Modules, helpers and additional defines
require THEME_DIR . '/inc/template-tags.php'; // Helpers, wp_body_open
require THEME_DIR . '/inc/customizer.php'; // Customizer support
require THEME_DIR . '/inc/theme-support.php'; // add_theme_support
require THEME_DIR . '/inc/security-hardening.php'; // Security - hardening
require THEME_DIR . '/inc/image-sizes.php'; // Image sizes handling
// require get_template_directory() . '/inc/exists-checks.php'; // Custom, cached checks for post existence
if (class_exists( 'ACF' )) { require THEME_DIR . '/inc/acf-sanitization.php'; } // ACF sanitization helper functions
/*********** HELPERS - LOGIN PAGE AND EDITOR ADDONS ***********/
// Custom login page
function login_stylesheet() {
wp_enqueue_style( 'custom-login', THEME_DIR_URI . '/assets/login/login.css' );
}
add_action( 'login_enqueue_scripts', 'login_stylesheet' );
/*********** CUSTOM STYLING ***********/
// Template styles
function wg_styles() {
// Load compiled styles
wp_register_style( 'main-css', THEME_DIR_URI . '/assets/css/main.min.css', array(), '1.00' );
wp_enqueue_style( 'main-css' );
// Inits and imports
wp_enqueue_script( 'main', THEME_DIR_URI .'/assets/js/main.min.js', array(), '1.00', array( 'strategy' => 'defer', 'in-footer' => true));
}
add_action( 'wp_enqueue_scripts', 'wg_styles' );
/*********** CUSTOM FUNCTIONS ***********/
// Removes categories and tags from blogposts
/*function unregister_default_categories_taxonomy() {
unregister_taxonomy_for_object_type('category', 'post');
unregister_taxonomy_for_object_type('post_tag', 'post');
}
add_action('init', 'unregister_default_categories_taxonomy');*/
// Remove "no taxonomy" for radio taxonomy plugin
/* if ( class_exists( 'Radio_Buttons_For_Taxonomies' ) ) {
add_filter( 'radio_buttons_for_taxonomies_no_term_grupa', '__return_false' );
} */
// Register custom nav menus
/*function add_nav_menus() {
register_nav_menus( array(
'header-helpers'=> __( 'Helper menu - header', 'wg-blank' ),
'footer-menu'=> __( 'Footer menu', 'wg-blank' ),
));
}
add_action('init', 'add_nav_menus');*/
// Remove <p> and <br/> from Contact Form 7
/* if ( class_exists( 'WPCF7' ) ) {
add_filter('wpcf7_autop_or_not', '__return_false');
} */