你好,
我再一次被我的定制器API卡住了。如何将我的分区放在另一个分区/文件夹中(不管你怎么称呼它)?与标准小部件部分类似:
我已搜索此问题,但未找到任何内容。
提前感谢!
这是一个面板,自定义程序包含三个层:panels
包含节,sections
包含设置,以及settings
是由controls
在customizer UI中。
[panel]
|--[section]
| |--[setting] and his [control]
| |--[setting] and his [control]
|--[section]
| |--[setting] and his [control]
| |--[setting] and his [control]
Panel, Section, Setting, Control创建Panel
在创建Sections
通过$id
将它们分组在同一个Panel
.
如何使用wp api添加、更新和检索用户元字段?我添加了一个函数来向用户添加元字段phonenumber。这样的函数是否需要向元对象添加元值?该函数不会将字段添加到API响应中的元对象,而是将其作为新字段添加。我现在拥有的功能:<?php function portal_add_user_field() { register_rest_field( \'user\', \'phonenumber\', array( \'