Skip to content

Fix view transitions setting values not being saved #2036

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

Merged
merged 2 commits into from
Jun 4, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions plugins/view-transitions/includes/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@
'post_content_selector',
);
foreach ( $selector_options as $selector_option ) {
if ( isset( $value[ $selector_option ] ) && is_string( $value[ $selector_option ] ) ) {
$selector_option_value = trim( sanitize_text_field( $value[ $selector_option ] ) );
if ( isset( $input[ $selector_option ] ) && is_string( $input[ $selector_option ] ) ) {
$selector_option_value = trim( sanitize_text_field( $input[ $selector_option ] ) );

Check warning on line 132 in plugins/view-transitions/includes/settings.php

View check run for this annotation

Codecov / codecov/patch

plugins/view-transitions/includes/settings.php#L131-L132

Added lines #L131 - L132 were not covered by tests
if ( '' !== $selector_option_value ) {
$value[ $selector_option ] = $selector_option_value;
}
Expand Down
Loading