mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-16 13:13:33 +09:00
Merge branch 'master' of https://github.com/ultimatemember/ultimatemember into feature/ajax_upgrade_process
This commit is contained in:
@@ -69,7 +69,7 @@ jQuery(document).ready(function() {
|
||||
return false;
|
||||
});
|
||||
|
||||
jQuery(document).on('click', '.um-finish-upload.file', function(){
|
||||
jQuery(document).on('click', '.um-finish-upload.file:not(.disabled)', function(){
|
||||
|
||||
var key = jQuery(this).attr('data-key');
|
||||
var preview = jQuery(this).parents('.um-modal-body').find('.um-single-file-preview').html();
|
||||
@@ -83,7 +83,7 @@ jQuery(document).ready(function() {
|
||||
jQuery('.um-single-file-preview[data-key='+key+']').parents('.um-field').find('input[type=hidden]').val( jQuery('.um-single-file-preview[data-key='+key+']').parents('.um-field').find('.um-single-fileinfo a').attr('href') );
|
||||
});
|
||||
|
||||
jQuery(document).on('click', '.um-finish-upload.image', function(){
|
||||
jQuery(document).on('click', '.um-finish-upload.image:not(.disabled)', function(){
|
||||
|
||||
var elem = jQuery(this);
|
||||
var key = jQuery(this).attr('data-key');
|
||||
|
||||
@@ -567,7 +567,7 @@ if ( ! class_exists( 'um\core\Access' ) ) {
|
||||
* Restrict content new logic
|
||||
*
|
||||
* @param $posts
|
||||
* @param $query
|
||||
* @param \WP_Query $query
|
||||
* @return array
|
||||
*/
|
||||
function filter_protected_posts( $posts, $query ) {
|
||||
@@ -581,6 +581,13 @@ if ( ! class_exists( 'um\core\Access' ) ) {
|
||||
|
||||
//other filter
|
||||
foreach ( $posts as $post ) {
|
||||
|
||||
//Woocommerce AJAX fixes....remove filtration on wc-ajax which goes to Front Page
|
||||
if ( ! empty( $_GET['wc-ajax'] ) /*&& $query->is_front_page()*/ ) {
|
||||
$filtered_posts[] = $post;
|
||||
continue;
|
||||
}
|
||||
|
||||
$restriction = $this->get_post_privacy_settings( $post );
|
||||
|
||||
if ( ! $restriction ) {
|
||||
@@ -588,6 +595,8 @@ if ( ! class_exists( 'um\core\Access' ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$is_singular = $query->is_singular();
|
||||
|
||||
//post is private
|
||||
if ( '0' == $restriction['_um_accessible'] ) {
|
||||
$filtered_posts[] = $post;
|
||||
@@ -604,7 +613,7 @@ if ( ! class_exists( 'um\core\Access' ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( empty( $query->is_singular ) ) {
|
||||
if ( empty( $is_singular ) ) {
|
||||
//if not single query when exclude if set _um_access_hide_from_queries
|
||||
if ( empty( $restriction['_um_access_hide_from_queries'] ) ) {
|
||||
|
||||
@@ -703,7 +712,7 @@ if ( ! class_exists( 'um\core\Access' ) ) {
|
||||
}
|
||||
}
|
||||
|
||||
if ( empty( $query->is_singular ) ) {
|
||||
if ( empty( $is_singular ) ) {
|
||||
//if not single query when exclude if set _um_access_hide_from_queries
|
||||
if ( empty( $restriction['_um_access_hide_from_queries'] ) ) {
|
||||
|
||||
@@ -790,7 +799,7 @@ if ( ! class_exists( 'um\core\Access' ) ) {
|
||||
}
|
||||
|
||||
} else {
|
||||
if ( empty( $query->is_singular ) ) {
|
||||
if ( empty( $is_singular ) ) {
|
||||
if ( empty( $restriction['_um_access_hide_from_queries'] ) ) {
|
||||
|
||||
if ( ! isset( $restriction['_um_noaccess_action'] ) || '0' == $restriction['_um_noaccess_action'] ) {
|
||||
|
||||
Reference in New Issue
Block a user