I creat a post form on front-end for wordpress members by use DJD Site Post plugin. Plugin url: http://wordpress.org/extend/plugins/djd-site-post/
And now i want to auto strip all hyperlink & images in post when user copy & paste content from other website (with many links).
I use the simple editor in plugin (tinymce editor).
How to auto strip all hyperlinks & images in post befor record to database (or when user click the submit button) by php functions or tinymce functions (exclude admin user)?
Here is some code in the plugin i think need to edit: (I'm using case simple)
// Set editor (content field) style
switch($djd_options['djd-editor-style']){
case 'simple':
$teeny = true;
$show_quicktags = false;
add_filter( 'teeny_mce_buttons', create_function ( '' , "return array('bold', 'italic', 'underline', 'strikethrough', 'bullist', 'numlist', 'justifyleft', 'justifycenter', 'justifyright', 'undo', 'redo', 'unlink', 'fullscreen');" ) , 50 );
break;
case 'rich':
$teeny = false;
$show_quicktags = true;
break;
case 'html':
$teeny = true;
$show_quicktags = true;
add_filter ( 'user_can_richedit' , create_function ( '' , 'return false;' ) , 50 );
break;
}
Thanks all for help. (Sorry if my english is not good.)