wordpress默认密码

One of the most talked about feature of WordPress 3.8 is the new admin interface. It is fully responsive and looks great on all devices. If you don’t like the default colors, then you can choose from 8 different admin color schemes and even add new ones. In this article, we will show you how to set a default admin color scheme in WordPress for new users. We will also show you how to prevent users from changing the default WordPress admin color scheme.

WordPress 3.8最受关注的功能之一是新的管理界面。 它具有充分的响应能力,在所有设备上看起来都很棒。 如果您不喜欢默认颜色,则可以从8种不同的管理配色方案中进行选择 ,甚至可以添加新的。 在本文中,我们将向您展示如何在WordPress中为新用户设置默认的管理员配色方案。 我们还将向您展示如何防止用户更改默认的WordPress admin颜色方案。

In order to set a default WordPress admin color scheme for new users, all you need to do is add the following code in your theme’s functions.php file or in a site-specific plugin:

为了为新用户设置默认的WordPress admin颜色方案,您需要做的就是在主题的functions.php文件或特定于站点的插件中添加以下代码:


function set_default_admin_color($user_id) {
$args = array(
'ID' => $user_id,
'admin_color' => 'sunrise'
);
wp_update_user( $args );
}
add_action('user_register', 'set_default_admin_color');

This code changes the default WordPress admin color scheme to Sunrise for each new user who registers on your site. It does not change the color scheme for previously registered users. Also, this code will not stop users from choosing another admin color scheme. Users can still go to their profile section and choose any other color scheme they like.

对于每个在您的网站上注册的新用户,此代码将默认的WordPress admin配色方案更改为Sunrise。 它不会更改先前注册用户的配色方案。 另外,此代码不会阻止用户选择其他管理员配色方案。 用户仍然可以转到其个人资料部分,并选择他们喜欢的任何其他配色方案。

如何阻止用户切换管理员配色方案 (How to Stop Users From Switching Admin Color Schemes)

If you would like to set a default color scheme for your site and do not want users to use any other color scheme, then all you have to do is add the following code in your theme’s functions.php file or in a site-specific plugin:

如果您想为网站设置默认的配色方案,并且不希望用户使用任何其他配色方案,那么您要做的就是在主题的functions.php文件或特定于站点的插件中添加以下代码:


if ( !current_user_can('manage_options') )
remove_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' );

This code will remove the admin color scheme picker from the profile screen of all users except users with administrator privileges.

此代码将从具有管理员权限的用户之外的所有用户的配置文件屏幕中删除管理颜色方案选择器。

We hope this article helped you set a default WordPress admin color scheme and disable the color scheme picker from user profiles on your WordPress site.

我们希望本文能帮助您设置默认的WordPress管理员配色方案,并在WordPress网站上的用户个人资料中禁用配色方案选择器。

If you could change the default admin color scheme, which color scheme would you pick? Let us know by leaving a comment below.

如果您可以更改默认的管理员配色方案,那么您会选择哪种配色方案? 让我们在下面留下评论。

翻译自: https://www.wpbeginner.com/wp-tutorials/how-to-set-default-admin-color-scheme-for-new-users-in-wordpress/

wordpress默认密码

wordpress默认密码_如何在WordPress中为新用户设置默认管理员配色方案相关推荐

  1. 如何在mysql中创建连接_如何在MySQL中创建新用户并开启远程连接访问?

    如何在MySQL中创建新用户并开启远程连接访问? 发布时间:2020-05-21 14:55:19 来源:亿速云 阅读:176 作者:鸽子 下面由mysql教程给大家介绍MySQL创建新用户并开启远程 ...

  2. 如何在MySQL中创建新用户并授予权限

    原作者:Etel Sverdlov  转载&翻译来源:https://www.digitalocean.com/community/tutorials/how-to-create-a-new- ...

  3. 如何在Windows中创建新用户?

    在Windows 8和10中创建用户 打开控制面板. 单击" 用户帐户". 点击管理其他帐户. 在窗口底部附近,单击" 在PC设置中添加新用户". 单击+以添加 ...

  4. select html默认选中的值,HTML/jquery中的select标签设置默认选中取值

    一.jQuery中的select标签设置默认选中取值 每一次操作select的时候,总是要出来翻一下资料,不如自己总结一下,以后就翻这里了. 比如 1.设置value为pxx的项选中 $(" ...

  5. wordpress添加媒体_如何在WordPress中添加新帖子并利用所有功能

    wordpress添加媒体 Are you trying to create a new post in WordPress? Do you want to learn about all the W ...

  6. wordpress添加媒体_如何在WordPress中添加电子书下载

    wordpress添加媒体 Do you want to add ebook downloads to your WordPress site? WordPress makes it easy for ...

  7. wordpress图像大小_如何在WordPress中添加图像积分(逐步操作)

    wordpress图像大小 Recently, some of our readers asked us about how to properly add image credits in Word ...

  8. wordpress添加媒体_如何在WordPress中添加jQuery FAQ手风琴

    wordpress添加媒体 Recently one of our users asked us if there was a way for them to add a FAQ accordion ...

  9. wordpress添加媒体_如何在WordPress中添加精选内容滑块

    wordpress添加媒体 Do you want to add a featured content slider like Yahoo or ESPN? Many popular sites us ...

最新文章

  1. java对象深入理解
  2. 推荐一个十分好看的开源博客系统
  3. Spring面试题和答案
  4. linux fedora35让GRUB 2记住上一次启动的操作系统
  5. puppeteer api_使用Node.js和Puppeteer API生成PDF文件
  6. 机器学习复制粘贴笔记要点
  7. LeetCode 133. 克隆图(图的BFS/DFS)
  8. js if判断多个条件_五、if 条件判断
  9. ACOUG 联合创始人盖国强:万象更新,数据库技术和生态的发展演进
  10. c++删除数组中重复元素_leetcode 数组中重复的数字
  11. Error:Execution failed for task ‘:app:preDebugAndroidTestBuild’. Conflict with dependency ‘com.andr
  12. java 合并两个音频_如何利用音乐合成软件将多段音频合并为一段?快速合并音频的方法...
  13. 白杨SEO:推广与运营有什么区别和相同?推广如何转运营?
  14. python 定时器、每天凌晨3点执行方法_python 定时器,实现每天凌晨3点执行的方法...
  15. jQuery实现图片点击放大缩小(小案例)
  16. ffmpeg js转换音频_微信FFMPEG 扩展转换音频格式
  17. 关于c语言的聊天图片不用打字搞笑,不用打字就可聊天图片大全 不用打字早上好表情包...
  18. WordCount 案例
  19. 51单片机静态数码管原理及代码
  20. 一文彻底搞懂extern用法

热门文章

  1. python定义一个整数变量a_第二篇.1、python基础之数据类型与变量
  2. C语言 全字母句,全字母句 SDUT
  3. CSW博客《数字黄金》
  4. css3悬停按钮发光遮罩动画js特效
  5. 狂野飙车9显示无法连接服务器,狂野飙车9:竞速传奇无法连接服务器如何解决...
  6. 史上最详细的Android Studio系列教程(一)--下载和安装
  7. 关于Iplat4J平台原型绘制
  8. Deeplung:深度学习项目笔记(二)——医学影像学dicom,mhd及raw文件读取与可视化
  9. Vue3电影中后台开发纪实(九):项目简历与面试
  10. Bootstrap系列之文本(Text)