Support » Requests and Feedback » Link category definition issue

  • Is the “Links / Link Categories / (Add|Edit) a Link Category / Formatting / Between Link and Description” observed at this time? Both in 1.2 and 1.3 the < BR /> does nothing and, in fact, no matter what is written to that field it won’t show up between the link and the description…

Viewing 9 replies - 1 through 9 (of 9 total)
  • A search in the forum would help. Anything to do with category or list styling *should* be done in the CSS. No br tags needed.

    Well, I happen to be searching the forum, and this is the only (useless) answer I get. Anyone care to chime in?

    You are not searching. You are posting. And useless? Thanks.

    For the sake of argument, what precisely does one search for to answer this question?
    I recall solving this problem on my own, long ago, after unsuccessfully searching this forum and finding only the answer that I should search the forum, where I can only find an answer to search the forum, and then be criticized for complaining at the uselessness of such problem-solving.

    As far as I can see the br tag as has been observed does not appear to work (thank ***). Normal list styling is all you need.

    I can’t find it in the forum. How does one do a linebreak formatting in CSS in a single “li”-element? (I want to separate link and description)

    You use line-height or possibly padding on li a. in the CSS.

    Hi Ville –

    Six months later, I have an answer to your question. 🙂 I was looking for a solution to this myself, and a search of the forums didn’t come up with anything except this post, so I went into the code. In /wp-includes/links.php, at the bottom in the get_links_list function, the before, after, and between fields are not called from the database on lines 486-488, and then on about line 507, those items are hardcoded when the call is sent to get_links, and what is hardcoded for between is just a newline (\n). There are two ways to fix this:

    1. a) Add the three fields to the SELECT so they’re picked up for the fuction. Lines 486-488 would probably become:

    SELECT DISTINCT link_category, cat_name, show_images,
    show_description, show_rating, show_updated, sort_order,
    sort_desc, text_before_link, text_after_link, text_after_all, list_limit

    b) then, list those three database items in the call to get_links, so line 507 changes from:

    ","n",<br />


    "get_links($cat['text_before_link'],","get_links($cat['text_after_all'],","get_links($cat['text_after_link'],",<br />

    Then the call to get_links should properly pull those settings from link categories.

    The other, fast cheap and wrong (but the way I did it) way to do it, is to just hardcode that BR tag into line 507:

    ","n<br>",<br />

    or of course br \ if you’re doing that xhtml thing.

    Dougal wrote this function originally so I might send this to him to see if I did it right.

    Tried to insert that (though things are cut off in your post) and got tons of PHP and mySQL errors.


Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Link category definition issue’ is closed to new replies.