Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
shridhamdeveloper committed Dec 20, 2024
1 parent 27b3e3b commit 776b488
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions modules/reviews/class-saswp-reviews-collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public function saswp_register_collection_post_type() {
'labels' => array(
'name' => esc_html__( 'Collections', 'schema-and-structured-data-for-wp' ),
'add_new' => esc_html__( 'Add Collection', 'schema-and-structured-data-for-wp' ),
'add_new_item' => esc_html__( 'Edit Collection', 'schema-and-structured-data-for-wp' ),
'add_new_item' => esc_html__( 'Add Collection', 'schema-and-structured-data-for-wp' ),
'edit_item' => esc_html__( 'Edit Collection', 'schema-and-structured-data-for-wp' ),
),
'public' => true,
Expand Down Expand Up @@ -907,8 +907,12 @@ public function saswp_admin_collection_interface_render() {
<lable><?php echo esc_html__( 'Date Format', 'schema-and-structured-data-for-wp' ); ?></lable>
<select name="saswp_collection_date_format" class="saswp-collection-date-format saswp-coll-settings-options">
<?php
foreach( $date_format as $key => $val){
echo '<option value="'. esc_attr( $key).'" '.($post_meta['saswp_collection_date_format'][0] == $key ? 'selected':'').' >'.esc_html( $val ).'</option>';
foreach( $date_format as $key => $val){
$selected_date = '';
if ( isset( $post_meta['saswp_collection_date_format'][0] ) && $post_meta['saswp_collection_date_format'][0] == $key ) {
$selected_date = 'selected';
}
echo '<option value="'. esc_attr( $key).'" '.esc_attr( $selected_date ).' >'.esc_html( $val ).'</option>';
}
?>
</select>
Expand Down

0 comments on commit 776b488

Please sign in to comment.