Last active
February 9, 2018 19:34
-
-
Save mrwweb/f627f3fe407a64293f6a99d701526b94 to your computer and use it in GitHub Desktop.
A very simple shortcode to clear content following aligned images.
This file contains hidden or 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: Clear Aligned Content Shortcode | |
Description: A way to ensure floated images in page content don't wrap. Use [clear] in editor to push following content below any aligned images. | |
Author: Mark Root-Wiley | |
Version: 1.0 | |
Author URI: https://MRWweb.com | |
Plugin URI: https://gist.githubusercontent.com/mrwweb/f627f3fe407a64293f6a99d701526b94/raw/c0e23d2f5b0252332e4f7c549a2990b4c944cfe1/mrw-clear-shortcode.php | |
USAGE: | |
Place "[clear]" on own line in WordPress editor. | |
Any content on following lines will appear below any previous aligned images. | |
*/ | |
add_shortcode( 'clear', 'mrw_clear_shortcode' ); | |
function mrw_clear_shortcode() { | |
return '<span style="display:block !important; clear:both !important; width: 100% !important; height: 1px !important; border: 0 !important; background: transparent !important;"></span>'; | |
} |
Author
mrwweb
commented
Feb 9, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment