MagicStick
Forum Replies Created
-
Hey man. Can you be more specific as to what you mean? Not sure…
Forum: Plugins
In reply to: [Multisite Post Duplicator] Update post status on linked posts?Hi Johan. I’ll be releasing a fix for your linked post status issue mentioned above later tonight. 🙂
I’ve had a think about your ‘delete linked post’ request. I have some reservations about putting this into the core without giving the user some options on this so I’m going to have a further think about how to manage this. However if you wish to implement this functionality simply add the following code into your functions.php file in your theme 🙂
function mpd_trash_linked_posts($post_id){ if (function_exists('mpd_get_persists_for_post')) { $linked = mpd_get_persists_for_post(get_current_blog_id(), $post_id); foreach ($linked as $linked_post) { switch_to_blog($linked_post['destination_id']); wp_trash_post( $linked_post['destination_post_id'] ); restore_current_blog(); } } } add_action('trash_post', 'mpd_trash_linked_posts');Forum: Plugins
In reply to: [Multisite Post Duplicator] Copy Media files?hey Harm. Sorry for taking so long to get back to you and sorry for the confusion because the MPD metabox should not be showing in the media post type as it doesn’t work! I’ll remove it in the next release but stay tuned because I am working on some functionality in that area! 😉
Forum: Plugins
In reply to: [Multisite Post Duplicator] Update post status on linked posts?Hi Johan. Thank you for your info (and for your donation! :-)). I’ll def look to add this functionality in a future release.
hey Ian. Thanks for the kind words. If you only want to be able to duplicate to one site you can add the following to your functions.php. (remember to change the ID to the ID of your ‘Master Site’
function mpd_filter_sites_to_one($args){ $id_of_main_site = 2; // Change this to the id of your 'main' site $args['ID'] = $id_of_main_site; return $args; } add_action('mpd_get_sites_args','mpd_filter_sites_to_one');Regarding your main point. Thanks for the info I’ll look into this.
Just an update. This is being worked on just now and will be part of v1.6.6 released in the next days or so. v1.6.5 was released just to get a few essential fixes done before working on a solution to this issue.
Hey joe. Just to give you an update on this. Yeah my memory was right because at the moment this code is running the GLOBALS are currently set to the destination post so
wp_get_attachment_url($post_media_attachment->ID)would have returned the wrong post. I wrote a wee function to get round this by multisitifying™ wp_get_attachment_url function.function mpd_wp_get_attachment_url($ID, $source_blog){ switch_to_blog($source_blog); $attachment_url = wp_get_attachment_url($ID); restore_current_blog(); return $attachment_url; }Its not the most efficient, but I feel necessary for the OP issues raised.
Thanks for letting me know about this. Will have an update pushed out to WP shortly.
- This reply was modified 8 years, 10 months ago by MagicStick.
Forum: Plugins
In reply to: [Multisite Post Duplicator] custom slug doesn’t get copiedThis has been fixed an will be released as part of v1.6.5 in the next few days. In the meantime you can get it at:
https://github.com/magicstickuk/multisite-post-duplicator/tree/v1.6.5
Thanks for the info man. Going to look into this but I’m pretty sure the reason I didn’t use this in the first place was because wp_get_attachment_url isn’t compatible over multisite. Could be wrong. But I’ll def have a rethink of this code. THanks!
Forum: Plugins
In reply to: [Multisite Post Duplicator] ACF Image and Post Attachments not copying acrossHey guys. Sorry for the late reply on this. Got a week off from my day job this week. Planning to get this sorted once and for all. Thanks again for your patience 🙂
Looking into issues on this james. Working on a release for the end of the week. Hopefully this will solve your query. Thanks for your patience. 🙂
Forum: Plugins
In reply to: [Multisite Post Duplicator] Backslashes “\” missing in copped pagesYour post_content is storing json data? Can you explain what is happening here? So I can better understand the environment that is looking to be copied?
Forum: Plugins
In reply to: [Multisite Post Duplicator] acf duplicate post objectsThis is a limitation in the plugin. Been trying to get my head around a workaround to this problem. They are various issues at play with this.
1. We need the destination site to have all the same linked posts for that particular post object.
2. We need to find a way to identify the linked ids and somehow manage them.
3. In order to work each sub site would have to have the exact same ACF field groups and Custom Post types.If there is any devs out there willing to offer any solutions on this please let me know 🙂
Forum: Plugins
In reply to: [Multisite Post Duplicator] custom slug doesn’t get copiedI’ll add this to my todo list for the next release. I think I know what is going on here.
Sorry for the late reply. Been up to my eyes in other stuff!
Mario
Hi Maxime. I am aware of this ‘bug’. I’ll get it sorted this week. I have a week off from my day job this weeks so planning to finally get round to my todo list! 🙂
Thanks for your kind words.
Mario