diff --git a/src/php/admin-menus/class-import-menu.php b/src/php/admin-menus/class-import-menu.php index 016bf3e9..3c3b2565 100644 --- a/src/php/admin-menus/class-import-menu.php +++ b/src/php/admin-menus/class-import-menu.php @@ -145,13 +145,13 @@ protected function print_messages() { $imported, 'code-snippets' ), - '' . number_format_i18n(( $imported ) . '', + '' . number_format_i18n( $imported ) . '', ); printf( ' %s', - esc_url( code_snippets()->get_menu_url( 'manage' ) ) - esc_html__( 'Have fun!', 'code-snippets' ); + esc_url( code_snippets()->get_menu_url( 'manage' ) ), + esc_html__( 'Have fun!', 'code-snippets' ) ); } diff --git a/src/php/class-contextual-help.php b/src/php/class-contextual-help.php index 80261324..267d55ff 100644 --- a/src/php/class-contextual-help.php +++ b/src/php/class-contextual-help.php @@ -72,13 +72,19 @@ private function load_help_sidebar() { 'https://codesnippets.pro' => __( 'Plugin Website', 'code-snippets' ), ]; + $kses = [ + 'p' => [], + 'strong' => [], + 'a' => [ 'href' => [] ], + ]; + $contents = sprintf( "
%s
\n", esc_html__( 'For more information:', 'code-snippets' ) ); foreach ( $sidebar_links as $url => $label ) { $contents .= "\n" . sprintf( '', esc_url( $url ), esc_html( $label ) ); } - $this->screen->set_help_sidebar( wp_kses_post( $contents ) ); + $this->screen->set_help_sidebar( wp_kses( $contents, $kses ) ); } /** diff --git a/src/php/cloud/class-cloud-search-list-table.php b/src/php/cloud/class-cloud-search-list-table.php index 1b22b0fa..36bf9821 100644 --- a/src/php/cloud/class-cloud-search-list-table.php +++ b/src/php/cloud/class-cloud-search-list-table.php @@ -165,7 +165,7 @@ public function display_rows() { %s', - esc_html__( 'Codevault:', 'code-snippets' ); + esc_html__( 'Codevault:', 'code-snippets' ), esc_url( sprintf( 'https://codesnippets.cloud/codevault/%s', $item->codevault ) ), esc_html( $item->codevault ) ); diff --git a/src/php/strings.php b/src/php/strings.php index 6839784c..42083b68 100644 --- a/src/php/strings.php +++ b/src/php/strings.php @@ -14,7 +14,7 @@ // settings-fields.php. __( 'Minify Snippet Output', 'code-snippets' ); -__( 'Minify snippet output by removing whitespace and optimising code to reduce load times.', 'code-snippets' ); +__( 'Minify snippet output by removing whitespace and optimizing code to reduce load times.', 'code-snippets' ); // edit.php. __( 'View Full Stylesheet', 'code-snippets' ); diff --git a/src/php/views/partials/list-table-notices.php b/src/php/views/partials/list-table-notices.php index 8781f1e6..bfcb3d3e 100644 --- a/src/php/views/partials/list-table-notices.php +++ b/src/php/views/partials/list-table-notices.php @@ -62,8 +62,12 @@ ); if ( isset( $result_messages[ $result ] ) ) { + $result_kses = [ + 'strong' => [], + ]; + printf( '%s