Changeset 29956
- Timestamp:
- 10/18/2014 05:57:23 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class.wp-styles.php
r28518 r29956 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; … … 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; 145 146 echo "<style type='text/css'>\n"; 148 } 149 150 echo "<style id='wp-inline-style-" . esc_attr( $handle ) . "' type='text/css'>\n"; 147 151 echo "$output\n"; 148 152 echo "</style>\n";
Note: See TracChangeset
for help on using the changeset viewer.