Freelance Project

All freelance projects at One Location


eng_468x60_peopleflag  eng_468x60_step

Wordpress/custom Http Headers 16.06.09


We need a quick Wordpress plugin to do the following:

Use the ’send_headers’ action to add HTTP headers on Wordpress posts based on the modified date of the post.

So the plugin should work like this pseudcode:

add_action(’send_headers’, ‘add_my_custom_headers’);
function add_my_custom_headers() {

// CODE TO MAKE SURE THIS IS A POST

if ( POST IS TODAY ) {
header(“x-test-current-date: Today”);
}
elsif ( POST IS YESTERDAY ) {
header(“x-test-current-date: YESTERDAY”);
}
elsif ( POST LAST UPDATED BEFORE YESTERDAY ) {
header(“x-test-current-date: OLD”);
}
elsif ( POST LAST UPDATED BEFORE A WEEK AGO ) {
header(“x-test-current-date: REALLY OLD”);
}
else {
header(“x-test-post-date: ANCIENT”);
}

}

We’ll figure out how to finish it and what headers we want to use, we just need someone to create the functional shell to do the date calcs and the appropriate logic.

  • Digg
  • Sphinn
  • FriendFeed
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • StumbleUpon
  • Yahoo! Buzz
  • Print this article!




No Adware

If you enjoyed this post, make sure you
Subscribe to my RSS feed!


Wordpress/custom Http Headers 16.06.09


We need a quick Wordpress plugin to do the following:

Use the ’send_headers’ action to add HTTP headers on Wordpress posts based on the modified date of the post.

So the plugin should work like this pseudcode:

add_action(’send_headers’, ‘add_my_custom_headers’);
function add_my_custom_headers() {

// CODE TO MAKE SURE THIS IS A POST

if ( POST IS TODAY ) {
header(“x-test-current-date: Today”);
}
elsif ( POST IS YESTERDAY ) {
header(“x-test-current-date: YESTERDAY”);
}
elsif ( POST LAST UPDATED BEFORE YESTERDAY ) {
header(“x-test-current-date: OLD”);
}
elsif ( POST LAST UPDATED BEFORE A WEEK AGO ) {
header(“x-test-current-date: REALLY OLD”);
}
else {
header(“x-test-post-date: ANCIENT”);
}

}

We’ll figure out how to finish it and what headers we want to use, we just need someone to create the functional shell to do the date calcs and the appropriate logic.

  • Digg
  • Sphinn
  • FriendFeed
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • StumbleUpon
  • Yahoo! Buzz
  • Print this article!




No Adware

If you enjoyed this post, make sure you
Subscribe to my RSS feed!


  • Freelance Arena
  • Unique Premium WordPress Themes
  • teliad - the marketplace for text links