source/php/Search.php
public function addAlgoliaModuleAttribute($attributes, $post)
    {
        //Get rendered data from module(s)
        $rendered = strip_tags($this->getRenderedPostModules($post));

        //Only add if not empty
        if (!empty($rendered)) {
            $attributes['modules'] = substr($rendered, 0, 7000);
        }

        return $attributes;
    }
public function addAlgoliaModuleAttribute($attributes, $post)
    {
        //Get rendered data from module(s)
        $rendered = strip_tags($this->getRenderedPostModules($post));

        //Only add if not empty
        if (!empty($rendered)) {
            $attributes['modules'] = substr($rendered, 0, 7000);
        }

        return $attributes;
    }
public function addAlgoliaModuleAttribute ( $ attributes , $ post ) { //Get rendered data from module(s) $ rendered = strip_tags ( $ this -> getRenderedPostModules ( $ post ) ) ; //Only add if not empty if ( ! empty ( $ rendered ) ) { $ attributes [ 'modules' ] = substr ( $ rendered , 0 , 7000 ) ; } return $ attributes ; }
Add a attribute to algolia search
@param array   $attributes
@param WP_Post $post
@return array
Add a attribute to algolia search