Version 1.0.50

This commit is contained in:
ultimatemember
2015-02-12 02:16:33 +02:00
parent 23c30f6a39
commit 3af48d0466
10 changed files with 63 additions and 14 deletions
+2 -1
View File
@@ -17,7 +17,8 @@ if(isset($_FILES[$id]['name'])) {
$temp = $_FILES[$id]["tmp_name"];
$file = $_FILES[$id]["name"];
$file = str_replace(array('(',')','+','&','?','%','{','}','[',']','=',',',';',' '),'',$file);
$file = strtolower($file);
$error = $ultimatemember->files->check_image_upload( $temp, $id );
if ( $error ){
+7 -3
View File
@@ -26,14 +26,18 @@
}
$count = count( $search_filters );
?>
<div class="um-search um-search-<?php echo $count; ?>">
<form method="get" action="" />
<?php
<?php if ( isset( $_REQUEST['page_id'] ) && get_option('permalink_structure') == 0 ) { ?>
<input type="hidden" name="page_id" id="page_id" value="<?php echo $_REQUEST['page_id']; ?>" />
<?php }
$i = 0;
foreach( $search_filters as $filter ) {
@@ -54,7 +58,7 @@
<div class="um-clear"></div>
<div class="um-search-submit">
<input type="hidden" name="um_search" id="um_search" value="1" />
<a href="#" class="um-button um-do-search"><?php _e('Search','ultimatemember'); ?></a><a href="<?php echo $ultimatemember->permalinks->get_current_url( true ); ?>" class="um-button um-alt"><?php _e('Reset','ultimatemember'); ?></a>
+21 -2
View File
@@ -39,12 +39,24 @@ class UM_Enqueue {
global $ultimatemember;
$exclude = um_get_option('js_css_exclude');
if ( $exclude && is_array( $exclude ) ) {
if ( $exclude && !is_admin() && is_array( $exclude ) ) {
$c_url = $ultimatemember->permalinks->get_current_url( get_option('permalink_structure') );
foreach( $exclude as $match ) {
if ( strstr( $c_url, $match ) )
if ( strstr( $c_url, untrailingslashit( $match ) ) )
return;
}
}
$include = um_get_option('js_css_include');
if ( $include && !is_admin() && is_array( $include ) ) {
$c_url = $ultimatemember->permalinks->get_current_url( get_option('permalink_structure') );
foreach( $include as $match ) {
if ( !strstr( $c_url, untrailingslashit( $match ) ) )
return;
}
@@ -64,6 +76,13 @@ class UM_Enqueue {
}
// load a localized version for date/time
$locale = get_option('WPLANG');
if ( $locale && file_exists( um_path . 'assets/js/pickadate/translations/' . $locale . '.js' ) ) {
wp_register_script('um_datetime_locale', um_url . 'assets/js/pickadate/translations/' . $locale . '.js', '', '', true );
wp_enqueue_script('um_datetime_locale');
}
}
/***
+8 -4
View File
@@ -596,7 +596,8 @@ class UM_Fields {
if ( $array['years_x'] == 'past' ) {
$date = new DateTime( date('Y-n-d') );
$past = $date->modify('-'.$array['years'].' years')->format('Y,n,d');
$past = $date->modify('-'.$array['years'].' years');
$past = $date->format('Y,n,d');
$array['date_min'] = $past;
$array['date_max'] = date('Y,n,d');
@@ -604,7 +605,8 @@ class UM_Fields {
} else if ( $array['years_x'] == 'future' ) {
$date = new DateTime( date('Y-n-d') );
$future = $date->modify('+'.$array['years'].' years')->format('Y,n,d');
$future = $date->modify('+'.$array['years'].' years');
$future = $date->format('Y,n,d');
$array['date_min'] = date('Y,n,d');
$array['date_max'] = $future;
@@ -613,8 +615,10 @@ class UM_Fields {
$date = new DateTime( date('Y-n-d') );
$date_f = new DateTime( date('Y-n-d') );
$past = $date->modify('-'. ( $array['years'] / 2 ).' years')->format('Y,n,d');
$future = $date_f->modify('+'. ( $array['years'] / 2 ).' years')->format('Y,n,d');
$past = $date->modify('-'. ( $array['years'] / 2 ).' years');
$past = $date->format('Y,n,d');
$future = $date_f->modify('+'. ( $array['years'] / 2 ).' years');
$future = $date_f->format('Y,n,d');
$array['date_min'] = $past;
$array['date_max'] = $future;