本文整理汇总了PHP中wpl_global::domain方法的典型用法代码示例。如果您正苦于以下问题:PHP wpl_global::domain方法的具体用法?PHP wpl_global::domain怎么用?PHP wpl_global::domain使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wpl_global
的用法示例。
在下文中一共展示了wpl_global::domain方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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);
}
示例2: get_sender
/**
* Get notification sender
* @author Howard R <howard@realtyna.com>
* @static
* @return array|string
*/
public static function get_sender()
{
$wpl_sender_email = wpl_global::get_setting('wpl_sender_email');
$wpl_sender_name = wpl_global::get_setting('wpl_sender_name');
if (trim($wpl_sender_email) == '') {
$domain = wpl_global::domain(wpl_global::get_full_url());
$wpl_sender_email = 'info@' . $domain;
}
if (trim($wpl_sender_name) == '') {
return $wpl_sender_email;
} else {
return array($wpl_sender_name, $wpl_sender_email);
}
}