Hover state + 32px icons in CustomPress

I know. I'm asking a question instead of answering one. Weird huh?

My hope is that there is a simple solution to this query. I recently installed CustomPress on a client's site because, hey, custom post type portability. What's not to love? We're re-building her theme and the plugin allows her to start on photo galleries now while I craft the other pixels. Sure, I could just call the same cpt.php file into both functions.php scripts but the GUI is very client-friendly.

I have a minor issue.

Normally I would use CSS to create a standard 16px icon, a color 16px icon, and a 32px icon for a post. If I were to guess, I'd say the icon sprite may look something like...


Seems legit.

Unfortunately, I'm only able to declare a standard 16px icon for the post type.


Well golly... that's no fun.

I'll spare you the code block and we'll say the solution might look like this in other themes: http://wptheming.com/2010/11/how-to-use-custom-post-type-icons/

Now, I can either [a] just manually declare the post type as usual or [b] do a style override instead of an icon definition but why resolve today what I can complain about tomorrow?

Wait that's not right...

Why solve for myself today what we can put into the plugin for everybody else tomorrow?

Yes that makes much more sense.

I suppose the trick would be that you'd need four options in the admin:

1. Sprite location (please tie this into the media library. Seriously.)
2. Standard icon position (0x0 default)
3. Hover icon position (0x-16 default)
4. 32bit icon position (-16x0 default)

You'd have to allow changing the position for folks who want to put 7 custom post types into one sprite.

Anyhow, this is a feature that really ought to find its way into CustomPress, even if we declare 3 different images instead of working with sprites.

Any chance it either exists or is already on the way and all of my hot air was for nothing?

  • Tom Eagles
    • Syntax Hero

    @Imperative Ideas

    Lol love the style of the post, ok lets do this the easy way, i checked our project management system and couldn't find this in there so guess what it will be there now :slight_smile: tagging :Arnold the man that can on this and adding this as a feature request because i can and it's a cool idea for a feature, actually more than cool it's a great idea. anyway oenough of my ramblings still recovering from the long shift yesterday.

    so ignore the above +1 from me added as a feature request and developer notified, and thanks for asking a question nice to be able to help you for achange, so off ya go back to answering the questions. :slight_smile:



  • Imperative Ideas
    • HummingBird

    Sorry to slack on my reply. Every time I rebuild my workstation I swear THIS TIME I'm going to do a full Acronis image before I start dirtying it up.

    This time I will, I swear.

    Anyhow, if Arnold wants to get really fancy he could allow for both individual uploads or sprites. I'm not picky. The admin doesn't tend to be a high-volume app the way the front end is and maybe for a first implementation picking 16, 16-hover, and 32 is as separate images is enough.

    Glad you enjoyed the post. Humor goes a long ways towards resolution when you're really just complaining about incidentals :slight_smile:

  • Imperative Ideas
    • HummingBird

    One more thing because as long as Arnold is flagged, I might as well monopolize his time.

    A bit of text explaining why "map meta capabilities" pretty much always needs to be true unless you're going to do this would keep a lot of "OMG HALP" posts out of the forums. I mean, I don't mind them... more points for me. Still, you generally want it to be "true" and not the default of "false".

    It's probably the single least user-friendly item in all of WordPress outside of a NAV walker (actually, a custom nav walker generator is a great idea for a plugin... but I digress)

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.