helen / admin-color-schemer Goto Github PK
View Code? Open in Web Editor NEWCreate your own admin color scheme, right in the WordPress admin under the Tools menu.
Home Page: http://wordpress.org/plugins/admin-color-schemer/
Create your own admin color scheme, right in the WordPress admin under the Tools menu.
Home Page: http://wordpress.org/plugins/admin-color-schemer/
Two things:
In the case that core's Sass files change between releases, in particular minor ones, we should handle that appropriately. A likely path would be to delete all the files, both copied from core and generated, re-copy, and re-compile.
Are there differences between how this plugin works and built in schemes - I ask as there is a plugin I use that has a non-traditional wordpress menu. It adopts the menu colors from the built in schemes, but it does not with the custom one.
It's kind of buried under Tools - some people have a habit of looking at the plugin row actions, and we should definitely link to edit a scheme from the user profile screen.
That you can choose what the admin theme is called in a setting menu.
already suggested this over at wordpress.org but figured I"d share it here too.
Hello,
I believe this plugin is missing its empty-scheme.php
.
Warning: include(C:\apache\htdocs\wordpress\wp-content\plugins\admin-color-schemer/templates/empty-scheme.php): failed to open stream: No such file or directory in C:\apache\htdocs\wordpress-latest\wp-content\plugins\admin-color-schemer\classes\plugin.php on line 110
Warning: include(): Failed opening 'C:\apache\htdocs\wordpress\wp-content\plugins\admin-color-schemer/templates/empty-scheme.php' for inclusion (include_path='.;C:\php\pear') in C:\apache\htdocs\wordpress-latest\wp-content\plugins\admin-color-schemer\classes\plugin.php on line 110
Discovered while testing to release 1.1, am not sure if this was always broken but I have a suspicion it probably was.
The preview mechanism works by replacing the CSS file reference on #colors-css
, but if you're using the default admin color scheme there is no separate color scheme file to load and therefore no #colors-css
. Pull request to fix this incoming.
Per @markjaquith: "People could share these suckers in a tweet’s length."
Hello !
First of all, sorry for my bad english. I'm french, and I do my best...
And thank you so much for such a nice pluging !!!
When replacing a website with a WordPress solution, I prepare the new version in an under-directory.
When it's ok, I replace the old one in the main/online directory.
I change parameters following WordPress notice for doing that.
But I lose custom parameters of Admin Color Schemer.
Il looked in the database / usermeta table trying to find a bad url that should be changed, but nothing that seem to be wrong.
How could I fix that ?
Thank you in advance for any information !
Regards,
Hey guys, any plans to update this to PHP7?
Otherwise they are hidden/buried.
A preview.css file is written - just need to do the magic to make this work for no-JS in addition to the implemented AJAX way.
Possibly powered by .org; specifically not a @nacin project.
It would be really great if the button colour selected also applied to buttons in the Advanced Custom Fields plugin. Thanks for this plugin, I use it on every site I build.
Closely related to #2 - sometimes the plugin updates might mean changes to the way the Sass is compiled, so it should probably either recompile the CSS on update or prompt the user to do so. The latter is probably safer. Either way, this will need to store an option with the plugin's version whenever the CSS is compiled.
Some ideas on how to do this, but nothing that doesn't require duplicating things in core and possibly creating a less-than-smooth transition between core upgrades. Ideas welcome.
For reference, core does this through Grunt+CSSJanus.
The color theme in WordPress Core now add custom colors also to the editor. This is being done by adding css custom properties in the editor. These get injected via a body class on the editor pages.
The available colors in the editor seem to be:
--wp-admin-theme-color: #000;
--wp-admin-theme-color-darker-10: #000;
--wp-admin-theme-color-darker-20: #000;
In core they are defined here: https://github.com/WordPress/WordPress/blob/ad48a153873cdef28ab03c54a034de807e729052/wp-includes/css/dist/edit-post/style.css#L1998-L2008
body.admin-color-light {
--wp-admin-theme-color: #0085ba;
--wp-admin-theme-color-darker-10: #0073a1;
--wp-admin-theme-color-darker-20: #006187;
--wp-admin-border-width-focus:2px
}
body.admin-color-modern {
--wp-admin-theme-color: #3858e9;
--wp-admin-theme-color-darker-10: #2145e6;
--wp-admin-theme-color-darker-20: #183ad6;
--wp-admin-border-width-focus:2px
}
body.admin-color-blue {
--wp-admin-theme-color: #096484;
--wp-admin-theme-color-darker-10: #07526c;
--wp-admin-theme-color-darker-20: #064054;
--wp-admin-border-width-focus:2px
}
body.admin-color-coffee {
--wp-admin-theme-color: #46403c;
--wp-admin-theme-color-darker-10: #383330;
--wp-admin-theme-color-darker-20: #2b2724;
--wp-admin-border-width-focus:2px
}
body.admin-color-ectoplasm {
--wp-admin-theme-color: #523f6d;
--wp-admin-theme-color-darker-10: #46365d;
--wp-admin-theme-color-darker-20: #3a2c4d;
--wp-admin-border-width-focus:2px
}
body.admin-color-midnight {
--wp-admin-theme-color: #e14d43;
--wp-admin-theme-color-darker-10: #dd382d;
--wp-admin-theme-color-darker-20: #d02c21;
--wp-admin-border-width-focus:2px
}
body.admin-color-ocean {
--wp-admin-theme-color: #627c83;
--wp-admin-theme-color-darker-10: #576e74;
--wp-admin-theme-color-darker-20: #4c6066;
--wp-admin-border-width-focus:2px
}
body.admin-color-sunrise {
--wp-admin-theme-color: #dd823b;
--wp-admin-theme-color-darker-10: #d97426;
--wp-admin-theme-color-darker-20: #c36922;
--wp-admin-border-width-focus:2px
}
Hi !
I am a big fan of your plugin !
I was tweaking the admin CSS a bit and I found that to have a background color on metabox titles was absolutely gorgious !
It would be awesome if you could embed this feature into your plugin !
the CSS class are : .meta-box-sortables h3, .postbox h3, and it could be awesome if we could change both background and text color :)
Screenshot : http://cl.ly/image/0F29402g1635
Isn't that gorgious ? :)
We should either error out or fall back - this may need to be case-by-case. For instance, the icon_color should fall back to white if cleared out, but not specifying a base color should probably result in an error.
Ref: https://twitter.com/Keithamus/status/1055179677277384705
Safari Tech Preview now supports a prefers-color-scheme: dark
CSS media query that is used when macOS Mojave is in dark mode.
I would love to see this plugin support this separate media query by offering both a "Regular/Normal/Default" (what the plugin currently offers) and "Dark" set of colors to be used (Dark then being optional, of course, and simply offering the same amount of scheme customization as the regular color set.)
Correct me if I'm wrong, but it could be as simple as duplicating the existing admin color controls to have a separate "Dark" set (possibly include a new box or have it as a new column in the existing box... including how it's used by prefers-color-scheme
with browsers, of course) and then setting up the dark color customizations to output just like the existing setup with them wrapped in the prefers-color-scheme: dark
media query.
Even though I'm running from build. Here's what it looks like: https://cloudup.com/cNQMqQSq4Ls
It seems the lib/phpsass
library (last updated 5 years ago, it seems) needs to be updated to a new version or otherwise patched to avoid a fatal PHP error when saving a color scheme for those using PHP 8.0+.
The exact errors appear to be:
Fatal error: An error of type E_COMPILE_ERROR was caused in line 133 of the file /wp-content/plugins/admin-color-schemer/lib/phpsass/tree/SassRuleNode.php. Error message: Array and string offset access syntax with curly braces is no longer supported
Fatal error: Uncaught Error: count(): Argument #1 ($value) must be of type Countable|array, string given in /wp-content/plugins/admin-color-schemer/lib/phpsass/tree/SassMixinNode.php on line 66
Fatal error: Uncaught Error: strlen(): Argument #1 ($str) must be of type string, array given in /wp-content/plugins/admin-color-schemer/lib/phpsass/script/SassScriptFunction.php on line 207
Ideally, there's a new version of that PHPSass library that can be dropped in to replace the old one which accommodates modern PHP.
Otherwise, it appears those 3 errors can be patched while leaving the rest as-is to get things back into working order on PHP 8.0 from what I've tested:
if(gettype($this->args) == 'string'){ $this->args = array($this->args); }
before $argc = count($this->args);
$string = ''.$string;
before $strlen = strlen($string);
Additionally, it'd probably be good to update/add to the plugin's data in the main plugin file & readme info for mentioning the required PHP version (currently missing but 5.6 might be a fine option [haven't tested to be sure] unless 7.0 or something is a better option since those still on 5.6 are likely already needing to use old versions of plugins anyway & would be easier to test/guarantee), required WordPress version (3.8+ might be fine as-is), and the WordPress version it's been tested up to (currently missing while it can now be 6.2.2 to get rid of that warning on https://wordpress.org/plugins/admin-color-schemer/ that says the plugin hasn't been tested with modern WP versions) while also updating the plugin version, changelog, etc. accordingly.
*Keeping in mind that https://core.trac.wordpress.org/ticket/48881 might also still be happening for anyone with checkboxes that don't show up. I wonder if there's a good way where the checkbox just isn't given a custom style unless it's been specifically set in the custom admin color scheme setting for that one item to help avoid oddities regarding this.
I’ve also posted this at https://wordpress.org/support/topic/fatal-error-fix-php-8-x-fatal-error-upon-saving-custom-admin-color-scheme/ if it’s seen as beneficial to discuss/track things further there (and/or also putting this in one of the first spots one might look at when encountering this issue.)
Probably a CONTRIBUTING.md. Have already created a develop branch and set it to be the default in GitHub.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.