In the second part of this post I’ll show you how you can add a column that lists the total number of pages for a user with a break out of the drafts, pending private, and published. Each element is linked to the respective list of pages. Note that this modification removes the Posts column from the user page, however if you wish to retain it, remove the first five lines (the notonebit_modify_user_columns and the associated add_filter call).
The following code would be added to your theme’s functions.php file.
This is a two-part post that will give you the code for plugins that will modify your WordPress user management page with some useful additional information
This post will give you the code for the highlighted area on the left. This code adds two bits of information for every user, their last login date and time, and the last date and time they were active. When you hover over the “Last login” and “Last active” text the tooltip shows you the exact date and time info. Continue reading “Two WordPress Plugins To Improve Your User Management Page”
It’s been a while since the popular PHP pagination class has received any of my attention, so a few months ago I set out to re-write the class to be more up to date. This version takes advantage of both code and security updates as well as updates to PHP and MySQL. I’m also planning on moving the code over to GitHub where it should be easier to manage.
Here is the new and improved PHP pagination class for your enjoyment:
Based on feedback (and the long time between updates), I’m releasing an updated version of the PHP pagination class.
No more SQL errors if using the class on a query with no results (although I fail to see the point of using it on an empty query anyway, but the bug is fixed)
When selecting ‘ALL’ only one page is displayed, and if you are using the display_items_per_page drop-down menu, ‘ALL’ is now selected as well.
If a page less than page one, or greater than the total number of pages is requested, no results are displayed and the appropriate prevous/next links are disabled
The items per page array that populates the display_items_per_page drop-down menu is now an option that can be configured when instantiating the class. Previously this was hard-coded to the class.
The $high option has been removed from the class (it was never used).
Note that if you receive a PHP notice about undefined indexes that you should turn down your error reporting. This notice may be displayed when loading the page for the first time when no $_GET variables are present. The class accounts for this, however PHP throws a notice about it.