Skip to content

Commit 3080bae

Browse files
Merge pull request #374 from masteradhoc/patch-2
fix post excerpt typo
2 parents 5c62df0 + bc287e0 commit 3080bae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

admin-functions.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,8 @@ function duplicate_post_copy_attachments( $new_id, $post ) {
488488
$cloned_child = [
489489
'ID' => $new_attachment_id,
490490
'post_title' => $child->post_title,
491-
'post_exceprt' => $child->post_title,
491+
'post_excerpt' => $child->post_excerpt, // Caption.
492+
'post_content' => $child->post_content, // Description.
492493
'post_author' => $new_post_author->ID,
493494
];
494495
wp_update_post( wp_slash( $cloned_child ) );

0 commit comments

Comments
 (0)