WordPress.org

Make WordPress Core

Changeset 28827


Ignore:
Timestamp:
06/24/2014 10:55:56 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Allow for easier adding of custom class variables when extending WP_Customize_Section or WP_Customize_Setting.

props rhurling.
fixes #27315.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

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

    r28509 r28827  
    9595     */
    9696    public function __construct( $manager, $id, $args = array() ) {
    97         $keys = array_keys( get_class_vars( __CLASS__ ) );
     97        $keys = array_keys( get_object_vars( $this ) );
    9898        foreach ( $keys as $key ) {
    9999            if ( isset( $args[ $key ] ) )
  • trunk/src/wp-includes/class-wp-customize-setting.php

    r28769 r28827  
    7777     */
    7878    public function __construct( $manager, $id, $args = array() ) {
    79         $keys = array_keys( get_class_vars( __CLASS__ ) );
     79        $keys = array_keys( get_object_vars( $this ) );
    8080        foreach ( $keys as $key ) {
    8181            if ( isset( $args[ $key ] ) )
Note: See TracChangeset for help on using the changeset viewer.