This is not yet complete, but I wanted to share progress to make sure that @mansj is on board with the approach. We should avoid using direct SQL statements as much as possible and use other methods available to us.
Uses get_post() for single queries in popup.php and upload.php
Uses wp_update_post() to update individual attachments
Uses get_post_meta() and update_post_meta() to update meta information.
Uses admin_url() rather than get_bloginfo("wp_url"), which allows us to drop FORCE_SSL_ADMIN
Uses wp_safe_redirect() to ensure safe local redirects
I'm in progress on using WP_Query() to search for existing content.
This is not yet complete, but I wanted to share progress to make sure that @mansj is on board with the approach. We should avoid using direct SQL statements as much as possible and use other methods available to us.
get_post()
for single queries inpopup.php
andupload.php
wp_update_post()
to update individual attachmentsget_post_meta()
andupdate_post_meta()
to update meta information.admin_url()
rather thanget_bloginfo("wp_url")
, which allows us to dropFORCE_SSL_ADMIN
wp_safe_redirect()
to ensure safe local redirectsI'm in progress on using
WP_Query()
to search for existing content.