Changeset 31032 for trunk/src/wp-includes/class.wp-scripts.php
- Timestamp:
- 01/03/2015 05:07:15 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class.wp-scripts.php
r31030 r31032 28 28 public $print_code = ''; 29 29 public $ext_handles = ''; 30 public $print_after_html = ''; 30 31 public $ext_version = ''; 31 32 public $default_dirs; … … 68 69 } 69 70 70 public function print_extra_script( $handle, $echo = true ) {71 if ( ! $output = $this->get_data( $handle, 'data' ) )71 public function print_extra_script( $handle, $echo = true, $key = 'data' ) { 72 if ( ! $output = $this->get_data( $handle, $key ) ) { 72 73 return; 73 74 if ( !$echo ) 74 } 75 76 if ( ! $echo ) { 75 77 return $output; 78 } 76 79 77 80 echo "<script type='text/javascript'>\n"; // CDATA and type='text/javascript' is not needed for HTML 5 … … 118 121 if ( $this->in_default_dir($srce) ) { 119 122 $this->print_code .= $this->print_extra_script( $handle, false ); 123 $this->print_after_html .= "\n" . $this->print_extra_script( $handle, false, 'data-after' ); 120 124 $this->concat .= "$handle,"; 121 125 $this->concat_version .= "$handle$ver"; … … 156 160 if ( $this->do_concat ) { 157 161 $this->print_html .= $tag; 162 $this->print_after_html .= $this->print_extra_script( $handle, false, 'data-after' ) . "\n"; 158 163 } else { 159 164 echo $tag; 165 $this->print_extra_script( $handle, true, 'data-after' ); 160 166 } 161 167 … … 262 268 $this->concat_version = ''; 263 269 $this->print_html = ''; 270 $this->print_after_html = ''; 264 271 $this->ext_version = ''; 265 272 $this->ext_handles = '';
Note: See TracChangeset
for help on using the changeset viewer.