當前位置: 首頁>>代碼示例>>PHP>>正文


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怎麽用?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;
 }
開發者ID:DonMehdi,項目名稱:wordpress_website,代碼行數:18,代碼來源:siteorigin-widget.class.php

示例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;
 }
開發者ID:jesusmarket,項目名稱:jesusmarket,代碼行數:22,代碼來源:siteorigin-widget.class.php


注:本文中的SiteOrigin_Widget::modify_child_widget_form方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。