Esempio n. 1
0
/**
 * Loaded plugin
 */
function otw_wpl_plugin_loaded()
{
    global $otw_plugin_options, $otw_wpl_plugin_url, $wp_wpl_int_items, $otw_wpl_grid_manager_component, $otw_wpl_grid_manager_object, $otw_wpl_shortcode_component, $otw_wpl_form_component;
    //load text domain
    load_plugin_textdomain('widgetize-pages-light', false, dirname(plugin_basename(__FILE__)) . '/languages/');
    $wp_wpl_int_items = array('page' => array(array(), __('Pages', 'widgetize-pages-light'), __('All pages', 'widgetize-pages-light')));
    $otw_plugin_options = get_option('otw_plugin_options');
    $otw_wpl_plugin_url = plugin_dir_url(__FILE__);
    //otw components
    $otw_wpl_grid_manager_component = false;
    $otw_wpl_grid_manager_object = false;
    $otw_wpl_shortcode_component = false;
    $otw_wpl_form_component = false;
    //load core component functions
    @(include_once 'include/otw_components/otw_functions/otw_functions.php');
    if (!function_exists('otw_register_component')) {
        wp_die('Please include otw components');
    }
    //register grid manager component
    otw_register_component('otw_grid_manager', dirname(__FILE__) . '/include/otw_components/otw_grid_manager/', $otw_wpl_plugin_url . 'include/otw_components/otw_grid_manager/');
    //register form component
    otw_register_component('otw_form', dirname(__FILE__) . '/include/otw_components/otw_form/', $otw_wpl_plugin_url . 'include/otw_components/otw_form/');
    //register shortcode component
    otw_register_component('otw_shortcode', dirname(__FILE__) . '/include/otw_components/otw_shortcode/', $otw_wpl_plugin_url . 'include/otw_components/otw_shortcode/');
}
Esempio n. 2
0
Author URI: http://themeforest.net/user/OTWthemes
*/
load_plugin_textdomain('otw_tsw', false, dirname(plugin_basename(__FILE__)) . '/languages/');
$wp_tsw_tmc_items = array('page' => array(array(), __('Pages', 'otw_tsw')), 'post' => array(array(), __('Posts', 'otw_tsw')));
$wp_tsw_agm_items = array('page' => array(array(), __('Pages', 'otw_tsw')), 'post' => array(array(), __('Posts', 'otw_tsw')));
$wp_tsw_cs_items = array('page' => array(array(), __('Pages', 'otw_tsw')), 'post' => array(array(), __('Posts', 'otw_tsw')));
$otw_tsw_plugin_url = plugin_dir_url(__FILE__);
$otw_tsw_css_version = '1.0';
//include functons
require_once plugin_dir_path(__FILE__) . '/include/otw_tsw_functions.php';
//otw components
$otw_tsw_shortcode_component = false;
$otw_tsw_form_component = false;
$otw_tsw_validator_component = false;
//load core component functions
@(include_once 'include/otw_components/otw_functions/otw_functions.php');
if (!function_exists('otw_register_component')) {
    wp_die('Please include otw components');
}
//register form component
otw_register_component('otw_form', dirname(__FILE__) . '/include/otw_components/otw_form/', $otw_tsw_plugin_url . '/include/otw_components/otw_form/');
//register validator component
otw_register_component('otw_validator', dirname(__FILE__) . '/include/otw_components/otw_validator/', $otw_tsw_plugin_url . '/include/otw_components/otw_validator/');
//register shortcode component
otw_register_component('otw_shortcode', dirname(__FILE__) . '/include/otw_components/otw_shortcode/', $otw_tsw_plugin_url . '/include/otw_components/otw_shortcode/');
/** 
 *call init plugin function
 */
add_action('init', 'otw_tsw_init');
add_action('widgets_init', 'otw_tsw_widgets_init');
Esempio n. 3
0
$otw_sbm_shortcode_component = false;
$otw_sbm_form_component = false;
$otw_sbm_content_sidebars_component = false;
//load core component functions
@(include_once 'include/otw_components/otw_functions/otw_functions.php');
if (!function_exists('otw_register_component')) {
    wp_die('Please include otw components');
}
//register grid manager component
otw_register_component('otw_grid_manager', dirname(__FILE__) . '/include/otw_components/otw_grid_manager/', $otw_sbm_plugin_url . '/include/otw_components/otw_grid_manager/');
//register form component
otw_register_component('otw_form', dirname(__FILE__) . '/include/otw_components/otw_form/', $otw_sbm_plugin_url . '/include/otw_components/otw_form/');
//register shortcode component
otw_register_component('otw_shortcode', dirname(__FILE__) . '/include/otw_components/otw_shortcode/', $otw_sbm_plugin_url . '/include/otw_components/otw_shortcode/');
//register content sidebars component
otw_register_component('otw_content_sidebars', dirname(__FILE__) . '/include/otw_components/otw_content_sidebars/', $otw_sbm_plugin_url . '/include/otw_components/otw_content_sidebars/');
/** calls list of available sidebars
 *
 */
function otw_sidebars_list()
{
    if (isset($_GET['action']) && $_GET['action'] == 'edit') {
        require_once 'include/otw_manage_sidebar.php';
    } else {
        require_once 'include/otw_list_sidebars.php';
    }
}
/** calls page where to create new sidebars
 *
 */
function otw_sidebars_manage()