splorp / tersus

An achingly simple WordPress theme without all the usual cruft.
GNU General Public License v3.0
99 stars 6 forks source link

Decruft wp_tag_cloud #39

Closed splorp closed 10 years ago

splorp commented 11 years ago

I hate tag clouds at the best of times, but I know that some folks prefer to use them. Keeping this in mind, we should do some work at decrufting the output of the default WordPress cloud.

Specifically:

Before:

<a href='/tag/sometag' class='tag-link-36' title='2 topics' style='font-size: 8pt;'>sometag</a>

After:

<a href="/tag/sometag" title="2 posts">sometag</a>

I realize that some of these adjustments remove the frequency scaling from the tags themselves, but tough beans … we’re attempting to build a cleaner theme here, right?

cdharrison commented 11 years ago

Improved slightly. I'm a RegEx newb, so I duplicated decruft to target some of the things we wanted to remove in wp_tag_cloud. Still need to figure out rewriting the title.

splorp commented 10 years ago

Boom, baby!

The output of wp_tag_cloud links are now formatted as such:

<a href="/tag/foo" title="View 1 post">Foo</a> <a href="/tag/bar" title="View 2 posts">Bar</a>

Another one bites the dust, per commit 98d578cc37fe067c82081c8b10ddd6943772838f