本文整理汇总了PHP中wpl_global::wpl_version方法的典型用法代码示例。如果您正苦于以下问题:PHP wpl_global::wpl_version方法的具体用法?PHP wpl_global::wpl_version怎么用?PHP wpl_global::wpl_version使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wpl_global
的用法示例。
在下文中一共展示了wpl_global::wpl_version方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _wpl_import
_wpl_import($this->tpl_path . '.scripts.js');
_wpl_import('libraries.activities');
?>
<div class="wrap wpl-wp wpl-dashboard-wp">
<header>
<div class="wpl-icon-header wpl-icon-dashboard"></div>
<h2>
<?php
echo __('WPL', WPL_TEXTDOMAIN);
?>
<?php
echo wpl_global::check_addon('pro') ? 'PRO' : 'Basic';
?>
<span class="wpl-dashboard-ver">v<?php
echo wpl_global::wpl_version();
?>
</span>
</h2>
</header>
<div id="dashboard-links-wp">
<ul>
<?php
foreach ($this->submenus as $submenu) {
?>
<li class="link-<?php
echo $submenu->id;
?>
">
<a href="<?php
示例2: upgrade_wpl
/**
* Running necesarry queries and functions for upgrading
* @author Howard <howard@realtyna.com>
* @return void
*/
public function upgrade_wpl()
{
if (wpl_folder::exists(WPL_ABSPATH . 'assets' . DS . 'upgrade' . DS . 'files')) {
/** copy files **/
$res = wpl_folder::copy(WPL_ABSPATH . 'assets' . DS . 'upgrade' . DS . 'files', ABSPATH, '', true);
/** delete files **/
wpl_folder::delete(WPL_ABSPATH . 'assets' . DS . 'upgrade' . DS . 'files');
}
/** run queries **/
$query_file = WPL_ABSPATH . 'assets' . DS . 'upgrade' . DS . 'queries.sql';
if (wpl_file::exists($query_file)) {
$queries = wpl_file::read($query_file);
$queries = str_replace(";\r\n", "-=++=-", $queries);
$queries = str_replace(";\r", "-=++=-", $queries);
$queries = str_replace(";\n", "-=++=-", $queries);
$sqls = explode("-=++=-", $queries);
if (function_exists('is_multisite') and is_multisite() and wpl_global::check_addon('multisite')) {
$original_blog_id = wpl_global::get_current_blog_id();
// Get all blogs
$blogs = wpl_db::select("SELECT `blog_id` FROM `#__blogs`", 'loadColumn');
foreach ($blogs as $blog) {
if (!isset($blog->blog_id)) {
continue;
}
switch_to_blog($blog->blog_id);
foreach ($sqls as $sql) {
try {
wpl_db::q($sql);
} catch (Exception $e) {
}
}
}
/** delete query file **/
wpl_file::delete($query_file);
switch_to_blog($original_blog_id);
} else {
foreach ($sqls as $sql) {
try {
wpl_db::q($sql);
} catch (Exception $e) {
}
}
/** delete query file **/
wpl_file::delete($query_file);
}
}
/** run script **/
$script_file = WPL_ABSPATH . 'assets' . DS . 'upgrade' . DS . 'script.php';
if (wpl_file::exists($script_file)) {
include $script_file;
/** delete script file **/
wpl_file::delete($script_file);
}
/** update WPL version in db **/
update_option('wpl_version', wpl_global::wpl_version());
}
示例3: check_realtyna_credentials
/**
* Checks Realtyna billing credentials
* @author Howard <howard@realtyna.com>
* @static
* @return array
*/
public static function check_realtyna_credentials()
{
/** import settings library **/
_wpl_import('libraries.settings');
$current_url = wpl_global::get_full_url();
$domain = wpl_global::domain($current_url);
$settings = wpl_global::get_settings();
$phpver = phpversion();
$wplversion = wpl_global::wpl_version();
$wpversion = wpl_global::wp_version();
$username = $settings['realtyna_username'];
$password = $settings['realtyna_password'];
$POST = array('domain' => $domain, 'wpversion' => $wpversion, 'wplversion' => $wplversion, 'phpver' => $phpver, 'username' => urlencode($username), 'password' => urlencode($password), 'command' => 'check_credentials', 'format' => 'json');
$io_handler = 'http://billing.realtyna.com/io/io.php';
$result = wpl_global::get_web_page($io_handler, $POST);
$answer = json_decode($result, true);
/** saving status **/
$status = isset($answer['status']) ? $answer['status'] : 0;
wpl_settings::save_setting('realtyna_verified', $status, 1);
$message = $status ? __('Credentials verified.', WPL_TEXTDOMAIN) : __('Invalid credentials!', WPL_TEXTDOMAIN);
$success = 1;
return array('success' => $success, 'message' => $message, 'status' => $status);
}