What I mean by Dynamic Editor Style is adding CSS style based on user setting/option. For example you have a font option via the customizer where user can select font to use or maybe link color option like my previous tutorial about color option in customizer.
Couple week ago I was sick. So I didn’t train for roughly 2 weeks. Yesterday I start my training again, and I regret my decision to stop.
Calluses I develop (painfully) on my palm nearly gone. I lost my grip. I can’t “lift” as much. My stamina drops.
I could blame it to the flu virus. But I simply stop too long.
I’m not actually a fan of themes with tons of design options. I think as a designer, it’s our job to design theme.
However, it’s not always a bad idea to let user express their creativity.
Last weekend, I create another theme. Nevertheless, a simple one with classic design. And this time I create several color options for it. Usually I prefer “refresh” transport method for my themes, because it’s works, easier to code (and maintain in the future). But because this is a simple theme, I get it done relatively quickly. So I decide to “play” and use “postMessage” transport method for the color options.
There are problems I found when implementing this, and I want to share my solution.
Here’s the theme, you can download and check the source code:
Well, there was a time when I need to remove admin color scheme option. And this how I do that.
I was building a complex site with several user role, and to make it easier to know which user role I use to login, I set each user role to use different admin color scheme and disable admin color option in profile edit.
It’s actually pretty simple. And I will also explain the coding process, how to learn to code something in WordPress. (I’m sure it’s pretty useful trick if you wants to learn to code/problem solving in WP).
That was actually a question by a fellow WordPress designer/developer when he realized his code didn’t work (I’ll explain the problem below).
It’s actually a simple mistake and can be avoided if we use “refresh” transport method when creating customizer option. But I do understand that “postMessage” transport method is better (but needed more code).
So here’s a little example. I create a twentyfifteen child theme with customizer setting to hide/show header area.
In the last 30 days. I was sick 3 times. I got a flu and terrible headache just a few days ago. Actually I’m still coughing and sneezing a lot. I wonder if I do something wrong in my training.
Adding admin notice on plugin activation can be super useful. For example we can:
- Add link to the settings page,
- Giving info about minimum requirement of their server,
- Tutorial links,
- Promote pro version of our plugin,
- Ask the user to rate our plugin,
- Ask donation,
- Or simply telling them that they are awesome.
If you ever try to create an “Admin Notice” on plugin activation. You’ll know that using
admin_notices action inside your “activation hook function” will not work. But there’s a workaround for that.
It’s very easy to create settings page in WordPress. But sometimes in our plugin we only need a single/few options. And creating dedicated settings page just for this option is overkill.
That’s what I think when I write “f(x) Private Site” Plugin yesterday. You can download the plugin for a full code example:
When it make sense, we can add settings to WordPress default settings page such as “General Settings”, Writing Settings”, “Reading Settings”, etc. And this is how to do that.
If you build a plugin that require template modification, it might be a good idea to bundle an example theme in your plugin. And here’s how to do it.
My first plugin at WordPress.org ! f(x) Share.
Wow. that feels great.
Note: After several month, Andy start to give me issue. Cannot uninstall it. Broken. Please be careful.
Have you ever feel that your android phone and tablet in some case works better than your PC?
I think GMail Apps in Android is amazing. I wish I have that in my laptop. I don’t like to assign a browser tab constantly open just for email.
If you feel the same way, I think you need to at least try Andy.
It’s not only for Windows, It also support Ubuntu and OSX