-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
50 lines (41 loc) · 1.41 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
<?php
/**
* Customizations atop the maxwell theme.
**/
/* register our styles. */
function enqueue_parent_styles() {
$parenthandle = 'maxwell-stylesheet';
$theme = wp_get_theme();
wp_enqueue_style( $parenthandle, get_template_directory_uri() . '/style.css',
array(),
$theme->parent()->get('Version')
);
wp_enqueue_style( 'child-style', get_stylesheet_uri(),
array( $parenthandle ),
$theme->get('Version')
);
}
add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
/* We're not using excerpts now, but just in case we go back, some adjustments */
function my_excerpt_length($length) {
return 1000;
}
add_filter(‘excerpt_length’, ‘my_excerpt_length’, 999);
function wpdocs_excerpt_more( $more ) {
return '...';
}
add_filter( 'excerpt_more', 'wpdocs_excerpt_more', 999);
function improve_login_page() {
$current_user = "";
if( is_user_logged_in()) {
global $wpdb;
$current_user = wp_get_current_user();
}
$output = '<script type="text/javascript">';
$output .= 'window.onload = function() {';
$output .= 'jQuery("<p class=\'login-note\'>If this is your first visit, please click on <a href=\'https://blog.dchbk.us/wp-login.php?action=register\'>Register</a>.</p>").insertAfter("#login > h1");';
$output .= '}';
$output .= '</script>';
echo $output;
}
add_action('login_header', 'improve_login_page');