-
Notifications
You must be signed in to change notification settings - Fork 108
chore: satisfy plugin checks for WP core 6.9 #319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: core
Are you sure you want to change the base?
Changes from all commits
a88d5c3
e3600f8
4e7ebce
bd21d15
fd1ed58
d9c4c66
aaa64c2
042e638
cd182ca
1ed23bb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -173,11 +173,11 @@ public function display_rows() { | |
|
|
||
| echo '</a>'; | ||
| ?> | ||
| </h3> | ||
| <ul class="action-buttons"> | ||
| <?php echo cloud_lts_build_action_links( $item, 'search' ); ?> | ||
| </ul> | ||
| </div> | ||
| </h3> | ||
| <ul class="action-buttons"> | ||
| <?php echo wp_kses_post( cloud_lts_build_action_links( $item, 'search' ) ); ?> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe this will break the thickbox script. Escaping isn't necessary here – if we want to improve compliance, the underlying function really should be refactored to do output itself. |
||
| </ul> | ||
| </div> | ||
| <div class="column-description"> | ||
| <p><?php echo wp_kses_post( $this->process_description( $item->description ) ); ?></p> | ||
| <p class="authors"> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -230,17 +230,18 @@ public static function handle_version_switch( string $target_version ): array { | |
| return self::create_error_response( $install_result->get_error_message() ); | ||
| } | ||
|
|
||
| if ( $install_result ) { | ||
| delete_transient( VERSION_CACHE_KEY ); | ||
| if ( $install_result ) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like this introduces some incorrect indentation. |
||
| delete_transient( VERSION_CACHE_KEY ); | ||
|
|
||
| return [ | ||
| 'success' => true, | ||
| 'message' => sprintf( __( 'Successfully switched to version %s. Please refresh the page to see changes.', 'code-snippets' ), $target_version ), | ||
| ]; | ||
| } | ||
| return [ | ||
| 'success' => true, | ||
| /* translators: %s: the version number that was switched to. */ | ||
| 'message' => sprintf( __( 'Successfully switched to version %s. Please refresh the page to see changes.', 'code-snippets' ), $target_version ), | ||
| ]; | ||
| } | ||
|
|
||
| return self::handle_installation_failure( $target_version, $validation['download_url'], $install_result ); | ||
| } | ||
| return self::handle_installation_failure( $target_version, $validation['download_url'], $install_result ); | ||
| } | ||
|
|
||
| public static function render_version_switch_field( array $args ): void { | ||
| $current_version = self::get_current_version(); | ||
|
|
@@ -291,7 +292,7 @@ public static function render_version_switch_field( array $args ): void { | |
|
|
||
| public static function ajax_switch_version(): void { | ||
| if ( ! wp_verify_nonce( $_POST['nonce'] ?? '', 'code_snippets_version_switch' ) ) { | ||
| wp_die( __( 'Security check failed.', 'code-snippets' ) ); | ||
| wp_die( esc_html__( 'Security check failed.', 'code-snippets' ) ); | ||
| } | ||
|
|
||
| if ( ! current_user_can( 'update_plugins' ) ) { | ||
|
|
@@ -329,7 +330,7 @@ public static function render_refresh_versions_field( array $args ): void { | |
|
|
||
| public static function ajax_refresh_versions(): void { | ||
| if ( ! wp_verify_nonce( $_POST['nonce'] ?? '', 'code_snippets_refresh_versions' ) ) { | ||
| wp_die( __( 'Security check failed.', 'code-snippets' ) ); | ||
| wp_die( esc_html__( 'Security check failed.', 'code-snippets' ) ); | ||
| } | ||
|
|
||
| if ( ! current_user_can( 'manage_options' ) ) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
printfseems redundant here. What are we intending to achieve with this change?