ButlerBlog

chad butler's weblog

  • About
  • Blog
  • WordPress Plugins
  • Contact

WP-Members new feature release

By Chad Butler 7 Comments

I am very excited to announce an upgrade to the ever-popular (and FREE!) WP-Members plugin. This is tentatively going to be the 2.3.3 release, although depending on how much gets completed, it may push us to call this 2.4.

Update 11/12/2010: As a new feature release, I am releasing this as 2.4.  The beta version is now available at http://wordpress.org/extend/plugins/wp-members/download/.  Just download the zip of 2.4.  This tag will remain as any updates are made to the beta, so you’ll always have the most recent release.

First, some bug fixes

Since the 2.3.2 release, there haven’t been too many bugs, which is good. 2.3.2 was a bug fix release itself and it is always a little embarrassing to have a new bug come out with the bug fix release. However, some unnoticed (and pre-2.3.2) bugs have become apparent and will be corrected in this release.  The most notable are the non-widget sidebar function and the stripslashes admin bug.  Both of these have current (and easy fixes), but they are fully corrected in the upcoming release.

If anyone notices any other bugs, be sure to let me know soon so we can attempt to get fixes in prior to this release.

And, some new features

One of the most requests (and the most needed) new features for the plugin is CAPTCHA support.  If you do not know what CAPTCHA is, it makes things difficult for automated/computerized processes to utilize the forms on your website/blog.  The Official CAPTCHA Site has some good information on this.  In our case, we want to prevent automated signups full of spam.  So I have added a new option of placing a CAPTCHA in the registration form.

There were many possibilities in going down this road.  There are a number of WP plugins that provide CAPTCHA for comments, contact, etc.  I had considered the possibility of leveraging one or more of those.  But that brought in a slew of potential landmines when compatibility is considered as well as future upgrades and how to pick one over the other.  So I chose to go with what I consider to be the standard: reCAPTCHA.  The reCAPTCHA project was chosen for a number of reasons:

  1. It is a project of Carnagie Mellon University, where the concept of CAPTCHA was introduced.
  2. It is now a project of  Google Labs / Google Code.
  3. It helps with the digitization of books.
  4. It is FREE!

It is also widely used, so (a) it will not be foreign to a number of your users and (2) if you are already using reCAPTCHA, it should integrate with your existing site.

There are unforeseen pitfalls in any new feature release and this is no exception.  While I have tried to build this with compatibility in mind, there could be potential collisions if you are using an existing plugin such as the WP-reCAPTCHA plugin.  I tried to consider how other processes utilized reCAPTCHA and tried to keep this (a) restricted to WP-Members and (b) built in a way that it shouldn’t interfere with other instances of reCAPTCHA in the site.  It holds its own settings for the reCAPTCHA keys and calls its own library.  Please note: if you are already using reCAPTCHA in other areas of your site, even though I’ve tried to make this compatible, there could be potential problems I haven’t noticed.

Another new process is the addition of localization.  I had been working diligently toward full localization support earlier in development, but somewhere along the way I introduced a slew of new features (essentially when the admin panel was introduced) with the intention of coming back to clean it up later.  Well… I never did.  Until now.

While I am not going to say that this release will have full support, I have diligently gone through and tried to make sure that we are ready to flip the switch.  From this release I will release a thorough POT file for anyone interested in translating.  For those of you that need foreign language support, there is already a list of potential translators that have come to me so we should have support in the future for quite a few languages.

Two other features that I want to get done, but may have to be put off are:

  • Bulk Registration Moderation
  • Bulk User Export

I’m trying to get those done for this release, but there’s quite a bit of work yet on already growing admin panel.

As always, if you have feature requests, feel free to let me know.  Just keep in mind that requesting doesn’t equal immediate implementation.

  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on X (Opens in new window) X
  • Click to email a link to a friend (Opens in new window) Email
  • Click to print (Opens in new window) Print
  • More
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Pinterest (Opens in new window) Pinterest

Filed Under: WP-Members Tagged With: plugins, WordPress, WP-Members

WP-Members™ 2.3 Bug Fix – Non-widget Sidebar Login

By Chad Butler 16 Comments

An astute user recently pointed out an unknown bug that was introduced in the WP-Members 2.3.0 release and carries through the current 2.3.2 release.

If the user calls the wpmem_inc_sidebar function directly (as in the case of not using the widget), you will get a fatal error. I made some file structure changes in 2.3.0 in the area of the sidebar, the widget, and the login status and manually calling the function got overlooked. Fortunately, this effects a small number of users, there is an easy workaround, and I’ve already added a fix in the upcoming 2.3.3 feature release.

If you are effected by this bug and need a fix before the 2.3.3 release, you can do the following:

  • Open wp-members.php
  • At the end of the file, before the closing php tag (“?>”), add this:
    include_once('wp-members-sidebar.php');
  • Save the file
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on X (Opens in new window) X
  • Click to email a link to a friend (Opens in new window) Email
  • Click to print (Opens in new window) Print
  • More
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Pinterest (Opens in new window) Pinterest

Filed Under: WP-Members Tagged With: plugins, WordPress, WP-Members

Write a simple WP plugin to add the trademark symbol (™) to your mark

By Chad Butler 1 Comment

You have a trademark you need to mark on your WordPress site, but you don’t want to search through the site to find each occurrence and update each post?  I have developed a plugin for you that will ™ or ® your content on the fly.  But if you are the do-it-yourselfer type, then here’s a way to make a simple plugin to filter every instance of your trademark in posts, pages, and titles.

It is assumed that the reader has a basic working knowledge of PHP as I am not going to go into explaining the particulars of the PHP constructs.  While you could just copy and paste, it will be easier if you know the basics.

Filter the Content

The first function will go through the_content and replace every instance of your trademark with your trademark(tm).  We will call this tm_the_content.  WP stores the content of a post or a page in the variable $content, which we will pass to the function.

function tm_the_content( $content )
{
   ... we'll add code here later ...
}

We will use str_replace to find the instances of Our-Trademark (replacing “Our-Trademark” with the actual trademark text you are working with) in $content and replaced it with Our-Trademark(tm).  Note, I am using &#0153 for the trademark symbol, but you could put in place <sup> superscript or <div> and CSS, or what suits your fancy.  I like keeping it simple, though.  (Note: you can also replace &#0153 with &#174; to get the registered trademark symbol (r) ).

$content = str_replace("Our-Trademark", "Our-Trademark™", $content);

Now $content has all instances of Our-Trademark replaced with our trademark(tm), but we need to send back the filtered content:

return $content;

Functions and Filters:

function tm_the_content($content)
{
  $content = str_replace("Our-Trademark", "Our-Trademark&#0153", $content);
  return $content;
}

WordPress stores the title of a post or a page in the variable $title.  Filtering $title is exactly the same as filtering $content, so we can build our function tm_the_title by essentially copying tm_the_content and changing $content to $title:

function tm_the_title($title)
{
  $title = str_replace("Our-Trademark", "Our-Trademark&#0153", $title);
  return $title;
}

And you thought this was going to be hard.  😉

Now we need to fire these functions at the appropriate time.  As I mentioned earlier, in WordPress, we do this by using add_filter.

In case you were unaware, WordPress has a built-in function called add_filter() that will fire a function to filter your content.  We will use two instances of add_filter() to filter both the_content, the function that gets the $content of a post or a page, and the_title, the function that gets, you guessed it, the $title.

When you use add_filter(), you need to send the function two things, what you are filtering, and the function to use to do the filtering:

add_filter( $tag, $function_to_add, $priority, $accepted_args );

The last two parameters are optional, and in this case, we will only be using the first two.  We will use this twice in our plugin to fire each of our functions:

add_filter('the_content', 'tm_the_content');
add_filter('the_title', 'tm_the_title');

Put it all together:

<?php
add_filter('the_content', 'tm_the_content');
function tm_the_content($content)
{
  $content = str_replace("Our-Trademark", "Our-Trademark&#0153", $content);
  return $content;
}

add_filter('the_title', 'tm_the_title');
function tm_the_title($title)
{
  $title = str_replace("Our-Trademark", "Our-Trademark&#0153", $title);
  return $title;
}
?>

Here is a sample of the code.

Well that’s it.  I hope that you will find this snippet of code useful.

  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on X (Opens in new window) X
  • Click to email a link to a friend (Opens in new window) Email
  • Click to print (Opens in new window) Print
  • More
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Pinterest (Opens in new window) Pinterest

Filed Under: Blogging Tips, WordPress Tagged With: blogging, code, plugins, tips, tools, tutorials, WordPress

  • « Previous Page
  • 1
  • …
  • 48
  • 49
  • 50
  • 51
  • 52
  • …
  • 109
  • Next Page »

Join Us!

I will never share your information. No spam. No junk. No kidding. Unsubscribe anytime.

Recent Posts:

  • The High Price of Free Plugins
  • YouTube Success: Key Tips for Enhancing Video Optimization and Visibility
  • Mobile App vs. Mobile Website Ideal Choice for your Business
  • Top Strategies to Boost Your Brand’s Visibility and Impact
  • Advanced Blogging Strategies: Using Analytics, A/B Testing, and Conversion Optimization Techniques to Grow Your Audience
  • Unlock Real-Time Process Insights to Save Time and Money
  • How Writers Can Attract More Audience Attention
  • Dress for Success – Even at Home
  • Mastering the Art of Crafting SMART Marketing Goals
  • Rediscover Your Brand Story: 7 Tips for Refreshing Your Company Identity

Archives

  • About
  • Blog
  • Archive
  • Contact

Site powered by WordPress, running on the Genesis Framework from StudioPress.

Unless otherwise noted, content on this site is © 2006-2025 ButlerBlog and may not be reproduced without express written permission from the author.

Some content may include affiliate links for which this site receives a small commission.