getThemeGenCustomPostTypes

The Responsive Minimal getThemeGenCustomPostTypes function.

Description

getThemeGenCustomPostTypes(); 

Usage

  1. if ( !function_exists( 'getThemeGenCustomPostTypes' ) ) { 
  2. require_once '/functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = getThemeGenCustomPostTypes(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/functions.php  
  1. function getThemeGenCustomPostTypes() { 
  2. global $themename, $shortname; 
  3. $CustomPostTypes = array('Gallery', 'Portfolio', 'Products', 'Services', 'Testimonials'); 
  4. $fontColorPostType = get_option($shortname.'_fontColorPostType'); 
  5. ?> 
  6. <span class="title_option_tg_full">Disable/enable custom post type (Gallery, Portfolio, Products, Services, Testimonials)</span> 
  7. <?php foreach($CustomPostTypes as $CustomPostType) {?> 
  8. <label for="<?php echo $shortname;?>_enablePostType<?php echo $CustomPostType?>"><?php echo __($CustomPostType, 'tstranslate')?></label> 
  9. <?php $enableCustomPostType = get_option($shortname.'_enablePostType'.$CustomPostType, 'true'); ?> 
  10. <input name="<?php echo $shortname.'_enablePostType'.$CustomPostType;?>" id="<?php echo $shortname.'_enablePostType'.$CustomPostType;?>" type="checkbox"  
  11. <?php echo($enableCustomPostType == 'true')?'checked="checked"':'';?> value="true"/> 
  12. <?php } ?> 
  13. <div class="clear"></div> 
  14. <small class="description_full"><?php echo __('Disable/enable custom post type (Gallery, Portfolio, Products, Services, Testimonials) This option will hide these menus in the slider ofwpdashboard interface.', 'tstranslate')?></small> 
  15. <span class="title_option_tg_full">Font Color custom post type (Gallery, Portfolio, Products, Services, Testimonials)</span> 
  16. <label for="<?php echo $shortname;?>_fontColorPostType"><?php echo __('Font Color', 'tstranslate')?></label> 
  17. <input name="<?php echo $shortname.'_fontColorPostType';?>" id="<?php echo $shortname.'_fontColorPostType';?>" type="text" value="<?php echo $fontColorPostType;?>" /> 
  18. <br /> 
  19. <span><b>(Font Color)</b> Use hex, rgb, hsl or color name eg(#333, rgb(200, 200, 200), hsl(0, 0%, 20%) or blue)</span> 
  20. <div class="area-save-btn"><input name="save" type="submit" value="Save" class="button-primary"/></div><!-- end area-save --> 
  21. <?php }