Skip to content

Commit

Permalink
Unneeded echo statement
Browse files Browse the repository at this point in the history
  • Loading branch information
joedolson committed Jan 5, 2025
1 parent 2aa7437 commit 633aa01
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/my-calendar-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -2085,7 +2085,7 @@ function mc_update_location_controls() {
if ( ! wp_verify_nonce( $nonce, 'my-calendar-nonce' ) ) {
wp_die( 'Invalid nonce' );
}
$locations = isset( $_POST['mc_location_controls'] ) ? map_deep( $_POST['mc_location_controls'], 'sanitize_textarea_field' ) : array();
$locations = isset( $_POST['mc_location_controls'] ) ? map_deep( wp_unslash( $_POST['mc_location_controls'] ), 'sanitize_textarea_field' ) : array();
$mc_location_controls = array();
foreach ( $locations as $key => $value ) {
$mc_location_controls[ $key ] = mc_csv_to_array( $value[0] );
Expand All @@ -2100,7 +2100,6 @@ function mc_update_location_controls() {
*/
function mc_location_controls() {
if ( current_user_can( 'mc_edit_settings' ) ) {
$response = mc_update_location_controls();
$location_fields = array(
'event_label' => __( 'Name of Location', 'my-calendar' ),
'event_city' => __( 'City', 'my-calendar' ),
Expand All @@ -2110,7 +2109,7 @@ function mc_location_controls() {
'event_country' => __( 'Country', 'my-calendar' ),
);
$mc_location_controls = mc_get_option( 'location_controls' );

mc_update_location_controls();
?>
<p><?php echo wp_kses_post( __( 'Save custom values to change location text fields into dropdowns. One field per line. Format: <code>saved_value,Displayed Value</code>', 'my-calendar' ) ); ?></p>
<form method="post" action="<?php echo esc_url( admin_url( 'admin.php?page=my-calendar-config#my-calendar-input' ) ); ?>">
Expand Down

0 comments on commit 633aa01

Please sign in to comment.