Giter Site home page Giter Site logo

dartiss / pride-bar Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 1.0 1.27 MB

WordPress plugin to add an LGBT+ flag to your admin bar

Home Page: https://wordpress.org/plugins/pride-bar/

License: GNU General Public License v2.0

PHP 100.00%
wordpress wordpress-plugin pride rainbow admin-bar wordpress-vip lgbtq lgbt

pride-bar's Introduction

David Artiss - @dartiss

Hi, I'm David (he/him/his) ๐Ÿ‘‹๐Ÿผ I'm a WordPress VIP Customer Success Support Lead.

WordPress VIP, part of Automattic, are enterprise WordPress and are the official digital experience platform from the makers of WordPress.com.

WordPress VIP banner

I'm a WordPress plugin developer, contributor and international speaker. I'm passionate about inclusive language and statistics. I'm also a regular, but average, gamer, having played poorly since the 1980s.

I'm also a massive geek - ask me about all things Apple, Marvel, Star Wars and Star Trek ๐Ÿ––๐Ÿผ

My Github stats

WordPress Plugins ๐Ÿ”Œ

Most of my repos are for my WordPress plugins, with many now archived and private. I work on these in my own time and take no donations for their continuation - I write and support them because I like doing so. For this reason, changes may be slow to be made but I will always try and provide support in the WordPress.org forums as quickly as I can. Indeed, that's where all support should be directed. Please use the repo's issues log to look for outstanding issues or to add new features that you'd like to see.

Thank you โ™ฅ๏ธ

WordPress Contributing ๐Ÿค

I contribute to WordPress, in varying degrees, to the following...

Follow me ๐Ÿ•ต

Get in touch ๐Ÿค™๐Ÿผ

For ALL support questions about my plugins, please use the appropriate WordPress.org forum.

Gaming ๐ŸŽฎ

  • PSN user name: Darkstorm40
  • Nintendo Switch friend code: SW-2993-1134-1615

GitHub Dev.to LinkedIn Discord Twitch status

pride-bar's People

Contributors

dartiss avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

alexclassroom

pride-bar's Issues

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
    |         | '__'.
--------------------------------------------------------------------------------

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.

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

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.

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 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.

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?

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.