我有安裝BuddyPress的有3個小組。當用戶在前臺編輯自己的個人資料,我想,如果當他們點擊保存,它會自動前進到下一個字段組。BuddyPress的編輯個人資料順序
因此,舉例來說,我編輯我的場1組配置文件,點擊保存,就帶我到現場組2,所以我可以編輯,而無需點擊導航標籤領域。
因爲這是與方法的形式=「POST」我假定這將是作爲檢查後值一樣簡單。問題是當我編輯配置文件,並保存沒有發佈數據。即時通訊使用這只是用於故障排除(注意,這些空車返回我節省後):
//Next step progression
//Check the field group
echo bp_get_current_profile_group_id();
if(bp_get_current_profile_group_id() == 1) {
echo '<pre>';
print_r($_GET);
echo '</pre>';
echo '<pre>';
print_r($_POST);
echo '</pre>';
if(isset($_POST['_wpnonce'])){ ?>
<script>
jQuery(document).ready(function($){
alert('Saved');
});
</script>
<?php }
} elseif(bp_get_current_profile_group_id() == 2) {
}
挖得更深一些,我看到表單動作是在此之後:<?php bp_the_profile_group_edit_form_action(); ?>
它調用函數<?php bp_get_the_profile_group_edit_form_action(); ?>
我看到我可以添加從how this function is documented過濾器/行動,但我似乎無法得到它的工作。
這無疑讓我給我的答案。非常感謝! – Derek