BP_Group_Extension: setup_legacy_properties ()
设置遗留属性。
描述
这个方法负责确保所有的遗留配置属性都存储在一个数组$ This ->legacy_properties中,这样它们对在旧位置引用变量的插件仍然可用。
另请参阅
源
文件:bp-groups /类/ class-bp-group-extension.php
protected function setup_legacy_properties(){//只运行一次。如果(!Empty ($this->legacy_properties)) {return;} $属性= $this->get_legacy_property_list();美元params = $ this - >参数;lp美元= & $ this - > legacy_properties;Foreach ($properties as $property) {switch ($property) {case 'enable_create_step': $lp['enable_create_step'] = $params['屏幕']['create']['enabled']; / /将屏幕上的所有内容都显示出来打破;Case 'enable_edit_item': $lp['enable_edit_item'] = $params['屏幕']['编辑']['启用'];打破; case 'enable_admin_item' : $lp['enable_admin_item'] = $params['screens']['admin']['enabled']; break; case 'create_step_position' : $lp['create_step_position'] = $params['screens']['create']['position']; break; // Note: 'admin' becomes 'edit' to distinguish from Dashboard 'admin'. case 'admin_name' : $lp['admin_name'] = $params['screens']['edit']['name']; break; case 'admin_slug' : $lp['admin_slug'] = $params['screens']['edit']['slug']; break; case 'create_name' : $lp['create_name'] = $params['screens']['create']['name']; break; case 'create_slug' : $lp['create_slug'] = $params['screens']['create']['slug']; break; case 'admin_metabox_context' : $lp['admin_metabox_context'] = $params['screens']['admin']['metabox_context']; break; case 'admin_metabox_priority' : $lp['admin_metabox_priority'] = $params['screens']['admin']['metabox_priority']; break; default : // All other items get moved over. $lp[ $property ] = $params[ $property ]; // Also reapply to the object, for backpat. $this->{$property} = $params[ $property ]; break; } } }
更新日志
版本 | 描述 |
---|---|
BuddyPress 1.8.0 | 介绍了。 |