
內容簡介
使用F4 Simple White Label,您可以更改登錄圖像、在管理員條中添加自定義徽標以及更改管理員頁腳文字。
目前,這只能通過一些易於使用的鉤子來實現。我們計劃在 WordPress 後端添加選項頁面,以便您可以在不使用任何代碼的情況下更改以上所有內容。
使用方法
您可以將以下鉤子添加到您的佈景主題的 functions.php 中。
將favicon添加到登錄頁面和後端:
add_filter('F4/SWL/admin_favicon', function() {
return 'url-to-your-favicon.ico';
});
更改登錄頁面圖像:
add_filter('F4/SWL/login_image', function() {
return 'url-to-your-login-image.png';
});
您還可以像這樣更改 href、link 文本、圖像 alt 文本:
add_filter('F4/SWL/login_image_href', function() {
return 'https://www.f4dev.ch';
});
add_filter('F4/SWL/login_image_link_text', function() {
return '此 WordPress 由 FAKTOR VIER 提供動力';
});
add_filter('F4/SWL/login_image_alt', function() {
return 'FAKTOR VIER 徽標';
});
如果需要,您可以像這樣添加自定義內嵌樣式到圖像中:
add_filter('F4/SWL/login_image_style', function() {
return 'width: 50px; height: 50px;';
});
在管理員條中添加自定義徽標:
add_filter('F4/SWL/admin_bar_logo', function() {
return 'url-to-your-admin-bar-logo.png';
});
您還可以像這樣更改 href、徽標 alt 文本:
add_filter('F4/SWL/admin_bar_logo_href', function() {
return 'https://www.f4dev.ch';
});
add_filter('F4/SWL/admin_bar_logo_alt', function() {
return 'FAKTOR VIER 徽標';
});
如果需要,您可以像這樣添加自定義內嵌樣式到徽標中:
add_filter('F4/SWL/admin_bar_logo_style', function() {
return 'height: 20px; margin: 8px 0;';
});
如果您有使用淺色主題的用戶,您可以為其定義不同的徽標。如果您不使用此鉤子,則在所有主題中都使用 admin_bar_logo 徽標:
add_filter('F4/SWL/admin_bar_logo_light', function() {
return 'url-to-your-admin-bar-logo-light.png';
});
更改後端頁腳文字:
add_filter('F4/SWL/admin_footer_text', function() {
return '<span id="footer-thankyou">感謝您使用 WordPress。</span>';
});
add_filter('F4/SWL/admin_footer_update_text', function() {
return '版本 5.3';
});
功能概述
將favicon添加到登錄頁面和後端
更改登錄頁面圖像
在管理員條中添加自定義徽標
更改後端頁腳文字
易於使用
輕巧且優化
100%免費!
計劃功能
在 WordPress 後端中配置所有內容,無需代碼
外掛標籤
開發者團隊
原文外掛簡介
With F4 Simple White Label you can change the login image, add a custom logo to the admin bar and change the admin footer texts.
Currently this is only possible with a few easy to use hooks. We plan to add an options page to the WordPress backend, so you can change all the above mentioned without using a single line of code.
Usage
You can add the following hooks to the functions.php of your theme.
Add favicon to login page and backend:
add_filter('F4/SWL/admin_favicon', function() {
return 'url-to-your-favicon.ico';
});
Change the login page image:
add_filter('F4/SWL/login_image', function() {
return 'url-to-your-login-image.png';
});
You can also change the href, link text, image alt text like this:
add_filter('F4/SWL/login_image_href', function() {
return 'https://www.f4dev.ch';
});
add_filter('F4/SWL/login_image_link_text', function() {
return 'This WordPress is powered by FAKTOR VIER';
});
add_filter('F4/SWL/login_image_alt', function() {
return 'FAKTOR VIER logo';
});
If needed you can add custom inline styles to the image:
add_filter('F4/SWL/login_image_style', function() {
return 'width:50px; height:50px;';
});
Add a custom logo to the admin bar:
add_filter('F4/SWL/admin_bar_logo', function() {
return 'url-to-your-admin-bar-logo.png';
});
You can also change the href, logo alt text like this:
add_filter('F4/SWL/admin_bar_logo_href', function() {
return 'https://www.f4dev.ch';
});
add_filter('F4/SWL/admin_bar_logo_alt', function() {
return 'FAKTOR VIER logo';
});
If needed you can add custom inline styles to the logo:
add_filter('F4/SWL/admin_bar_logo_style', function() {
return 'height:20px; margin:8px 0;';
});
If you have users that like to use the light color theme, you can define a different logo for that. If you dont use this hook, the admin_bar_logo logo us used for all themes:
add_filter('F4/SWL/admin_bar_logo_light', function() {
return 'url-to-your-admin-bar-logo-light.png';
});
Change the backend footer texts:
add_filter('F4/SWL/admin_footer_text', function() {
return '';
});
add_filter('F4/SWL/admin_footer_update_text', function() {
return 'Version 5.3';
});
Features overview
Add favicon to login page and backend
Change the login page image
Add a custom logo to the admin bar
Change the backend footer texts
Easy to use
Lightweight and optimized
100% free!
Planned features
Everything configurable in the backend without a single line of code
