function _p2p_load() { if (!function_exists('p2p_register_connection_type')) { require_once RTBIZ_PATH . 'vendor/scribu/lib-posts-to-posts/autoload.php'; } P2P_Storage::init(); P2P_Query_Post::init(); P2P_Query_User::init(); P2P_URL_Query::init(); P2P_Widget::init(); P2P_Shortcodes::init(); if (is_admin()) { $this->_load_admin(); } }
function _p2p_load() { load_plugin_textdomain(P2P_TEXTDOMAIN, '', basename(dirname(__FILE__)) . '/lang'); if (!function_exists('p2p_register_connection_type')) { require_once dirname(__FILE__) . '/vendor/scribu/lib-posts-to-posts/autoload.php'; } P2P_Storage::init(); P2P_Query_Post::init(); P2P_Query_User::init(); P2P_URL_Query::init(); P2P_Widget::init(); P2P_Shortcodes::init(); register_uninstall_hook(__FILE__, array('P2P_Storage', 'uninstall')); if (is_admin()) { _p2p_load_admin(); } }
<?php require_once dirname(__FILE__) . '/util.php'; require_once dirname(__FILE__) . '/api.php'; require_once dirname(__FILE__) . '/autoload.php'; P2P_Autoload::register('P2P_', dirname(__FILE__)); P2P_Storage::init(); P2P_Query_Post::init(); P2P_Query_User::init(); P2P_URL_Query::init(); P2P_Widget::init(); P2P_Shortcodes::init();