當前位置: 首頁>>代碼示例>>PHP>>正文


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怎麽用?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;
 }
開發者ID:JDjimenezdelgado,項目名稱:old-mmexperience,代碼行數:10,代碼來源:theme_globals.php

示例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;
     }
 }
開發者ID:alikris,項目名稱:OTA,代碼行數:34,代碼來源:theme_utils.php


注:本文中的BYT_Theme_Utils::get_current_language_page_id方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。