WordPress

monthly archive – wp_get_archives return a string with no year in it

 
<?php
    $string = wp_get_archives('type=monthly&limit=4&echo=0');
    $pattern = ' ((19|20)\d{2}(</a>))';
    echo preg_replace($pattern, '\\3', $string);
?>