From 88dded4018482b178682a213c6eaa772314d7ded Mon Sep 17 00:00:00 2001 From: joedolson Date: Wed, 25 Sep 2024 18:44:31 +0000 Subject: [PATCH] deploy: ff9dc776f34f19721bb94e1a58b92a8903144467 --- mc_save_settings.html | 2 +- my-calendar-categories.php.html | 10 +++++----- my-calendar-event-editor.php.html | 2 +- my-calendar-location-manager.php.html | 2 +- my-calendar-locations.php.html | 6 +++--- my-calendar-settings.php.html | 20 ++++++++++---------- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/mc_save_settings.html b/mc_save_settings.html index 7735ed54..4c74cad6 100644 --- a/mc_save_settings.html +++ b/mc_save_settings.html @@ -116,7 +116,7 @@
Parameters:
-

POST global.

+

Sanitized POST global.

diff --git a/my-calendar-categories.php.html b/my-calendar-categories.php.html index 203aeefa..65a2b92d 100644 --- a/my-calendar-categories.php.html +++ b/my-calendar-categories.php.html @@ -175,7 +175,7 @@ if ( isset( $_GET['default'] ) && is_numeric( $_GET['default'] ) ) { mc_update_option( 'default_category', (int) $_GET['default'] ); $default_category = (int) $_GET['default']; - mc_show_notice( __( 'Default Category Changed', 'my-calendar' ) ); + mc_show_notice( __( 'Default Category Changed', 'my-calendar' ), true, false, 'success' ); } if ( isset( $post['mode'] ) && 'add' === $post['mode'] ) { @@ -193,7 +193,7 @@ if ( $cat_id ) { $append = implode( ' ', $append ); - mc_show_notice( __( 'Category added successfully', 'my-calendar' ) . ". $append" ); + mc_show_notice( __( 'Category added successfully', 'my-calendar' ) . ". $append", true, false, 'success' ); } else { mc_show_error( __( 'Category addition failed.', 'my-calendar' ) ); } @@ -218,9 +218,9 @@ mc_update_option( 'default_category', '' ); } if ( $results && ( $cal_results || $rel_results ) ) { - mc_show_notice( __( 'Category deleted successfully. Categories in calendar updated.', 'my-calendar' ) ); + mc_show_notice( __( 'Category deleted successfully. Categories in calendar updated.', 'my-calendar' ), true, false, 'success' ); } elseif ( $results && ! $cal_results ) { - mc_show_notice( __( 'Category deleted successfully. Category was not in use; categories in calendar not updated.', 'my-calendar' ) ); + mc_show_notice( __( 'Category deleted successfully. Category was not in use; categories in calendar not updated.', 'my-calendar' ), true, false, 'success' ); } elseif ( ! $results && $cal_results ) { mc_show_error( __( 'Category not deleted. Categories in calendar updated.', 'my-calendar' ) ); } @@ -260,7 +260,7 @@ $results = mc_update_cat( $update ); $append = implode( ' ', $append ); if ( $results || '' !== trim( $append ) ) { - mc_show_notice( __( 'Category edited successfully.', 'my-calendar' ) . " $append" ); + mc_show_notice( __( 'Category edited successfully.', 'my-calendar' ) . " $append", true, false, 'success' ); } else { mc_show_error( __( 'Category was not changed.', 'my-calendar' ) . " $append" ); } diff --git a/my-calendar-event-editor.php.html b/my-calendar-event-editor.php.html index f091c475..4c1f1499 100644 --- a/my-calendar-event-editor.php.html +++ b/my-calendar-event-editor.php.html @@ -458,7 +458,7 @@ $url = urldecode( sanitize_text_field( $post['ref'] ) ); // A link to the main calendar is always shown. Only show this if it was a different calendar. if ( mc_get_uri() !== $url ) { - mc_show_notice( "<a href='" . esc_url( $url ) . "'>" . __( 'Return to Calendar', 'my-calendar' ) . '</a>', true, false, 'info' ); + mc_show_notice( "<a href='" . esc_url( $url ) . "'>" . __( 'Return to Calendar', 'my-calendar' ) . '</a>' ); } } } diff --git a/my-calendar-location-manager.php.html b/my-calendar-location-manager.php.html index 07d92434..d2b84765 100644 --- a/my-calendar-location-manager.php.html +++ b/my-calendar-location-manager.php.html @@ -69,7 +69,7 @@ ); // Translators: Delete link. $notice = sprintf( __( 'Are you sure you want to delete this location? %s', 'my-calendar' ), '<a class="button delete" href="' . esc_url( add_query_arg( $args, admin_url( 'admin.php?page=my-calendar-location-manager&mode=delete&confirm=true' ) ) ) . '">' . __( 'Delete', 'my-calendar' ) . '</a>' ); - mc_show_notice( $notice ); + mc_show_notice( $notice, true, false, 'warning' ); } } if ( isset( $_GET['default'] ) && is_numeric( $_GET['default'] ) ) { diff --git a/my-calendar-locations.php.html b/my-calendar-locations.php.html index 1e19137d..a5402314 100644 --- a/my-calendar-locations.php.html +++ b/my-calendar-locations.php.html @@ -413,7 +413,7 @@ do_action( 'mc_delete_location', $results, $location ); if ( $results ) { $value = true; - $return = mc_show_notice( __( 'Location deleted successfully', 'my-calendar' ), false ); + $return = mc_show_notice( __( 'Location deleted successfully', 'my-calendar' ), false, false, 'success' ); $default_location = mc_get_option( 'default_location', false ); if ( (int) $default_location === $location ) { mc_update_option( 'default_location', '' ); @@ -490,7 +490,7 @@ ); $edit_url = add_query_arg( $args, admin_url( 'admin.php?page=my-calendar-locations' ) ); // Translators: Link to edit new location. - mc_show_notice( sprintf( __( 'Location added successfully. <a href="%s">Edit location.</a>', 'my-calendar' ), $edit_url ) ); + mc_show_notice( sprintf( __( 'Location added successfully. <a href="%s">Edit location.</a>', 'my-calendar' ), $edit_url ), true, false, 'success' ); } else { mc_show_error( __( 'Location could not be added to database', 'my-calendar' ) ); } @@ -544,7 +544,7 @@ } elseif ( 0 === $results ) { mc_show_error( __( 'Location was not changed.', 'my-calendar' ) ); } else { - mc_show_notice( __( 'Location edited successfully', 'my-calendar' ) ); + mc_show_notice( __( 'Location edited successfully', 'my-calendar' ), true, false, 'success' ); } $cur_loc = (int) $_POST['location_id']; mc_show_location_form( 'edit', $cur_loc ); diff --git a/my-calendar-settings.php.html b/my-calendar-settings.php.html index c063621c..f4fcc1f9 100644 --- a/my-calendar-settings.php.html +++ b/my-calendar-settings.php.html @@ -618,11 +618,11 @@ if ( isset( $post['mc_manage'] ) ) { $before_permalinks = mc_get_option( 'use_permalinks' ); mc_update_management_settings( $post ); - mc_show_notice( __( 'My Calendar Management Settings saved', 'my-calendar' ) ); + mc_show_notice( __( 'My Calendar Management Settings saved', 'my-calendar' ), true, false, 'success' ); } if ( isset( $post['mc_permissions'] ) ) { mc_update_permissions_settings( $post ); - mc_show_notice( __( 'My Calendar Permissions Updated', 'my-calendar' ) ); + mc_show_notice( __( 'My Calendar Permissions Updated', 'my-calendar' ), true, false, 'success' ); } // Output. if ( isset( $post['mc_show_months'] ) ) { @@ -631,12 +631,12 @@ $post['mc_title_template_list'] = wp_kses_post( $_POST['mc_title_template_list'] ); $post['mc_title_template_solo'] = wp_kses_post( $_POST['mc_title_template_solo'] ); mc_update_output_settings( $post ); - mc_show_notice( __( 'Display Settings saved', 'my-calendar' ) ); + mc_show_notice( __( 'Display Settings saved', 'my-calendar' ), true, false, 'success' ); } // Input. if ( isset( $post['mc_input'] ) ) { mc_update_input_settings( $post ); - mc_show_notice( __( 'Input Settings saved', 'my-calendar' ) ); + mc_show_notice( __( 'Input Settings saved', 'my-calendar' ), true, false, 'success' ); } if ( current_user_can( 'manage_network' ) && is_multisite() ) { if ( isset( $post['mc_network'] ) ) { @@ -644,19 +644,19 @@ update_site_option( 'mc_multisite', $mc_multisite ); $mc_multisite_show = (int) $post['mc_multisite_show']; update_site_option( 'mc_multisite_show', $mc_multisite_show ); - mc_show_notice( __( 'Multisite settings saved', 'my-calendar' ) ); + mc_show_notice( __( 'Multisite settings saved', 'my-calendar' ), true, false, 'success' ); } } // custom text. if ( isset( $post['mc_previous_events'] ) ) { mc_update_text_settings( $post ); - mc_show_notice( __( 'Custom text settings saved', 'my-calendar' ) ); + mc_show_notice( __( 'Custom text settings saved', 'my-calendar' ), true, false, 'success' ); } // Save email settings. if ( isset( $post['mc_email'] ) ) { mc_update_email_settings( $post ); - mc_show_notice( __( 'Email notice settings saved', 'my-calendar' ) ); + mc_show_notice( __( 'Email notice settings saved', 'my-calendar' ), true, false, 'success' ); } /** @@ -665,16 +665,16 @@ * @hook mc_save_settings * * @param {string} Message after updating settings sent to `mc_show_notice()`. - * @param {array} $post POST global. + * @param {array} $post Sanitized POST global. */ $settings = do_action( 'mc_save_settings', '', $post ); if ( is_string( $settings ) && '' !== $settings ) { - mc_show_notice( $settings ); + mc_show_notice( $settings, true, false, 'success' ); } $return = mc_import_settings(); if ( $return ) { - mc_show_notice( $return ); + mc_show_notice( $return, true, false, 'success' ); } }