Beispiel #1
0
 function on_the_go_systems_branding_plugins_loaded()
 {
     global $onthegosystems_branding_paths;
     // find the latest version
     $latest = 0;
     foreach ($onthegosystems_branding_paths as $key => $data) {
         if ($key > $latest) {
             $latest = $key;
         }
     }
     if ($latest > 0) {
         require_once $onthegosystems_branding_paths[$latest]['path'] . '/onthegosystems-branding-loader.php';
         ont_set_on_the_go_systems_uri_and_start($onthegosystems_branding_paths[$latest]['url']);
     }
 }
Beispiel #2
0
define('WPCF_ABSPATH', dirname(__FILE__));
define('WPCF_RELPATH', plugins_url() . '/' . basename(WPCF_ABSPATH));
define('WPCF_INC_ABSPATH', WPCF_ABSPATH . '/includes');
define('WPCF_INC_RELPATH', WPCF_RELPATH . '/includes');
define('WPCF_RES_ABSPATH', WPCF_ABSPATH . '/resources');
define('WPCF_RES_RELPATH', WPCF_RELPATH . '/resources');
//Add installer
include dirname(__FILE__) . '/embedded/common/installer/loader.php';
WP_Installer_Setup($wp_installer_instance, array('plugins_install_tab' => '1', 'repositories_include' => array('toolset', 'wpml')));
require_once WPCF_INC_ABSPATH . '/constants.php';
/*
 * Since Types 1.2 we load all embedded code without conflicts
 */
require_once WPCF_ABSPATH . '/embedded/types.php';
require_once WPCF_ABSPATH . '/embedded/onthego-resources/onthegosystems-branding-loader.php';
ont_set_on_the_go_systems_uri_and_start(WPCF_RELPATH . '/embedded/onthego-resources/');
// Plugin mode only hooks
add_action('plugins_loaded', 'wpcf_init');
// init hook for module manager
add_action('init', 'wpcf_wp_init');
register_activation_hook(__FILE__, 'wpcf_upgrade_init');
register_deactivation_hook(__FILE__, 'wpcf_deactivation_hook');
add_filter('plugin_action_links', 'wpcf_types_plugin_action_links', 10, 2);
/**
 * Deactivation hook.
 *
 * Reset some of data.
 */
function wpcf_deactivation_hook()
{
    // Reset redirection