• Skip to navigation
  • Skip to main content
  • Skip to footer

Webhead

An independent web developer in Hawaii, developing WordPress websites, themes, and plugins

  • Plugins
  • Blog
  • About

Plugins

WP-Cron Status Checker

September 23, 2019 by webhead

WP-Cron is the single most important part of WordPress. It runs everything from checking for security updates, to cleaning your database of old data, to processing bills. If WP-Cron fails to complete, this plugin will let you know.

The WP-Cron Status Checker plugin lets you know if WP-Cron can’t run and if any jobs fail to complete. It keeps a log of all the WP-Cron runs while also letting you know how long each job took to run and when it ran.

There are two types of errors that this plugin can detect. The first is if WP-Cron cannot run. Sometimes WordPress or your server are not set up properly and some permissions or settings need to be changed. If this is the case you’ll receive an email saying something like “WP-Cron Cannot Run”.

The second type of error is if a plugin, theme or even WordPress core has a programming error. It could be a PHP error, or just something unexpected that causes an error and stops the WP-Cron process. In this case you’ll receive an email saying something like “WP-Cron Failed to Complete”. Below are the different errors you can get and what they mean:

  • COMPLETED – The job completed successfully.
  • EXITED – This job completed without errors. Most likely this process was designed to exit early and not go through the full WordPress process. No errors were detected so this is considered a success.
  • IN PROGRESS – Still currently running.
  • FAILED – The job failed to complete. Either an error occurred, or it’s been 5 minutes and the process has still not completed.
  • SKIPPED – If a hook is giving you problems and you know about it, you can skip it by hooking into the ‘wcsc_skip_hook’ hook. If you don’t hook into that hook you shouldn’t ever get this result.

This free plugin is available on the WordPress plugin repository:
https://wordpress.org/plugins/wp-cron-status-checker/

PRO VERSION

The free version is limited to logging just 3 WP-Cron runs at a time. The PRO version removes this limitation and lets you keep logs longer and get notified sooner. I will be adding to the PRO version as I have more time and get more requests. So for now you can get locked into a low annual subscription cost (provided you don’t let your subscription expire). I’ll continue to add new features and raise the price as they are added.

WHAT IS TRACKED?
Data is collected for every site (or sub-site in multisite installations) the admin opts in for or that has an active license key. Most data-points are collected on a weekly cycle, and only if there are changes. Some events like license activation/deactivation and plugin activation/uninstall are collected immediately.

Classy Blocks

May 7, 2019 by webhead

Classy blocks is a WordPress plugin that makes adding additional CSS classes a breeze in the new WordPress blocks editor (gutenberg). Instead of typing in a CSS class in the Advanced -> Additional CSS Classes textbox, let your editors select a CSS class in a dropdown you create.

Create a block field that appears in the Inspector with a user-friendly UI. Add your CSS classes through the WordPress Customizer’s Additional CSS or your theme’s stylesheets. Then blocks can have custom css classes with the click of a dropdown just like this block. This block has the bottom green border and padding added with the plugin.

Download the Classy Blocks plugin in the WordPress plugin repository: http://wordpress.org/plugins/classy-blocks

WH Tweaks

July 2, 2016 by webhead

Often times, ideas from WordPress Ideas  or bugs from WordPress Trac take years to make it into WordPress Core.  Sometimes even if everyone agrees on the fix it still doesn’t get in.  This plugin is the temporary patch you’ve been waiting for.  Activate any feature you want and disable any you don’t want.  Additional features will be occasionally added as I find them missing.

This plugin can be downloaded in the WordPress repository:
https://wordpress.org/plugins/wh-tweaks/

Below is a description of the features found in this plugin:

Security

  • Scramble the WordPress version on public side.

    To force browsers to get a fresh copy of javascript and stylesheets, the WordPress version is appended to filenames.

    Before:
    wp-includes/js/comment-reply.min.js?ver=4.5.3.
    After:
    wp-includes/js/comment-reply.min.js?ver=994.5.01.3.
  • Obscure the login errors on the Login and Lost Password forms.

    If a bad username or password is entered when logging in, WordPress will say exactly which one is wrong.  While user-friendly, an attacker could find out what usernames are used on the site.  The Lost Password form is also vulnerable to this, so only the user’s email will be allowed.

    Before Login Error:
    ERROR: Invalid username
    After Login Error:
    ERROR: Invalid username or incorrect password.

    Before Lost Password form action:
    Entering a correct username will send a password.
    After Lost Password form action:
    Only entering a correct email will send a password

Additions

  • Automatically set the Return-Path to the From Address if it’s not already set.

    If you get email from your website and in gmail it says something like “via notmydomain.com”, you will likely need this option checked.  If you’re email’s From address is “[email protected]”, this plugin will will set your Return-Path.  More on getting rid of “via” here.  This has been in WordPress Trac (#22837) since 2012 with a severity of “Major” set for a “future release”.

  • Add shortcodes to output the current [ year ] and [ date ]

    A lot of times a footer has a copyright date and it is a year or two old.  Using the year shortcode will always show the current year.  Same goes for the date shortcode.

  • Make child categories show with a light gray background.

    Sometimes when category names extend more than one line it is hard to tell the parent from the child.  This highlights the children categories with a light gray background.

    Before:
    categories-before

    After:
    categories-after

  • Let excerpts show links.

    HTML in the excerpts is a pretty highly requested feature to have in WordPress.  However, a lot of formatting problems could come up if HTML were allowed.  For example if you have a small area for your excerpts, but have a huge image or text, this would not look good in that small area.   On the opposite end of the argument, having content like “click here to see something” without a link is really annoying.  Activating this option allows the link to show in the excerpt so “click here to see something” will show properly.  A good compromise.

  • Show private pages in parent dropdowns

    A page, whether public or private, should be able to be a parent to another page.  Currently WordPress Core does not allow private pages to be chosen as a parent to another page.  This problem is listed in WordPress Trac (#8592) as a “critical” issue set for a “future release” since 2008 and is also in WordPress Ideas since 2011.  With this option activated, a private page can be selected as a parent in both the Quick Edit and single page editing page.

    Before:

    After:

  • Allow commas in Category terms

    Currently commas are used as delimiters to separate one taxonomy term from another.  By adding double quotes around a term, you would think the comma would not be seen as a delimiter and would be added as part of the term.  In WordPress Core this is not so and has been an issue in WordPress Trac (#14691) as a “normal” issue set for a “future release” since 2010.  With this option activated, category terms can have commas in them as long as it is surrounded by a double quote.  Currently this does not work for Tags.  More investigation is needed to see if this can be done with Tags in this plugin.

    Before:
    Adding “a,b,c”:

    After:
    Adding “a,b,c”:

  • Responsive Videos

    Currently embedded videos are set to a specific width unless the theme does something about this. Enabling this option puts a container around the embed and adds some styling to make the video expand to the full width of the content while keeping its aspect ratio.

 

Subtractions

  • Don’t send the admin email notifications when a new user signs up or a user changes their password.

    A lot of times when you are the admin who sets up WordPress for a client or someone else who uses the site, you don’t care if users sign up.  This option will prevent emails from being sent to the email address in the General Settings.

    Before:
    Email will be sent anytime a user is added or a user changes their password.
    After:
    No email will be sent when a user is added or a user changes their password.
  • Disable the default WordPress REST API endpoints

    New in WordPress 4.7 is the REST API.  This allows any website and application to access public data on your site programmatically.  If you don’t know what the REST API is, you can think of it as something similar to RSS Feeds.  It’s just another way for other people to access your data, but with much more flexibility.  If you have private data the same security protocols are in place to keep your data private.  But sometimes you just don’t want something and this lets you disable that feature you don’t want.

  • Remove the author pages

    Any author who has a published post or page will have their own “author” page.  But many times, you don’t want to let the world know the usernames of your users.  This is especially true if your user’s usernames are actually their email addresses.  If you aren’t using the author page, it’s best to remove them.  Activating this option redirects visitors to a 404 page.

    Before:
    http://example.com/author/admin shows the author page .
    After:
    http://example.com/author/admin shows a 404 Page not found page.
  • Prevent author enumeration

    User ids are incremental, so by starting off with 1 and going all the way up, hackers or anyone can query your website and find out all the usernames on your website.  If you’ve removed author pages by activating the previous option, hackers can’t find out the usernames, but they will still try.  If your web host offers protection from this allow them to handle it as it doesn’t involve WordPress running and taking up valuable server resources.  If your web host does not offer protection from this and you do not want to manually configure your server, the next best thing is to have this plugin detect it and redirect the visitor to a 403 Forbidden page as quickly as possible.

    Before:
    http://example.com/?author=1 redirects to http://example.com/author/admin .
    After:
    http://example.com/?author=1 shows a 403 Forbidden page.

Optimize

  • Don’t load emojis styles and scripts

    Did you know WordPress developers only added emojis to cover up a humangous fix?  Checking this won’t undo that fix so if you don’t need emojis, you don’t need to load them. 

    Before:
    emoji-before
    After:
    emoji-after

 

Multisite

  • Show the main site’s static sidebar on all sites by default.

    This feature is a workaround for WordPress Trac #22370.  On Multisite only, this feature will show the main site’s sidebar on any of its sites when the sidebar is empty.  For example if you want the same footer widgerts on all sites in your Multisite installation, this will show the footer from the main site as long as the other sites don’t have their own widgets.  Each site can enable or disable this feature.  Just be aware that the sidebar that is shown is the sidebar of the main site at the time you save.  So if you have a shopping cart widget, weather widget or anything that changes without you saving a widget, it will not work correctly.

    Before:
    Sites without any widgets in their sidebar will not show anything.
    After:
    Sites without any widgets in their sidebar will show whatever is set in the main site’s sidebars.

Personalize Login Form

  • Link logo on login page to your home page.

    The WordPress logo normally links to http://wordpress.org.  Checking this option will make the logo link to your home page.

    Before:
    Clicking on the logo takes you to wordpress.org.
    After:
    Clicking on the logo takes you to your home page.
  • The rest of the logo settings

    The rest of the logo settings are pretty self explanatory.  The logo for retina screens should be 2 times larger than the normal logo.  If you have a logo that is wider or taller than 320×84 pixels, you can adjust the Logo Width and Logo Height values.

 

View the plugin in the WordPress repository:
https://wordpress.org/plugins/wh-tweaks/

Clear Cache for Me

November 4, 2015 by webhead

W3 Total Cache and WP Super Cache are great caching plugins, but they do not know when a widget is updated. WPEngine is the best place to host your WordPress installation, but their caching system is no smarter when it comes to updating widgets and menus. I created this plugin because my website did not see any changes when saving widgets or menus using these caching systems. Clear Cache For Me will purge ALL your cache each time you do a save without having to press an additional button. It may be overkill, which may be why it’s not built in, but some people need simplicity.

Works with the following caching systems:

  • Autoptimize
  • Breeze Cache
  • Cache Enabler
  • GoDaddy Cache
  • Kinsta Cache
  • LiteSpeed Cache
  • SiteGround SuperCacher
  • WP Fastest Cache
  • WP Super Cache
  • WP Optimize Cache
  • W3 Total Cache
  • WPEngine Cache

Clears all cache for following actions:

  • When Widgets are saved
  • When Customizer is saved
  • When Menus are saved
  • When a Contact Form 7 form is saved.
  • When a Formidable Form form is saved.
  • When WooThemes settings are saved.
  • When NextGen Gallery albums and galleries are updated (beta – may not clear cache on all actions).
  • When Qode options are saved this plugin forces browsers to reload the custom css and custom js.
  • When a WP Forms forms or settings are saved.
  • When WooCommerce settings are saved. (Cache should already be clearing when products are saved.)
  • When settings from the Insert Headers and Footers plugin by WPBeginner are saved.
  • When Settings from a settings page is saved. This includes settings from WordPress core, Yoast SEO, and most other plugins using the Settings API.
  • When WordPress is updated.
  • When plugins are updated, activated, and deactivated.

There is a convenient clear cache button on the dashboard for users with the right capability. Admins (users with the ‘manage_options’ capability) can set which capability a user needs to view the button. If you are using this button often, please consider submitting a request to have this plugin do your button-pushing for you. This plugin is meant to work behind the scenes to make your life easier and less frustrating.

Development Mode
An option is included in the settings to force your browser to get a fresh copy of CSS and Javascript files.  This is a convenient option to use when you or your developer are updating the site and want to be sure the changes are seen.

View it in the WordPress plugin repository.

Contact Form 7 Multi-Step Forms

November 4, 2015 by webhead

With this plugin you can create multiple Contact Form 7 forms and link them together to create a multi step form.  The free version of this plugin allows you to create multi-step forms with a limit on the amount of information that can be submitted.  The limit is due to the fact that the plugin uses cookies to store the submitted data from one step to the next.  If a submission exceeds the browser’s cookie size limit, you’ll notice chunks of missing data in that submission.

See a example of the plugin working here:
https://webheadcoder.com/contact-form-7-multi-step-form/

Note:  If you need a form that saves entries or needs conditional fields consider using Formidable.  I have used this plugin to build a multi-step application form.

PRO VERSION

The Pro version of this plugin will allow your forms to submit as much as 5MB of data.  That’s over 1,000 times more data than the free version.  This is because the Pro version uses Session Storage. This means you can have a ton of fields and steps more than the free version. (File uploads are still only supported on the last step and does not count towards the limit.) Session Storage has been available in all major browsers since about 2010.

Please make sure you try out the Free version of the plugin first and see if that works for you.  If you try submitting your form and you are not receiving all the information in the email or you just don’t want to risk losing data when the submission gets too large, you can upgrade by clicking the button below. 

Additional Features

  • Use on large forms with unlimited steps
  • Use it with the Conditional Fields plugin to skip steps.

What this plugin does not do

  • This plugin does not support file uploads on every form. If you need to use file uploads make sure to place it on the last step.

  • This plugin currently does not support “pipes” in the select field. See here for more on what “pipes” is on the Contact Form 7 site.

  • This plugin currently does not support “Exclude lines with blank mail-tags”. 

  • This plugin does not load another form on the same page. It only works when the forms are on separate pages. Many have asked to make it load via ajax so all forms can reside on one page. This plugin does not support that.


Currently the Pro version REQUIRES the WordPress REST API and Contact Form 7 AJAX submission to be enabled.  
By default these settings are already enabled.

 

WHAT IS TRACKED?
Data is collected for every site (or sub-site in multisite installations) the admin opts in for or that has an active license key. Most data-points are collected on a weekly cycle, and only if there are changes. Some events like license activation/deactivation and plugin activation/uninstall are collected immediately.


OTHER PLUGINS

Classy Blocks

Easily add classes in the new block editor.

WP-Cron Status Checker

Make sure WP-Cron is always working.

Clear Cache For Me

Automatically purge all cache when your caching system may not.