質問するログイン新規登録

質問編集履歴

1

コードを修正しました。

2018/01/16 08:23

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -8,7 +8,11 @@
8
8
  下記のように固定ページを作成しました。
9
9
 
10
10
 
11
+ ```
12
+
13
+ <?
14
+ if(isset($_POST['change_usd']) && wp_verify_nonce($_POST['change_usd'],'change_usd')){
11
- ```<? get_header();$user = wp_get_current_user();
15
+ get_header();$user = wp_get_current_user();
12
16
  $uid = $user -> ID;
13
17
  $user_info = get_userdata($uid);
14
18
  if(isset($_POST['password'])){
@@ -21,11 +25,9 @@
21
25
  $email = wp_update_user( array( 'ID' => $uid, 'user_email' => $_POST['email']));
22
26
  }
23
27
  }
28
+ }
24
29
 
25
30
  ?>
26
-
27
-
28
-
29
31
  <form action="" method="post">
30
32
  <?php wp_nonce_field('change_usd','change_usd');?>
31
33
  <dl>
@@ -40,6 +42,7 @@
40
42
  </dl>
41
43
  <div class="submit"><input type="submit" name="submit" id="submit" class="button button-primary" value="更新する" /></div>
42
44
  </form>
45
+
43
46
  ```
44
47
 
45
48