注册用于自定义选项的窗口小部件控件回调。
原型
wp_register_widget_control( int|string $id, string $name, callable $control_callback, array $options = array() )
参数
$id
(int|string)
(Required)
边栏ID。
$name
(string)
(Required)
边栏显示名称。
$control_callback
(callable)
(Required)
显示侧栏时运行。
$options
(array)
(Optional)
数组或控制选项字符串。 ‘height’(int)从未使用过。默认为200。 ‘width’(int)完全展开的控件表单的宽度(但尽量使用默认宽度)。默认250。 ‘id_base’(int | string)多小部件所必需的,即允许多个实例(如文本小部件)的小部件。小部件ID最终看起来像{$ id_base} – {$ unique_number}。
源文件
路径:“
<?php
...
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/wp_register_widget_control/