-
Notifications
You must be signed in to change notification settings - Fork 0
/
pagebuilder-widgets-collection.php
37 lines (33 loc) · 1.55 KB
/
pagebuilder-widgets-collection.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/**
* Plugin Name: Page Builder widgets collection
* Plugin URI: http://www.ibsciss.com/wordpress/pagebuilder-widgets-collection
* Description: A widgets collection for the SiteOrigin's Page Builder
* Version: 0.9
* Author: Ibsciss
* Author URI: http://www.ibsciss.com
* License: MIT
*/
/*
* Define plugin paths and urls.
*/
if(!defined('IBSCISS_PLUGIN_PATH_PBWC')) define('IBSCISS_PLUGIN_PATH_PBWC', plugin_dir_path( __FILE__ ));
if(!defined('IBSCISS_PLUGIN_URL_PBWC')) define('IBSCISS_PLUGIN_URL_PBWC', plugins_url('/').'pagebuilder-widgets-collection/');
if(!defined('IBSCISS_PLUGIN_RESOURCES_PATH_PBWC')) define('IBSCISS_PLUGIN_RESOURCES_PATH_PBWC', IBSCISS_PLUGIN_PATH_PBWC.'Ibsciss/Wordpress/Resources');
if(!defined('IBSCISS_PLUGIN_RESOURCES_URL_PBWC')) define('IBSCISS_PLUGIN_RESOURCES_URL_PBWC', IBSCISS_PLUGIN_URL_PBWC.'Ibsciss/Wordpress/Resources');
function ibsciss_register_files($fileName){ require_once IBSCISS_PLUGIN_PATH_PBWC.'Ibsciss/Wordpress/'.$fileName.'.php'; }
function ibsciss_register_service($serviceName){ ibsciss_register_files('Services/'.$serviceName); }
function ibsciss_autoload_service(){ ibsciss_register_service('autoload'); }
/*
* include necessary files
*/
ibsciss_autoload_service();
ibsciss_register_files('Widgets/Widget');
/*
* register widgets
*/
\Ibsciss\Wordpress\Widgets\Widget::register('Heading');
\Ibsciss\Wordpress\Widgets\Widget::register('Separator');
\Ibsciss\Wordpress\Widgets\Widget::register('SimpleCallToAction');
\Ibsciss\Wordpress\Widgets\Widget::register('Image');
\Ibsciss\Wordpress\Widgets\Widget::init();