Inject theme name and version into the footer dynamically
This commit is contained in:
parent
831b7ccb39
commit
435fd86bfe
|
@ -6,6 +6,7 @@
|
||||||
*
|
*
|
||||||
* @package understrap
|
* @package understrap
|
||||||
*/
|
*/
|
||||||
|
$the_theme = wp_get_theme();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php get_sidebar('footerfull'); ?>
|
<?php get_sidebar('footerfull'); ?>
|
||||||
|
@ -23,8 +24,8 @@
|
||||||
<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 -->
|
||||||
|
|
Reference in New Issue