public function isValidExtension($extension)
    {
        $valid_page_types = implode('|', Grav::instance()['config']->get('system.pages.types'));

        // Strip the file extension for valid page types
        if (preg_match('/(' . $valid_page_types . ')/', $extension)) {
            return true;
        }
        return false;
    }
public function isValidExtension($extension)
    {
        $valid_page_types = implode('|', Grav::instance()['config']->get('system.pages.types'));

        // Strip the file extension for valid page types
        if (preg_match('/(' . $valid_page_types . ')/', $extension)) {
            return true;
        }
        return false;
    }
public function isValidExtension ( $ extension ) { $ valid_page_types = implode ( '|' , Grav :: instance ( ) [ 'config' ] -> get ( 'system.pages.types' ) ) ; // Strip the file extension for valid page types if ( preg_match ( '/(' . $ valid_page_types . ')/' , $ extension ) ) { return true ; } return false ; }
Check if this is a valid Grav extension

@param $extension
@return bool
Check if this is a valid Grav extension