Skip to content

Commit

Permalink
See pewresearch/pewresearch-org@9470ae6 from refs/heads/release/5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
prcdevgitbot committed Feb 7, 2024
1 parent a676b81 commit 9dce46f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions includes/wp-admin/class-wp-admin.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
namespace PRC\Platform;
use WP_Error;

// For admin notices see https://github.com/Automattic/vip-go-mu-plugins/tree/develop/admin-notice
// AND https://github.com/Automattic/vip-go-mu-plugins/blob/develop/async-publish-actions.php

Expand Down Expand Up @@ -34,8 +35,7 @@ public function init($loader = null) {
// This removes the "Public Preview" next to the draft label in the WordPress admin.
remove_filter( 'display_post_states', array( 'DS_Public_Post_Preview', 'display_preview_state' ), 20 );
// This disables the VIP restriction for usernames when on local environments. Good for testing and automation.
// This disables the VIP restriction for usernames when on local environments. Good for testing and automation.
if ( wp_get_environment_type() === 'local' ) {
if ( defined('PRC_PLATFORM_TESTING_MODE') && true === PRC_PLATFORM_TESTING_MODE ) {
remove_filter( 'authenticate', 'wpcom_vip_limit_logins_for_restricted_usernames', 30 );
}

Expand All @@ -57,6 +57,11 @@ public function init($loader = null) {
}
}

/**
* Change the default admin color scheme to modern and don't allow users to change it.
* @param mixed $result
* @return string
*/
public function default_admin_color_scheme( $result ) {
$result = 'modern';
return $result;
Expand Down
Empty file.
Empty file.
Empty file.

0 comments on commit 9dce46f

Please sign in to comment.