extra_category_fields_choosesitemap

The Woocommerce Category based sitemaps extra category fields choosesitemap function.

Description

extra_category_fields_choosesitemap( $tag ); 

Parameters (1)

0. $tag
The tag.

Usage

  1. if ( !function_exists( 'extra_category_fields_choosesitemap' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-category-based-sitemaps/includes/wccs-functions.php'; 
  3.  
  4. // The tag. 
  5. $tag = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = extra_category_fields_choosesitemap($tag); 
  9.  

Defined (1)

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

/includes/wccs-functions.php  
  1. function extra_category_fields_choosesitemap( $tag ) {  
  2. $t_id = $tag->term_id; 
  3. $cat_meta = get_option( "category_$t_id"); 
  4.  
  5. ?> 
  6.  
  7. <tr class="form-field" > 
  8. <th scope="row" valign="top"> 
  9. <font size="02"> <?php echo __('Sitemap type for this category', 'wccs'); ?></font> 
  10. </th> 
  11. <td> 
  12. <label for="Cat_meta[sitemaptype]"></label> 
  13. <input type="radio" style="width:1.5%" name="Cat_meta[sitemaptype]" id="Cat_meta[sitemaptype]" value="01" <?php if ( (isset($cat_meta['sitemaptype'])) && ($cat_meta['sitemaptype'] == "01") ) {echo "checked";} ?> /> 
  14. <?php echo __('xml', 'wccs'); ?> 
  15.   
  16.  
  17. <input type="radio" style="width:1.5%" name="Cat_meta[sitemaptype]" id="Cat_meta[sitemaptype]" value="02" <?php if ( (isset($cat_meta['sitemaptype'])) && ($cat_meta['sitemaptype'] == "02") ) {echo "checked";} ?> /> 
  18. <?php echo __('gzip ', 'wccs'); ?> 
  19.   
  20.  
  21.  
  22.  
  23. </td> 
  24. </tr> 
  25.  
  26.  
  27. <?php 
  28. }