Title: Some function are not using their aguments
Last modified: January 14, 2019

---

# Some function are not using their aguments

 *  [killua99](https://wordpress.org/support/users/killua99/)
 * (@killua99)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/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){
   
           if(isset($_POST['persist'])){
   
               $args = array(
   
                   'source_id'      => get_current_blog_id(),
                   'destination_id' => $destination_id,
                   'source_post_id' => $_POST['ID'],
                   'destination_post_id' => $created_post['id']
   
               );
   
               mpd_add_persist($args);
   
           }
   
       }
       ```
   
 * 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](https://wordpress.org/support/users/magicstick/)
 * (@magicstick)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/some-function-are-not-using-their-aguments/#post-11086729)
 * 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!
   🙂
 *  Thread Starter [killua99](https://wordpress.org/support/users/killua99/)
 * (@killua99)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/some-function-are-not-using-their-aguments/#post-11088608)
 * If you keep it Open Source I would like to help you rewriting the code.
 * You could take a look at my code, [https://github.com/killua99](https://github.com/killua99)
 * Cheers

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Some function are not using their aguments’ is closed to new replies.

 * ![](https://ps.w.org/multisite-post-duplicator/assets/icon-128x128.png?rev=1562920)
 * [Multisite Post Duplicator](https://wordpress.org/plugins/multisite-post-duplicator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/multisite-post-duplicator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/multisite-post-duplicator/)
 * [Active Topics](https://wordpress.org/support/plugin/multisite-post-duplicator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/multisite-post-duplicator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/multisite-post-duplicator/reviews/)

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [feature](https://wordpress.org/support/topic-tag/feature/)

 * 2 replies
 * 2 participants
 * Last reply from: [killua99](https://wordpress.org/support/users/killua99/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/some-function-are-not-using-their-aguments/#post-11088608)
 * Status: not resolved