Skip to:
Content

BuddyPress.org

Changeset 13013


Ignore:
Timestamp:
07/15/2021 10:42:52 AM (4 years ago)
Author:
imath
Message:

Implement an __isset magic method inside the BP_Theme_Compat class

Props sbrajesh

Fixes #8507

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/classes/class-bp-theme-compat.php

    r11032 r13013  
    118118        return array_key_exists( $property, $this->_data ) ? $this->_data[$property] : '';
    119119    }
     120
     121    /**
     122     * Check a theme's property exists.
     123     *
     124     * @since 9.0.0
     125     *
     126     * @param string $property Property name.
     127     * @return bool True if the property exists. False otherwise.
     128     */
     129    public function __isset( $property ) {
     130        return array_key_exists( $property, $this->_data );
     131    }
    120132}
Note: See TracChangeset for help on using the changeset viewer.