本文整理汇总了PHP中SiteOrigin_Widget::modify_child_widget_form方法的典型用法代码示例。如果您正苦于以下问题:PHP SiteOrigin_Widget::modify_child_widget_form方法的具体用法?PHP SiteOrigin_Widget::modify_child_widget_form怎么用?PHP SiteOrigin_Widget::modify_child_widget_form使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SiteOrigin_Widget
的用法示例。
在下文中一共展示了SiteOrigin_Widget::modify_child_widget_form方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
/**
* Get the form options and allow child widgets to modify that form.
*
* @param bool|SiteOrigin_Widget $parent
*
* @return mixed
*/
function form_options($parent = false)
{
$form_options = $this->modify_form($this->form_options);
if (!empty($parent)) {
$form_options = $parent->modify_child_widget_form($form_options, $this);
}
// Give other plugins a way to modify this form.
$form_options = apply_filters('siteorigin_widgets_form_options', $form_options, $this);
$form_options = apply_filters('siteorigin_widgets_form_options_' . $this->id_base, $form_options, $this);
return $form_options;
}
示例2:
/**
* Get the main form options and allow child widgets to modify that form.
*
* @param bool|SiteOrigin_Widget $parent
*
* @return mixed
*/
function form_options($parent = false)
{
if (empty($this->form_options)) {
// If the widget doesn't have form_options defined from the constructor, then it might be defining them in the get_widget_form function
$this->form_options = $this->get_widget_form();
}
$form_options = $this->modify_form($this->form_options);
if (!empty($parent)) {
$form_options = $parent->modify_child_widget_form($form_options, $this);
}
// Give other plugins a way to modify this form.
$form_options = apply_filters('siteorigin_widgets_form_options', $form_options, $this);
$form_options = apply_filters('siteorigin_widgets_form_options_' . $this->id_base, $form_options, $this);
return $form_options;
}