Skip to content

Instantly share code, notes, and snippets.

@pento
Last active September 26, 2017 21:20
Show Gist options
  • Select an option

  • Save pento/bc4574b8eb0f4500efbeb75ec7d8630c to your computer and use it in GitHub Desktop.

Select an option

Save pento/bc4574b8eb0f4500efbeb75ec7d8630c to your computer and use it in GitHub Desktop.

Revisions

  1. pento revised this gist Sep 4, 2017. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions rainbow-bar.php
    Original file line number Diff line number Diff line change
    @@ -31,8 +31,7 @@ function rainbow_bar() {
    box-shadow: unset;
    }

    #wpadminbar #wp-admin-bar-root-default > li > a,
    #wpadminbar #wp-admin-bar-top-secondary > li {
    #wpadminbar .ab-top-menu > li > a {
    background-color: rgba( 50, 55, 60, .85 );
    }
    </style>
  2. pento created this gist Sep 4, 2017.
    41 changes: 41 additions & 0 deletions rainbow-bar.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,41 @@
    <?php

    /*
    * Plugin Name: Rainbow Bar!
    */

    function rainbow_bar() {
    ?>
    <style type="text/css">
    #wpadminbar {
    background: linear-gradient(
    to bottom,
    #e24c3e 0%,
    #e24c3e 16.66667%,
    #f47d3b 16.66667%,
    #f47d3b 33.33333%,
    #fdb813 33.33333%,
    #fdb813 50%,
    #74bb5d 50%,
    #74bb5d 66.66667%,
    #38a6d7 66.66667%,
    #38a6d7 83.33333%,
    #8c7ab8 83.33333%,
    #8c7ab8 100% );
    }

    #wpadminbar,
    #wpadminbar .quicklinks > ul > li {
    -webkit-box-shadow: unset;
    -moz-box-shadow: unset;
    box-shadow: unset;
    }

    #wpadminbar #wp-admin-bar-root-default > li > a,
    #wpadminbar #wp-admin-bar-top-secondary > li {
    background-color: rgba( 50, 55, 60, .85 );
    }
    </style>
    <?php
    }
    add_action( 'wp_before_admin_bar_render', 'rainbow_bar' );