Last active
April 23, 2016 18:01
-
-
Save anythinggraphic/67ff70cbf0ddca924b31 to your computer and use it in GitHub Desktop.
Add A Horizontal Rule (HR) Button to the WordPress Editor
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 | |
//* Add HR button to TinyMCE | |
//* @link http://anythinggraphic.net/horizontal-rule-button-in-wordpress | |
add_filter("mce_buttons", "ag_horizontal_rule_button"); | |
function ag_horizontal_rule_button($buttons) { | |
$buttons[] = 'hr'; | |
return $buttons; | |
} |
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
hr { | |
border-top: 1px solid #ccd8db; | |
border-bottom: 1px solid white; | |
clear: both; | |
margin: 3rem 0; | |
width: 100%; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment