mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- 2.0.44 pre-release;
This commit is contained in:
@@ -32,7 +32,7 @@ if ( ! class_exists( 'UM' ) ) {
|
|||||||
* @method UM_User_Location_API User_Location_API()
|
* @method UM_User_Location_API User_Location_API()
|
||||||
* @method UM_Photos_API Photos_API()
|
* @method UM_Photos_API Photos_API()
|
||||||
* @method UM_Groups Groups()
|
* @method UM_Groups Groups()
|
||||||
* @method UM_Frontend_Posting_API Frontend_Posting_API()
|
* @method UM_Frontend_Posting Frontend_Posting()
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
final class UM extends UM_Functions {
|
final class UM extends UM_Functions {
|
||||||
|
|||||||
@@ -127,6 +127,14 @@ if ( ! class_exists( 'um\core\Plugin_Updater' ) ) {
|
|||||||
'key' => 'user_notes',
|
'key' => 'user_notes',
|
||||||
'title' => 'User Notes',
|
'title' => 'User Notes',
|
||||||
),
|
),
|
||||||
|
'um-frontend-posting/um-frontend-posting.php' => array(
|
||||||
|
'key' => 'frontend_posting',
|
||||||
|
'title' => 'Frontend Posting',
|
||||||
|
),
|
||||||
|
'um-filesharing/um-filesharing.php' => array(
|
||||||
|
'key' => 'filesharing',
|
||||||
|
'title' => 'File Sharing',
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
$active_um_plugins = array();
|
$active_um_plugins = array();
|
||||||
|
|||||||
@@ -729,27 +729,4 @@ function um_edit_url_field_value( $value, $key ) {
|
|||||||
$value = esc_attr( $value );
|
$value = esc_attr( $value );
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
add_filter( 'um_edit_url_field_value', 'um_edit_url_field_value', 10, 2 );
|
add_filter( 'um_edit_url_field_value', 'um_edit_url_field_value', 10, 2 );
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set current date if date value is empty
|
|
||||||
*
|
|
||||||
* @param string $value "Field Value"
|
|
||||||
* @param string $default "Field Key"
|
|
||||||
* @param string $key "Field Type"
|
|
||||||
* @param string $type "Field Default Value"
|
|
||||||
* @param array $data "Field Data"
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
function um_field_value__default_datetime( $value, $default, $key, $type, $data ) {
|
|
||||||
|
|
||||||
if ( empty( $value ) && empty( $default ) && $type === 'date' ) {
|
|
||||||
$value = date( 'Y/m/d' );
|
|
||||||
} elseif ( empty( $value ) && empty( $default ) && $type === 'time' ) {
|
|
||||||
$value = date( 'H:i' );
|
|
||||||
}
|
|
||||||
|
|
||||||
return $value;
|
|
||||||
}
|
|
||||||
add_filter( 'um_field_value', 'um_field_value__default_datetime', 10, 5 );
|
|
||||||
Reference in New Issue
Block a user