Just My Random Stuff Just some hopefully useful, yet random posts from my own experiences, that nobody ever told me about before.

7Jun/102

How to Use New WordPress 3.0 Features That Will Save You Tons of Time

Well there is a ton of buzz about WordPress 3.0, but I realized that not to much documentation is out yet about how to use the fun and easy stuff, so here goes.  But first, some disclaimers so I don't get yelled at by.

  • Even though the attached file is in WordPress plugin format, I did not release this as a plugin.
  • I did not include stuff like validation, sanitation, etc. on user input fields, only because I wanted to show the new features and save on the time to write this.  Always validate and sanitize your inputs.
  • As with everything, there is usually more than 1 way to go about it.  The methods I list below WORK FOR ME in a custom blog I am about to launch and follow the WordPress functions documentation.  Don't flame me if you don't like the way I did it, please stay constructive.
  • I did not include code comment on the source code, since, I more than did the job here in this article.
  • I did not add any localization.
  • I apologize in advance if the source highlighter looks funky, please download the zip file for a nicely formatted PHP code file
7Apr/105

WP-ZFF Zend Framework Full

I needed to include Zend Framework in a special WordPress plugin I made for someone, so I figured I would make a plugin to include Zend Framework Zend and ZendX libraries for WordPress Plugins.  Once I get the WordPress guys to approve the plugin and I will update this post with the download links, support links, etc.

Here's an example of how to use it, once it is installed and activated.

function plugin_function() {
    $channel = new Zend_Feed_Rss('http://rss.example.com/channelName');
    echo $channel->title();
    echo  $channel->category['domain'];
    foreach ($channel as $item) {
        echo $item->title() . "\n";
    }
}

That's all you have to do instantiate the class.

Download the plugin

Updates

  • Apr 28, 2010
    • Zend Framework releases V. 1.10-4,
    • Updated the way the autoloader loads to make it more compatible
    • See changelog

8Mar/100

WordPress Update Unique Keys

I made a plugin called Update Unique Keys for WordPress.

In an effort to help make WordPress installations more secure, this plugin will use the WordPress hosted Unique Key generator to update the wp-config.php file with the following keys/salts:

* AUTH_KEY
* SECURE_AUTH_KEY
* LOGGED_IN_KEY
* NONCE_KEY
* AUTH_SALT
* SECURE_AUTH_SALT
* LOGGED_IN_SALT
* NONCE_SALT

If the wp-config.php file is not writable, then the plugin will show the key / salt values on the plugin options page so the admin can then manually update the wp-config.php file.

I will update this post with any updates.

Changelog

Version 1.0 - First Release

Installation

Note: As is the case when installing any new plugin, it's always a good idea to backup your blog data before installing.

  1. After downloading the Update Unique Keys plugin, unpack and upload the file to the wp-content/plugins folder on your blog. Make sure to leave the directory structure of the archive intact so that all of the Update Unique Keys files are located in 'wp-content/plugins/updateuniquekeys/'
  2. You will need to activate the Update Unique Keys plugin in order to update your wp-config.php file. Go to the Plugins tab and find Update Unique Keys in the list and click Activate.
  3. After activating proceed to the plugin settings page (under Settings > Update Unique Keys) to update your keys and wp-config.php file.

Download

Download plugin here