twentyeleven_print_link_color_style

Add a style block to the theme for the current link color.

Description

twentyeleven_print_link_color_style(); 

This function is attached to the wp_head action hook.


Usage

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

Defined (1)

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

/inc/theme-options.php  
  1. function twentyeleven_print_link_color_style() { 
  2. $link_color = $options['link_color']; 
  3.  
  4.  
  5. // Don't do anything if the current link color is the default. 
  6. if ( $default_options['link_color'] == $link_color ) 
  7. return; 
  8. ?> 
  9. <style> 
  10. /* Link color */ 
  11. a,  
  12. #site-title a:focus,  
  13. #site-title a:hover,  
  14. #site-title a:active,  
  15. .entry-title a:hover,  
  16. .entry-title a:focus,  
  17. .entry-title a:active,  
  18. .widget_twentyeleven_ephemera .comments-link a:hover,  
  19. section.recent-posts .other-recent-posts a[rel="bookmark"]:hover,  
  20. section.recent-posts .other-recent-posts .comments-link a:hover,  
  21. .format-image footer.entry-meta a:hover,  
  22. #site-generator a:hover { 
  23. color: <?php echo $link_color; ?>; 
  24. section.recent-posts .other-recent-posts .comments-link a:hover { 
  25. border-color: <?php echo $link_color; ?>; 
  26. article.feature-image.small .entry-summary p a:hover,  
  27. .entry-header .comments-link a:hover,  
  28. .entry-header .comments-link a:focus,  
  29. .entry-header .comments-link a:active,  
  30. .feature-slider a.active { 
  31. background-color: <?php echo $link_color; ?>; 
  32. </style> 
  33. <?php