- 2.0.44 pre-release;

This commit is contained in:
nikitasinelnikov
2019-04-23 11:39:19 +03:00
parent 89d74b88fd
commit 00d5968557
3 changed files with 10 additions and 25 deletions
+1 -1
View File
@@ -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 {
+8
View File
@@ -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();
+1 -24
View File
@@ -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 );