RadoslavGeorgiev / rila-framework

A front-end WordPress framework with a set of many extendable class wrappers, inpired by the MVC ideology
GNU General Public License v2.0
18 stars 3 forks source link

PHP callbacks in maps #16

Closed RadoslavGeorgiev closed 7 years ago

RadoslavGeorgiev commented 7 years ago

Right now, the following core does not work (within blocks for example:

$this->map(array(
    'table' => array( $this, 'parse_table' )
));

The reason lies within the following code of class-meta.php:

if( is_array( $map_to ) && is_array( $value ) ) {
    $value = new Meta( $value, $map_to );
    continue;
}

The code should check if the array is also a callback.

RadoslavGeorgiev commented 7 years ago

Fixed in bec830b