-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
27 lines (23 loc) · 964 Bytes
/
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
<?php
require_once get_stylesheet_directory() . '/env.php';
require_once get_stylesheet_directory() . '/actlys/actlys.php';
function kadence_child_enqueue_styles() {
$parent_style = 'kadence'; // This is the handle used for the parent theme's stylesheet
wp_enqueue_style($parent_style, get_template_directory_uri() . '/style.css');
wp_enqueue_style('kadence-child-style',
get_stylesheet_directory_uri() . '/style.css',
array($parent_style),
filemtime(__DIR__.'/style.css')
);
}
add_action('wp_enqueue_scripts', 'kadence_child_enqueue_styles');
add_action('template_redirect', 'actlys_redirect_account_setup_to_licenses');
function actlys_redirect_account_setup_to_licenses() {
// Check if the user is logged in and if the current page is 'account-setup'
if (is_user_logged_in() && is_page('account-setup')) {
// Redirect to /licenses/
wp_redirect(home_url('/licenses/'));
exit; // Ensure no further code is executed after the redirect
}
}
?>