本文整理汇总了PHP中BYT_Theme_Utils::get_current_language_page_id方法的典型用法代码示例。如果您正苦于以下问题:PHP BYT_Theme_Utils::get_current_language_page_id方法的具体用法?PHP BYT_Theme_Utils::get_current_language_page_id怎么用?PHP BYT_Theme_Utils::get_current_language_page_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BYT_Theme_Utils
的用法示例。
在下文中一共展示了BYT_Theme_Utils::get_current_language_page_id方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_cart_page_url
public function get_cart_page_url()
{
$cart_page_url = '';
if (function_exists('wc_get_page_id') && BYT_Theme_Utils::is_woocommerce_active()) {
$cart_page_id = wc_get_page_id('cart');
$cart_page_id = BYT_Theme_Utils::get_current_language_page_id($cart_page_id);
$cart_page_url = get_permalink($cart_page_id);
}
return $cart_page_url;
}
示例2: resetpassword_notification
public static function resetpassword_notification($user_id)
{
$user = get_userdata($user_id);
if (!$user || !$user->user_resetpassword_key) {
return false;
}
$override_wp_login = of_get_option('override_wp_login', 0);
$reset_password_page_url_id = BYT_Theme_Utils::get_current_language_page_id(of_get_option('reset_password_page_url', ''));
$reset_password_page_url = get_permalink($reset_password_page_url_id);
if (!$reset_password_page_url || !$override_wp_login) {
$reset_password_page_url = get_home_url() . '/wp-login.php';
}
$admin_email = get_option('admin_email');
$resetpassword_url = esc_url_raw(add_query_arg(array('action' => 'resetpassword', 'user_id' => $user->ID, 'resetpassword_key' => $user->user_resetpassword_key), $reset_password_page_url));
$subject = get_bloginfo('name') . __(' - Reset Password ', 'bookyourtravel');
$body = __('To reset your password please go to the following url: ', 'bookyourtravel');
$body .= "\r\n";
$body .= $resetpassword_url;
$body .= "\r\n";
$body .= "\r\n";
$body .= __('This link will remain valid for the next 24 hours.', 'bookyourtravel');
$body .= __('In case you did not request a password reset, please ignore this email.', 'bookyourtravel');
$headers = array();
$headers[] = "MIME-Version: 1.0";
$headers[] = "Content-type: text/plain; charset=utf-8";
$headers[] = "From: " . get_bloginfo('name') . " <" . $admin_email . ">";
$headers[] = "Reply-To: " . get_bloginfo('name') . " <" . $admin_email . ">";
$headers[] = "X-Mailer: PHP/" . phpversion();
if (mail($user->user_email, $subject, $body, implode("\r\n", $headers), '-f ' . $admin_email)) {
return true;
} else {
return false;
}
}