• Resolved theMikeD

    (@themiked)


    In this thread

    http://wordpress.org/support/topic/using-mp6-icons-for-a-custom-post-type

    it was suggested to look for the MP6 constant to determine if MP6 is active.

    Elsewhere, it is suggested that identifying mp6 in css is done by looking for the “mp6” class on body. So, for example, to set the icon of a custom post type I could use the following code:

    function md_set_tips_icon() {
        global $post_type;
    	if ( MP6 ) {
    		?>
            <style type="text/css">
                    .mp6 #menu-posts-md_tips .wp-menu-image:before {
                            content: '\f118';
                    }
            </style>
            <?
    	} else {
                    ...
    	}
    }

    The “mp6” CSS class is no longer being assigned in WP3.8, so I’m assuming that code will need to be modified. So I guess I need code that will allow me to say

    if ( some_WP_constant_containing_the_version_number <= 3.7} ) {
        do old style admin menu icon
    } else {
        do new style admin menu icon
    }

    Is there such a constant?

    http://wordpress.org/plugins/mp6/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Identify MP6 in WP 3.8?’ is closed to new replies.