evolved_copy_date

The Evolved evolved copy date function.

Description

evolved_copy_date(); 

Usage

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

Defined (1)

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

/functions.php  
  1. function evolved_copy_date() { 
  2.  
  3. global $wpdb; 
  4. $daty = $wpdb->get_results("SELECT YEAR(min(post_date)) as 'start', YEAR(now()) as 'end' from wp_posts where post_status = 'publish'"); 
  5.  
  6. if ($daty[0]->start != $daty[0]->end) { 
  7. $copy = "© ".$daty[0]->start." - ".$daty[0]->end; 
  8. }else{ 
  9. $copy = "© ".$daty[0]->start; 
  10. return $copy;