Make WordPress Core

Changeset 20860


Ignore:
Timestamp:
05/23/2012 09:21:29 PM (14 years ago)
Author:
nacin
Message:

Remove temporary magic call method in favor of theme(), settings(), controls(), and sections() methods for WP_Customize_Manager. fixes #20736.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-customize-manager.php

    r20852 r20860  
    145145
    146146        /**
    147          * Generic getter.
     147         * Get the theme being customized.
    148148         *
    149149         * @since 3.4.0
    … …  
    151151         * @return WP_Theme
    152152         */
    153         public function __call( $callee, $args ) {
    154                 if ( in_array( $callee, array( 'theme', 'settings', 'controls', 'sections' ) ) )
    155                         return $this->$callee;
     153        public function theme() {
     154                return $this->theme;
     155        }
     156
     157        /**
     158         * Get the registered settings.
     159         *
     160         * @since 3.4.0
     161         *
     162         * @return array
     163         */
     164        public function settings() {
     165                return $this->settings;
     166        }
     167
     168        /**
     169         * Get the registered controls.
     170         *
     171         * @since 3.4.0
     172         *
     173         * @return array
     174         */
     175        public function controls() {
     176                return $this->controls;
     177        }
     178
     179        /**
     180         * Get the registered sections.
     181         *
     182         * @since 3.4.0
     183         *
     184         * @return array
     185         */
     186        public function sections() {
     187                return $this->sections;
    156188        }
    157189
Note: See TracChangeset for help on using the changeset viewer.