c044a1bb by Jeff Balicki

sss

Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent 6060f08c
......@@ -210,6 +210,9 @@ if ( ( ( $search && $show_search ) || ( $filters && $show_filters && count( $sea
}
} ?>
<div class="um <?php echo esc_attr( $this->get_class( $mode ) ); ?> um-<?php echo esc_attr( substr( md5( $form_id ), 10, 5 ) ); ?>"
data-hash="<?php echo esc_attr( substr( md5( $form_id ), 10, 5 ) ) ?>" data-base-post="<?php echo esc_attr( $post->ID ) ?>"
data-must-search="<?php echo esc_attr( $must_search ); ?>" data-searched="<?php echo $not_searched ? '0' : '1'; ?>"
......
......@@ -14833,7 +14833,7 @@ h1 + p, .h1 + p {
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='19.432' height='11.567' viewBox='0 0 19.432 11.567'%3E%3Cpath id='Path_1875' data-name='Path 1875' d='M395.235 274.525a1.19 1.19 0 0 0 1.681.063l9.188-8.526a1.19 1.19 0 0 0 0-1.744l-9.187-8.526a1.19 1.19 0 1 0-1.619 1.744l8.248 7.654-8.248 7.654a1.19 1.19 0 0 0-.063 1.681Z' transform='translate(274.905 -394.917) rotate(90)' fill='%231A3668'/%3E%3C/svg%3E");
}
.glyphicon-chevron-down::after {
.um-member-directory-filters-visible a .glyphicon-chevron-up::after {
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='19.631' height='11.905' viewBox='0 0 19.631 11.905'%3E%3Cpath id='Path_1875' data-name='Path 1875' d='M395.235 274.525a1.19 1.19 0 0 0 1.681.063l9.188-8.526a1.19 1.19 0 0 0 0-1.744l-9.187-8.526a1.19 1.19 0 1 0-1.619 1.744l8.248 7.654-8.248 7.654a1.19 1.19 0 0 0-.063 1.681Z' transform='matrix(-0.017 -1 1 -0.017 -248.34 411.22)' fill='%231A3668'/%3E%3C/svg%3E");
}
......@@ -14856,6 +14856,32 @@ h1 + p, .h1 + p {
flex: unset !important;
}
.um-faicon-angle-left:before {
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9.095' height='15' viewBox='0 0 9.095 15'%3E%3Cpath id='Path_1291' data-name='Path 1291' d='M7.515 5.543c.52-.526 1.03-1.048 1.546-1.564Q10.918 2.123 12.779.272a.834.834 0 0 1 1.232 0c.236.242.477.479.716.718a.817.817 0 0 1 0 1.222L11.379 5.557Q9.758 7.18 8.138 8.8a.9.9 0 0 1-.606.289.864.864 0 0 1-.667-.288Q5.614 7.551 4.363 6.3L.956 2.889c-.232-.232-.465-.463-.7-.7A.812.812 0 0 1 .269.993l.71-.71a.833.833 0 0 1 1.25 0l3.016 3L7.429 5.462Z' transform='translate(9.095) rotate(90)' fill='%231A3668'/%3E%3C/svg%3E") !important;
}
.um-faicon-angle-right:before {
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9.095' height='15' viewBox='0 0 9.095 15'%3E%3Cpath id='Path_1369' data-name='Path 1369' d='M7.515 3.553c.52.526 1.03 1.048 1.546 1.564q1.857 1.856 3.718 3.708a.834.834 0 0 0 1.232 0c.236-.242.477-.479.716-.718a.817.817 0 0 0 0-1.222L11.379 3.538Q9.758 1.915 8.138.29A.9.9 0 0 0 7.532 0a.864.864 0 0 0-.667.288Q5.614 1.544 4.363 2.8L.956 6.207c-.232.232-.465.463-.7.7A.812.812 0 0 0 .269 8.1l.71.71a.833.833 0 0 0 1.25 0l3.016-3L7.429 3.634Z' transform='translate(9.095) rotate(90)' fill='%231A3668'/%3E%3C/svg%3E") !important;
}
.um-directory .um-members-pagination-box .um-members-pagi .pagi.current {
border-color: #fff !important;
background-color: #fff !important;
color: #3eaf49 !important;
font-weight: 800 !important;
}
.um-directory .um-members-pagination-box .um-members-pagi .pagi.current span {
border-color: #fff !important;
background-color: #fff !important;
color: #3eaf49 !important;
font-weight: 800 !important;
}
.pagi span {
color: #2c2c2c !important;
}
.entry-content .is-layout-constrained.wp-block-group {
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.1607843137);
padding: 40px 32px;
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
......@@ -166,6 +166,3 @@ function is_valid_email_domain($login, $email, $errors ){
}
}
add_action('register_post', 'is_valid_email_domain',10,3 );
......
......@@ -8,37 +8,15 @@ add_shortcode('members-list', 'members_list');
function members_list(){
try{
$atts['tax'] = 1;
$args['filters'] = 1;
$args['search_fields'][0] = "department_branch";
$show_filters = empty( $args['roles_can_filter'] ) || ( ! empty( $priority_user_role ) && in_array( $priority_user_role, $args['roles_can_filter'] ) );
$search_filters = array();
if ( isset( $args['search_fields'] ) ) {
$search_filters = apply_filters( 'um_frontend_member_search_filters', array_unique( array_filter( $args['search_fields'] ) ) );
}
if ( ! empty( $search_filters ) ) {
$search_filters = array_filter( $search_filters, function( $item ) {
return in_array( $item, array_keys( UM()->member_directory()->filter_fields ) );
});
$search_filters = array_values( $search_filters );
}
$custom_args = array(
'post_type' => 'attachment',
'posts_per_page' => -1,
'paged' => 1,
'post_status' => 'any',
'order' => 'DESC',
'orderby' => 'rand',
);
$custom_query = new \WP_Query($custom_args);
$custom_args = array( 'number' => -1 );
$custom_query = new \WP_User_Query($custom_args);
$members = $custom_query->get_results();
ob_start();
$uniqid = uniqid();
if ($custom_query->have_posts()):
if (!empty($members)):
?>
<div class="course-list resources">
<label for="quicksearch">Search:</label><input type="text" id="quicksearch" placeholder="" />
......@@ -47,25 +25,9 @@ function members_list(){
<div class="filter-group">
<div class="category-filter-group ">
<div class="category">
<?php $i = 0;
foreach ( $search_filters as $filter ) {
error_log(print_r($filter, true));
$filter_content = UM()->member_directory()->show_filter( $filter, $args );
if ( empty( $filter_content ) ) {
continue;
}
$type = UM()->member_directory()->filter_types[ $filter ]; ?>
<div class="um-search-filter um-<?php echo esc_attr( $type ) ?>-filter-type <?php echo ( $i != 0 && $i%2 !== 0 ) ? 'um-search-filter-2' : '' ?>">
<?php echo $filter_content; ?>
</div>
<?php $i++;
} ?>
<?php $terms = get_terms( array( 'taxonomy' => 'mlo-category' ) );
foreach($terms as $term){ ?>
<div class="category-filter"> <input id="<?php echo $term->slug ; ?>" value="<?php echo $term->slug ; ?>" type="checkbox" class="sr-only"><label for="<?php echo $term->slug ; ?>"><?php echo $term->name ; ?></label></div>
<?php $terms = get_post_meta('437','_um_custom_fields', true);
foreach($terms['department_branch']['options'] as $term){ ?>
<div class="category-filter"> <input id="<?php echo $term ; ?>" value="<?php echo $term ; ?>" type="checkbox" class="sr-only"><label for="<?php echo $term; ?>"><?php echo $term; ?></label></div>
<?php }; ?>
</div>
</div>
......@@ -80,9 +42,9 @@ function members_list(){
<table id="resources">
<thead><tr><th class="hidden"></th><th></th><th class="hidden"></th><th></th></tr></thead>
<tbody>
<?php while ($custom_query->have_posts()): $custom_query->the_post();
echo members(get_the_ID());
endwhile; ?>
<?php foreach ($members as $members):
echo members($members->ID);
endforeach; ?>
</tbody>
</table>
</div>
......@@ -92,7 +54,7 @@ function members_list(){
return $output;
}catch(Throwable $e) {
error_log("resources_list()". $e->getMessage()) ;
error_log("members_list()". $e->getMessage()) ;
}
}
......@@ -100,7 +62,7 @@ function members_list(){
function members($id, $tax){
function members($id){
ob_start();
$post = get_post($id);
......@@ -109,13 +71,7 @@ function members($id, $tax){
$text = wp_trim_words( $text, $excerpt_length, ' ...' );
$categories = get_the_terms( $id, 'mlo-category' );
$cat ="";
if(is_array( $categories)){
foreach( $categories as $category ) {
if($category->parent == $tax){
$cat .= " ".$category->slug;
}
};
} ?>
?>
<tr class="table-like__item">
<td class="item"><div class="item-content"><a target="_blank" role="button" href="<?php echo wp_get_attachment_url($id); ?>"><?php echo $post->post_title; ?></a><div>
......
......@@ -25030,16 +25030,12 @@
};
});
$$1(document).ready(function ($) {
var timerid;
$("#quicksearch").on("input", function (e) {
var value = $(this).val();
if ($(this).data("lastval") != value) {
$(this).data("lastval", value);
clearTimeout(timerid);
timerid = setTimeout(function () {
$('.um-do-search.um-button').click();
}, 500);
}
// $(document).on("click", ".um-member-directory-filters-a", function(e) {
// $('#department_branch').select2('destroy');
// });
$("#quicksearch.um-search-line").keyup(function () {
$('.um-do-search.um-button').click();
});
});
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
......@@ -88,6 +88,12 @@ jQuery(document).ready(function($) {
$('.filter-group').toggleClass('open');
var span = $(this).find('.glyphicon');
span.toggleClass('glyphicon-chevron-up glyphicon-chevron-down');
});
});
\ No newline at end of file
......
......@@ -38,18 +38,15 @@ document.addEventListener("DOMContentLoaded", function() {
});
jQuery(document).ready(function($) {
var timerid;
$("#quicksearch").on("input", function(e) {
var value = $(this).val();
if ($(this).data("lastval") != value) {
$(this).data("lastval", value);
clearTimeout(timerid);
timerid = setTimeout(function() {
// $(document).on("click", ".um-member-directory-filters-a", function(e) {
// $('#department_branch').select2('destroy');
// });
$("#quicksearch.um-search-line").keyup(function() {
$('.um-do-search.um-button').click();
}, 500);
};
});
});
......
......@@ -173,9 +173,13 @@
.glyphicon-chevron-up::after {
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='19.432' height='11.567' viewBox='0 0 19.432 11.567'%3E%3Cpath id='Path_1875' data-name='Path 1875' d='M395.235 274.525a1.19 1.19 0 0 0 1.681.063l9.188-8.526a1.19 1.19 0 0 0 0-1.744l-9.187-8.526a1.19 1.19 0 1 0-1.619 1.744l8.248 7.654-8.248 7.654a1.19 1.19 0 0 0-.063 1.681Z' transform='translate(274.905 -394.917) rotate(90)' fill='%231A3668'/%3E%3C/svg%3E");
}
.glyphicon-chevron-down::after {
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='19.631' height='11.905' viewBox='0 0 19.631 11.905'%3E%3Cpath id='Path_1875' data-name='Path 1875' d='M395.235 274.525a1.19 1.19 0 0 0 1.681.063l9.188-8.526a1.19 1.19 0 0 0 0-1.744l-9.187-8.526a1.19 1.19 0 1 0-1.619 1.744l8.248 7.654-8.248 7.654a1.19 1.19 0 0 0-.063 1.681Z' transform='matrix(-0.017 -1 1 -0.017 -248.34 411.22)' fill='%231A3668'/%3E%3C/svg%3E");
.um-member-directory-filters-visible{
a{
.glyphicon-chevron-up::after {
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='19.631' height='11.905' viewBox='0 0 19.631 11.905'%3E%3Cpath id='Path_1875' data-name='Path 1875' d='M395.235 274.525a1.19 1.19 0 0 0 1.681.063l9.188-8.526a1.19 1.19 0 0 0 0-1.744l-9.187-8.526a1.19 1.19 0 1 0-1.619 1.744l8.248 7.654-8.248 7.654a1.19 1.19 0 0 0-.063 1.681Z' transform='matrix(-0.017 -1 1 -0.017 -248.34 411.22)' fill='%231A3668'/%3E%3C/svg%3E");
}
}
}
.um-directory .um-member-directory-header .um-member-directory-header-row.um-member-directory-search-row{
justify-content: flex-start !important;
......@@ -193,4 +197,27 @@
.um-directory .um-member-directory-header .um-member-directory-header-row .um-member-directory-search-line label{
flex:unset !important;
}
.um-faicon-angle-left:before{
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9.095' height='15' viewBox='0 0 9.095 15'%3E%3Cpath id='Path_1291' data-name='Path 1291' d='M7.515 5.543c.52-.526 1.03-1.048 1.546-1.564Q10.918 2.123 12.779.272a.834.834 0 0 1 1.232 0c.236.242.477.479.716.718a.817.817 0 0 1 0 1.222L11.379 5.557Q9.758 7.18 8.138 8.8a.9.9 0 0 1-.606.289.864.864 0 0 1-.667-.288Q5.614 7.551 4.363 6.3L.956 2.889c-.232-.232-.465-.463-.7-.7A.812.812 0 0 1 .269.993l.71-.71a.833.833 0 0 1 1.25 0l3.016 3L7.429 5.462Z' transform='translate(9.095) rotate(90)' fill='%231A3668'/%3E%3C/svg%3E") !important;
}
.um-faicon-angle-right:before{
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9.095' height='15' viewBox='0 0 9.095 15'%3E%3Cpath id='Path_1369' data-name='Path 1369' d='M7.515 3.553c.52.526 1.03 1.048 1.546 1.564q1.857 1.856 3.718 3.708a.834.834 0 0 0 1.232 0c.236-.242.477-.479.716-.718a.817.817 0 0 0 0-1.222L11.379 3.538Q9.758 1.915 8.138.29A.9.9 0 0 0 7.532 0a.864.864 0 0 0-.667.288Q5.614 1.544 4.363 2.8L.956 6.207c-.232.232-.465.463-.7.7A.812.812 0 0 0 .269 8.1l.71.71a.833.833 0 0 0 1.25 0l3.016-3L7.429 3.634Z' transform='translate(9.095) rotate(90)' fill='%231A3668'/%3E%3C/svg%3E") !important;
}
.um-directory .um-members-pagination-box .um-members-pagi .pagi.current{
border-color: #fff !important;
background-color: #fff !important;
color: #3eaf49 !important;
font-weight: 800 !important;
}
.um-directory .um-members-pagination-box .um-members-pagi .pagi.current span{
border-color: #fff !important;
background-color: #fff !important;
color: #3eaf49 !important;
font-weight: 800 !important;
}
.pagi span{
color: #2c2c2c !important;
}
\ No newline at end of file
......
......@@ -5,7 +5,7 @@
Author: the Understrap Contributors
Author URI: https://github.com/understrap/understrap-child/graphs/contributors
Template: understrap
Version: 1.2.0026
Version: 1.2.0027
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: understrap-child
......
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
<style>
</style>
<script type="text/template" id="tmpl-um-members-pagination">
<# if ( data.pagination.pages_to_show.length > 0 ) { #>
......@@ -13,15 +15,18 @@
</div>
<div class="um-members-pagi uimob340-hide uimob500-hide">
<span class="pagi pagi-arrow <# if ( data.pagination.current_page == 1 ) { #>disabled<# } #>" data-page="first" aria-label="<?php esc_attr_e( 'First page', 'ultimate-member' ); ?>"><i class="um-faicon-angle-double-left"></i></span>
<span class="pagi pagi-arrow <# if ( data.pagination.current_page == 1 ) { #>disabled<# } #>" data-page="prev" aria-label="<?php esc_attr_e( 'Previous page', 'ultimate-member' ); ?>"><i class="um-faicon-angle-left"></i></span>
<span class="pagi pagi-arrow <# if ( data.pagination.current_page == 1 ) { #>disabled<# } #>" data-page="prev" aria-label="<?php esc_attr_e( 'Previous page', 'ultimate-member' ); ?>">
<i class="um-faicon-angle-left"></i></span>
<# _.each( data.pagination.pages_to_show, function( page, key, list ) { #>
<span class="pagi <# if ( page == data.pagination.current_page ) { #>current<# } #>" data-page="{{{page}}}">{{{page}}}</span>
<span class="pagi <# if ( page == data.pagination.current_page ) { #>current<# } #>" data-page="{{{page}}}"><span>{{{page}}}</span></span>
<# }); #>
<span class="pagi pagi-arrow <# if ( data.pagination.current_page == data.pagination.total_pages ) { #>disabled<# } #>" data-page="next" aria-label="<?php esc_attr_e( 'Next page', 'ultimate-member' ); ?>"><i class="um-faicon-angle-right"></i></span>
<span class="pagi pagi-arrow <# if ( data.pagination.current_page == data.pagination.total_pages ) { #>disabled<# } #>" data-page="last" aria-label="<?php esc_attr_e( 'Last page', 'ultimate-member' ); ?>"><i class="um-faicon-angle-double-right"></i></span>
<span class="pagi pagi-arrow <# if ( data.pagination.current_page == data.pagination.total_pages ) { #>disabled<# } #>" data-page="next" aria-label="<?php esc_attr_e( 'Next page', 'ultimate-member' ); ?>">
<i class="um-faicon-angle-right"></i></span>
</div>
<# } #>
</script>
\ No newline at end of file
</script>
......