Skip to content

Instantly share code, notes, and snippets.

@westonruter
Last active November 5, 2018 22:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save westonruter/6920e17a1afd828d446d913105f0b755 to your computer and use it in GitHub Desktop.
Save westonruter/6920e17a1afd828d446d913105f0b755 to your computer and use it in GitHub Desktop.
<?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