WordPress.org

Ready to get started?Download WordPress

Forums

Bulk Change Attachment Parent
looking for $_GET['doaction'] || $_GET['doaction2'] is making your plugin fail (1 post)

  1. James Revillini
    Member
    Posted 2 years ago #

    around line 99 you have

    // Prompt the user for the new parent ID
    		elseif (
    			( isset($_GET['doaction']) || isset($_GET['doaction2']) )
    			&& ( 'bulkchangeparent' == $_GET['action'] || 'bulkchangeparent' == $_GET['action2'] )
    			&& ( isset($_GET['media']) || isset($_GET['ids']) )
    		) {

    the first parenthesized expression looking for the existence of doaction and doaction2 breaks the plugin as of changeset 17352 http://core.trac.wordpress.org/changeset/17352 - I'm not sure exactly when they rolled this into a release, but based on comments I've seen elsewhere, it looks like maybe around 3.1.

    if you just delete that line and the && on the next line, you're left with the following which works

    // Prompt the user for the new parent ID
    		elseif (
    			( 'bulkchangeparent' == $_GET['action'] || 'bulkchangeparent' == $_GET['action2'] )
    			&& ( isset($_GET['media']) || isset($_GET['ids']) )
    		) {

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

  • RSS feed for this topic
  • Started 2 years ago by James Revillini
  • This topic is not resolved
  • WordPress version: 3.1.3