summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorSergey Biryukov <sergeybiryukov@git.wordpress.org>2025-05-02 14:17:45 +0000
committerSergey Biryukov <sergeybiryukov@git.wordpress.org>2025-05-02 14:17:45 +0000
commit06c30e71ee1dd3bb7ca17044ecd1d4bb032da654 (patch)
tree50e2c0221798f22411688dfdb47a5a02bc6729c3
parenta788083247e256f48d9cc16941b3ede10b6b7ea6 (diff)
downloadwordpress-06c30e71ee1dd3bb7ca17044ecd1d4bb032da654.tar.gz
wordpress-06c30e71ee1dd3bb7ca17044ecd1d4bb032da654.zip
Coding Standards: Use `is_wp_error()` in `WP_Customize_Custom_CSS_Setting`.
This brings more consistency with similar checks elsewhere in core. Follow-up to [39350]. Props dilipbheda, mukesh27. Fixes #63363. git-svn-id: https://develop.svn.wordpress.org/trunk@60215 602fd350-edb4-49c9-b593-d223f7449a82
-rw-r--r--src/wp-includes/customize/class-wp-customize-custom-css-setting.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wp-includes/customize/class-wp-customize-custom-css-setting.php b/src/wp-includes/customize/class-wp-customize-custom-css-setting.php
index 0e6132f339..aab0e47530 100644
--- a/src/wp-includes/customize/class-wp-customize-custom-css-setting.php
+++ b/src/wp-includes/customize/class-wp-customize-custom-css-setting.php
@@ -197,9 +197,10 @@ final class WP_Customize_Custom_CSS_Setting extends WP_Customize_Setting {
)
);
- if ( $r instanceof WP_Error ) {
+ if ( is_wp_error( $r ) ) {
return false;
}
+
$post_id = $r->ID;
// Cache post ID in theme mod for performance to avoid additional DB query.