BP_Admin_Setting_tab: settings_save_lagecy ()

描述

文件:bp-core /类/ class-bp-admin-setting-tab.php

受保护函数settings_save_lagecy(){全局$wp_settings_fields;($wp_settings_fields[$this->tab_name])?(array) $wp_settings_fields[$this->tab_name]: [];美元legacy_names = [];Foreach ($fields as $section => $settings) {$legacy_names[] = $setting_name;}} //一些遗留选项没有在Settings API中注册,或者在UI中被反转。$ legacy_options =阵列(‘bp-enable-private-network’,‘bp-disable-account-deletion’,‘bp-disable-avatar-uploads’,‘bp-disable-cover-image-uploads’,‘bp-disable-group-avatar-uploads’,‘bp-disable-group-cover-image-uploads’,‘bp_disable_blogforum_comments’,‘bp-disable-profile-sync’,‘bp_restrict_group_creation’,‘hide-loggedout-adminbar’,);$legacy_options = array_intersect($legacy_options, $legacy_names);注意:每个选项在UI中都有相反的表示,Ie中,Profile Syncing选项读取“Enable Sync”,所以当它被选中时,//相应的选项应该被取消设置。$value = isset($_POST[$legacy_option]) ? '' : 1; bp_update_option( $legacy_option, $value ); } }

问题吗?

我们总是很乐意帮助您解决代码或其他问题!搜索我们的开发人员文档联络支持,或与我们联系销售团队