define('WPCF_RES_RELPATH', WPCF_RELPATH . '/resources'); // Add installer $installer = dirname(__FILE__) . '/plus/installer/loader.php'; if (file_exists($installer)) { include_once $installer; if (function_exists('WP_Installer_Setup')) { 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/loader.php'; onthego_initialize(WPCF_ABSPATH . '/embedded/onthego-resources/', 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_deactivation_hook(__FILE__, 'wpcf_deactivation_hook'); register_activation_hook(__FILE__, 'wpcf_activation_hook'); /** * Deactivation hook. * * Reset some of data. */ function wpcf_deactivation_hook() { // Delete messages delete_option('wpcf-messages');
/** * wpv_embedded_load_or_deactivate * * Check if the plugin version (or an embedded one inside another plugin) is already active. If it is, start the deactivation flow. If it is not, define the WPV_EMBEDDED_ALONE constant and load the plugin * * @since 1.6.2 */ require dirname(__FILE__) . '/onthego-resources/loader.php'; if ( ( defined( 'FORCE_SSL_ADMIN' ) && FORCE_SSL_ADMIN ) || is_ssl() ) { onthego_initialize(dirname(__FILE__) . '/onthego-resources/', rtrim( str_replace( 'http://', 'https://', plugins_url() ), '/' ) . '/' . basename( dirname( __FILE__ ) ) . '/onthego-resources/'); } else { onthego_initialize(dirname(__FILE__) . '/onthego-resources/', plugins_url() . '/' . basename( dirname( __FILE__ ) ) . '/onthego-resources/'); } add_action( 'plugins_loaded', 'wpv_embedded_load_or_deactivate' ); function wpv_embedded_load_or_deactivate() { if ( class_exists( 'WP_Views' ) ) { add_action( 'admin_init', 'wpv_embedded_deactivate' ); add_action( 'admin_notices', 'wpv_embedded_deactivate_notice' ); } else { define( 'WPV_EMBEDDED_ALONE', true ); require_once 'views.php'; } } /**
} define('WPV_URL', $wpv_url); define('WPV_URL_EMBEDDED', $wpv_url); } else { define('WPV_URL', get_stylesheet_directory_uri() . '/' . WPV_FOLDER); define('WPV_URL_EMBEDDED', WPV_URL); } if (is_ssl()) { define('WPV_URL_EMBEDDED_FRONTEND', WPV_URL_EMBEDDED); } else { define('WPV_URL_EMBEDDED_FRONTEND', str_replace('https://', 'http://', WPV_URL_EMBEDDED)); } if (defined('WPV_URL_EMBEDDED')) { // load on the go resources require WPV_PATH_EMBEDDED . '/onthego-resources/loader.php'; onthego_initialize(WPV_PATH_EMBEDDED . '/onthego-resources/', WPV_URL_EMBEDDED . '/onthego-resources/'); } if (!defined('EDITOR_ADDON_RELPATH')) { define('EDITOR_ADDON_RELPATH', WPV_URL . '/common/visual-editor'); } if (!function_exists('wplogger')) { require_once WPV_PATH_EMBEDDED . '/common/wplogger.php'; } if (!function_exists('wpv_debuger')) { require_once WPV_PATH_EMBEDDED . '/inc/wpv-query-debug.class.php'; } require WPV_PATH_EMBEDDED . '/inc/constants-embedded.php'; require WPV_PATH_EMBEDDED . '/inc/wpv-admin-messages.php'; require WPV_PATH_EMBEDDED . '/inc/functions-core-embedded.php'; require_once WPV_PATH_EMBEDDED . '/common/wp-pointer.php'; require WPV_PATH_EMBEDDED . '/inc/wpv-shortcodes.php';
define('WPCF_INC_RELPATH', WPCF_RELPATH . '/includes'); define('WPCF_RES_ABSPATH', WPCF_ABSPATH . '/resources'); define('WPCF_RES_RELPATH', WPCF_RELPATH . '/resources'); if (!defined('WPCF_EMBEDDED_TOOLSET_ABSPATH')) { define('WPCF_EMBEDDED_TOOLSET_ABSPATH', WPCF_EMBEDDED_ABSPATH . '/toolset'); } if (!defined('WPCF_EMBEDDED_TOOLSET_RELPATH')) { define('WPCF_EMBEDDED_TOOLSET_RELPATH', WPCF_EMBEDDED_RELPATH . '/toolset'); } 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_EMBEDDED_TOOLSET_ABSPATH . '/onthego-resources/loader.php'; onthego_initialize(WPCF_EMBEDDED_TOOLSET_ABSPATH . '/onthego-resources/', WPCF_EMBEDDED_TOOLSET_RELPATH . '/onthego-resources/'); require WPCF_EMBEDDED_TOOLSET_ABSPATH . '/toolset-common/loader.php'; toolset_common_initialize(WPCF_EMBEDDED_TOOLSET_ABSPATH . '/toolset-common/', WPCF_EMBEDDED_TOOLSET_RELPATH . '/toolset-common/'); // Plugin mode only hooks add_action('plugins_loaded', 'wpcf_init'); // init hook for module manager add_action('init', 'wpcf_wp_init'); register_deactivation_hook(__FILE__, 'wpcf_deactivation_hook'); register_activation_hook(__FILE__, 'wpcf_activation_hook'); add_action('after_setup_theme', 'wpcf_initialize_autoloader_full', 20); /** * Configure autoloader also for full Types (it has been loaded by embedded Types by now). */ function wpcf_initialize_autoloader_full() { WPCF_Autoloader::get_instance()->add_path(WPCF_INC_ABSPATH . '/classes');
} define('CRED_COMMERCE_PLUGIN_FOLDER', basename(CRED_COMMERCE_PLUGIN_PATH)); define('CRED_COMMERCE_PLUGIN_URL', plugins_url() . '/' . CRED_COMMERCE_PLUGIN_FOLDER); define('CRED_COMMERCE_ASSETS_URL', CRED_COMMERCE_PLUGIN_URL . '/assets'); define('CRED_COMMERCE_ASSETS_PATH', CRED_COMMERCE_PLUGIN_PATH . '/assets'); define('CRED_COMMERCE_LOCALE_PATH', CRED_COMMERCE_PLUGIN_FOLDER . '/locale'); define('CRED_COMMERCE_VIEWS_PATH', CRED_COMMERCE_PLUGIN_PATH . '/views'); define('CRED_COMMERCE_VIEWS_PATH2', CRED_COMMERCE_PLUGIN_FOLDER . '/views'); define('CRED_COMMERCE_TEMPLATES_PATH', CRED_COMMERCE_PLUGIN_PATH . '/views/templates'); define('CRED_COMMERCE_TABLES_PATH', CRED_COMMERCE_PLUGIN_PATH . '/views/tables'); define('CRED_COMMERCE_CLASSES_PATH', CRED_COMMERCE_PLUGIN_PATH . '/classes'); define('CRED_COMMERCE_CONTROLLERS_PATH', CRED_COMMERCE_PLUGIN_PATH . '/controllers'); define('CRED_COMMERCE_MODELS_PATH', CRED_COMMERCE_PLUGIN_PATH . '/models'); define('CRED_COMMERCE_LOGS_PATH', CRED_COMMERCE_PLUGIN_PATH . '/logs'); define('CRED_COMMERCE_PLUGINS_PATH', CRED_COMMERCE_PLUGIN_PATH . '/plugins'); // define plugin name (path) define('CRED_COMMERCE_PLUGIN_NAME', CRED_COMMERCE_PLUGIN_FOLDER . '/' . basename(__FILE__)); define('CRED_COMMERCE_PLUGIN_BASENAME', plugin_basename(__FILE__)); // load on the go resources require_once CRED_COMMERCE_PLUGIN_PATH . '/onthego-resources/loader.php'; onthego_initialize(CRED_COMMERCE_PLUGIN_PATH . '/onthego-resources', CRED_COMMERCE_PLUGIN_URL . '/onthego-resources/'); //define('CRED_COMMERCE_DEBUG',true); //define('CRED_COMMERCE_DEV',true); function cred_commerce_activated() { add_option('cred_commerce_activated', '1'); } register_activation_hook(__FILE__, 'cred_commerce_activated'); include CRED_COMMERCE_PLUGIN_PATH . '/loader.php'; CREDC_Loader::load('CLASS/CRED_Commerce'); CRED_Commerce::init();
define('TACCESS_ASSETS_URL', TACCESS_PLUGIN_URL . '/assets'); define('TACCESS_ASSETS_PATH', TACCESS_PLUGIN_PATH . '/assets'); define('TACCESS_INCLUDES_PATH', TACCESS_PLUGIN_PATH . '/includes'); define('TACCESS_TEMPLATES_PATH', TACCESS_PLUGIN_PATH . '/templates'); define('TACCESS_LOGS_PATH', TACCESS_PLUGIN_PATH . '/logs'); define('TACCESS_LOCALE_PATH', TACCESS_PLUGIN_FOLDER . '/locale'); // backwards compatibility define('WPCF_ACCESS_VERSION', TACCESS_VERSION); // rename these, because conflicts define('WPCF_ACCESS_ABSPATH_', TACCESS_PLUGIN_PATH); define('WPCF_ACCESS_RELPATH_', TACCESS_PLUGIN_URL); define('WPCF_ACCESS_INC_', TACCESS_INCLUDES_PATH); // for WPML define('TACCESS_WPML_STRING_CONTEXT', 'Types_Access'); require TACCESS_ASSETS_PATH . '/onthego-resources/loader.php'; onthego_initialize(TACCESS_ASSETS_PATH . '/onthego-resources', TACCESS_ASSETS_URL . '/onthego-resources/'); // our global object global $wpcf_access; // logging function if (!function_exists('taccess_log')) { if (defined('TACCESS_DEBUG') && TACCESS_DEBUG) { function taccess_log($message, $file = null, $level = 1) { // check if we need to log.. if (!defined('TACCESS_DEBUG') || !TACCESS_DEBUG) { return false; } // full path to log file if ($file == null) { $file = 'debug.log'; }
if (!defined('WPTOOLSET_COMMON_PATH')) { define('WPTOOLSET_COMMON_PATH', CRED_PLUGIN_PATH . '/toolset/toolset-common'); } // include loader include CRED_PLUGIN_PATH . '/loader.php'; if (function_exists('plugins_url')) { define('CRED_PLUGIN_URL', plugins_url() . '/' . CRED_PLUGIN_FOLDER); } else { // determine plugin url manually, as robustly as possible define('CRED_PLUGIN_URL', CRED_Loader::getFileUrl(CRED_FILE_PATH)); } define('CRED_FILE_URL', CRED_PLUGIN_URL . '/' . CRED_FILE_NAME); define('CRED_ASSETS_URL', CRED_PLUGIN_URL . '/assets'); // load on the go resources require_once CRED_PLUGIN_PATH . '/toolset/onthego-resources/loader.php'; onthego_initialize(CRED_PLUGIN_PATH . '/toolset/onthego-resources/', CRED_PLUGIN_URL . '/toolset/onthego-resources/'); // whether to try to load assets in concatenated form, much faster // tested on single site/multisite subdomains/multisite subfolders if (!defined('CRED_CONCAT_ASSETS')) { define('CRED_CONCAT_ASSETS', false); } // I've disabled this as it was causing compatibility issues with font-awesome in Views 1.3 // enable CRED_DEBUG, on top of this file /* cred_log($_SERVER); cred_log(CRED_Loader::getDocRoot()); cred_log(CRED_Loader::getBaseUrl()); cred_log(CRED_PLUGIN_URL); */ // register assets CRED_Loader::add('assets', array('SCRIPT' => array('cred_console_polyfill' => array('loader_url' => CRED_FILE_URL, 'loader_path' => CRED_FILE_PATH, 'version' => CRED_FE_VERSION, 'dependencies' => null, 'path' => CRED_ASSETS_URL . '/common/js/console_polyfill.js', 'src' => CRED_ASSETS_PATH . '/common/js/console_polyfill.js'), 'cred_template_script' => array('loader_url' => CRED_FILE_URL, 'loader_path' => CRED_FILE_PATH, 'version' => CRED_FE_VERSION, 'dependencies' => array('jquery', 'jquery-ui-sortable', 'jquery-ui-dialog', 'wp-pointer'), 'path' => CRED_ASSETS_URL . '/common/js/gui.js', 'src' => CRED_ASSETS_PATH . '/common/js/gui.js'), 'cred_codemirror_dev' => array('loader_url' => CRED_FILE_URL, 'loader_path' => CRED_FILE_PATH, 'version' => CRED_FE_VERSION, 'dependencies' => null, 'path' => CRED_ASSETS_URL . '/third-party/codemirror.js', 'src' => CRED_ASSETS_PATH . '/third-party/codemirror.js'), 'cred_extra' => array('loader_url' => CRED_FILE_URL, 'loader_path' => CRED_FILE_PATH, 'version' => CRED_FE_VERSION, 'dependencies' => array('jquery', 'jquery-effects-scale'), 'path' => CRED_ASSETS_URL . '/common/js/extra.js', 'src' => CRED_ASSETS_PATH . '/common/js/extra.js'), 'cred_utils' => array('loader_url' => CRED_FILE_URL, 'loader_path' => CRED_FILE_PATH, 'version' => CRED_FE_VERSION, 'dependencies' => array('jquery', 'cred_extra'), 'path' => CRED_ASSETS_URL . '/common/js/utils.js', 'src' => CRED_ASSETS_PATH . '/common/js/utils.js'), 'cred_gui' => array('loader_url' => CRED_FILE_URL, 'loader_path' => CRED_FILE_PATH, 'version' => CRED_FE_VERSION, 'dependencies' => array('jquery', 'jquery-ui-dialog', 'wp-pointer'), 'path' => CRED_ASSETS_URL . '/common/js/gui.js', 'src' => CRED_ASSETS_PATH . '/common/js/gui.js'), 'cred_mvc' => array('loader_url' => CRED_FILE_URL, 'loader_path' => CRED_FILE_PATH, 'version' => CRED_FE_VERSION, 'dependencies' => array('jquery'), 'path' => CRED_ASSETS_URL . '/common/js/mvc.js', 'src' => CRED_ASSETS_PATH . '/common/js/mvc.js'), 'cred_cred_dev' => array('loader_url' => CRED_FILE_URL, 'loader_path' => CRED_FILE_PATH, 'version' => CRED_FE_VERSION, 'dependencies' => array('jquery', 'underscore', 'cred_console_polyfill', 'cred_codemirror_dev', 'cred_extra', 'cred_utils', 'cred_gui', 'cred_mvc'), 'path' => CRED_ASSETS_URL . '/js/cred.js', 'src' => CRED_ASSETS_PATH . '/js/cred.js'), 'cred_cred_nocodemirror_dev' => array('loader_url' => CRED_FILE_URL, 'loader_path' => CRED_FILE_PATH, 'version' => CRED_FE_VERSION, 'dependencies' => array('jquery', 'underscore', 'cred_console_polyfill', 'cred_extra', 'cred_utils', 'cred_gui', 'cred_mvc'), 'path' => CRED_ASSETS_URL . '/js/cred.js', 'src' => CRED_ASSETS_PATH . '/js/cred.js'), 'cred_cred_post_dev' => array('loader_url' => CRED_FILE_URL, 'loader_path' => CRED_FILE_PATH, 'version' => CRED_FE_VERSION, 'dependencies' => array('jquery', 'cred_console_polyfill', 'cred_extra', 'cred_utils', 'cred_gui'), 'path' => CRED_ASSETS_URL . '/js/post.js', 'src' => CRED_ASSETS_PATH . '/js/post.js'), 'cred_cred_nocodemirror' => array('loader_url' => CRED_FILE_URL, 'loader_path' => CRED_FILE_PATH, 'version' => CRED_FE_VERSION, 'dependencies' => array('jquery', 'underscore', 'jquery-ui-dialog', 'wp-pointer', 'jquery-effects-scale', 'cred_extra', 'cred_utils', 'cred_gui', 'cred_mvc'), 'path' => CRED_ASSETS_URL . '/js/cred.js', 'src' => CRED_ASSETS_PATH . '/js/cred.js'), 'cred_wizard_dev' => array('loader_url' => CRED_FILE_URL, 'loader_path' => CRED_FILE_PATH, 'version' => CRED_FE_VERSION, 'dependencies' => array('cred_cred_dev'), 'path' => CRED_ASSETS_URL . '/js/wizard.js', 'src' => CRED_ASSETS_PATH . '/js/wizard.js')), 'STYLE' => array('cred_template_style' => array('loader_url' => CRED_FILE_URL, 'loader_path' => CRED_FILE_PATH, 'version' => CRED_FE_VERSION, 'dependencies' => array('wp-admin', 'colors-fresh', 'toolset-font-awesome', 'cred_cred_style_nocodemirror_dev'), 'path' => CRED_ASSETS_URL . '/css/gfields.css', 'src' => CRED_ASSETS_PATH . '/css/gfields.css'), 'cred_codemirror_style_dev' => array('loader_url' => CRED_FILE_URL, 'loader_path' => CRED_FILE_PATH, 'version' => CRED_FE_VERSION, 'dependencies' => null, 'path' => CRED_ASSETS_URL . '/third-party/codemirror.css', 'src' => CRED_ASSETS_PATH . '/third-party/codemirror.css'), 'toolset-font-awesome' => array('loader_url' => CRED_FILE_URL, 'loader_path' => CRED_FILE_PATH, 'version' => CRED_FE_VERSION, 'dependencies' => null, 'path' => CRED_ASSETS_URL . '/common/css/font-awesome.min.css', 'src' => CRED_ASSETS_PATH . '/common/css/font-awesome.min.css'), 'cred_cred_style_dev' => array('loader_url' => CRED_FILE_URL, 'loader_path' => CRED_FILE_PATH, 'version' => CRED_FE_VERSION, 'dependencies' => array('toolset-font-awesome', 'cred_codemirror_style_dev', 'wp-jquery-ui-dialog', 'wp-pointer'), 'path' => CRED_ASSETS_URL . '/css/cred.css', 'src' => CRED_ASSETS_PATH . '/css/cred.css'), 'cred_cred_style_nocodemirror_dev' => array('loader_url' => CRED_FILE_URL, 'loader_path' => CRED_FILE_PATH, 'version' => CRED_FE_VERSION, 'dependencies' => array('toolset-font-awesome', 'wp-jquery-ui-dialog', 'wp-pointer'), 'path' => CRED_ASSETS_URL . '/css/cred.css', 'src' => CRED_ASSETS_PATH . '/css/cred.css')))); // init loader for this specific plugin and load assets if needed CRED_Loader::init(CRED_FILE_PATH);
define('WPDDL_DEBUG', false); } //TODO: this is used for archives / loops it is better to use it only for this data. Should we rename it not to get confused.. define('WPDDL_GENERAL_OPTIONS', 'ddlayouts_options'); define('WPDDL_CSS_OPTIONS', 'layout_css_settings'); define('WPDDL_LAYOUTS_CSS', 'layout_css_styles'); define('WPDDL_LAYOUTS_META_KEY', '_layouts_template'); define('WPDDL_LAYOUTS_POST_TYPE', 'dd_layouts'); define('WPDDL_LAYOUTS_SETTINGS', 'dd_layouts_settings'); define('WPDDL_LAYOUTS_EXTRA_MODULES', WPDDL_ABSPATH . '/extra'); if (!defined('TOOLSET_EDIT_LAST')) { define('TOOLSET_EDIT_LAST', '_toolset_edit_last'); } define('DDL_ITEMS_PER_PAGE', 10); require WPDDL_ONTHEGO_RESOURCES . 'loader.php'; onthego_initialize(WPDDL_ONTHEGO_RESOURCES, WPDDL_RELPATH . '/toolset/onthego-resources/'); require_once WPDDL_INC_ABSPATH . '/constants.php'; require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'classes/wpddl.settings.class.php'; require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'classes/wpddl.admin.class.php'; if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'classes/wpddl.admin-embedded.class.php') && defined('WPDDL_EMBEDDED') && (defined('WPDDL_DEVELOPMENT') === false && defined('WPDDL_PRODUCTION') === false)) { require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'classes/wpddl.admin-embedded.class.php'; } else { if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'classes/wpddl.admin-plugin.class.php') && (defined('WPDDL_DEVELOPMENT') || defined('WPDDL_PRODUCTION'))) { require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'classes/wpddl.admin-plugin.class.php'; } } require_once WPDDL_INC_ABSPATH . '/help_links.php'; require_once WPDDL_INC_ABSPATH . '/api/ddl-features-api.php'; require_once WPDDL_TOOLSET_COMMON_ABSPATH . '/utility/utils.php'; require_once WPDDL_TOOLSET_COMMON_ABSPATH . '/WPML/wpml-string-shortcode.php'; require_once WPDDL_CLASSES_ABSPATH . '/wpddl.user-profiles.class.php';