Changeset 18480 for trunk/wp-includes/class.wp-styles.php
- Timestamp:
- 07/28/2011 06:24:00 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class.wp-styles.php
r18464 r18480 47 47 48 48 if ( $this->do_concat ) { 49 if ( $this->in_default_dir($obj->src) && !isset($obj->extra['conditional']) 49 if ( $this->in_default_dir($obj->src) && !isset($obj->extra['conditional']) && !isset($obj->extra['alt']) ) { 50 50 $this->concat .= "$handle,"; 51 51 $this->concat_version .= "$handle$ver"; 52 52 53 if ( !empty($this->registered[$handle]->extra['data']) ) 54 $this->print_code .= $this->registered[$handle]->extra['data']; 53 $this->print_code .= $this->get_data( $handle, 'after' ); 55 54 56 55 return true; … … 98 97 } 99 98 100 function add_inline_style( $handle, $ data) {101 if ( !$ data)99 function add_inline_style( $handle, $code ) { 100 if ( !$code ) 102 101 return false; 103 102 104 if ( !empty( $this->registered[$handle]->extra['data'] ) ) 105 $data .= "\n" . $this->registered[$handle]->extra['data']; 103 $after = $this->get_data( $handle, 'after' ); 104 if ( !$after ) 105 $after = array(); 106 106 107 return $this->add_data( $handle, 'data', $data ); 107 $after[] = $code; 108 109 return $this->add_data( $handle, 'after', $after ); 108 110 } 109 111 110 112 function print_inline_style( $handle, $echo = true ) { 111 if ( empty($this->registered[$handle]->extra['data']) ) 113 $output = $this->get_data( $handle, 'after' ); 114 115 if ( empty( $output ) ) 112 116 return false; 113 117 114 $output = $this->registered[$handle]->extra['data'];118 $output = implode( "\n", $output ); 115 119 116 120 if ( !$echo ) … … 152 156 return false; 153 157 } 154 158 155 159 function do_footer_items() { // HTML 5 allows styles in the body, grab late enqueued items and output them in the footer. 156 160 $this->do_items(false, 1);
Note: See TracChangeset
for help on using the changeset viewer.