Tag Archives: WordPress

WordPress WP-Config Tricks

Digging Into WordPress recently put up an interesting article, WordPress Configuration Tricks, that covers a bunch of useful features hidden in that little-accessed part of WordPress: The wp-config.php file.

[What] many users don’t know is that the wp-config.php file may be used to specify a wide variety of configurational settings, enabling you to improve the functionality, performance, and security of your WordPress-powered site.

Did you know you can set several configuration options, usually stored in the database, as constants in the wp-config file? It saves a bit of time and processing power, as the data doesn’t have to be pulled from the database.

define('WP_HOME', 'http://diggingintowordpress.com');
define('WP_SITEURL', 'http://diggingintowordpress.com');
define('TEMPLATEPATH', '/absolute/path/to/wp-content/themes/active-theme');
define('STYLESHEETPATH', '/absolute/path/to/wp-content/themes/active-theme');

You can also disable post revisions, set the maximum number of revisions to store, or change the autosave interval for the post editor. You can even set up error logs and increase the ammount of memory allotted to PHP.

Blogsessive on WordPress Themes and the GPL

I recently read an interesting post over at Blogsessive on the big controversy over the GPL and WordPress. It covers the other perspective, that of the smaller theme developers trying to earn a living, from a somewhat neutral standpoint of someone who on one hand likes the GPL, but on the other hand doesn’t want to put stifle the creativity of the authors who can’t necessarily devote time to something that will have little return.

The discussion around this always seems to evolve into “open source” versus “author protection”. As Alex King pointed out in one of his posts, theme authors should be aware of what the GPL license exposes them too, while it provides freedom for basically everyone else.

I’m not by any means against freedom and open source. I’ve been preaching about the power of WordPress and the wonder that it is, but what I love more is to see a protection system for those authors that make a living out of releasing quality themes and plugins for WordPress. Somewhere along the way, in our quest for “freedom” we forgot how hard it is to earn our living, how hard it is to learn the things we now use to feed our families.

I have a similar position. I like the GPL as much as anyone who contributes to the WordPress community, and I appreciate it’s provisions for paid software, but as nice as that sounds in print, it doesn’t always work out that well in real life.

My Take on the WordPress Themes & the GPL License [Blogsessive]

Changelogs in WordPress Plugins

A new feature recently launched on WordPress Extend allows plugin authors to create changelogs in their plugin readme files, which will now show up in a separate tab on Extend, as well as in the dialogs that appear when you click the “View version 1.3.2 Details” links on the Plugins screen in wordPress.

For me, a changelog is a very important thing it is all about justifying to your users why they should upgrade to the latest version of your plugin as well as reassuring them that the changes made have been made for specific reasons and helping them to understand the impact the changes may have on there usage of your plugin.

Some plugins are already starting to take advantage of this new feature. Others, such as my own, already have changelogs, but they aren’t yet formatted in the manner required to trigger the creation of a separate Changelog tab.

Changelogs, Changelogs, Changelogs [westi on wordpress]

Managing Widgets in WordPress 2.8

The new widget management in WordPress 2.8 is greatly improved. You can drag widgets from the available widgets area to any widgetized sidebar, and edit the settings with a click of the little arrow. There’s no more annoying “Save” button for you to have to remember to click either.

The only problem? As soon as you drop a widget into a sidebar, it appears on your blog. That means one or two visitors might see an unconfigured widget before you have a chance to edit and save the settings. (This was brought to my attention recently by WP Weekly.)

Luckily, there’s a workaround…

Continue reading →

“Woo2″ Launches, WooThemes Moving Toward GPL-Compliancy

WooThemes LogoWooThemes just launched their second iteration, bringing with it several changes, including a website redesign and GPL compliancy on all themes moving forward.

The themes still cost money, but there are no longer any restrictions on how many times you can use the theme you paid for.

Pricing structures have changed, with 2-for-1 and 3-for-1 offers built into the one-time purchases. The “theme club” memberships seem to be a bit cheaper as well.

Also launched now is the new WooCamp blog, which is the theme company’s “design, development, and better blogging outlet.” It might be worth checking out even if you’re not into the premium theme thing…

An Easier Way to Handle Plugin Options in WordPress 2.8

Write forms, collect data from them, validate, then store. That’s the routine familiar to most plugin developers, and one that could always be easier. Why should you have to waste your time writing boring form handling functions when you could be working on one of the more interesting parts of your code?

With WordPress 2.8 comes the register_setting() function, which just might make things a bit easier.

Essentially the function lets WordPress handle the data collection and storage dirty work. After calling register_setting() when the init hook runs, you can just create the form and sanitize the data with a callback function.

add_action('admin_init', 'ozh_sampleoptions_init');
function ozh_sampleoptions_init() {
register_setting('ozh_sampleoptions_options', 'ozh_sample');
}

Apparently this method works in 2.7 as well, but in 2.8 it is required if you’re using options.php for your settings.

Poll: Are You Running WordPress 2.8?

WordPress 2.8 “Baker” was released on June 11th, bringing with it 790 bug fixes, some interface improvements, and several new features, many of which will be appreciated by plugin and theme developers. (Read the full announcement.)

Have you upgraded yet?

Have you upgraded to WordPress 2.8 yet?

  • Yes! (84%, 21 Votes)
  • I haven't had the time yet. (12%, 3 Votes)
  • I'm waiting a couple weeks, just to be safe. (4%, 1 Votes)
  • I'm waiting for a plugin to be updated... (0%, 0 Votes)

Total Voters: 25

Loading ... Loading ...

Note: If you’re reading this in an RSS reader, you may have to click through to the website to vote.

Custom Taxonomies in WordPress 2.8

There has been a bit of talk about “custom taxonomies” in WordPress, which have been around since version 2.3, and how WordPress 2.8 will integrate them into the interface in some amazing, better-than-sliced-bread way.

Many of the posts out there, unfortunately, never explained in a clear manner what custom taxonomies were. They talked of how amazing the concept was, and things like that, but they didn’t lay out the concept so people could understand the concept.

Justin Tadlock has a comprehensive post, Custom taxonomies in WordPress 2.8, that explains the concept very well, and has pretty much everything you need to know. What’s coming in 2.8, what’s already in WP, code snippets illustrating the use of the Custom Taxonomy API, etc.

Continue reading →

WordPress MU to be Merged with WordPress Core

WordPress MU, the branch of WordPress that runs the popular WordPress.com “instant blog” site is being discontinued.

Matt Mullenweg announced at WordCamp San Francisco that the multi-blog capabilities of WPMU would be merged with the main WordPress core, a la Movable Type.

The two codebases’ merging will hopefully unify the project a bit more. It’s always stuck me as a bit odd the way WPMU is so separate from the main project, with slower development and minimal documentation.

I only hope that this is done carefully so that the majority of WordPress users (who are running single-blog setups) won’t be confused or inconvenienced in any way.

Thanks to @wptavern for bringing this to my attention.

SyntaxHighlighter Evolved

I recently started using the SyntaxHighlighter Evolved plugin on Webmaster-Source. The plugin provides an easy way to format code snippets for display in posts, complete with colorization.

When using SyntaxHighlighter Evolved, you don’t need to replace quotation marks with " or anything like that. The plugin takes care of that, and preserves the original spacing.

The plugin has colorization support for several of programming languages, and it’s possible to add support if needed. The output is fully themeable via basic CSS.

All you have to do to invoke the plugin is surround your code in quick tags for the appropriate language, and you get something like this:

<?php echo "Here's some code"; ?>;

It shows up as an ordinary <pre>…</pre> tag once it leaves the editor, with contents neatly escaped, and the JavaScript does the rest to make things look neat once the page loads all the way.