WordPress.org

Ready to get started?Download WordPress

Forums

classes.php hack missing in 2.9 (9 posts)

  1. curlsdiva
    Member
    Posted 4 years ago #

    Before I upgraded to 2.9, I had a great hack for classes.php (in WP Includes) which makes all the difference to my site. I can't remember where I found it, but it ran like this.

    $link .= 'title="' . sprintf(__( 'View all posts filed under %s' ), $cat_name) . '"';
    else
    21.4 Change this to read as follows:

    $link .= 'title="' . sprintf(__( 'See all articles filed under %s' ), $cat_name) . '"';

    Problem is, in 2.9 there seems to be NO classes.php. I've searched every script with the word 'class' in it to find the above code, but no luck. Where did classes.php go? And if it's gone for good, how can I achieve the same hack in 2.9?

    You can see that all I want to change is that line of text on the hover which says 'View all posts filed under' to 'See all articles filed under'. There MUST be an easy way of doing this in 2.9?

  2. dsortax
    Member
    Posted 4 years ago #

    Rollback to older version. It's what i did when i had too much problems with 2.9

  3. curlsdiva
    Member
    Posted 4 years ago #

    dsortax - good plan, except I'm not confident about manually rolling back and my hosting service can't help. Plus it seems kind of silly to rollback just for one tiny (but important to me) hack. I found the hack here:
    http://wp123.info/modifications/how-to-remove-view-all-posts-filed-under/comment-page-1/#comment-118

    So I've asked there how to modify this hack for 2.9.
    But if anyone here knows how, PLEASE help?

  4. The classes.php file does exist in WordPress 2.9 you will find it in wp-includes.

    However, I would recommend against changing a core file to achieve this when you can achieve the same result using a plugin (or with code in your themes functions.php file).

    The code you need it detailed in the following blog post:

    http://blog.ftwr.co.uk/archives/2010/01/02/mangling-strings-for-fun-and-profit/

    I hope that helps!

  5. curlsdiva
    Member
    Posted 4 years ago #

    westi - thanks for your reply.

    I'm beginning to wonder if my 2.9 installation has corrupted. Because what there is in wp-includes are the following:

    class-feed.php
    class-IXR.php
    class-json.php
    class-oembed.php
    class-phpass.php
    class-phpmailer.php
    class-pop3.php
    class-simplepie.php
    class-smtp.php
    class-snoopy.php
    class.wp-dependencies.php
    class.wp-scripts.php

    No classes.php (which I did have in 2.8.6).

    I admit to not being expert in all of this at all and I'm really struggling here. Is there supposed to be a wp-includes/110n.php file? Because I don't have that either. I'm afraid I simply can't find the translation functions. At this rate, I won't be upgrading again. I'll be giving up on WordPress. I'm supposed to be writing magazine articles, instead I'm mired in all of this because of one upgrade.

    Think my upgrade is corrupted?

    Anyway, thank you very much for taking the time to do the code you've given. I appreciate it. But whether this works for me who knows?

  6. curlsdiva
    Member
    Posted 4 years ago #

    And westi - putting that code in my theme's functions.php broke not only the file but my whole site!

  7. curlsdiva
    Member
    Posted 4 years ago #

    Right, it's a new morning. First, I'm not a code monkey, I'm a beginner, so things that would be obvious to you aren't to me, they're gobbledegook. But I'm learning - slowly.

    westi - that piece of code you supplied me with: d'you mean that I should save that as a php file, make it a plugin? Then install that plug-in on my (running 2.9) site? You see, unfortunately, you can't assume that if you give me a piece of nicely crafted code that I'll know what to do with it because as a beginner, I don't! Spell it out, chaps, think lowest common denominator, think five year old child (or senior learner in this case).

    Why I broke the functions.php and indeed my whole site last night was probably because I put your code in utterly the wrong place. I've saved it as a php script but am wary of putting it anywhere among my files until I'm sure I'm not going to break the site again! So if I know exactly what to do with it, that would be good.

    Hope you're still with me on this?

  8. curlsdiva
    Member
    Posted 4 years ago #

    westi - right, here I am eating humble pie. Very humble pie. I put your code as a php script with the rest of the plug-ins on my site, activated it and it has done the trick.

    I find coding stuff incredibly stressful and it makes me unable to see what's obvious and commonsense. Instead I turn into a snarling blind dragon!

    Thank you for the plugin. It works perfectly. I confess I still don't 'really' understand what 'translated strings' means, but I'm blissful in my ignorance. For the moment.

    Thanks again.

    PS Example of blind dragon mode? classes.php is on ahem Page 2 of my files - I hadn't looked further than Page 1 but was so stressed I didn't realise that. Embarrassing or what?

  9. Antonio L
    Member
    Posted 4 years ago #

    i had a similar problem
    I copied the code in

    The code you need it detailed in the following blog post:

    http://blog.ftwr.co.uk/archives/2010/01/02/mangling-strings-for-fun-and-profit/

    and pasted in functions.php file (right at the beginning) and it works

Topic Closed

This topic has been closed to new replies.

About this Topic