Make WordPress Core


Ignore:
Timestamp:
05/19/2014 06:16:39 AM (10 years ago)
Author:
wonderboymusic
Message:

Add missing access modifiers to methods in WP_Scripts and WP_Styles.

See #27881, #22234.

File:
1 edited

Legend:

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

    r28209 r28518  
    1818 */
    1919class WP_Styles extends WP_Dependencies {
    20     var $base_url;
    21     var $content_url;
    22     var $default_version;
    23     var $text_direction = 'ltr';
    24     var $concat = '';
    25     var $concat_version = '';
    26     var $do_concat = false;
    27     var $print_html = '';
    28     var $print_code = '';
    29     var $default_dirs;
    30 
    31     function __construct() {
     20    public $base_url;
     21    public $content_url;
     22    public $default_version;
     23    public $text_direction = 'ltr';
     24    public $concat = '';
     25    public $concat_version = '';
     26    public $do_concat = false;
     27    public $print_html = '';
     28    public $print_code = '';
     29    public $default_dirs;
     30
     31    public function __construct() {
    3232        /**
    3333         * Fires when the WP_Styles instance is initialized.
     
    4040    }
    4141
    42     function do_item( $handle ) {
     42    public function do_item( $handle ) {
    4343        if ( !parent::do_item($handle) )
    4444            return false;
     
    120120    }
    121121
    122     function add_inline_style( $handle, $code ) {
     122    public function add_inline_style( $handle, $code ) {
    123123        if ( !$code )
    124124            return false;
     
    133133    }
    134134
    135     function print_inline_style( $handle, $echo = true ) {
     135    public function print_inline_style( $handle, $echo = true ) {
    136136        $output = $this->get_data( $handle, 'after' );
    137137
     
    151151    }
    152152
    153     function all_deps( $handles, $recursion = false, $group = false ) {
     153    public function all_deps( $handles, $recursion = false, $group = false ) {
    154154        $r = parent::all_deps( $handles, $recursion );
    155155        if ( !$recursion ) {
     
    166166    }
    167167
    168     function _css_href( $src, $ver, $handle ) {
     168    public function _css_href( $src, $ver, $handle ) {
    169169        if ( !is_bool($src) && !preg_match('|^(https?:)?//|', $src) && ! ( $this->content_url && 0 === strpos($src, $this->content_url) ) ) {
    170170            $src = $this->base_url . $src;
     
    186186    }
    187187
    188     function in_default_dir($src) {
     188    public function in_default_dir($src) {
    189189        if ( ! $this->default_dirs )
    190190            return true;
     
    197197    }
    198198
    199     function do_footer_items() { // HTML 5 allows styles in the body, grab late enqueued items and output them in the footer.
     199    public function do_footer_items() { // HTML 5 allows styles in the body, grab late enqueued items and output them in the footer.
    200200        $this->do_items(false, 1);
    201201        return $this->done;
    202202    }
    203203
    204     function reset() {
     204    public function reset() {
    205205        $this->do_concat = false;
    206206        $this->concat = '';
Note: See TracChangeset for help on using the changeset viewer.