1. 隱藏 site-description,我們可以使用 CSS 的 display 屬性將其設置為 none:
css
.site-description {
display: none;
}
2. 隱藏WordPress 用戶登入介面的語言切換功能
PHP
add_filter( 'login_display_language_dropdown', '__return_false' ); #加入在functions.php
3. SSH ADMIN
PUTTY
sudo -i cd /volume1/@appdata/homeassistant/config vi configuration.yaml
4.聚合登录 & WordPress 修正第三方登錄無法正確跳轉 HTTP CODE 302
PHP
public function login($type){
$state = md5(uniqid(rand(), TRUE));
$_SESSION['Oauth_state'] = $state;
$keysArr = array(
"act" => "login",
"appid" => $this->appid,
"appkey" => $this->appkey,
"type" => $type,
"redirect_uri" => $this->callback,
"state" => $state
);
$login_url = $this->apiurl.'?'.http_build_query($keysArr);
// Redirect the user's browser
header("Location: $login_url");
//如果是 WordPress 環境,使用 wp_redirect 取代 header。
wp_redirect($arr['url']);
exit;
}
2024.09.21 | PCCW Modem 多撥 5隻IP