Skip to content

Instantly share code, notes, and snippets.

@ThatGuySam
Last active July 28, 2022 21:26
Show Gist options
  • Select an option

  • Save ThatGuySam/d4754b3d207c866c48fda6aec8c93aeb to your computer and use it in GitHub Desktop.

Select an option

Save ThatGuySam/d4754b3d207c866c48fda6aec8c93aeb to your computer and use it in GitHub Desktop.

Revisions

  1. ThatGuySam renamed this gist Jul 28, 2022. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. ThatGuySam revised this gist Jul 28, 2022. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions wp-env-color-scheme
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,9 @@
    <?php

    // Force Color Scheme for environments
    // so that you're less likely to accidentally
    // make a DEV update to a Production WordPress
    // instance.
    add_filter( 'get_user_option_admin_color', 'update_user_option_admin_color', 5 );
    function update_user_option_admin_color( $color_scheme ) {
    if (defined('WP_LOCAL_DEV') && WP_LOCAL_DEV) return 'ocean';
  3. ThatGuySam created this gist Sep 4, 2019.
    9 changes: 9 additions & 0 deletions wp-env-color-scheme
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    <?php

    // Force Color Scheme for environments
    add_filter( 'get_user_option_admin_color', 'update_user_option_admin_color', 5 );
    function update_user_option_admin_color( $color_scheme ) {
    if (defined('WP_LOCAL_DEV') && WP_LOCAL_DEV) return 'ocean';

    return 'default';
    }