本文整理匯總了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;
}