/** * Entry method. * * Creates and handles the Userland interface for the Plugin. * * @access public * @static */ static function serve() { $me = new AgmUserMaps(); $me->add_hooks(); $me->model = new AgmMapModel(); }
$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 Google Maps plugin is installed. Please reinstall.')); } } } $textdomain_handler('agm_google_maps', false, AGM_PLUGIN_SELF_DIRNAME . '/languages/'); // Post Indexer (http://premium.wpmudev.org/project/post-indexer) integration define('AGM_USE_POST_INDEXER', function_exists('post_indexer_make_current'), true); require_once AGM_PLUGIN_BASE_DIR . '/lib/class_agm_map_model.php'; require_once AGM_PLUGIN_BASE_DIR . '/lib/class_agm_maps_widget.php'; require_once AGM_PLUGIN_BASE_DIR . '/lib/class_agm_plugin_installer.php'; register_activation_hook(__FILE__, array('AgmPluginInstaller', 'install')); AgmPluginInstaller::check(); add_action('widgets_init', create_function('', "register_widget('AgmMapsWidget');")); if (is_admin()) { require_once AGM_PLUGIN_BASE_DIR . '/lib/class_agm_admin_help.php'; } require_once AGM_PLUGIN_BASE_DIR . '/lib/class_agm_plugins_handler.php'; AgmPluginsHandler::init(); if (is_admin()) { require_once AGM_PLUGIN_BASE_DIR . '/lib/class_agm_admin_form_renderer.php'; require_once AGM_PLUGIN_BASE_DIR . '/lib/class_agm_admin_maps.php'; AgmAdminMaps::serve(); } else { require_once AGM_PLUGIN_BASE_DIR . '/lib/class_agm_marker_replacer.php'; require_once AGM_PLUGIN_BASE_DIR . '/lib/class_agm_user_maps.php'; AgmUserMaps::serve(); }