Code is Poetry.
WordPress' code just... wasn't. This is now dealt with. Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS. Fixes #41057. Built from https://develop.svn.wordpress.org/trunk@42343 git-svn-id: http://core.svn.wordpress.org/trunk@42172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -127,8 +127,8 @@ final class WP_Customize_Custom_CSS_Setting extends WP_Customize_Setting {
|
||||
}
|
||||
}
|
||||
$id_base = $this->id_data['base'];
|
||||
$value = '';
|
||||
$post = wp_get_custom_css_post( $this->stylesheet );
|
||||
$value = '';
|
||||
$post = wp_get_custom_css_post( $this->stylesheet );
|
||||
if ( $post ) {
|
||||
$value = $post->post_content;
|
||||
}
|
||||
@@ -180,9 +180,11 @@ final class WP_Customize_Custom_CSS_Setting extends WP_Customize_Setting {
|
||||
$css = '';
|
||||
}
|
||||
|
||||
$r = wp_update_custom_css_post( $css, array(
|
||||
'stylesheet' => $this->stylesheet,
|
||||
) );
|
||||
$r = wp_update_custom_css_post(
|
||||
$css, array(
|
||||
'stylesheet' => $this->stylesheet,
|
||||
)
|
||||
);
|
||||
|
||||
if ( $r instanceof WP_Error ) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user