public static function serve() { $me = new Embi_AdminPages(); /* We build an array of all the section complete with callback functions */ $me->_sections_default = array(); $me->_sections_default['my-account'] = array('active' => true, 'title' => __('My Account', 'embi'), 'callback' => array($me, 'embi_my_account_widget_section')); $me->_sections_default['this-blog'] = array('active' => true, 'title' => __('This Blog', 'embi'), 'callback' => array($me, 'embi_this_blog_widget_section')); $me->_sections_default['my-blogs'] = array('active' => true, 'title' => __('My Blogs', 'embi'), 'callback' => array($me, 'embi_my_blogs_widget_section')); $me->_sections_default['storage-space'] = array('active' => true, 'title' => __('Storage Space', 'embi'), 'callback' => array($me, 'embi_storage_section')); $me->_sections_default['pro-sites'] = array('active' => true, 'title' => __('Pro Sites', 'embi'), 'callback' => array($me, 'embi_prosites_section')); $me->_add_hooks(); }
if (defined('WP_PLUGIN_URL') && defined('WP_PLUGIN_DIR') && file_exists(WP_PLUGIN_DIR . '/' . basename(__FILE__))) { define('EMBI_PLUGIN_LOCATION', 'plugins', true); define('EMBI_PLUGIN_BASE_DIR', WP_PLUGIN_DIR, true); define('EMBI_PLUGIN_URL', WP_PLUGIN_URL, true); $textdomain_handler = 'load_plugin_textdomain'; } else { // No textdomain is loaded because we can't determine the plugin location. // No point in trying to add textdomain to string and/or localizing it. wp_die(__('There was an issue determining where Post Voting plugin is installed. Please reinstall.')); } } } $textdomain_handler('embi', false, EMBI_PLUGIN_SELF_DIRNAME . '/languages/'); require_once EMBI_PLUGIN_BASE_DIR . '/lib/class_embi_installer.php'; Embi_Installer::check(); require_once EMBI_PLUGIN_BASE_DIR . '/lib/template_tags.php'; // Widgets //require_once EMBI_PLUGIN_BASE_DIR . '/lib/class_embi_widget_name.php'; //add_action('widgets_init', create_function('', "register_widget('Embi_WidgetName');")); // ... if (is_admin()) { require_once EMBI_PLUGIN_BASE_DIR . '/lib/class_embi_admin_pages.php'; Embi_AdminPages::serve(); } /* if (!function_exists('is_supporter')) { function is_supporter () { return true; } } */