WordPress开发教程:删除或修改后台面板的版权或版本信息

前端之家收集整理的这篇文章主要介绍了WordPress开发教程:删除或修改后台面板的版权或版本信息前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

相信很多站长朋友在使用wordpress开发网站的过程中,在对后台控制面板进行定制修改的时候,都希望删除或者修改wordpress默认的版权信息:感谢使用wordpress进行创作。下面的wordpress教程里,我们就向大家介绍一下删除或者修改wordpress后台面板版权或者版本的方法

删除修改版权信息,切换到主题目录,打开functions.PHP文件,加入以下代码

Crayon-5c891d195c0d4731672973" 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-mixed-highlight" title="Contains Mixed Languages">
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-button-icon">
Crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
Crayon-plain-wrap">
Crayon-main" style="">Crayon-table">Crayon-row">
Crayon-nums " data-settings="show">
Crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
Crayon-num" data-line="Crayon-5c891d195c0d4731672973-1">1
Crayon-num Crayon-striped-num" data-line="Crayon-5c891d195c0d4731672973-2">2
Crayon-num" data-line="Crayon-5c891d195c0d4731672973-3">3
Crayon-num Crayon-striped-num" data-line="Crayon-5c891d195c0d4731672973-4">4
Crayon-num" data-line="Crayon-5c891d195c0d4731672973-5">5
Crayon-num Crayon-striped-num" data-line="Crayon-5c891d195c0d4731672973-6">6
Crayon-code">
Crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
Crayon-line" id="Crayon-5c891d195c0d4731672973-1">Crayon-ta">PHP
Crayon-line Crayon-striped-line" id="Crayon-5c891d195c0d4731672973-2">Crayon-t">functionCrayon-h"> Crayon-e">remove_footer_adminCrayon-h"> Crayon-sy">(Crayon-sy">)Crayon-h"> Crayon-sy">{
Crayon-line" id="Crayon-5c891d195c0d4731672973-3">Crayon-h">Crayon-k ">echoCrayon-h"> Crayon-s">'这里是版权信息。'Crayon-sy">;
Crayon-line Crayon-striped-line" id="Crayon-5c891d195c0d4731672973-4">Crayon-sy">}
Crayon-line" id="Crayon-5c891d195c0d4731672973-5">Crayon-e">add_filterCrayon-sy">(Crayon-s">'admin_footer_text'Crayon-sy">,Crayon-h"> Crayon-s">'remove_footer_admin'Crayon-sy">)Crayon-sy">;
Crayon-line Crayon-striped-line" id="Crayon-5c891d195c0d4731672973-6">

删除或者修改版本信息,切换到主题目录,打开functions.PHP文件,加入以下代码

Crayon-5c891d195c0de783289385" 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-mixed-highlight" title="Contains Mixed Languages">
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-button-icon">
Crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
Crayon-plain-wrap">
Crayon-main" style="">Crayon-table">Crayon-row">
Crayon-nums " data-settings="show">
Crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
Crayon-num" data-line="Crayon-5c891d195c0de783289385-1">1
Crayon-num Crayon-striped-num" data-line="Crayon-5c891d195c0de783289385-2">2
Crayon-num" data-line="Crayon-5c891d195c0de783289385-3">3
Crayon-num Crayon-striped-num" data-line="Crayon-5c891d195c0de783289385-4">4
Crayon-num" data-line="Crayon-5c891d195c0de783289385-5">5
Crayon-num Crayon-striped-num" data-line="Crayon-5c891d195c0de783289385-6">6
Crayon-num" data-line="Crayon-5c891d195c0de783289385-7">7
Crayon-code">
Crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
Crayon-line" id="Crayon-5c891d195c0de783289385-1">Crayon-ta">PHP
Crayon-line Crayon-striped-line" id="Crayon-5c891d195c0de783289385-2">Crayon-t">functionCrayon-h"> Crayon-e">my_footer_shhCrayon-sy">(Crayon-sy">)Crayon-h"> Crayon-sy">{
Crayon-line" id="Crayon-5c891d195c0de783289385-3">Crayon-h">Crayon-e">remove_filterCrayon-sy">(Crayon-h"> Crayon-s">'update_footer'Crayon-sy">,Crayon-h"> Crayon-s">'core_update_footer'Crayon-h"> Crayon-sy">)Crayon-sy">;Crayon-h">
Crayon-line Crayon-striped-line" id="Crayon-5c891d195c0de783289385-4">Crayon-sy">}
Crayon-line" id="Crayon-5c891d195c0de783289385-5">
Crayon-line Crayon-striped-line" id="Crayon-5c891d195c0de783289385-6">Crayon-e">add_actionCrayon-sy">(Crayon-h"> Crayon-s">'admin_menu'Crayon-sy">,Crayon-h"> Crayon-s">'my_footer_shh'Crayon-h"> Crayon-sy">)Crayon-sy">;
Crayon-line" id="Crayon-5c891d195c0de783289385-7">

如果只想让管理员后台看到wordpress版权信息,而不想让其他角色的用户后台查看到wordpress的版本信息,可以修改上面的代码为:

Crayon-5c891d195c0df603881865" 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-mixed-highlight" title="Contains Mixed Languages">
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-button-icon">
Crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
Crayon-plain-wrap">
Crayon-main" style="">Crayon-table">Crayon-row">
Crayon-nums " data-settings="show">
Crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
Crayon-num" data-line="Crayon-5c891d195c0df603881865-1">1
Crayon-num Crayon-striped-num" data-line="Crayon-5c891d195c0df603881865-2">2
Crayon-num" data-line="Crayon-5c891d195c0df603881865-3">3
Crayon-num Crayon-striped-num" data-line="Crayon-5c891d195c0df603881865-4">4
Crayon-num" data-line="Crayon-5c891d195c0df603881865-5">5
Crayon-num Crayon-striped-num" data-line="Crayon-5c891d195c0df603881865-6">6
Crayon-num" data-line="Crayon-5c891d195c0df603881865-7">7
Crayon-num Crayon-striped-num" data-line="Crayon-5c891d195c0df603881865-8">8
Crayon-code">
Crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
Crayon-line" id="Crayon-5c891d195c0df603881865-1">Crayon-ta">PHPCrayon-h">
Crayon-line Crayon-striped-line" id="Crayon-5c891d195c0df603881865-2">Crayon-t">functionCrayon-h"> Crayon-e">my_footer_shhCrayon-sy">(Crayon-sy">)Crayon-h"> Crayon-sy">{
Crayon-line" id="Crayon-5c891d195c0df603881865-3">Crayon-h">Crayon-st">ifCrayon-h"> Crayon-sy">(Crayon-h"> Crayon-o">!Crayon-h"> Crayon-e">current_user_canCrayon-sy">(Crayon-s">'manage_options'Crayon-sy">)Crayon-h"> Crayon-sy">)Crayon-h"> Crayon-sy">{Crayon-h"> Crayon-c">// 'update_core' may be more appropriate
Crayon-line Crayon-striped-line" id="Crayon-5c891d195c0df603881865-4">Crayon-h">Crayon-e">remove_filterCrayon-sy">(Crayon-h"> Crayon-s">'update_footer'Crayon-sy">,Crayon-h"> Crayon-s">'core_update_footer'Crayon-h"> Crayon-sy">)Crayon-sy">;Crayon-h">
Crayon-line" id="Crayon-5c891d195c0df603881865-5">Crayon-h">Crayon-sy">}
Crayon-line Crayon-striped-line" id="Crayon-5c891d195c0df603881865-6">Crayon-sy">}
Crayon-line" id="Crayon-5c891d195c0df603881865-7">Crayon-e">add_actionCrayon-sy">(Crayon-h"> Crayon-s">'admin_menu'Crayon-sy">,Crayon-h"> Crayon-s">'my_footer_shh'Crayon-h"> Crayon-sy">)Crayon-sy">;
Crayon-line Crayon-striped-line" id="Crayon-5c891d195c0df603881865-8">

原文链接:https://www.f2er.com/wordpress/238457.html

猜你在找的wordpress相关文章