Yoast / duplicate-post

Yoast Duplicate Post plugin for WordPress
https://yoast.com
GNU General Public License v2.0
46 stars 35 forks source link

Typo and logic issue for child excerpt #369

Closed shabnam611 closed 2 months ago

shabnam611 commented 5 months ago

Please give us a description of what happened

In admin-functions.php file on line 473 (in the current version 4.5), there are a typo and a logic error

$cloned_child = [ 'ID' => $new_attachment_id, 'post_title' => $child->post_title, 'post_exceprt' => $child->post_title, 'post_author' => $new_post_author->ID, ];

post_exceprt should read post_excerpt and should be filled with $child->post_excerpt.

To Reproduce

Step-by-step reproduction instructions

  1. Kindly open the file from wp-content > plugins > duplicate post > admin-functions.php
  2. find line number 473

Expected results

  1. 'post_excerpt' => $child->post_excerpt

Actual results

  1. 'post_exceprt' => $child->post_title

Screenshots, screen recording, code snippet

If possible, please provide a screenshot, a screen recording or a code snippet which demonstrates the bug.

Screenshot 2024-05-09 at 12 03 21 PM

Technical info

Used versions

shabnam611 commented 5 months ago

+1 https://wordpress.org/support/topic/excerpt-problem-9/