WordPress Plugin: Logout Password Protected Posts

Latest version: 0.2 – Released November 3rd, 2012

Description

There is no built-in way for your visitors to "log out" of password protected posts once they've entered the password. Even logged in users cannot log out of password protected posts by logging out of their account. This plugin solves that problem by providing a link for your visitors to log out of password protected posts.

After installing the plugin, add <?php do_action('posts_logout_link'); ?> somewhere in your theme to display a link for logging out of password protected posts.

Installation

You can install this plugin directly from your WordPress dashboard:

  1. Go to the Plugins menu and click Add New.
  2. Search for Logout Password Protected Posts.
  3. Click Install Now next to the Logout Password Protected Posts plugin.
  4. Activate the plugin.
  5. Add <?php do_action('posts_logout_link'); ?> somewhere in your theme.

Those people who are logged in to password protected posts will now see a link to log out.

For manual installation, see the guide to Manually Installing Plugins.

FAQ

I can't see a link to log out. What's up?

Have you added the template tag somewhere in your theme? You need to add <?php do_action('posts_logout_link'); ?> somewhere in your theme for the link to show up.

I've added the template tag to my theme but I can't see the log out link. What's up?

Ensure that you have entered a password for a password protected post. The link will not show up if you're not logged into a password protected post.

Can I change the default text in the link?

Sure. Add a second parameter to the template tag with the text you'd like instead. For example: <?php do_action('posts_logout_link','Log out!'); ?>

For those who want even more control, you can also add a third paramter which will be used as the class name on the link element.

Download

Version 0.2 ZIP file from downloads.wordpress.org

Any comments, questions, queries, suggestions, complaints, etc, please leave a comment!

WordPress Plugin: User Switching

Latest version: 0.8.2- Released August 6th, 2013:
  • Russian translation by R J

Description

This plugin allows you to quickly swap between user accounts in WordPress at the click of a button. You'll be instantly logged out and logged in as your desired user. This is handy for test environments where you regularly log out and in between different accounts, or for adminstrators of sites who need to switch between multiple accounts.

Features

  • Switch users: Instantly switch to any user account from the Users screen.
  • Switch back: Instantly switch back to your originating account.
  • Switch off: Log out of your account but retain the ability to instantly switch back in again.
  • It's completely secure (see the Security section below).
  • Compatible with WordPress, WordPress Multisite and BuddyPress.

Security

  • Only users with the ability to edit other users can switch user accounts (by default this is only Administrators on single site installs, and Super Admins on Multisite installs). Lower level users cannot switch accounts.
  • User switching is protected with WordPress' nonce security system, meaning only those who intend to switch users can switch.
  • Full support for administration over SSL (if applicable).
  • Passwords are not (and cannot be) revealed.

Translations Included

  • Arabic by Hassan Hisham
  • Chinese Simplified by Tunghsiao Liu
  • Farsi (Persian) by Amin Ab
  • German by Ralph Stenzel
  • Japanese by Yusuke Hayasaki
  • Lithuanian by Tommixoft
  • Polish by Bartosz Arendt
  • Russian by R J
  • Slovak by Max Samael

Screenshots

  1. user-switching screenshot 1

    The Switch To link on the Users screen

  2. user-switching screenshot 2

    The Switch To link on a user's profile

Installation

You can install this plugin directly from your WordPress dashboard:

  1. Go to the Plugins menu and click Add New.
  2. Search for User Switching.
  3. Click Install Now next to the User Switching plugin.
  4. Activate the plugin.

Alternatively, see the guide to Manually Installing Plugins.

Usage

Visit the Users menu in WordPress and you'll see a Switch To link next to each user. Clicking this will immediately switch you into that user account. Once switched, you can switch back to your originating account via the Switch back link on each dashboard screen and in your profile menu in the WordPress toolbar.

See the FAQ for information about the Switch Off feature.

Todo list

  • A custom capability (eg. ‘switch_users’) which can be granted to lower level users so they can switch accounts. Done!
  • Some way of switching back to the administrator account after switching to a lower level account (will require a cookie-based remembering system which doesn’t compromise security).
    Done!
  • A persistent notification in the admin area reminding you that this is an account you switched to and not your account (also reliant on solution above). Done!

FAQ

What does "Switch off" mean?

Switching off logs you out of your account but retains your user ID in an authorisation cookie so you can switch straight back without having to log in again manually. It's akin to switching to no user, and being able to switch back.

The Switch Off link can be found in your profile menu in the WordPress toolbar. Once you've switched off you'll see a Switch back link in the footer of your site.

Does this plugin work with WordPress Multisite?

Yes, and you'll also be able to switch users from the Users screen in Network Admin.

Does this plugin work with BuddyPress?

Yes, and you'll also be able to switch users from member profile screens and the member listing screen.

Does this work as a mu-plugin?

Yes, but you'll need to install user-switching.php into the root of your mu-plugins directory, not in the user-switching subdirectory. This is a restriction of WordPress.

What capability does a user need in order to switch accounts?

A user needs the edit_users capability in order to switch user accounts. By default only Administrators have this capability, and with Multisite enabled only Super Admins have this capability.

Can regular admins on Multisite installs switch accounts?

No. This can be enabled though by installing the User Switching for Regular Admins plugin.

Are any hooks called when users switch accounts?

Yes. When a user switches to another account, the switch_to_user hook is called with the new and old user IDs passed as parameters.

When a user switches back to their original account, the switch_back_user hook is called with the new (original) and old user IDs passed as parameters.

When a user switches off, the switch_off_user hook is called with the old user ID as a parameter.

Download

This plugin requires WordPress version 3.1 or later.

View the plugin on WordPress.org.

Version 0.8.2 ZIP file from downloads.wordpress.org

Any comments, questions, queries, suggestions, complaints, etc, please leave a comment!

WordPress Plugin: Instapaper ‘Read Later’ Links

Latest version: 1.2- Released June 15th, 2012:
  • Update to the new style button from Instapaper. The original black version no longer works.

Description

This plugin allows you to display Instapaper ‘Read later’ links next to each post on your blog just like on Give Me Something To Read. You can either automatically insert the links adjacent to your blog entries, or you can just use the template tag to insert the links wherever you like.

What the hell is Instapaper?

From instapaper.com:

Instapaper is a fast, easy, free tool to save web pages for reading later. When you find something you want to read, but you don’t have time now, you click ‘Read Later’. When you do have time to read, you visit Instapaper on your computer or phone and get whatever you wanted to read.

Check out instapaper.com for all the details and to sign up.

Can I see an example?

The plugin is active on this very blog, so ‘Read Later’ links should show up next to each post title on here.

Screenshot of the plugin in action on the Kubrick theme

The plugin in action on the Kubrick theme

Screenshot of the plugin Settings screen

The plugin Settings screen

Installation

  1. Unzip the ZIP file and drop the folder straight into your ‘wp-content/plugins-’ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Check out the front page of your blog. A ‘Read Later’ link will now show adjacent to each post.

Usage

By default, this plugin displays a ‘Read Later’ link adjacent to each blog entry on your blog. If you wish to control where the links are displayed, you can go to the Settings -> Read Later Links menu and choose between a few display options.

If you choose to disable automatic placement, you’ll need to add the following code to your theme in order insert the ‘Read Later’ link for each post:

<?php do_action('read_later'); ?>

The code must be inside the WordPress loop.

Thanks

Download

This plugin requires WordPress version 2.7 or later. Tested up to 3.4.2.

Version 1.2 ZIP file from downloads.wordpress.org

Any comments, questions, queries, suggestions, complaints, etc, please leave a comment!

WordPress Plugin: Plugin Info

Latest version: 0.7.9- Released April 7th, 2013

Description

This plugin provides a simple way of displaying up-to-date information about specific plugins hosted on the WordPress Plugin Directory in your blog posts and pages. It is intended for plugin authors who want to display details of their own plugins from the WP Plugin Directory on their blog and want those details to remain up to date. It’s also useful for bloggers who may blog about plugins and would like the details in their blog posts to remain up to date.

Er, what?

You want to blog about a particular plugin on your blog and include various details of it in your blog post (eg. the number of downloads or the last updated date). You could manually type this information into your post but this means that in a few days/weeks/months’ time the information will be out of date.

This plugin allows you to use shortcodes in your blog posts and pages which fetches this information right from the WordPress Plugin Directory, therefore ensuring the information always remains up to date.

Here’s an example

This plugin uses shortcodes so it’s ridiculously easy to include any information about a particular plugin in your post or page:

This plugin has been downloaded [plugin downloaded] times!

This will produce the following content in your blog post:

This plugin has been downloaded 1,650 times!

The download count will remain current without you having to touch your blog post again.

Is this plugin for me?

This plugin is only going to be of use to you if:

  1. You are a plugin author and you want a ridiculously easy way to include up to date information about any of your plugins in your blog posts or pages.
  2. You are the author of a blog that highlights plugins of interest and you want to ensure that information in your posts remains up to date.

Installation

  1. Unzip the ZIP file and drop the folder straight into your wp-content/plugins directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Now read the usage guidelines below.

Usage

  1. Write a new blog post or page, or open an existing post or page for editing.
  2. In the ‘Plugin Info’ box on that screen, type the slug of the plugin like this:
    'Plugin Info' plugin screenshot
    (The plugin slug is the last part of the URL of the plugin’s page on wordpress.org.)
  3. Add a shortcode to your blog entry like this: [plugin downloaded] and save the post. (That’s the word ‘plugin’ and not the slug of your plugin by the way).
  4. Take a look at your post and the number of dowloads of the plugin will be displayed.

Which attributes can I display?

Below is a list of all the available shortcodes.

Plain info:

  • [plugin author_name] – The plugin author’s name
  • [plugin author_url] – The URL of the plugin author’s homepage
  • [plugin compatibility] – The compatibility concensus with the most recent version of WordPress (as a %)
  • [plugin compat_with] – The version of WordPress used for the compatibility concensus (ie. the latest WordPress version, eg. “2.8.5″)
  • [plugin download_url] – The URL of the plugin’s ZIP file
  • [plugin downloaded] – The all time download count with comma-separated thousands (eg. “12,345″)
  • [plugin homepage_url] – The URL of the plugin’s homepage
  • [plugin link_url] – The URL of the plugin’s page on the WP Plugin Directory
  • [plugin name] – The plugin name
  • [plugin profile_url] – The URL of the author’s profile on WP.org
  • [plugin requires] – The ‘Requires at least’ WP version number
  • [plugin rating] – The plugin’s star rating as a whole number out of 5 (given by visitors to wp.org)
  • [plugin slug] – The plugin slug
  • [plugin tags] – A comma-separated list of the plugin’s tags
  • [plugin tested] – The ‘Tested up to’ WP version number
  • [plugin updated_ago] – How long ago the plugin was last updated (eg. “20 days ago”)
  • [plugin updated] – The date the plugin was last updated, formatted according to your Date Format settings under Settings->General (eg. “20 January 2009″)
  • [plugin version] – The plugin version number

Formatted info (eg. links and ordered lists):

Most shortcodes which display a formatted link can have their default link text overridden by adding a ‘text’ parameter. For example: [plugin homepage text=’Homepage’] will display a link to the plugin homepage with the link text ‘Homepage’.

  • [plugin author] – A formatted link to the plugin author’s homepage with the author’s name as the link text (if the author doesn’t have a homepage this will just display their name)
  • [plugin description] – The full description of the plugin
  • [plugin download] – A formatted link to the plugin’s ZIP file with ‘Download’ as the link text
  • [plugin homepage] – A formatted link to the plugin’s homepage with ‘Visit plugin homepage’ as the link text
  • [plugin link] – A formatted link to the plugin’s page on the WP Plugin Directory with the plugin name as the link text
  • [plugin profile] – A formatted link to the author’s WP.org profile page with the author’s name as the link text
  • [plugin screenshots] – The list of the screenshots attached to the plugin (an <ol> list of <img> tags with descriptions)
  • [plugin changelog] – The list of changelog entries
  • [plugin latest_change] – Just the latest changelog entry
  • [plugin other_notes] – The ‘Other Notes’ section of the plugin

Some less useful raw data:

  • [plugin downloaded_raw] – The all time download count as a raw number (eg. “12345″)
  • [plugin num_ratings] – The number of people who’ve rated the plugin on wp.org
  • [plugin rating_raw] – The plugin’s actual average rating as a score out of 100 (given by visitors to wp.org)
  • [plugin updated_raw] – The date the plugin was last updated, in the format “yyyy-mm-dd”

The geek stuff

The plugin information is collected from wp.org each time you save your post or page. It is updated hourly using WordPress’ cron system and uses the Plugin API available in WordPress 2.7 or later. The plugin data is stored as an associative array in a custom field called ‘plugin-info’, and the plugin slug you enter is saved as a custom field called ‘plugin’. For supergeeks, this means you can also access the plugin data using get_post_meta(), but I’ll let you figure that out for yourself.

Todo list

  • A shortcode for a standard information box which contains all the essential plugin info in a nice format.
  • Possibly allow shortcodes in the title of posts.
  • Clickable shortcoces listed on the post editing screen.
  • A shortcode for a link to the author’s wordpress.org profile page (pending support in the Plugin API).
  • A shortcode for the ‘Other Notes’ section of the plugin (pending support in the Plugin API).
  • A simple UI for adding the plugin slug info to posts so you don’t have to use the Custom Fields directly.
  • Periodically update the data for all of your plugins from wordpress.org.

Download

This plugin requires WordPress version 2.7 or later.

Version 0.7.9 ZIP file from downloads.wordpress.org

Any comments, questions, queries, suggestions, complaints, etc, please leave a comment!

WordPress Plugin: MagpieRSS Hotfix for Enclosure Support and Character Encoding Issues

Latest version: 1.2 – Released 16th December 2008

Description

This hotfix adds support for RSS enclosures to MagpieRSS, the RSS parser behind the fetch_rss() function in WordPress. It also forces MagpieRSS to use UTF-8 character encoding, which fixes some issues with feeds that contain non-ASCII characters.

Is this plugin for me?

This plugin is only going to be of use to you if:

  1. You are fetching feeds on your blog with the fetch_rss() function and want to parse enclosures contained in the feed; or
  2. You are fetching feeds on your blog either with the RSS Sidebar Widget or with fetch_rss() and question marks are showing up somewhere in the feed where special characters are supposed to be.

Installation

  1. Unzip the ZIP file and drop the folder straight into your wp-content/plugins directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. That’s it! You can now parse enclosures contained in feeds fetched by WordPress.

Download

ZIP file from downloads.wordpress.org

FAQ

For FAQs, including how to parse enclosures in your feed, please see the plugin’s FAQ page on wordpress.org.

Any comments, questions, queries, suggestions, complaints, etc, please leave a comment!