Ticket #7824: press-this.diff

File press-this.diff, 1.2 KB (added by rmccue, 5 years ago)

Patch to add referrer ability to Press This

Line 
1Index: press-this.php
2===================================================================
3--- press-this.php      (revision 9058)
4+++ press-this.php      (working copy)
5@@ -104,6 +104,7 @@
6 
7 // Set Variables
8 $title = wp_specialchars(aposfix(stripslashes($_GET['t'])));
9+$referrer = aposfix(stripslashes($_GET['r'])));
10 $selection = trim( aposfix( stripslashes($_GET['s']) ) );
11 if ( ! empty($selection) ) {
12        $selection = preg_replace('/(\r?\n|\r)/', '</p><p>', $selection);
13@@ -534,7 +535,7 @@
14                                <h2 id="content_type"><label for="content"><?php _e('Post') ?></label></h2>
15                       
16                                <div class="editor-container">
17-                                       <textarea name="content" id="content" style="width:100%;" class="mceEditor" rows="15"><?php if ($selection) { echo wp_richedit_pre($selection); } ?><p>via <a href="<?php echo $url ?>"><?php echo $title; ?></a></p><?php if($selection) echo '.'; ?></textarea>
18+                                       <textarea name="content" id="content" style="width:100%;" class="mceEditor" rows="15"><?php if ($selection) { echo wp_richedit_pre($selection); } ?><p>via <a href="<?php echo $url ?>"><?php echo $title; ?></a><?php if($referrer) echo ' ' . $referer; ?></p><?php if($selection) echo '.'; ?></textarea>
19                                </div>
20                        </div>
21                </div>