Customizing “Press This”
Press This function on WordPress is a good and fast way to create quick links and posts. Unfortunately if you’re using a custom template on your blog it doesn’t include your styles on the text, at least on plain-text mode
Luckily you can edit Press This to include your customizations:
1. As always, especially when following instructions by random people on the Internet, make a backup of the file you’re about to edit. In this case press-this.php located on [yourblogpath]/wp-admin/.
2. Open press-this.php on a text/html/php editor of your choice. If you’re not sure what to use, use TextEdit, NotePad or the built-in editor of your FTP-program; basically some plain-text editor.
3. Find a line starting with <$php if ($url). This is the line that will add the link to the page you’re linking to. Add your style conversions onto the first <p>-tag, eg <p class="source">.
4. If you also want to add style for the quoted text find a line called $selection = '<p>'.str_replace('<p></p>', '', $selection).'</p>';. Again, add your style conversions onto the first <p>-tag, eg <p class="quote">.
5. Save the file and replace the existing press-this.php file
6. Make sure everything works, with and without quoted text, ie. normal regression test, and you’re good to go!
It’s good to take a backup of your edited file as well. Why? Because this file will be replaced every time you update WordPress and editing this over and over again is cumbersome, though it gets easier after few times