mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-18 06:03:38 +09:00
Version 1.0.46
This commit is contained in:
+3
-1
@@ -90,7 +90,9 @@ class UM_Rewrite {
|
||||
|
||||
// Try nice name
|
||||
if ( !$user_id ) {
|
||||
$the_user = get_user_by( 'slug', um_queried_user() );
|
||||
$slug = um_queried_user();
|
||||
$slug = str_replace('.','-',$slug);
|
||||
$the_user = get_user_by( 'slug', $slug );
|
||||
if ( isset( $the_user->ID ) ){
|
||||
$user_id = $the_user->ID;
|
||||
}
|
||||
|
||||
+2
-1
@@ -345,12 +345,13 @@ class UM_Setup {
|
||||
'post_title' => $array['title'],
|
||||
'post_content' => $content,
|
||||
'post_name' => $slug,
|
||||
'post_type' => 'page',
|
||||
'post_type' => 'post',
|
||||
'post_status' => 'publish',
|
||||
'post_author' => um_user('ID'),
|
||||
);
|
||||
|
||||
$post_id = wp_insert_post( $user_page );
|
||||
wp_update_post( array('ID' => $post_id, 'post_type' => 'page' ) );
|
||||
|
||||
update_post_meta($post_id, '_um_core', $slug);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user