2c9e80d2 by Jeff Balicki

clean up

Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent 43c579a4
<?php
/*
* Template Name: badge share
* Template Name: Badge share
*/
global $wpdb;
......
<?php
/*
* Template Name: broker notifications archive
* Template Name: Broker notifications archive
*/
global $user_ID;
......
<?php
/*
* Template Name: default
*/
get_header("home");
?>
<div id="homecontent" class="home-content default">
<?php if (get_the_post_thumbnail()) { ?>
<div class="head-image" style="background-image:url(<?= get_the_post_thumbnail_url() ?>) !important;"></div>
<?php } ?>
<div class="row">
<?php get_template_part('loop', 'page'); ?>
</div>
</div>
<div class="modal fade" style='visibility:hidden' id="contact-team-modal" tabindex="-1" role="dialog" aria-labelledby="find-brokerTitle" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<?php echo do_shortcode('[contact-form-7 id="46927" title="Contact Our Team"]') ?>
</div>
</div>
</div>
</div>
<script>
jQuery(document).ready(function($) {
$('.find-a-broker-modal').on('click', function(e) {
e.preventDefault();
$('#find-broker-modal').modal('show');
});
$('.contact-modal').on('click', function(e) {
e.preventDefault();
$('#contact-team-modal').modal('show');
});
$('#find-broker-modal').css('visibility',' visible');
$('#contact-team-modal').css('visibility',' visible');
});
</script>
<?php wp_reset_query(); ?>
<?php get_footer(); ?>
\ No newline at end of file
......@@ -4,7 +4,6 @@ error_reporting(E_ALL & ~E_STRICT & ~E_NOTICE & ~E_WARNING & ~E_DEPRECATED);
@ini_set( 'post_max_size', '64M');
@ini_set( 'max_execution_time', '300' );
require_once __DIR__ . '/vendor/autoload.php';
require_once 'simple_html_dom.php';
require_once 'inc/users.php';
require_once 'inc/learn.php';
......@@ -14,9 +13,7 @@ function theme_broker_enqueue_scripts()
if (
is_page_template("broker_landing_page.php")
|| is_page_template("broker_pages.php")
|| is_page_template("login-page.php")
|| is_page_template("default.php")
|| is_page_template("general.php")
|| is_page_template("SearchWpResult.php")
|| is_page_template("SearchWp.php")
|| is_page_template("broker_notifications_archive.php")
......@@ -70,10 +67,7 @@ function theme_broker_enqueue_scripts()
if (
is_page_template("broker_landing_page.php")
|| is_page_template("login-page.php")
|| is_page_template("default.php")
|| is_page_template("general.php")
|| is_page_template("SearchWpResult.php")
|| is_page_template("broker_notifications_archive.php")
|| is_page_template("broker_account_pages.php")
|| get_post_type() == 'notifications'
......@@ -89,9 +83,7 @@ function theme_broker_enqueue_scripts()
if (
is_page_template("broker_landing_page.php")
|| is_page_template("broker_pages.php")
|| is_page_template("login-page.php")
|| is_page_template("default.php")
|| is_page_template("general.php")
|| is_page_template("SearchWpResult.php")
|| is_page_template("SearchWp.php")
|| is_page_template("broker_notifications_archive.php")
......@@ -110,9 +102,7 @@ function theme_broker_enqueue_scripts()
if (
is_page_template("broker_landing_page.php")
|| is_page_template("broker_pages.php")
|| is_page_template("login-page.php")
|| is_page_template("default.php")
|| is_page_template("general.php")
|| is_page_template("SearchWpResult.php")
|| is_page_template("broker_notifications_archive.php")
|| is_page_template("broker_account_pages.php")
......
......@@ -229,6 +229,7 @@ function badges_shortcode()
}
}
echo '</div>';
//echo '<div id="dialog" style="display:none;"></div>';
?>
<?php
......
<?php
/*
* Template Name: Login Staff Page
*/
?>
<?php get_header();?>
<div id="page-content">
<div id="login-wrap">
<div id="container">
<?php if (is_user_logged_in()): ?>
<?php global $current_user;
get_currentuserinfo();
?>
<script>
window.location.replace("<?php echo home_url('/'); ?>brokers-agents-info/broker-private-page/");
</script>
<?php else: ?>
<h2>Broker Login</h2>
<?php $args = array('redirect' => site_url('/broker-private-page'));
if (isset($_GET['action'])): ?>
<div class="success">
<p>
Your password has been reset. Please check your email for your new password.
</p>
</div>
<?php
endif;
if (isset($_GET['login']) && $_GET['login'] == 'failed_empty') {
?>
<div id="login-error">
<p>Login failed: You have entered an incorrect username or password. Please try again.</p>
</div>
<?php
}
wp_login_form($args);
?>
<?php endif;?>
</div>
</div>
</div>
<?php get_footer();?>
\ No newline at end of file
<?php
/*
* Template Name: Login Page
*/
?>
<?php get_header();?>
<div id="page-content">
<div id="login-wrap">
<div id="container">
<?php if (is_user_logged_in()):
?>
<script>window.location.replace("<?php echo site_url(); ?>");</script>
<?php global $current_user;
get_currentuserinfo();
?>
<div class="siblings mobile-hide">
<?php
if ($post->post_parent) {
$children = wp_list_pages("title_li=&sort_column=menu_order&child_of=" . $post->post_parent . "&echo=0");
$titlenamer = get_the_title($post->post_parent);
} else {
$children = wp_list_pages("title_li=&sort_column=menu_order&child_of=" . $post->ID . "&echo=0");
$titlenamer = get_the_title($post->ID);
}
if ($children) {?>
<ul>
<li class="<?php echo $post->post_parent ? '' : 'current_page_item'; ?>"><a href="<?php echo get_permalink($post->post_parent); ?>"><?php echo $titlenamer; ?></a></li>
<?php echo $children; ?>
</ul>
<?php }?>
</div>
<div class="siblings mobile-show">
<?php
if ($post->post_parent) {
$children = wp_list_pages("title_li=&sort_column=menu_order&child_of=" . $post->post_parent . "&echo=0");
$titlenamer = get_the_title($post->post_parent);
} else {
$children = wp_list_pages("title_li=&sort_column=menu_order&child_of=" . $post->ID . "&echo=0");
$titlenamer = get_the_title($post->ID);
}
if ($children) {?>
<ul>
<li class="<?php echo $post->post_parent ? '' : 'current_page_item'; ?>"><a href="<?php echo get_permalink($post->post_parent); ?>"><?php echo $titlenamer; ?></a></li>
<?php echo $children; ?>
</ul>
<?php }?>
</div>
<h2>Welcome <?php echo is_super_admin() ? 'Administrator' : $current_user->user_firstname . ' ' . $current_user->user_lastname; ?></h2>
<p><a href="<?php echo wp_logout_url(home_url()); ?>" title="Logout">>> Member Logout</a></p>
<?php else: ?>
<h2>Broker Login</h2>
<?php $args = array('redirect' => site_url());
if (isset($_GET['action'])): ?>
<div class="success">
<p>
Your password has been reset. Please check your email for your new password.
</p>
</div>
<?php
endif;
if (isset($_GET['login']) && $_GET['login'] == 'failed_empty') {
?>
<div id="login-error">
<p>Login failed: You have entered an incorrect username or password. Please try again.</p>
</div>
<?php
}
wp_login_form($args);
?>
<br />
<a style="margin-left:18px;" href="https://thecommonwell.ca/lost-password/" title="Password Lost and Found">Lost your password</a>
<?php endif;?>
</div>
</div>
</div>
<?php get_footer();?>
\ No newline at end of file
<?php
/*
* Template Name: logout Page
*/
?>
<?php get_header(); ?>
<div id="page-content">
<div id="login-wrap">
<div id="container">
<?php if (is_user_logged_in()) : ?>
<script>
window.location.replace("<?php echo wp_logout_url(home_url('/')); ?>");
</script>
<?php endif; ?>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>
\ No newline at end of file
<?php get_header(); ?>
<div id="homepage-content">
<header id="page-header">
<a href="#" class="mobile-menu-btn" title="mobile-menu-btn">Mobile menu link</a>
<div id="front-header">
<?php wp_nav_menu(array(
'theme_location' => 'main-nav',
'container' => 'nav',
'container_id' => 'primary-nav',
'menu_class' => 'sf-menu',
'walker' => new commonwell_walker_nav_menu
)) ?>
<?php wp_nav_menu(array(
'theme_location' => 'main-nav',
'container' => 'nav',
'container_id' => 'primary-nav-mobile',
'menu_class' => 'sf-click sf-vertical',
'walker' => new commonwell_walker_nav_menu
)) ?>
<img class="menu-logo-bottom mobile-show"
src="<?php bloginfo('template_directory'); ?>/images/ontario-mutuals-logo-143x86.jpg"
width="143" height="86" alt="Ontario Mutuals Logo">
<div class="mobile-show"><?php wp_nav_menu(array(
'theme_location' => 'secondary-nav',
'container' => 'nav',
'container_id' => 'menu-nav'
))
?>
</div>
</div>
</header>
<?php if (has_post_thumbnail($post->ID)): ?>
<?php $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full-post-thumbnail');
$img_id = get_post_thumbnail_id($post->ID);
$alt_text = get_post_meta($img_id, '_wp_attachment_image_alt', true);
$header_part_image_mobile = get_field('header_image_mobile');
$videoEnableValue = get_field('enable_video', $post->ID, true);
$enableVideo = !empty($videoEnableValue);
if($enableVideo) : ?>
<?php
$videoType = get_field('video_type', $post->ID, true);
$videoId = get_field('video_id', $post->ID, true);
?>
<a href="#" class="video-play-button link-lightbox" data-videoid="<?php echo $videoId; ?>" data-videosite="<?php echo $videoType; ?>">
<span class="play-arrow">Play button</span>
</a>
<div id="home-image">
<img src="<?php echo $image[0]; ?>" width="1024" height="575" alt="<?php echo $alt_text; ?>" />
</div>
<?php else : ?>
<div id="home-image">
<img src="<?php echo $image[0]; ?>" width="1024" height="575" alt="<?php echo $alt_text; ?>" />
</div>
<?php endif; ?>
<div class='header-image-mobile'>
<img src='<?= (!empty($header_part_image_mobile)) ? $header_part_image_mobile['sizes']['large'] : "" ?>' />
</div>
<div id="transparency-content">
<?php the_field('transparency_content'); ?>
</div>
<?php endif; ?>
<!-- For blue menu list (Don't use for now)-->
<?php
// wp_nav_menu(array(
// 'theme_location' => 'main-nav',
// 'container' => 'nav',
// 'container_id' => 'blue-menu',
// 'link_before' => ' [ ',
// 'link_after' => ' ] ',
// 'menu_class' => 'blue-menu',
// 'depth' => 1,
// ))
?>
</div>
<div class="front-page-bottom">
<div id="first-page-logo">
<a href="<?php bloginfo('url') ?>" title="<?php bloginfo('name') ?> - <?php bloginfo('description') ?>">
<img id="frontpage-logo" src="<?php bloginfo('template_directory') ?>/images/Commonwell-logo.svg"
width="200" height="80" alt="Commonwell Mutual Insurance Group Logo" />
</a>
</div>
<?php get_template_part('loop', 'home'); ?>
</div>
<script type="text/javascript">
(function($) {
$(document).ready(function() {
$('.link-lightbox').simpleLightboxVideo();
});
})(jQuery);
</script>
<?php //get_sidebar(); ?>
<?php wp_nav_menu(
array(
'theme_location' => 'broker-footer',
'container' => 'nav',
'container_id' => 'broker-footer',
)
);
?>
<?php get_footer(); ?>
<?php
/*
* Template Name: Lost Password
*/
?>
<?php get_header(); ?>
<div id="page-content">
<div id="login-wrap">
<div id="container">
<h2>Lost Password</h2>
<?php while ( have_posts() ) : the_post(); ?>
<article id="page-<?php the_ID(); ?>" class="meta-box hentry">
<div id="page-login" class="post-content page-login cf">
<div id="lostPassword">
<div id="message"></div>
<form id="lostPasswordForm" method="post">
<?php
// this prevent automated script for unwanted spam
if ( function_exists( 'wp_nonce_field' ) )
wp_nonce_field( 'rs_user_lost_password_action', 'rs_user_lost_password_nonce' );
?>
<p>
<label for="user_login"><?php _e('Username or E-mail:') ?> <br />
<input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr($user_login); ?>" size="20" />
</label>
</p>
<?php
/**
* Fires inside the lostpassword <form> tags, before the hidden fields.
*
* @since 2.1.0
*/
do_action( 'lostpassword_form' ); ?>
<p class="submit">
<input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" style="width: 140px !important;" value="<?php esc_attr_e('Get New Password'); ?>" />
</p>
</form>
</div>
</div>
</article>
<?php endwhile; ?>
</div><!-- .main-column -->
</div>
</div>
<?php get_footer(); ?>
<?php
/*
* Template Name: User page and change password
*/
global $current_user, $wp_roles;
get_currentuserinfo();
require_once(ABSPATH . WPINC . '/registration.php');
/* Get user info. */
//get_currentuserinfo(); //deprecated since 3.1
/* Load the registration file. */
//require_once( ABSPATH . WPINC . '/registration.php' ); //deprecated since 3.1
$error = array();
/* If profile was saved, update profile. */
if ('POST' == $_SERVER['REQUEST_METHOD'] && !empty($_POST['action']) && $_POST['action'] == 'update-user') {
/* Update user password. */
if (!empty($_POST['pass1']) && !empty($_POST['pass2'])) {
if ($_POST['pass1'] == $_POST['pass2'])
wp_update_user(array('ID' => $current_user->ID, 'user_pass' => esc_attr($_POST['pass1'])));
else
$error[] = __('The passwords you entered do not match. Your password was not updated.', 'profile');
}
/* Update user information. */
if (!empty($_POST['url']))
wp_update_user(array('ID' => $current_user->ID, 'user_url' => esc_url($_POST['url'])));
if (!empty($_POST['email'])) {
if (!is_email(esc_attr($_POST['email'])))
$error[] = __('The Email you entered is not valid. please try again.', 'profile');
elseif (email_exists(esc_attr($_POST['email'])) != $current_user->id)
$error[] = __('This email is already used by another user. try a different one.', 'profile');
else {
wp_update_user(array('ID' => $current_user->ID, 'user_email' => esc_attr($_POST['email'])));
}
}
if (!empty($_POST['first-name']))
update_user_meta($current_user->ID, 'first_name', esc_attr($_POST['first-name']));
if (!empty($_POST['last-name']))
update_user_meta($current_user->ID, 'last_name', esc_attr($_POST['last-name']));
if (!empty($_POST['description']))
update_user_meta($current_user->ID, 'description', esc_attr($_POST['description']));
/* Redirect so the page will show updated info.*/
/*I am not Author of this Code- i dont know why but it worked for me after changing below line to if ( count($error) == 0 ){ */
if (count($error) == 0) {
//action hook for plugins and extra fields saving
do_action('edit_user_profile_update', $current_user->ID);
wp_redirect(get_permalink());
exit;
}
}
?>
<?php get_header(); ?>
<div id="page-content">
<div id="login-wrap">
<div id="container">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div id="post-<?php the_ID(); ?>">
<div class="entry-content entry">
<?php the_content(); ?>
<?php if (!is_user_logged_in()) : ?>
<p class="warning">
<?php _e('You must be logged in to edit your profile.', 'profile'); ?>
</p><!-- .warning -->
<?php else : ?>
<?php if (count($error) > 0) echo '<p class="error">' . implode("<br />", $error) . '</p>'; ?>
<div class="siblings mobile-hide">
<?php
if ($post->post_parent) {
$children = wp_list_pages("title_li=&sort_column=menu_order&child_of=" . $post->post_parent . "&echo=0");
$titlenamer = get_the_title($post->post_parent);
} else {
$children = wp_list_pages("title_li=&sort_column=menu_order&child_of=" . $post->ID . "&echo=0");
$titlenamer = get_the_title($post->ID);
}
if ($children) { ?>
<ul>
<li class="<?php echo $post->post_parent ? '' : 'current_page_item'; ?>"><a href="<?php echo get_permalink($post->post_parent); ?>"><?php echo $titlenamer; ?></a></li>
<?php echo $children; ?>
</ul>
<?php } ?>
</div>
<div class="siblings mobile-show">
<?php
if ($post->post_parent) {
$children = wp_list_pages("title_li=&sort_column=menu_order&child_of=" . $post->post_parent . "&echo=0");
$titlenamer = get_the_title($post->post_parent);
} else {
$children = wp_list_pages("title_li=&sort_column=menu_order&child_of=" . $post->ID . "&echo=0");
$titlenamer = get_the_title($post->ID);
}
if ($children) { ?>
<ul>
<li class="<?php echo $post->post_parent ? '' : 'current_page_item'; ?>"><a href="<?php echo get_permalink($post->post_parent); ?>"><?php echo $titlenamer; ?></a></li>
<?php echo $children; ?>
</ul>
<?php } ?>
</div>
<h2>Broker Profile</h2>
<form method="post" id="adduser" action="<?php the_permalink(); ?>">
<p class="form-username">
<label for="first-name"><?php _e('First Name', 'profile'); ?></label>
<input class="text-input" name="first-name" type="text" id="first-name" value="<?php the_author_meta('first_name', $current_user->ID); ?>" />
</p><!-- .form-username -->
<p class="form-username">
<label for="last-name"><?php _e('Last Name', 'profile'); ?></label>
<input class="text-input" name="last-name" type="text" id="last-name" value="<?php the_author_meta('last_name', $current_user->ID); ?>" />
</p><!-- .form-username -->
<p class="form-email">
<label for="email"><?php _e('E-mail *', 'profile'); ?></label>
<input class="text-input" name="email" type="text" id="email" value="<?php the_author_meta('user_email', $current_user->ID); ?>" />
</p><!-- .form-email -->
<p class="form-url">
<label for="url"><?php _e('Website', 'profile'); ?></label>
<input class="text-input" name="url" type="text" id="url" value="<?php the_author_meta('user_url', $current_user->ID); ?>" />
</p><!-- .form-url -->
<p class="form-password">
<label for="pass1"><?php _e('Password *', 'profile'); ?> </label>
<input class="text-input" name="pass1" type="password" id="pass1" />
</p><!-- .form-password -->
<p class="form-password">
<label for="pass2"><?php _e('Repeat Password *', 'profile'); ?></label>
<input class="text-input" name="pass2" type="password" id="pass2" />
</p><!-- .form-password -->
<p class="form-textarea">
<label for="description"><?php _e('Biographical Information', 'profile') ?></label>
<textarea name="description" id="description" rows="3" cols="50"><?php the_author_meta('description', $current_user->ID); ?></textarea>
</p><!-- .form-textarea -->
<?php
//action hook for plugin and extra fields
// do_action('edit_user_profile',$current_user);
?>
<p class="form-submit">
<?php echo $referer; ?>
<p class="submit"><input name="updateuser" type="submit" id="updateuser" class="submit button" value="<?php _e('Update', 'profile'); ?>" /></ <?php wp_nonce_field('update-user') ?> <input name="action" type="hidden" id="action" value="update-user" />
</p><!-- .form-submit -->
</form><!-- #adduser -->
<?php endif; ?>
</div><!-- .entry-content -->
</div><!-- .hentry .post -->
<?php endwhile; ?>
<?php else : ?>
<p class="no-data">
<?php _e('Sorry, no page matched your criteria.', 'profile'); ?>
</p><!-- .no-data -->
<?php endif; ?>
<hr>
<p><a style="float:right" href="<?php echo wp_logout_url(home_url()); ?>" class="icon-cancel standard-button button-logout">logout</a></p>
</div><!-- .entry-content -->
</div>
</article>
</div><!-- .main-column -->
<?php get_footer(); ?>
\ No newline at end of file
<?php
/*
* Template Name: Default Video
*/
?>
<?php get_header(); ?>
<div id="page-content">
<?php if (has_post_thumbnail($post->ID)): ?>
<?php $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full-post-thumbnail');
$img_id = get_post_thumbnail_id($post->ID);
$alt_text = get_post_meta($img_id, '_wp_attachment_image_alt', true);
$videoEnableValue = get_field('enable_video', $post->ID, true);
$enableVideo = !empty($videoEnableValue);
?>
<div id="content-image" style='z-index:0;'>
<?php if($enableVideo) : ?>
<?php
$videoType = get_field('video_type', $post->ID, true);
$videoId = get_field('video_id', $post->ID, true);
?>
<div id="content-image">
<a href="#" class="video-play-button page-video-button link-lightbox" data-videoid="<?php echo $videoId; ?>" data-videosite="<?php echo $videoType; ?>">
<span class="play-arrow">Play button</span>
</a>
<img src="<?php echo $image[0]; ?>" width="1024" height="575" alt="<?php echo $alt_text; ?>" />
</div>
<?php else : ?>
<div id="content-image">
<img src="<?php echo $image[0]; ?>" width="1024" height="575" alt="<?php echo $alt_text; ?>" />
</div>
<?php endif; ?>
<div id="transparency-content">
<?php the_field('transparency_content'); ?>
</div>
</div>
<div id='has-image'>
<div class="breadcrumbs">
<?php if (function_exists('bcn_display')) {
bcn_display();
} ?>
</div>
<?php get_template_part('loop', 'page'); ?>
<div class="siblings mobile-show">
<?php
if($post->post_parent) {
$children = wp_list_pages("title_li=&sort_column=menu_order&child_of=".$post->post_parent."&echo=0");
$titlenamer = get_the_title($post->post_parent);
}
else {
$children = wp_list_pages("title_li=&sort_column=menu_order&child_of=".$post->ID."&echo=0");
$titlenamer = get_the_title($post->ID);
}
if ($children) { ?>
<ul>
<li class="<?php echo $post->post_parent ? '' : 'current_page_item'; ?>"><a href="<?php echo get_permalink($post->post_parent); ?>"><?php echo $titlenamer; ?></a></li>
<?php echo $children; ?>
</ul>
<?php } ?>
</div>
</div>
<?php else : ?>
<?php if(is_page('broker-private-page')){?>
<?php global $userAccessManager;
global $wpdb;
if (isset($userAccessManager)) {
$iUserId = $user_ID;
$is_no_bar=false;
$aUserGroupsForUser = $wpdb->get_results( $wpdb->prepare( "
SELECT wp_uam_accessgroup_to_object.object_id, wp_uam_accessgroup_to_object.object_type, wp_uam_accessgroup_to_object.group_id
FROM wp_uam_accessgroup_to_object INNER JOIN wp_uam_accessgroups ON wp_uam_accessgroup_to_object.group_id=wp_uam_accessgroups.ID
WHERE wp_uam_accessgroups.groupname = '%s' AND wp_uam_accessgroup_to_object.object_id = %d
ORDER BY wp_uam_accessgroup_to_object.object_id DESC
",'rating.thecommonwell.ca/auth/authenticate', $iUserId ) );
//error_log(print_r($aUserGroupsForUser,true));
foreach ($aUserGroupsForUser as $oGroup) {
// error_log($oGroup);
if ($oGroup->group_id =="3"){
$is_no_bar=true;
}
}
}//end of $userAccessManager
if(current_user_can('administrator')){$is_no_bar=true;}
if($is_no_bar == true){
?>
<div class="promer-banner">
<div class="promer-text">GIVE “WAVE” A TRY</div>
<div class="promer-button"><a href="http://rating.thecommonwell.ca" class="rating-engine-link-button" target="_blank">COMMERCIAL RATING TOOL</a></div>
</div>
<div id="no-image" class="promer-no-image">
<?php } else{?> <div id="no-image"> <?php }
}else{?>
<!-- If there is no image for content page -->
<div id="no-image">
<?php }//end of broker-private-page?>
<div class="siblings mobile-hide">
<?php
if($post->post_parent) {
$children = wp_list_pages("title_li=&sort_column=menu_order&child_of=".$post->post_parent."&echo=0");
$titlenamer = get_the_title($post->post_parent);
}
else {
$children = wp_list_pages("title_li=&sort_column=menu_order&child_of=".$post->ID."&echo=0");
$titlenamer = get_the_title($post->ID);
}
if ($children) { ?>
<ul>
<li class="<?php echo $post->post_parent ? '' : 'current_page_item'; ?>"><a href="<?php echo get_permalink($post->post_parent); ?>"><?php echo $titlenamer; ?></a></li>
<?php echo $children; ?>
</ul>
<?php } ?>
</div>
<div class="breadcrumbs">
<?php if (function_exists('bcn_display')) {
bcn_display();
} ?>
</div>
<?php get_template_part('loop', 'page'); ?>
<div class="siblings mobile-show">
<?php
if($post->post_parent) {
$children = wp_list_pages("title_li=&sort_column=menu_order&child_of=".$post->post_parent."&echo=0");
$titlenamer = get_the_title($post->post_parent);
}
else {
$children = wp_list_pages("title_li=&sort_column=menu_order&child_of=".$post->ID."&echo=0");
$titlenamer = get_the_title($post->ID);
}
if ($children) { ?>
<ul>
<li class="<?php echo $post->post_parent ? '' : 'current_page_item'; ?>"><a href="<?php echo get_permalink($post->post_parent); ?>"><?php echo $titlenamer; ?></a></li>
<?php echo $children; ?>
</ul>
<?php } ?>
</div>
</div>
<?php endif; ?>
<script type="text/javascript">
(function($) {
$(document).ready(function() {
$('.link-lightbox').simpleLightboxVideo();
});
})(jQuery);
</script>
</div>
<?php //get_sidebar(); ?>
<?php get_footer(); ?>
<?php
/*
* Template Name: Password Reset
*/
?>
<?php get_header(); ?>
<div id="homecontent" class="home-content">
<div id="login-wrap">
<div id="container">
<h2>Password Reset</h2>
<?php while (have_posts()) : the_post(); ?>
<article id="page-<?php the_ID(); ?>" class="meta-box hentry">
<div id="resetPassword">
<div id="message"></div>
<!--this check on the link key and user login/username-->
<?php
$errors = new WP_Error();
$user = check_password_reset_key($_GET['key'], $_GET['login']);
if (is_wp_error($user)) {
if ($user->get_error_code() == 'expired_key')
$errors->add(
'expiredkey',
__('Sorry, this key has expired. To gain access to your account, <a href="https://thecommonwell.ca/lost-password/">request a password reset key.</a>')
);
else
$errors->add('invalidkey', __('Sorry, that key does not appear to be valid.'));
}
// display error message
if ($errors->get_error_code()) {
echo '<span style="color:red;">' . $errors->get_error_message($errors->get_error_code()) . '</span>';
} else {
?>
<form id="resetPasswordForm" method="post" autocomplete="off">
<?php
// this prevent automated script for unwanted spam
if (function_exists('wp_nonce_field'))
wp_nonce_field('rs_user_reset_password_action', 'rs_user_reset_password_nonce');
?>
<input type="hidden" name="user_key" id="user_key" value="<?php echo esc_attr($_GET['key']); ?>" autocomplete="off" />
<input type="hidden" name="user_login" id="user_login" value="<?php echo esc_attr($_GET['login']); ?>" autocomplete="off" />
<p>
<label for="pass1"><?php _e('New password') ?><br />
<input type="password" name="pass1" id="pass1" class="input" size="20" value="" autocomplete="off" /></label>
</p>
<p>
<label for="pass2"><?php _e('Confirm new password') ?><br />
<input type="password" name="pass2" id="pass2" class="input" size="20" value="" autocomplete="off" /></label>
</p>
<p class="description indicator-hint"><?php _e('Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers, and symbols like ! " ? $ % ^ &amp; ).'); ?></p>
<br class="clear" />
<?php
/**
* Fires following the 'Strength indicator' meter in the user password reset form.
*
* @since 3.9.0
*
* @param WP_User $user User object of the user whose password is being reset.
*/
do_action('resetpass_form', $user);
?>
<p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e('Reset Password'); ?>" />
</p>
<?php } ?>
</form>
</div>
</article>
<?php endwhile; ?>
</div><!-- .main-column -->
</div>
</div>
<style>
.error {
color: red !important;
}
</style>
<?php get_footer(); ?>
\ No newline at end of file
<?php
/*
* Template Name: searchwp results template pdf
* Template Name: Searchwp results template pdf
*/
?>
......
......@@ -55,25 +55,14 @@ jQuery(document).ready(function($) {
}
});
$(".learning-cards .ugb-card__item .ugb-card__content:empty").parent().addClass('empty').removeClass('ugb--shadow-1');
// $('a').on('click', function(e) {
// if($(e.target).attr('href') == '#') {
// e.preventDefault();
// }
// if(!isMobile) {
// if($(this).parents('.menu-item-has-children').length > 0) {
// $(this).parents('.menu-item-has-children').addClass('open-menu');
// } else {
// $('.menu-item-has-children').removeClass('open-menu');
// }
// }
// });
$(".badge_container").not('.cert').click(function () {
var title = $(this).data('title');
//$("#dialog").dialog({modal: true, height: 590, width: 1005 });
// $("#dialog").dialog({modal: true, height: 590, width: 1005 });
var w = window.open("https://thecommonwell.ca/badge-share/?badge="+title, "popupWindow", "width=400, height=400, scrollbars=no");
});
......