如何修改wordpress的默认登录路径 wordpress默认账号密码_python


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颜色方案。


如何修改wordpress的默认登录路径 wordpress默认账号密码_java_02


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' );


如何修改wordpress的默认登录路径 wordpress默认账号密码_java_03


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默认密码