/** * Add Needed Post Types */ function ale_init_post_types() { if (function_exists('aletheme_get_post_types')) { foreach (aletheme_get_post_types() as $type => $options) { ale_add_post_type($type, $options['config'], $options['singular'], $options['multiple']); } } }
/** * Add custom icons for post types */ function ale_post_type_icons() { ?> <style type="text/css"> <?php if (function_exists('aletheme_get_post_types')) { foreach (aletheme_get_post_types() as $type => $config) { global $wp_version; if ($wp_version > '3.7.9') { if ($type == 'gallery') { ?> #menu-posts-<?php echo $type; ?> .wp-menu-image:before { content: "\f161"!important; } <?php } elseif ($type == 'inspiration') { ?> #menu-posts-<?php echo $type; ?> .wp-menu-image:before { content: "\f339"!important; } <?php } elseif ($type == 'press') { ?> #menu-posts-<?php echo $type; ?> .wp-menu-image:before { content: "\f185"!important; } <?php } elseif ($type == 'video') { ?> #menu-posts-<?php echo $type; ?> .wp-menu-image:before { content: "\f126"!important; } <?php } elseif ($type == 'testimonials') { ?> #menu-posts-<?php echo $type; ?> .wp-menu-image:before { content: "\f313"!important; } <?php } else { ?> #menu-posts-<?php echo $type; ?> .wp-menu-image:before { content: "\f348"!important; } <?php } } } } ?> </style> <?php }
/** * Add custom icons for post types */ function ale_post_type_icons() { ?> <style type="text/css"> <?php if (function_exists('aletheme_get_post_types')) { foreach (aletheme_get_post_types() as $type => $config) { ?> #menu-posts-<?php echo $type; ?> .wp-menu-image { background: url(<?php echo ALETHEME_URL; ?> /assets/images/post_type_icons/<?php echo $type; ?> .png) no-repeat 6px -17px !important; } #menu-posts-<?php echo $type; ?> :hover .wp-menu-image { background-position: 6px 7px !important; } <?php } } ?> </style> <?php }