diff --git src/wp-includes/class.wp-styles.php src/wp-includes/class.wp-styles.php
index 1a017ac..0de9051 100644
|
|
|
class WP_Styles extends WP_Dependencies { |
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | public function add_inline_style( $handle, $code ) { |
| 123 | | if ( !$code ) |
| | 123 | if ( ! $code ) { |
| 124 | 124 | return false; |
| | 125 | } |
| 125 | 126 | |
| 126 | 127 | $after = $this->get_data( $handle, 'after' ); |
| 127 | | if ( !$after ) |
| | 128 | if ( ! $after ) { |
| 128 | 129 | $after = array(); |
| | 130 | } |
| 129 | 131 | |
| 130 | 132 | $after[] = $code; |
| 131 | 133 | |
| … |
… |
class WP_Styles extends WP_Dependencies { |
| 135 | 137 | public function print_inline_style( $handle, $echo = true ) { |
| 136 | 138 | $output = $this->get_data( $handle, 'after' ); |
| 137 | 139 | |
| 138 | | if ( empty( $output ) ) |
| | 140 | if ( empty( $output ) ) { |
| 139 | 141 | return false; |
| | 142 | } |
| 140 | 143 | |
| 141 | 144 | $output = implode( "\n", $output ); |
| 142 | 145 | |
| 143 | | if ( !$echo ) |
| | 146 | if ( ! $echo ) { |
| 144 | 147 | return $output; |
| | 148 | } |
| 145 | 149 | |
| 146 | | echo "<style type='text/css'>\n"; |
| | 150 | echo "<style id='" . esc_attr( "wp-inline-style-$handle" ) . "' type='text/css'>\n"; |
| 147 | 151 | echo "$output\n"; |
| 148 | 152 | echo "</style>\n"; |
| 149 | 153 | |