WordPress.org

Make WordPress Core

Ticket #7824: press-this.diff

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

Patch to add referrer ability to Press This

  • press-this.php

     
    104104
    105105// Set Variables
    106106$title = wp_specialchars(aposfix(stripslashes($_GET['t'])));
     107$referrer = aposfix(stripslashes($_GET['r'])));
    107108$selection = trim( aposfix( stripslashes($_GET['s']) ) );
    108109if ( ! empty($selection) ) {
    109110        $selection = preg_replace('/(\r?\n|\r)/', '</p><p>', $selection);
     
    534535                                <h2 id="content_type"><label for="content"><?php _e('Post') ?></label></h2>
    535536                       
    536537                                <div class="editor-container">
    537                                         <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>
     538                                        <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>
    538539                                </div>
    539540                        </div>
    540541                </div>