Prefixing widget_posts_args Hook


I am working on a theme that I am trying to submit to I tested the code with theme sniffer plugin and I have the following error:

Hook names invoked by a theme/plugin should start with the theme/plugin prefix. 
Found: "widget_posts_args".

My code is the following:

    $nasio_r = new WP_Query( apply_filters( 'widget_posts_args', array(
        'posts_per_page'      => 3,
        'no_found_rows'       => true,
        'post_status'         => 'publish',
        'ignore_sticky_posts' => true
    ) ) );

How should I add the prefix without breaking the code?

Badan 2 years 2020-01-16T08:38:25-05:00 0 Answers 52 views 0

Leave an answer