Make WordPress Core


Ignore:
Timestamp:
05/19/2014 06:16:39 AM (12 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-scripts.php

    r27731 r28518  
    1818 */
    1919class WP_Scripts extends WP_Dependencies {
    20         var $base_url; // Full URL with trailing slash
    21         var $content_url;
    22         var $default_version;
    23         var $in_footer = array();
    24         var $concat = '';
    25         var $concat_version = '';
    26         var $do_concat = false;
    27         var $print_html = '';
    28         var $print_code = '';
    29         var $ext_handles = '';
    30         var $ext_version = '';
    31         var $default_dirs;
    32 
    33         function __construct() {
     20        public $base_url; // Full URL with trailing slash
     21        public $content_url;
     22        public $default_version;
     23        public $in_footer = array();
     24        public $concat = '';
     25        public $concat_version = '';
     26        public $do_concat = false;
     27        public $print_html = '';
     28        public $print_code = '';
     29        public $ext_handles = '';
     30        public $ext_version = '';
     31        public $default_dirs;
     32
     33        public function __construct() {
    3434                $this->init();
    3535                add_action( 'init', array( $this, 'init' ), 0 );
    3636        }
    3737
    38         function init() {
     38        public function init() {
    3939                /**
    4040                 * Fires when the WP_Scripts instance is initialized.
     
    5656         * @return array Scripts that have been printed
    5757         */
    58         function print_scripts( $handles = false, $group = false ) {
     58        public function print_scripts( $handles = false, $group = false ) {
    5959                return $this->do_items( $handles, $group );
    6060        }
    6161
    6262        // Deprecated since 3.3, see print_extra_script()
    63         function print_scripts_l10n( $handle, $echo = true ) {
     63        public function print_scripts_l10n( $handle, $echo = true ) {
    6464                _deprecated_function( __FUNCTION__, '3.3', 'print_extra_script()' );
    6565                return $this->print_extra_script( $handle, $echo );
    6666        }
    6767
    68         function print_extra_script( $handle, $echo = true ) {
     68        public function print_extra_script( $handle, $echo = true ) {
    6969                if ( !$output = $this->get_data( $handle, 'data' ) )
    7070                        return;
     
    8282        }
    8383
    84         function do_item( $handle, $group = false ) {
     84        public function do_item( $handle, $group = false ) {
    8585                if ( !parent::do_item($handle) )
    8686                        return false;
     
    152152         * Localizes only if the script has already been added
    153153         */
    154         function localize( $handle, $object_name, $l10n ) {
     154        public function localize( $handle, $object_name, $l10n ) {
    155155                if ( $handle === 'jquery' )
    156156                        $handle = 'jquery-core';
     
    181181        }
    182182
    183         function set_group( $handle, $recursion, $group = false ) {
     183        public function set_group( $handle, $recursion, $group = false ) {
    184184
    185185                if ( $this->registered[$handle]->args === 1 )
     
    194194        }
    195195
    196         function all_deps( $handles, $recursion = false, $group = false ) {
     196        public function all_deps( $handles, $recursion = false, $group = false ) {
    197197                $r = parent::all_deps( $handles, $recursion );
    198198                if ( ! $recursion ) {
     
    209209        }
    210210
    211         function do_head_items() {
     211        public function do_head_items() {
    212212                $this->do_items(false, 0);
    213213                return $this->done;
    214214        }
    215215
    216         function do_footer_items() {
     216        public function do_footer_items() {
    217217                $this->do_items(false, 1);
    218218                return $this->done;
    219219        }
    220220
    221         function in_default_dir($src) {
     221        public function in_default_dir($src) {
    222222                if ( ! $this->default_dirs )
    223223                        return true;
     
    233233        }
    234234
    235         function reset() {
     235        public function reset() {
    236236                $this->do_concat = false;
    237237                $this->print_code = '';
Note: See TracChangeset for help on using the changeset viewer.