Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch duplication does not create links #63

Open
Jon007 opened this issue Jul 20, 2018 · 1 comment
Open

Batch duplication does not create links #63

Jon007 opened this issue Jul 20, 2018 · 1 comment

Comments

@Jon007
Copy link

Jon007 commented Jul 20, 2018

Batch duplication does not create links even when "Allow linked duplication functionality?" is enabled.

This needs to be allowed, since it is almost impossible to create the links afterwards, since there is no searching or sorting in the create link dialog: if you have many hundreds of posts it is effectively impossible to find the post you want to link back to.

should be relatively simple to implement since the functionality already exists when duplicating a single post

@Jon007
Copy link
Author

Jon007 commented Jul 21, 2018

this could be done in mpd_bulk_action() bulkaction-mpd-addon l.158 after:
if ( $countBatch ) {

				/* JM: add persist links on bulk copy
				 * 		'source_id' : The ID of the source site
				 * 		'destination_id' : The ID of the destination site
				 * 		'source_post_id' : The ID of the source post that was copied
				 * 		'destination_post_id' : The ID of the source post that was copied
				 */
				$args = array(
					'source_id'				 => get_current_blog_id(),
					'destination_id'		 => $get_site[ 0 ],
					'source_post_id'		 => $post_id,
					'destination_post_id'	 => $results[ $highest_index ][ 'id' ]
				);
				mpd_add_persist( $args );

Although there is an action hook here which could allow implementation, the action parameters are insufficient to allow an implementation as the source post id is not available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant