Make WordPress Core


Ignore:
Timestamp:
01/16/2015 01:10:39 AM (10 years ago)
Author:
wonderboymusic
Message:

Revert [31032], this did not get much love.

See #25277.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class.wp-scripts.php

    r31033 r31189  
    2828    public $print_code = '';
    2929    public $ext_handles = '';
    30     public $print_after_html = '';
    3130    public $ext_version = '';
    3231    public $default_dirs;
     
    6968    }
    7069
    71     public function print_extra_script( $handle, $echo = true, $key = 'data' ) {
    72         if ( ! $output = $this->get_data( $handle, $key ) ) {
     70    public function print_extra_script( $handle, $echo = true ) {
     71        if ( !$output = $this->get_data( $handle, 'data' ) )
    7372            return;
    74         }
    75 
    76         if ( ! $echo ) {
     73
     74        if ( !$echo )
    7775            return $output;
    78         }
    7976
    8077        echo "<script type='text/javascript'>\n"; // CDATA and type='text/javascript' is not needed for HTML 5
     
    121118            if ( $this->in_default_dir($srce) ) {
    122119                $this->print_code .= $this->print_extra_script( $handle, false );
    123                 $this->print_after_html .= "\n" . $this->print_extra_script( $handle, false, 'data-after' );
    124120                $this->concat .= "$handle,";
    125121                $this->concat_version .= "$handle$ver";
     
    160156        if ( $this->do_concat ) {
    161157            $this->print_html .= $tag;
    162             $this->print_after_html .= $this->print_extra_script( $handle, false, 'data-after' ) . "\n";
    163158        } else {
    164159            echo $tag;
    165             $this->print_extra_script( $handle, true, 'data-after' );
    166160        }
    167161
     
    268262        $this->concat_version = '';
    269263        $this->print_html = '';
    270         $this->print_after_html = '';
    271264        $this->ext_version = '';
    272265        $this->ext_handles = '';
Note: See TracChangeset for help on using the changeset viewer.