Exemplo n.º 1
0
 /**
  * Main entry point.
  *
  * @static
  */
 function serve()
 {
     $me = new Wdpv_AdminPages();
     $me->add_hooks();
 }
Exemplo n.º 2
0
            // 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('wdpv', false, WDPV_PLUGIN_SELF_DIRNAME . '/languages/');
require_once WDPV_PLUGIN_BASE_DIR . '/lib/class_wdpv_installer.php';
Wdpv_Installer::check();
require_once WDPV_PLUGIN_BASE_DIR . '/lib/class_wdpv_options.php';
require_once WDPV_PLUGIN_BASE_DIR . '/lib/class_wdpv_model.php';
require_once WDPV_PLUGIN_BASE_DIR . '/lib/class_wdpv_codec.php';
require_once WDPV_PLUGIN_BASE_DIR . '/lib/class_wdpv_plugins_handler.php';
require_once WDPV_PLUGIN_BASE_DIR . '/lib/wdpv_template_tags.php';
Wdpv_Options::populate();
Wdpv_PluginsHandler::init();
// Widgets
require_once WDPV_PLUGIN_BASE_DIR . '/lib/class_wpdv_widget_voting.php';
add_action('widgets_init', create_function('', "register_widget('Wdpv_WidgetVoting');"));
require_once WDPV_PLUGIN_BASE_DIR . '/lib/class_wpdv_widget_popular.php';
add_action('widgets_init', create_function('', "register_widget('Wdpv_WidgetPopular');"));
require_once WDPV_PLUGIN_BASE_DIR . '/lib/class_wpdv_widget_network_popular.php';
add_action('widgets_init', create_function('', "register_widget('Wdpv_WidgetNetworkPopular');"));
if (is_admin()) {
    require_once WDPV_PLUGIN_BASE_DIR . '/lib/class_wdpv_admin_form_renderer.php';
    require_once WDPV_PLUGIN_BASE_DIR . '/lib/class_wdpv_admin_pages.php';
    Wdpv_AdminPages::serve();
} else {
    require_once WDPV_PLUGIN_BASE_DIR . '/lib/class_wdpv_public_pages.php';
    Wdpv_PublicPages::serve();
}