Archive for the ‘WordPress’ Category

WordPress read capability in depth

Saturday, December 1st, 2012

WordPress read capability

read user capability

Did you ever ask yourself, what WordPress read capability really allows to read? Any unregistered visitor of your blog can see and read any public post without limitations? What the purpose of ‘read’ user capability? After making little investigation I don’t sure that WordPress read capability should be called ‘read’ but not ‘user_profile’ for example. Why I got such conclusion? Because of WordPress read capability is responsible for these WordPress admin back-end menu items only:
“Dashboard”-“Home”, “Dashboard”-“My Sites” (for multisite WP installation) and “Profile”-“Your Profile”.
Thus if you revoke ‘read’ capability from some user, she could not access to her profile then. Such user will get error message from WordPress just after login: “You do not have sufficient permissions to access this page”.

Read the rest of this entry

Edit Post Expire WordPress Plugin

Sunday, November 11th, 2012

Edit Post Expire WordPress plugin

Edit Post Expire

How to force ‘edit_post’ capability expire automatically after some period of time for all authors of your blog? You met with such limitation at forums and agree that some times such feature is useful. Did you ever think, if post edit blocking is possible for usual WordPress posts?
This plugin allows you to prohibit authors editing their published posts after preset time interval, just like the forums do.
Time interval is counted in minutes from the moment of last modification made to the post. Once preset time, e.g. 5 minutes was over, author sees just the only ‘View’ link in the posts list. Thus he can not edit or delete blocked post, inspite he is that post real author.

Plugin is simple in use as it has the only changeable parameter – time interval in minutes, after which WordPress should block access for editing to published post.
It works for all roles except “Administrator”. Look on plugin in action at screenshots and short video below.

Read the rest of this entry

Optimize WordPress database perfomance

Monday, November 5th, 2012

Optimize WordPress database perfomance

Optimize WordPress database

Optimize WordPress database perfomance – every blog owner got this conclusion, ealier or later, but finally always.
Any site owner asks himself, how can I make my site lighter and faster. What else should I do? What technique to apply? General site speed is critical property for present days. As there are a lot of alternative variants where web-surfer may find and get the same information, large part of visitors do not wait, while their browsers finish download process of slow page. They just return to search engine and click on the next link from the huge list of available sources. This way, we (site owners) lose auditory and, as a result, have a lower traffic. And WordPress blogs are not exclusion. The same general rools are in action for our loving WordPress too. It doesn’t matter, what platform do you use, in order to build your site. It does matter, with what speed your platform delivers content to your site’s visitors.
Reliable hosting service provider; fast and powerful server; wide, high-speed, broadband, backbone channel; popular and effective publishing platform – all of these factors are important and valuable in relation to the final result – your site speed.

Read the rest of this entry

single.php is called twice – how to stop

Tuesday, October 30th, 2012

Stop double content rendering

Stop double execution

single.php is called twice for every post view – that was my conclusion after some investigations. How I’ve got it?
Trying to build the list of recently viewed posts I added simple tracking code into my active “Twenty Eleven” theme single.php template file. After that I’was wondered as I’ve got two records in my log instead the only one after any post view. First valid record for just viewed post and second unexpected record for post, which is chronologically next to the viewed post.
Thus WordPress post content rendered at least twice every time visitor clicks on its permalink. It is obvious and unneeded overhead for my opinion. Why it is happened? How to stop this weird behaviour?

Read the rest of this entry

Hide Login WordPress plugin review

Saturday, October 20th, 2012

Hide Login WordPress plugin

Hide Login

Hide Login is the direct ancestor of the Stealth Login WordPress plugin. Mohammad Hossein Aghanabi (parswp) tries to give it new life after Stealth Login was removed from WordPress repository as updated last time too long ago. In respect to author of original plugin Mohammad left the comment at the begin of hide-login.php file: “This is a new version of Stealth Login plugin by skullbit”. Features list is the same. Short description is available here – Stealth Login WordPress Plugin Review.
I tested new 2.1 version of Stealth Login, Ups!, excuse me, Hide Login plugin under WordPress 3.4.2. It was a pretty fresh WordPress installation. And I can say that Hide Login WordPress plugin worked well for me, but not too long. I discovered that ‘logout’ slug doesn’t lead to the real logout, just redirects to the home page, while you are still left logged in.

Read the rest of this entry

edit_theme_options capability for WordPress user

Friday, September 28th, 2012

edit-theme-options WordPress user capability

edit-theme-options user capability


‘edit_theme_options’ capability seems to be self-explained. It’s primary purpose is to provide access to WordPress front-end theme options changing.
On practice, if you have ‘edit_theme_options’ capability, then you have access to the ‘Appearance’ menu at WordPress admin back-end and to its menu items: “Themes” (select a theme for your WordPress front-end) and “Menus” (edit menus supported by your selected theme). Customize theme header image, background color, etc. section and ‘Widgets’ menu items require ‘edit_theme_options’ capability also.

How it is realized? How often and at what places WordPress uses/checks this user capability – ‘edit_theme_options’ in order to decide give current user permission to edit theme options or prohibit access to such functionality? Let’s check this together. We will make a quick look into WordPress version 3.4.2 core source code and comment its related fragments.

Read the rest of this entry

User Role Editor 3.8 is published

Sunday, September 2nd, 2012

User Role Editor

User Role Editor


User Role Editor WordPress plugin version 3.8 is published at September 1st, 2012. What’s new?
– Bug fix: Some times URE didn’t show real changes it made to the database. The reason was that direct database update did not invalidate data stored at WordPress cache. Special thanks to Knut Sparhell for the help with detecting this critical issue.
– WordPress core capabilities are shown separately from capabilities added by plugins and manually.
– If you configured URE to show you ‘Administrator’ role, you will see its capabilities, but you can not exclude any capability from it. I may just add capabilities to the Administrator role now. The reason – Administrator role should have all existing capabilities included.
– Brasilian Portuguese translation is updated.
[nothankyou]