mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
Merge remote-tracking branch 'origin/master'
# Conflicts: # includes/core/class-shortcodes.php
This commit is contained in:
@@ -656,6 +656,16 @@ div.uimob960 .um-search .um-search-submit .um-button.um-alt {float: right}
|
||||
div.uimob960 .um-member {width: 48%}
|
||||
div.uimob960 .um-gutter-sizer {width: 4%}
|
||||
|
||||
div.uimob960 .um-profile-photo {
|
||||
width: 200px !important;
|
||||
}
|
||||
|
||||
div.uimob960 .um-profile-photo a.um-profile-photo-img {
|
||||
width: 140px !important;
|
||||
height: 140px !important;
|
||||
top: -70px !important;
|
||||
}
|
||||
|
||||
/************************************************/
|
||||
|
||||
@media screen and (max-height: 400px) {
|
||||
|
||||
@@ -13,15 +13,20 @@
|
||||
right: 30px;
|
||||
}
|
||||
|
||||
div.uimob500 .um-profile-photo a.um-profile-photo-img {
|
||||
right: auto;
|
||||
}
|
||||
|
||||
.um-profile-edit {
|
||||
right: auto;
|
||||
left: 10px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
div.uimob960 .um-header .um-profile-meta,
|
||||
div.uimob800 .um-header .um-profile-meta {
|
||||
padding-left: 0 !important;
|
||||
padding-right: 200px !important;
|
||||
padding-right: 200px !important;
|
||||
}
|
||||
|
||||
.um-name {
|
||||
|
||||
@@ -485,12 +485,12 @@ if ( ! class_exists( 'Admin_Settings' ) ) {
|
||||
array(
|
||||
'id' => 'restricted_access_post_metabox',
|
||||
'type' => 'hidden',
|
||||
'value' => '',
|
||||
'value' => '',
|
||||
),
|
||||
array(
|
||||
'id' => 'restricted_access_taxonomy_metabox',
|
||||
'type' => 'hidden',
|
||||
'value' => '',
|
||||
'value' => '',
|
||||
),
|
||||
array(
|
||||
'id' => 'restricted_access_post_metabox',
|
||||
|
||||
@@ -9,8 +9,9 @@ foreach( $meta as $k => $v ) {
|
||||
$roles_array = array();
|
||||
|
||||
foreach ( UM()->roles()->get_roles() as $key => $value ) {
|
||||
if ( ! empty( UM()->query()->get_meta_value( '_um_roles', $key ) ) )
|
||||
$roles_array[] = UM()->query()->get_meta_value( '_um_roles', $key );
|
||||
$_um_roles = UM()->query()->get_meta_value( '_um_roles', $key );
|
||||
if ( ! empty( $_um_roles ) )
|
||||
$roles_array[] = $_um_roles;
|
||||
}
|
||||
|
||||
$show_these_users = get_post_meta( get_the_ID(), '_um_show_these_users', true );
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
<?php
|
||||
$can_search_array = array();
|
||||
foreach ( UM()->roles()->get_roles() as $key => $value ) {
|
||||
if ( ! empty( UM()->query()->get_meta_value( '_um_roles_can_search', $key ) ) )
|
||||
$can_search_array[] = UM()->query()->get_meta_value( '_um_roles_can_search', $key );
|
||||
$_um_roles_can_search = UM()->query()->get_meta_value( '_um_roles_can_search', $key );
|
||||
if ( ! empty( $_um_roles_can_search ) )
|
||||
$can_search_array[] = $_um_roles_can_search;
|
||||
}
|
||||
|
||||
$custom_search = apply_filters( 'um_admin_custom_search_filters', array() );
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
|
||||
<?php
|
||||
foreach ( UM()->roles()->get_roles( __( 'All roles', 'ultimate-member' ) ) as $key => $value ) {
|
||||
if ( ! empty( UM()->query()->get_meta_value( '_um_profile_role', $key ) ) )
|
||||
$profile_role = UM()->query()->get_meta_value( '_um_profile_role', $key );
|
||||
$_um_profile_role = UM()->query()->get_meta_value( '_um_profile_role', $key );
|
||||
if ( ! empty( $_um_profile_role ) )
|
||||
$profile_role = $_um_profile_role;
|
||||
}
|
||||
|
||||
UM()->admin_forms( array(
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
|
||||
<?php
|
||||
foreach ( UM()->roles()->get_roles( __( 'Default', 'ultimate-member' ) ) as $key => $value ) {
|
||||
if ( ! empty( UM()->query()->get_meta_value( '_um_register_role', $key ) ) )
|
||||
$register_role = UM()->query()->get_meta_value( '_um_register_role', $key );
|
||||
$_um_register_role = UM()->query()->get_meta_value( '_um_register_role', $key );
|
||||
if ( ! empty( $_um_register_role ) )
|
||||
$register_role = $_um_register_role;
|
||||
}
|
||||
|
||||
UM()->admin_forms( array(
|
||||
|
||||
@@ -177,6 +177,10 @@ if ( ! class_exists( 'Members' ) ) {
|
||||
|
||||
global $wpdb, $post;
|
||||
|
||||
/**
|
||||
* @var $profiles_per_page
|
||||
* @var $profiles_per_page_mobile
|
||||
*/
|
||||
extract($args);
|
||||
|
||||
$query_args = array();
|
||||
@@ -222,7 +226,11 @@ if ( ! class_exists( 'Members' ) ) {
|
||||
|
||||
$array['page'] = $members_page;
|
||||
|
||||
$array['total_pages'] = ceil( $array['total_users'] / $profiles_per_page );
|
||||
if ( isset( $profiles_per_page ) && $profiles_per_page > 0 ) {
|
||||
$array['total_pages'] = ceil( $array['total_users'] / $profiles_per_page );
|
||||
} else {
|
||||
$array['total_pages'] = 1;
|
||||
}
|
||||
|
||||
$array['header'] = $this->convert_tags( $header, $array );
|
||||
$array['header_single'] = $this->convert_tags( $header_single, $array );
|
||||
|
||||
@@ -138,6 +138,7 @@ if ( ! class_exists( 'Shortcodes' ) ) {
|
||||
return $form_id;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
/***
|
||||
*** @load a compatible template
|
||||
*/
|
||||
@@ -156,16 +157,45 @@ if ( ! class_exists( 'Shortcodes' ) ) {
|
||||
$file = um_path . "templates/{$tpl}.php";
|
||||
$theme_file = get_stylesheet_directory() . "/ultimate-member/templates/{$tpl}.php";
|
||||
|
||||
=======
|
||||
|
||||
/**
|
||||
* load a compatible template
|
||||
*
|
||||
* @param $tpl
|
||||
*/
|
||||
function load_template( $tpl ) {
|
||||
$file = um_path . 'templates/' . $tpl . '.php';
|
||||
|
||||
$theme_file = get_stylesheet_directory() . '/ultimate-member/templates/' . $tpl . '.php';
|
||||
>>>>>>> origin/master
|
||||
if ( file_exists( $theme_file ) ) {
|
||||
$file = $theme_file;
|
||||
}
|
||||
|
||||
if ( file_exists( $file ) ) {
|
||||
<<<<<<< HEAD
|
||||
include $file;
|
||||
}
|
||||
=======
|
||||
|
||||
$loop = ( $this->loop ) ? $this->loop : array();
|
||||
>>>>>>> origin/master
|
||||
|
||||
if ( isset( $this->set_args ) && is_array( $this->set_args ) ) {
|
||||
$args = $this->set_args;
|
||||
|
||||
/**
|
||||
* @var $tpl
|
||||
*/
|
||||
extract( $args );
|
||||
}
|
||||
|
||||
include $file;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
*** @Add class based on shortcode
|
||||
*/
|
||||
@@ -208,19 +238,19 @@ if ( ! class_exists( 'Shortcodes' ) ) {
|
||||
'show_lock' => 'yes',
|
||||
);
|
||||
|
||||
$args = wp_parse_args($args, $defaults);
|
||||
$args = wp_parse_args( $args, $defaults );
|
||||
|
||||
$args['lock_text'] = $this->convert_locker_tags($args['lock_text']);
|
||||
$args['lock_text'] = $this->convert_locker_tags( $args['lock_text'] );
|
||||
|
||||
if (!is_user_logged_in()) {
|
||||
if ($args['show_lock'] == 'no') {
|
||||
if ( ! is_user_logged_in() ) {
|
||||
if ( $args['show_lock'] == 'no' ) {
|
||||
echo '';
|
||||
} else {
|
||||
UM()->shortcodes()->set_args = $args;
|
||||
UM()->shortcodes()->load_template('login-to-view');
|
||||
$this->set_args = $args;
|
||||
$this->load_template( 'login-to-view' );
|
||||
}
|
||||
} else {
|
||||
echo do_shortcode($this->convert_locker_tags(wpautop($content)));
|
||||
echo do_shortcode( $this->convert_locker_tags( wpautop( $content ) ) );
|
||||
}
|
||||
|
||||
$output = ob_get_contents();
|
||||
@@ -388,14 +418,17 @@ if ( ! class_exists( 'Shortcodes' ) ) {
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
*** @Loads a template file
|
||||
*/
|
||||
/**
|
||||
* Loads a template file
|
||||
*
|
||||
* @param $template
|
||||
* @param array $args
|
||||
*/
|
||||
function template_load( $template, $args = array() ) {
|
||||
if ( is_array( $args ) ) {
|
||||
UM()->shortcodes()->set_args = $args;
|
||||
$this->set_args = $args;
|
||||
}
|
||||
UM()->shortcodes()->load_template( $template );
|
||||
$this->load_template( $template );
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user