Categories
Mac

How to Change the Width of the Reading List Sidebar in Safari

For the record, I know this is a silly hack. Add a new item to the `~/Library/Preferences/com.apple.Safari.plist` file: Key: `SidebarSplitViewDividerPosition` Type: “Number” Value: `400` For the value, use whatever width you want in the number of pixels. I think I like 400.

Categories
Web Development WordPress

Generate a Link to Activate a Plugin in WordPress

Here’s another specialized plugin development tip! If you want to create a link to activate a plugin, you need to know the path of the plugin file. Let’s use Akismet for this example. $path = ‘akismet/akismet.php’; $link = wp_nonce_url(admin_url(‘plugins.php?action=activate&plugin=’.$path), ‘activate-plugin_’.$path); The `$link` URL will be something like http://yoursite.com/wp-admin/plugins.php?action=activate&plugin=akismet%2Fakismet.php&_wpnonce=f97dabdf9

Categories
Web Development WordPress

How to Hard-Code a UA String for the Google Analytics for WordPress Plugin

If you want to define a Google Analytics “UA String” while using Yoast Google Analytics¬†plugin for WordPress. Add the following to your theme’s `functions.php` file: add_filter( ‘option_Yoast_Google_Analytics’, ‘custom_ua_string_filter’); function custom_ua_string_filter($options = array()) { $options[‘uastring’] = ‘UA-########-#’; $options[‘manual_uastring’] = true; return $options; } For users of WordPress Multisite, this will allow you to pre-configure new blogs […]

Categories
WordPress

Merge Settings Into an Array in WordPress

I found people are coming to this site (to an unrelated article) looking for a way to merge settings into an array. You’re looking for `wp_parse_args()` The main function for WordPress to do this is `wp_parse_args()`. You likely want this function. Learn more about `wp_parse_args()` Also consider `shortcode_atts()` This is used for parsing shortcode options. […]

Categories
Web Development

A Sweet Javascript Slideshow Script

Developers: reveal.js is a great standards-compliant slideshow script. It looks great and is an awesome alternative to Flash-based or image-based slideshows. reveal.js

Categories
Google

Ten Blue Links

Remember when Google was ten blue links? Today, for the first time, I was actually taken aback by the amount of visual crap on Google results.

Categories
WordPress

Easy Content Deployment for WordPress: RAMP

RAMP allows you to make all the changes you need in your staging environment, then selectively push these changes to your production site. You can set up a new section of your site, upload some images to fill out a nice carousel for it, and add a link to it on your home page. Once […]