Skip to content

Commit

Permalink
Hiding the map vars
Browse files Browse the repository at this point in the history
  • Loading branch information
krugazul committed Jan 7, 2025
1 parent 923d209 commit d20c491
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
16 changes: 5 additions & 11 deletions includes/classes/admin/class-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,17 +157,6 @@ public function create_settings_page() {

//Post type pages
add_action( 'lsx_to_framework_post_type_tab_content', array( $this, 'post_type_map_settings' ), 10, 2 );

/*if ( ! empty( tour_operator()->legacy->post_types ) ) {
foreach ( tour_operator()->legacy->post_types as $post_type => $label ) {
if ( isset( tour_operator()->legacy->options[ $post_type ]['googlemaps_marker'] ) && '' !== tour_operator()->legacy->options[ $post_type ]['googlemaps_marker'] ) {
tour_operator()->legacy->markers->post_types[ $post_type ] = tour_operator()->legacy->options[ $post_type ]['googlemaps_marker'];
} else {
tour_operator()->legacy->markers->post_types[ $post_type ] = LSX_TO_URL . 'assets/img/markers/' . $post_type . '-marker.png';
}
add_action( 'lsx_to_framework_' . $post_type . '_tab_content', array( $this, 'post_type_map_settings' ), 10, 2 );
}
}*/
}
}

Expand Down Expand Up @@ -251,6 +240,7 @@ public function fusion_table_settings( $tab = 'general' ) {
public function map_placeholder_settings( $tab = 'general' ) {
if ( 'placeholders' === $tab ) {
$settings = $this->get_settings_fields();

echo wp_kses_post( $this->output_fields( $settings['placeholder'] ) );
}
}
Expand All @@ -277,6 +267,10 @@ public function api_settings( $tab = 'general' ) {
public function post_type_map_settings( $tab, $post_type ) {
$settings = $this->get_settings_fields();
if ( 'placeholder' === $tab ) {
if ( ! in_array( $post_type, [ 'accommodation', 'destination', 'tour' ] ) ) {
unset( $settings['post_types']['placeholder']['map_placeholder_enabled'] );
unset( $settings['post_types']['placeholder']['map_placeholder'] );
}
echo wp_kses_post( $this->output_fields( $settings['post_types'][ $tab ], $post_type ) );
}
if ( 'template' === $tab ) {
Expand Down
6 changes: 0 additions & 6 deletions includes/classes/blocks/class-registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,6 @@ public function query_args_filter( $query, $block ) {
$this->onsale = false;
}

do_action( 'qm/debug', $query );

return $query;
}

Expand Down Expand Up @@ -310,8 +308,6 @@ public function maybe_hide_varitaion( $block_content, $parsed_block, $block_obj
return $block_content;
}

do_action( 'qm/debug', $matches );

if ( in_array( 'travel-information', $matches ) ) {
return $block_content;
}
Expand Down Expand Up @@ -395,8 +391,6 @@ public function maybe_hide_varitaion( $block_content, $parsed_block, $block_obj

foreach ( $key_array as $meta_key ) {
$value = lsx_to_custom_field_query( $meta_key, '', '', false );

do_action( 'qm/debug', $value );

// we need to see if the posts exist before we can use them
if ( stripos( $meta_key, '_to_' ) && 0 === $this->post_ids_exist( $value ) ) {
Expand Down

0 comments on commit d20c491

Please sign in to comment.