WordPress Admin Bar Issue in Version 3.3

If you have upgraded to WordPress 3.3 and the admin bar is not where it is supposed to be, it would be a good idea to check your function.php for the following code:

wp_deregister_script('admin-bar');
wp_deregister_style('admin-bar');
remove_action('wp_footer','wp_admin_bar_render',1000);

The above code is pretty common in 3.1 themes to permanently remove the bar from the theme. However, in 3.3, the bar still appears in wp-admin but it isn’t pretty. If you have a blank space for the bar but it isn’t visible, try scrolling to the bottom and see if you have unstyled bar items on the bottom left of the page. Then check your functions.php for the code above and comment it out.

New Plugin: WordPress Sentinel

WordPress Sentinel tracks all files in a WordPress installation (core, themes, plugins) and then periodically rechecks and notifies the administrator of any files that have changed in any way.

Most attacks against WordPress sites will install rogue code wherever they can – in new and existing files in the themes, plugins and even in the WordPress core files. This plugin is designed to tell the administrator exactly what files have been touched and when in order to make hack detection and recovery much easier.

Here is the plugin:

After dealing with a rash of hacked WordPress installs, I came up with the concept for this plugin. It doesn’t stop a hack from happening, but it is a great tool for identifying what files have been affected and should reduce cleanup time significantly. It should also help sites be aware of stealth hacks sooner rather than later.

Time to Upgrade Again

Because WordPress 3.3 (aka “Sonny”) has been released.

More Info here.

SASS for WordPress

SASS is a programmable approach to stylesheets which really adds some cool features. (Full reference is available here.) It can make a stylesheet easier to read, easier to update and also adds some powerful features like functions, variables and imports. It is pretty easy to add to Ruby and Drupal, but usually requires Compass installed on the server.

I’d glanced at SASS before, but today someone brought it back to my attention and my first thought was “How can I use that in WordPress?” A few hours of coding and testing later, I’ve got a pretty nifty plugin solution for anyone who wants/needs SASS features.

It is probably less than perfect since it uses a fairly dated php port of HAML/SASS. Any limitations of that code will reflect in the plugin since it just serves as a wrapper. However, it does not require Compass installed on the server and is really easy to install and start using.

Here is the plugin:

Here is how to make it work:

1. Install the plugin.
2. Copy style.css to style.scss in your theme.
3. Add the following code to your theme’s functions.php.

// Enables SASS to CSS automatic generation
function generate_css() {
  if(function_exists('wpsass_define_stylesheet'))
    wpsass_define_stylesheet("style.scss", "style.css");
}
add_action( 'after_setup_theme', 'generate_css' );

4. Make style.css writable (0775).
5. When editing the stylesheet, make all updates in style.scss only.
6. The plugin detects when style.scss has been updated, and rebuilds style.css from it.

If you try it, let me know how it goes and what you think of SASS.

Tech News – November 12th

Apple vs. HTC – Will HTC Phones be Banned?
I’m not sure the denying access to Android devices strategy will actually help Apple. #backlash (from both expected and unexpected sources)

Apple suggests design options for Samsung (to avoid lawsuits)
Helpful ideas like: don’t make your devices rectangular, don’t make the front bezel black and give it a cluttered appearance. #unbelievable

Tech firm wants to ban office e-mail
Interesting idea – communicate via IM and wiki like pages to avoid spam. #wikimail
Three issues I see with that approach:

  1. I see the change introducing some level of inefficiency to something that is already efficient and intuitive.
  2. How do you receive communication from outsite the company, like from other companies that use…email?
  3. If there is any portal from the outside to the new approaches, how long until spam becomes a factor there also?

Dropbox for Teams
This is a great idea, but security would be my main concern. Intranet with vpn access still seems like a better solution for mission critical or highly confidential information. #casualDocumentsOnly

Chrome Moves Up

I remember when Chrome first appeared. It was novel and minimalist and I remember installing it, trying it out and then going right back to Firefox. A few years later, after Firefox seemed bloated and slow, I gave it another look and never looked back (except to test website compatibility).

It appears that others have done the same:

Chrome reportedly leapfrogged Firefox during the last week of October to first week of November with the total of 25.69 percent of global market share, compared to Firefox’s 25.25%. It is also worth noting that based on the graph provided by Statcounter, Google Chrome’s market share is increasing, while Mozilla Firefox and the market leader Internet Explorer’s market share’s are decreasing. The data suggest that more internet users are switching from IE and Firefox to Google’s web browser.

Safari seems stuck down at 6%. I know I use Chrome on my Mac also…I just don’t care for Safari for some unknown reason.

WordPress Vulnerability

This is pretty old news, but I keep finding myself delousing hacked wordpress installs so it definitely bears repeating!

TimThumb is a pretty cool script that provides on-the-fly cropping and resizing of images.  It is cool enough that it has been included in a large number of WordPress plugins and Themes (both free and paid).  Unfortunately, there is a pretty significant exploit which allows hackers to upload or modify php scripts on your system.  That, in turn, gives them access to do just about anything they want.

Millions of wordpress installs are at risk from this issue…which raises the big question: how do I know if I have a problem?  Fortunately, Peter over at Code Garage made it easy - there is now a plugin which scans your install and tells you if you are vulnerable or not.

I highly recommend that all WordPress blogs take this simple action right away – installing and running the plugin is considerably easier than recovering from a hacked install.

Going Full Time

Here we go again…

Fully Self-Employed.  I’ve done this before, although we were supporting fewer kids in College back in those days.  Love the flexbility, but my boss can be a real jerk, making me work overtime whenever there is something to do.  Oh yea, and the SE Taxes…

At least I will have time to explore some interesting ideas that have been bouncing around in my head for a while.  Oh, and time to fix this dreadful placeholder website.

Speed Up Google Reader

If you are a google reader user, you’ve probably noticed that the interface has changed (not for the better). You may also have noticed that scrolling has gotten significantly slower. Even pressing ‘J’ to move the next article takes a few seconds, which is way too long if you skim hundreds of headlines in a few minutes like I try to do. Fortunately, there is a solution (found here):

First, install the AdBlockPlus extension.

Second, add the following filter:

plusone.google.com/u/0/_/+1/fastbutton

Now, close any open Google Reader windows, and you should be back to very fast scrolling.

Brilliant work, googleheads!

Apple Gripe

Although I’m not a zealot, I think Apple makes great products. I use OS X, Linux, Android and Windows every single day (often simultaneously) so I’m not married to any specific product line or OS, but there is not argument that Apple makes solid, refined, and beautiful products.

So my gripe? From today’s Apple Event:

10:24 a.m. Apple has paid more than $3 billion to app developers

This isn’t the first time I’ve seen this kind of message from Apple. As a licensed iOS developer, they email me the same kind of tripe pretty regularly. It is not that the statement isn’t true, Apple has written many checks to its army of independent developers. It is the arrogant slant to what is being said.

The developers develop product on their own dime and with all the risks that accompany that. Then they get to go through the onerous app approval process. Finally, their app appears on the market and they get to try an market it. If/when people finally buy it, Apple gets the first 30% and passes the other 70% on to the developer. I’m not complaining about this – Apple has created solid products and implemented a fabulous distribution system.

But Apple has not paid the developers over 3 billion dollars simply out of kindness – I would contend that Apple is not really paying them at all. The customers are the ones who are paying the app developers and Apple is just the middle man.

The truth is that developers have generated 1.3 billion dollars for Apple.