Last active
August 29, 2015 14:06
-
-
Save web-dev-media/ec549fa9b8c91c78b53a to your computer and use it in GitHub Desktop.
Revisions
-
web-dev-media revised this gist
Sep 8, 2014 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,12 @@ <?php /** * Plugin Name: Strip HTML from Author description * Plugin URI: https://gist.github.com/web-dev-media/ec549fa9b8c91c78b53a * Description: Remove all HTML-Code from author description * Version: 1.0 * Author: ../web/dev/media <info@web-dev-media.de> * Author URI: http://www.web-dev-media.de * License: GPL2 */ /** -
web-dev-media created this gist
Sep 8, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ <?php /** * Plugin Name: Strip HTML from Author description * Plugin URI: * Description: Remove all HTML-Code from author description * Version: 1.0 * Author: ../web/dev/media <info@web-dev-media.de> * Author URI: http://www.web-dev-media.de * License: GPL2 */ /** * Strip all HTML from the author description * * @author ../web/dev/media */ function strip_author_html( $author_meta ) { if( !empty( $_POST['description'] ) ){ $_POST['description'] = strip_tags( $_POST['description'] ); }else{ echo strip_tags( $author_meta ); } } add_filter( 'the_author_description', 'strip_author_html' ); add_action( 'edit_user_profile_update', 'strip_author_html' );