Code Monkey home page Code Monkey logo

pride-bar's Introduction

Pride Bar

Add an LGBTQIA+ flag design to your admin bar.

Originally added to WordPress.com and viewable by Australian users to support marriage equality, I have bought the rainbow flag to everyone's Admin Bar, via this plugin. But that's not all, as it now supports 33 different LGBTQIA+ flags.

How to use? Just install, activate and enjoy a new flag colored admin bar. Different designs are available - head to Settings -> General to change the theme. And, thanks to code by Mika Epstein, you can modify the positioning of the flag too - allow it to flow behind your Admin Bar menu options or go around it.

Thanks to for Michael Arestad for writing the original code and Pento for sharing it. And particularly to the LGBTQIA+ community for having such awesome symbols.

Iconography is courtesy of the very talented Janki Rathod ♥️

 

pride-bar's People

Contributors

dartiss avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

alexclassroom

pride-bar's Issues

Remove CSS and automate output

  • Create an array containing the theme name (for the settings) and the colour settings
  • Use array to generate CSS output
  • Add CSS directly to header

Make it user-specific

Would be nice to have an additional option to specify per-user as well.

So, there will be settings in both the General Settings and User Profile as well.

In both cases, there will be a "None" option, allowing the other to override.

General / Theme -> User / Theme = User theme
General / None -> User / None = No theme
General / Theme -> User / None = General theme
General / None -> User / Theme = User theme

Look at using edit_user_profile and show_user_profile hooks for adding the content to the user profile. Then use get_the_author_meta to get the details.

PHP errors upon first activation

Getting the following errors upon activation - probably because there's no default set.

Warning: include_once(/var/sites/a/artiss.uk/public_html/sandbox/wp-content/plugins/pride-bar/css/.min.php): failed to open stream: No such file or directory in /var/sites/a/artiss.uk/public_html/sandbox/wp-content/plugins/pride-bar/pride-bar.php on line 60

Warning: include_once(): Failed opening '/var/sites/a/artiss.uk/public_html/sandbox/wp-content/plugins/pride-bar/css/.min.php' for inclusion (include_path='.:/usr/newage/lib/php') in /var/sites/a/artiss.uk/public_html/sandbox/wp-content/plugins/pride-bar/pride-bar.php on line 60

Fix PHPCS issues

FILE: /Users/davidartiss/documents/github/pride-bar/uninstall.php
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
 20 | ERROR | [x] A closing tag is not permitted at the end of a PHP file
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: /Users/davidartiss/documents/github/pride-bar/pride-bar.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
--------------------------------------------------------------------------------
 96 | WARNING | Found: ==. Use strict comparisons (=== or !==).
 97 | ERROR   | All output should be run through an escaping function (see the
    |         | Security sections in the WordPress Developer Handbooks), found
    |         | '__'.
 98 | WARNING | Found: ==. Use strict comparisons (=== or !==).
 99 | ERROR   | All output should be run through an escaping function (see the
    |         | Security sections in the WordPress Developer Handbooks), found
    |         | '__'.
--------------------------------------------------------------------------------

Change menu text colour

Some set-ups - e.g. Aromantic, behind menu - can be barely read. Maybe add an option to change the menu text colour to compensate?

Add plugin meta for settings

As I've done with other plugins, I'll add something to the plugin meta that directs you to the settings page.

Fix strict PHPCS issues

FILE: /Users/davidartiss/Documents/Github/pride-bar/pride-bar.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 76 | ERROR | The $text arg must be a single string literal, not "ucwords(
    |       | 'Pride Bar style' )".
--------------------------------------------------------------------------------

Add second setting

Right now, there's a single theme field, which is for WordPress.com and HalfElf. The only difference is the way the same flag appears across the admin bar.

Instead, I want to add a tick box for selecting how it appears and have one theme for each flag.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.