Make WordPress Core

Opened 14 years ago

Closed 13 years ago

#13918 closed defect (bug) (fixed)

Don’t nag to Change Permalinks if permalink structure is defined

Reported by: demetris's profile demetris Owned by:
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.0
Component: Permalinks Keywords: has-patch
Focuses: Cc:

Description

The Post Edit screen nags you to Change Permalinks even for non-default permalink structures like:

/archives/%post_id% (example given by WP itself)

or

/%post_id%

Is there a reason WordPress checks in the way it does, instead of, for example, just checking whether permalink_structure is set, and then nagging accordingly?

The code is in get_sample_permalink_html:

http://core.trac.wordpress.org/browser/trunk/wp-admin/includes/post.php#L1065

Attachments (2)

t13918-permastruct-nag.diff (1.2 KB) - added by demetris 14 years ago.
More sensible nagging to Change Permalinks
t13918-permastruct-nag-v2.diff (1.0 KB) - added by demetris 13 years ago.
Adds check to the same IF, without nesting

Download all attachments as: .zip

Change History (7)

#1 @ocean90
14 years ago

  • Cc ocean90@… added
  • Component changed from General to Permalinks

#2 @demetris
14 years ago

  • Keywords has-patch added

Tentative patch to nag only when permalink_structure is empty.

(Personally I dislike the nag even then, but I don’t know what is most useful for the majority of WP users.)

@demetris
14 years ago

More sensible nagging to Change Permalinks

#3 @nacin
13 years ago

  • Milestone changed from Awaiting Triage to 3.1

Looks sane. Branching could be merged on the patch, though.

#4 @demetris
13 years ago

I suppose nacin’s comment means to add the check to the same IF, without nesting. I updated the patch accordingly, against the current trunk.

One other thing: I am not certain which way is better for checking whether the option does not have a value:

!get_option('permalink_structure')

or

get_option('permalink_structure') == ''

@demetris
13 years ago

Adds check to the same IF, without nesting

#5 @ryan
13 years ago

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

(In [16651]) Don’t nag to Change Permalinks if permalink structure is defined. Props demetris. fixes #13918

Note: See TracTickets for help on using tickets.