Inject theme name and version into the footer dynamically

This commit is contained in:
Max Myers 2016-10-11 11:01:04 -04:00
parent 831b7ccb39
commit 435fd86bfe
1 changed files with 7 additions and 6 deletions

View File

@ -6,25 +6,26 @@
* *
* @package understrap * @package understrap
*/ */
$the_theme = wp_get_theme();
?> ?>
<?php get_sidebar('footerfull'); ?> <?php get_sidebar('footerfull'); ?>
<div class="wrapper" id="wrapper-footer"> <div class="wrapper" id="wrapper-footer">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<footer id="colophon" class="site-footer" role="contentinfo"> <footer id="colophon" class="site-footer" role="contentinfo">
<div class="site-info"> <div class="site-info">
<a href="<?php echo esc_url( __( 'http://wordpress.org/', 'understrap' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'understrap' ), 'WordPress' ); ?></a> <a href="<?php echo esc_url( __( 'http://wordpress.org/', 'understrap' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'understrap' ), 'WordPress' ); ?></a>
<span class="sep"> | </span> <span class="sep"> | </span>
<?php printf( __( 'Theme: %1$s by %2$s.', 'understrap' ), 'understrap', '<a href="http://understrap.com/" rel="designer">understrap.com</a>' ); ?> <?php printf( __( 'Theme: %1$s by %2$s.', 'understrap' ), $the_theme->get( 'Name' ), '<a href="http://understrap.com/" rel="designer">understrap.com</a>' ); ?>
(<?php printf( __( 'Version', 'understrap' ) ); ?>: 0.4.7) (<?php printf( __( 'Version: %1$s', 'understrap' ), $the_theme->get( 'Version' ) ); ?>)
</div><!-- .site-info --> </div><!-- .site-info -->
</footer><!-- #colophon --> </footer><!-- #colophon -->
@ -32,9 +33,9 @@
</div><!--col end --> </div><!--col end -->
</div><!-- row end --> </div><!-- row end -->
</div><!-- container end --> </div><!-- container end -->
</div><!-- wrapper end --> </div><!-- wrapper end -->
</div><!-- #page --> </div><!-- #page -->