使用的过程中,很多时候我们想修改WordPress后台登陆表单中的用户名标签或密码标签:
我们可以打开网站根目录,修改 wp-login.PHP 文件 或者打开翻译文件进行修改,但是当我们的wordpress网站版本升级以后,修改会被覆盖,我们需要重新修改。这篇wordpress教程里,我们就向大家介绍一种使用翻译钩子进行修改的方法。
切换到主题目录,打开 functions.PHP 文件,加入以下代码:
Crayon-5c891cdf4bc99452016419" class="Crayon-Syntax Crayon-theme-classic Crayon-font-monaco Crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouSEOver" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
Crayon-toolbar" data-settings=" mouSEOver overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">Crayon-title">functions.PHP
Crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
Crayon-button Crayon-nums-button" title="Toggle Line Numbers">
Crayon-button-icon">
Crayon-button Crayon-plain-button" title="Toggle Plain Code">
Crayon-button-icon">
Crayon-button Crayon-wrap-button" title="Toggle Line Wrap">
Crayon-button-icon">
Crayon-button Crayon-expand-button" title="Expand Code">
Crayon-button-icon">
Crayon-button Crayon-copy-button" title="Copy">
Crayon-button-icon">
Crayon-button Crayon-popup-button" title="Open Code In New Window">
Crayon-language">PHPCrayon-button-icon">
Crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
Crayon-plain-wrap">
Crayon-main" style="">Crayon-table">
Crayon-nums " data-settings="show"> Crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;"> Crayon-num" data-line="Crayon-5c891cdf4bc99452016419-1">1 Crayon-num" data-line="Crayon-5c891cdf4bc99452016419-3">3 Crayon-num" data-line="Crayon-5c891cdf4bc99452016419-5">5 Crayon-num" data-line="Crayon-5c891cdf4bc99452016419-7">7 Crayon-num" data-line="Crayon-5c891cdf4bc99452016419-9">9 Crayon-num" data-line="Crayon-5c891cdf4bc99452016419-11">11 Crayon-num" data-line="Crayon-5c891cdf4bc99452016419-13">13 Crayon-num" data-line="Crayon-5c891cdf4bc99452016419-15">15 Crayon-num" data-line="Crayon-5c891cdf4bc99452016419-17">17 | Crayon-code">