Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#11688 closed defect (bug) (fixed)

Wrong preview link for draft/preview on admin post index

Reported by: mmn-o's profile MMN-o Owned by:
Milestone: 3.0 Priority: low
Severity: trivial Version: 2.9
Component: Administration Keywords: has-patch
Focuses: Cc:

Description

The preview link on /wp-admin/edit.php for $post->post_status 'pending' or 'draft' is generated without the GET variable "preview".

The attached patch simply adds '&preview=true' to wp-admin/includes/template.php in the Preview link statement.

I'm not sure about Wordpress coding standards, but I hope the way I added the 'preview' variable works. Otherwise please modify it to meet the coding standards.

Attachments (2)

admin-template-preview_link_fix.patch (984 bytes) - added by MMN-o 14 years ago.
Patch to fix preview link generation in wp-admin/includes/template.php
11688.diff (1003 bytes) - added by nacin 14 years ago.
Using add_query_arg()

Download all attachments as: .zip

Change History (4)

@MMN-o
14 years ago

Patch to fix preview link generation in wp-admin/includes/template.php

@nacin
14 years ago

Using add_query_arg()

#1 @nacin
14 years ago

  • Keywords has-patch added; preview link admin removed
  • Milestone changed from Unassigned to 3.0
  • Version set to 2.9

Nice find.

We have add_query_arg() to handle this. I've uploaded a second patch.

#2 @automattor
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [13104]) Add ?preview=true to edit post rows when draft|pending. Props MMN-o, fixes #11688

Note: See TracTickets for help on using tickets.