Support » Plugin: Multisite Post Duplicator » Some function are not using their aguments

  • Some functions are missing the use of arguments.

    For example on version ^1.7

    function mpd_process_persist( $post_id, $destination_id, $created_post = false){
            $args = array(
                'source_id'      => get_current_blog_id(),
                'destination_id' => $destination_id,
                'source_post_id' => $_POST['ID'],
                'destination_post_id' => $created_post['id']

    Look how you are using ‘source_post_id’ => $_POST[‘ID’], instead the argument $post_id

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author MagicStick


    Thanks for your post mate. This is a legacy issue and arose from the evolution of the plugin.

    Looking back I wouldn’t even be passing through so many parms. I would do it properly by passing a single args array and these legacy issues would be gone. It has been on my mind to to a rewrite as I’ve learned better ways to do things since launching the plugin some 4 years ago! Anyway, i digress. Thanks for point out and has made clear to me that a code revamp is defo pertinent for this plugin! 🙂

    If you keep it Open Source I would like to help you rewriting the code.

    You could take a look at my code,


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Some function are not using their aguments’ is closed to new replies.