Ticket #3188 (closed defect: fixed)

Opened 2 years ago

Last modified 1 year ago

Shouldn't use deprecated functions start_wp

Reported by: foolswisdom Assigned to: westi
Priority: normal Milestone: 2.3
Component: General Version: 2.1
Severity: normal Keywords: has-patch
Cc: Nazgul

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

3188.diff (6.6 kB) - added by westi on 10/06/06 20:57:34.
Deprecate start_wp
end_to_start_wp.diff (1.9 kB) - added by westi on 11/28/06 21:56:51.
Kill off the final start_wp call

Change History

10/06/06 18:30:55 changed by westi

  • owner changed from anonymous to westi.
  • status changed from new to assigned.

I'm working on this.

10/06/06 20:57:34 changed by westi

  • attachment 3188.diff added.

Deprecate start_wp

10/06/06 20:59:02 changed by westi

  • keywords set to has-patch.

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

11/14/06 01:24:31 changed by ryan

  • status changed from assigned to closed.
  • resolution set to fixed.

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

(follow-up: ↓ 5 ) 11/14/06 01:25:23 changed by ryan

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

(in reply to: ↑ 4 ) 11/14/06 08:46:18 changed by westi

  • status changed from closed to reopened.
  • resolution deleted.

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

11/14/06 08:46:23 changed by westi

  • keywords deleted.

11/28/06 21:56:51 changed by westi

  • attachment end_to_start_wp.diff added.

Kill off the final start_wp call

11/28/06 21:57:33 changed by westi

  • keywords set to has-patch.

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

(follow-up: ↓ 9 ) 11/30/06 00:12:19 changed by 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?

(in reply to: ↑ 8 ) 11/30/06 09:08:42 changed by westi

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.

12/01/06 10:57:40 changed by matt

  • milestone changed from 2.1 to 2.2.

03/27/07 22:40:40 changed by foolswisdom

  • milestone changed from 2.2 to 2.3.

09/11/07 18:56:17 changed by ryan

  • status changed from reopened to closed.
  • resolution set to fixed.

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

09/11/07 18:57:19 changed by ryan

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