Last active
November 5, 2018 22:54
-
-
Save westonruter/6920e17a1afd828d446d913105f0b755 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Spinning Custom Logo | |
* Description: Make your custom logo spin! | |
* Plugin URI: https://gist.github.com/westonruter/6920e17a1afd828d446d913105f0b755 | |
* Author Name: Weston Ruter | |
* Author URI: https://weston.ruter.net/ | |
* License: GPLv2 or later | |
*/ | |
add_action( 'wp_print_styles', function() { | |
if ( ! has_custom_logo() ) { | |
return; | |
} | |
?> | |
<style> | |
.custom-logo { | |
animation: logo-spin 4s linear infinite; | |
} | |
@keyframes logo-spin { | |
100% { | |
transform:rotate(360deg); | |
} | |
} | |
</style> | |
<?php | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment