Custom Logo Implementation in WordPress 4.5

Custom Logo is one of the awesome features of WordPress 4.5. You can see release detail of WordPress 4.5 “Coleman” here. Detail of Custom Logo is here. This link gives you detailed explanation of declaring support for Custom Logo and parameters available.

I needed to update my theme to use Custom Logo. But my all themes has logo option available. Image field was provided in the Customizer for logo. In the implementation of this new feature, existing logo was not supposed to be lost. So, I had to add new update script which will import old logo if set by use in existing theme.

Earlier, logo was displayed like following. Logo was saved in theme mod with key site_logo.

Update script I used is given below. I have tried to comment each step as much as possible as inline comments. Continue reading

Making Theme Accessibility Ready in WordPress

Accessibility means access generally. Accessibility in web design means creating web pages that everyone can use, regardless of disability or special needs, use and benefit from everything within their environment.

According to Wikipedia:

Accessibility refers to the design of products, devices, services, or environments for people with disabilities. The concept of accessible design ensures both “direct access” (i.e. unassisted) and “indirect access” meaning compatibility with a person’s assistive technology (for example, computer screen readers).

In WordPress, there is a mission to make WordPress accessible to everyone including the more than one billion humans with disabilities. And regular progress shows that this mission will be achieved in near future.

After hearing so much about Accessibility in WordPress, I wanted to try it in my theme also. So I decided to make my free theme Simple Life accessible. I was new and I did not know anything about making theme accessible. After spending few hours learning about key elements under Accessibility, I started modifying my theme. Honestly speaking, it took some iterations to finally make my theme fully accessible but I learned a lot in the process and I am happy about that. I want to share some points which are important while developing accessible WordPress theme or plugin. Continue reading