Yoast / duplicate-post

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

Various small bug fixes #337

Closed jrfnl closed 9 months ago

jrfnl commented 9 months ago

Context

*

Summary

This PR can be summarized in the following changelog entry:

Relevant technical choices:

Column::register_hooks(): bug fix

The Column::quick_edit_remove_original() method only expects one parameter, so no need to ask WP for 2.

Newsletter::newsletter_signup_form(): bug fix

The wp_nonce_field() function by default displays the field.

This means that, as things were, the nonce field would be echo'd out when the function was called + would add a 1 to the $html string being created. The resulting $html string would not contain the nonce field and the nonce field would not be between the <form> tags.

Fixed by setting the $display parameter to false.

Ref: https://developer.wordpress.org/reference/functions/wp_nonce_field/

QA: remove redundant code

The explode() function will always return an array, so strict comparing the return value with an empty string will never result in a passing condition.

Ref: https://www.php.net/manual/en/function.explode.php

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

Relevant test scenarios

Test instructions for QA when the code is in the RC

QA can test this PR by following these steps:

*

Impact check

This PR affects the following parts of the plugin, which may require extra testing:

*

UI changes

Documentation

Quality assurance

Innovation

Fixes #

coveralls commented 9 months ago

Pull Request Test Coverage Report for Build 6985579179


Changes Missing Coverage Covered Lines Changed/Added Lines %
src/ui/newsletter.php 0 1 0.0%
<!-- Total: 1 2 50.0% -->
Totals Coverage Status
Change from base Build 6985565176: 0.04%
Covered Lines: 1236
Relevant Lines: 2462

💛 - Coveralls