Make WordPress Core

Opened 18 years ago

Closed 17 years ago

Last modified 11 months ago

#3188 closed defect (bug) (fixed)

Shouldn't use deprecated functions start_wp

Reported by: foolswisdom's profile foolswisdom Owned by: westi's profile westi
Milestone: 2.3 Priority: normal
Severity: normal Version: 2.1
Component: General Keywords: has-patch
Focuses: Cc:

Description

Continuing ticket:3186 by Nazgul for remaining deprecated function start_wp

Here's a list of the functions (and between brackets the files that use them):

start_wp (wp-atom.php, wp-rss.php, wp-rss2.php, wp-admin/edit.php, wp-admin/export.php, wp-content/themes/clasdic/comment-popup.php and wp-content/themes/default/comment-popup.php)

Attachments (2)

3188.diff (6.6 KB) - added by westi 18 years ago.
Deprecate start_wp
end_to_start_wp.diff (1.9 KB) - added by westi 18 years ago.
Kill off the final start_wp call

Download all attachments as: .zip

Change History (15)

#1 @westi
18 years ago

  • Owner changed from anonymous to westi
  • Status changed from new to assigned

I'm working on this.

@westi
18 years ago

Deprecate start_wp

#2 @westi
18 years ago

  • Keywords has-patch added

Attached patch deprecates start_wp in all the listed places.

Also extends WP_Query to support post_type = all so as to enable using it for the exporter query.

Please test and feedback

#3 @ryan
18 years ago

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

(In [4465]) Don't use deprecated start_wp(). Props westi. fixes #3188

#4 follow-up: @ryan
18 years ago

Didn't include the export changes since the exporter needs to export posts of any status and not just publish.

#5 in reply to: ↑ 4 @westi
18 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Replying to ryan:

Didn't include the export changes since the exporter needs to export posts of any status and not just publish.

I tried to fix this with the new query var for post_type=all I guess i missed the post_status check as well.

I'll try and put up a patch to fix that one last occurrence by extending wp query to give us a way of getting every post/page back whatever the type /status

#6 @westi
18 years ago

  • Keywords has-patch removed

@westi
18 years ago

Kill off the final start_wp call

#7 @westi
18 years ago

  • Keywords has-patch added

Attached patch fixes the exporter to use the API and kills off start_wp for good

#8 follow-up: @matt
18 years ago

Wouldn't this allow someone to put export in the query string on someone's blog or RSS feed and grab the whole thing?

#9 in reply to: ↑ 8 @westi
18 years ago

Replying to matt:

Wouldn't this allow someone to put export in the query string on someone's blog or RSS feed and grab the whole thing?

Well post_type is a private query var (http://trac.wordpress.org/browser/trunk/wp-includes/classes.php#L6).

I'm not entirely sure how that affects where or not it is allowed in the url without spending more time reading the code.

However it probably should.

#10 @matt
18 years ago

  • Milestone changed from 2.1 to 2.2

#11 @foolswisdom
18 years ago

  • Milestone changed from 2.2 to 2.3

#12 @ryan
17 years ago

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

(In [6077]) Use setup_postdata instead of deprecated start_wp. fixes #3188

#13 @ryan
17 years ago

I simply changed it to use setup_postdata() instead of start_wp(). All we needed from start_wp was the postdata setup.

Note: See TracTickets for help on using tickets.