joli_faq_seo_faqs

Filters the raw FAQ data before the actual output.

The $faq argument contains an array with the same structure as follows :

$faqs = [
    [
        'ID' => 1,
        'title' => 'FAQ Title 1',
        'content' => 'My FAQ answer 1',
        'date' => '2021-01-01 12:30:00',
        'emoji' => '🔎'
    ],
    [
        'ID' => 2,
        'title' => 'FAQ Title 2',
        'content' => 'My FAQ answer 2',
        'date' => '2021-01-02 14:30:00',
        'emoji' => '❓'
    ],
    ...
];

Here is how to handle this filter:

add_filter( 'joli_faq_seo_faqs', function($faqs){
    //Filter $faqs array here
    return $faqs;
});
Was this page helpful?