Skip to content

Conversation

@vmanthos
Copy link
Contributor

@vmanthos vmanthos commented May 16, 2023

Fixes the issue of the selected template not being displayed in the meta-boxe's form.

@vmanthos vmanthos requested a review from engahmeds3ed June 22, 2023 13:11
: '<option value="' . $selected . '">' . $selected . '</option>';
/*
$filenames_flipped = array_flip( $filenames);
unset( $filenames_flipped[$selected] );

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commenting this line and the previous echo means that we will duplicate the selected option, correct?
as $remainingTemplates now will have the selected value inside and we echo it already above.

}
echo ( ! $selected )
? '<option value="">' . __( 'Theme default page.') . '</option>'
: '<option value="' . $selected . '">' . $selected . '</option>';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to add the selected helper function here?

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

Successfully merging this pull request may close these issues.

2 participants