Skip to content

Commit

Permalink
try posting results to server
Browse files Browse the repository at this point in the history
  • Loading branch information
iandunn committed Dec 1, 2023
1 parent 8289270 commit d164afd
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions mu-plugins/blocks/google-map/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,14 @@ function get_map_format_options( array $options ): array {
'label' => __( 'Format', 'wporg' ),
'title' => __( 'Format', 'wporg' ),
'key' => 'map_format',
'action' => 'javascript:;',
// TODO: this is temporary, to prevent Apply from making a POST request.
'action' => get_permalink(),
// this wont work if there's more than one instance of block on page

// maybe make this the upcoming-events page, but pass the url params to get_upcoming_events() and add them to the sql query to filter down results?
// make sure to prepare b/c untrusted data
// or maybe post to a search page b/c that could include past events?
// TODO: javascript:; action is temporary, to prevent Apply from making a POST request.
// ideally we'd update the block to accept an `event` param in addition to `action`.
// if `event` exists, that event is fired and passed the data so it can filter the map markers based on the selected filters.
'options' => array(
Expand Down

0 comments on commit d164afd

Please sign in to comment.