コード例 #1
0
ファイル: cta-widget.php プロジェクト: erkmen/wpstartersetup
 /**
  * Initialize the CTA widget
  */
 function initialize()
 {
     if (!class_exists('SiteOrigin_Widget_Button_Widget')) {
         include plugin_dir_path(__FILE__) . '../../so-button-widget/inc/widget.php';
         siteorigin_widget_register_self('button', realpath(plugin_dir_path(__FILE__) . '../../so-button-widget/so-button-widget.php'));
     }
 }
コード例 #2
0
ファイル: loader.php プロジェクト: erkmen/wpstartersetup
 /**
  * Register the widget and load its main include file.
  *
  * @action siteorigin_widgets_base_loaded
  */
 function load_register()
 {
     siteorigin_widget_register_self($this->widget_id, $this->file);
     if (!class_exists($this->get_class_name())) {
         require_once $this->load_file;
     }
 }