And here is WordPress 3.0

Upgrading to 3.0 was quite a pleasant experience. Well, aside from apparently being hacked at the same time, that is.

It may be coincidence, but I don't think so. I upgraded with the “upgrade” button to 3.0 yesterday and ... it all just worked. Cool.

But this morning, I found some bits didn't work, and then it all broke. I had PHP errors about not being to find sape.php, along with strange long unique ID. I then found a load of files that weren't there after the upgrade, and that most of the WordPress install was owned by nobody and not my login. Not nice.

Googling for refs. to SAPE gave me this link where someone else got got.  It looks like it's some sort of Russian advertising hack/scam.

I think I've cleaned up OK, but I'm concerned as to how they got in. I did get an email saying that my Admin WP password had changed (!) yesterday, and resetting that was what prompted me to finally try the upgrade. They got in after that, though. We shall see.

Moving on, I really only wanted to post about how easy it was to customise the new TwentyTen theme to my needs (adding AdWords is various places) without having to edit it!  Using WPs new Child Theme ability, I just created a child theme of TwentyTen thusly:

style.css

  1. /*
  2. Theme Name: Twenty Ten FNX
  3. Description: Child theme for the Twenty Ten theme
  4. Author: Neil Bird
  5. Template: twentyten
  6. */
  7.  
  8. @import url("../twentyten/style.css");
  9.  

functions.php

  1. <?php
  2.  
  3. function favicon_link() {
  4. echo '<link rel="shortcut icon" href="/glyphs/fnxweb.ico" type="image/x-icon">' . "\n";
  5. echo '<link rel="icon" href="/glyphs/fnxweb.mng" type="video/x-mng">' . "\n";
  6. echo '<link rel="icon" href="/glyphs/fnxweb.gif" type="image/gif">' . "\n";
  7. }
  8. add_action('wp_head', 'favicon_link');
  9.  
  10. function add_advert($post_content) {
  11. # No per-post ads on the main page
  12. if (is_single() || is_page())
  13. return $post_content."\n".'< p><hr><b>Advertisement</b>< /p><!--adsense#ad-page--><hr>';
  14. return $post_content;
  15. }
  16. add_filter('the_content', 'add_advert', 5);
  17.  
  18. ?>
  19.  

And then I just had to position the AdvertisingManager plugin widget accordingly in the sidebar.  I did have to make a copy of header.php, but from what I've not learnt about WP actions/filters, I may be able to hack that mod. in (the link to the main website from the header title) via script, thereby leaving me with no more manual editing of themes when I upgrade.

I also symlinked the twentyten screenshot.png just for completeness.

Nice.


Advertisement



About fnx

PSN: the_phoenix
This entry was posted in Software and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>