Skip to content

Commit

Permalink
restore primary term to avoid trigger of unsaved values
Browse files Browse the repository at this point in the history
  • Loading branch information
vraja-pro committed Apr 26, 2024
1 parent dbb1985 commit 0638706
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions admin/class-primary-term-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,10 @@ public function add_input_fields( $content ) {
*/
protected function primary_term_field( $taxonomy_name ) {
return sprintf(
'<input class="yoast-wpseo-primary-term" type="hidden" id="%1$s" name="%2$s"/>',
'<input class="yoast-wpseo-primary-term" type="hidden" id="%1$s" name="%2$s" value="%3$s" />',
esc_attr( $this->generate_field_id( $taxonomy_name ) ),
esc_attr( $this->generate_field_name( $taxonomy_name ) )
esc_attr( $this->generate_field_name( $taxonomy_name ) ),
esc_attr( $this->get_primary_term( $taxonomy_name ) )
);
}

Expand Down

0 comments on commit 0638706

Please sign in to comment.