Skip to content

Instantly share code, notes, and snippets.

@alexkingorg
Last active December 17, 2015 05:28
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 alexkingorg/5557869 to your computer and use it in GitHub Desktop.
Save alexkingorg/5557869 to your computer and use it in GitHub Desktop.
Minimalist tabs for the WordPress 3.6 post formats feature.
<?php
/*
Plugin Name: AK.org Minimalist Post Format Tabs
Plugin URI: https://gist.github.com/alexkingorg/5557869
Description: Reduce the footprint of the post format tabs in the WordPress admin UI.
Version: 1.0
Author: Alex King
Author URI: http://alexking.org
License: GPL2
*/
function akv3_minimalist_format_tabs() {
?>
<style type="text/css">
.post-format-options {
background: transparent;
border: 0;
margin: 10px 0 0;
padding: 0;
}
.post-format-options a:hover,
.post-format-options a.active {
background: linear-gradient(to top, #ECECEC, #F9F9F9) repeat scroll 0 0 #F1F1F1;
}
.post-format-options a {
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
margin-right: 0;
padding: 0;
}
.post-format-options a div {
display: none;
}
.post-format-title {
margin-top: 0;
}
.post-format-change {
display: none;
}
#poststuff {
padding-top: 5px;
}
#wp-content-editor-tools {
height: auto;
padding: 0 0 7px;
}
</style>
<?php
}
add_action('admin_head-post.php', 'akv3_minimalist_format_tabs', 100);
add_action('admin_head-post-new.php', 'akv3_minimalist_format_tabs', 100);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment