-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpage-profile.php
More file actions
55 lines (39 loc) · 1.25 KB
/
page-profile.php
File metadata and controls
55 lines (39 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
$settings_permalink = home_url('/settings/');
$current_user = wp_get_current_user();
add_filter( 'acf/load_value/name=email', 'custom_load_value_user_email', 10, 3 );
function custom_load_value_user_email( $value, $post_id, $field )
{
$current_user = wp_get_current_user();
return $current_user->user_email;
}
if ( function_exists('acf_form_head') ) { acf_form_head(); }
get_header(); ?>
<div id="content" class="content-sidebar">
<div class="wrap">
<?php do_action( 'before_content' ); ?>
<div id="main" role="main">
<?php do_shortcode('[settings_nav]'); ?><br />
<div id="profile">
<?php
do_action( 'sewn/register/the_form', array(
'form_type' => 'profile',
'field_groups' => array('acf_custom-register','acf_sewn_subscriptions'),
) );
/** /
if ( function_exists('acf_form') ) {
acf_form( array(
'post_id' => 'user_' . $current_user->ID,
'field_groups' => array('acf_custom-profile', 'acf_sewn_subscriptions'),
'return' => add_query_arg('action', 'profile', get_permalink()),
'submit_value' => 'Save'
) );
}
/**/ ?>
</div>
</div>
<?php #get_sidebar(); ?>
<?php do_action( 'after_content' ); ?>
</div>
</div>
<?php get_footer(); ?>