本文整理汇总了PHP中Javelin::getInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP Javelin::getInstance方法的具体用法?PHP Javelin::getInstance怎么用?PHP Javelin::getInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Javelin
的用法示例。
在下文中一共展示了Javelin::getInstance方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: error_reporting
<?php
error_reporting(E_ALL);
include "wp-config.php";
include "wp-admin/includes/plugin.php";
$dir = getcwd();
$plugin_file = $dir . "/wp-content/plugins/wp-responder/wpresponder.php";
function run_activate_plugin($plugin)
{
$current = get_option('active_plugins');
$plugin = plugin_basename(trim($plugin));
if (!in_array($plugin, $current)) {
$current[] = $plugin;
sort($current);
do_action('activate_plugin', trim($plugin));
update_option('active_plugins', $current);
do_action('activate_' . trim($plugin));
do_action('activated_plugin', trim($plugin));
}
return null;
}
run_activate_plugin($plugin_file);
include $plugin_file;
Javelin::getInstance()->install();
示例2: isAdminPage
}
private function isAdminPage()
{
return is_admin() && Routing::isWPRAdminPage() && !Routing::whetherLegacyURL($_GET['page']) || _wpr_actions_page();
}
private function enqueueAdminScripts()
{
wp_enqueue_style("wpresponder-tabber", get_bloginfo("wpurl") . "/?wpr-file=tabber.css");
wp_enqueue_style("wpr-jquery-ui");
wp_enqueue_script("wpresponder-tabber");
wp_enqueue_script("wpresponder-scripts");
wp_enqueue_script("wpresponder-ckeditor");
wp_enqueue_script("jquery");
}
}
register_activation_hook(__FILE__, array(Javelin::getInstance(), 'install'));
function no_address_error()
{
?>
<div class="error fade"><p><strong>You must set your address in the <a href="<?php
echo admin_url('admin.php?page=_wpr/settings');
?>
"> newsletter settings page</a>.</strong></p></div><?php
}
function _wpr_admin_enqueue_less()
{
?>
<link rel="stylesheet/less" type="text/css" href="<?php
echo get_bloginfo('wpurl');
?>
/?wpr-file=admin-ui.less"/>