private static function getStickyPosts($limit = -1, $offset = false, $moreQuerySettings = [])
    {
        $sticky_posts = Option::get('sticky_posts');
        if (!$sticky_posts) {
            return [];
        }
        if (!isset($moreQuerySettings['post_type'])) {
            $moreQuerySettings['post_type'] = Post::TYPE_POST;
        }
        $querySettings = [
            'post_type' => [
                $moreQuerySettings['post_type'],
            ],
            'post__in' => $sticky_posts,
            'posts_per_page' => $limit,
        ];
        if ($offset) {
            $querySettings['offset'] = $offset;
        }
        $querySettings = array_merge($querySettings, $moreQuerySettings);
        $loop = new \WP_Query($querySettings);

        return self::loopQueryPosts($loop);
    }
private static function getStickyPosts($limit = -1, $offset = false, $moreQuerySettings = [])
    {
        $sticky_posts = Option::get('sticky_posts');
        if (!$sticky_posts) {
            return [];
        }
        if (!isset($moreQuerySettings['post_type'])) {
            $moreQuerySettings['post_type'] = Post::TYPE_POST;
        }
        $querySettings = [
            'post_type' => [
                $moreQuerySettings['post_type'],
            ],
            'post__in' => $sticky_posts,
            'posts_per_page' => $limit,
        ];
        if ($offset) {
            $querySettings['offset'] = $offset;
        }
        $querySettings = array_merge($querySettings, $moreQuerySettings);
        $loop = new \WP_Query($querySettings);

        return self::loopQueryPosts($loop);
    }
private static function getStickyPosts ( $ limit = - 1 , $ offset = false , $ moreQuerySettings = [ ] ) { $ sticky_posts = Option :: get ( 'sticky_posts' ) ; if ( ! $ sticky_posts ) { return [ ] ; } if ( ! isset ( $ moreQuerySettings [ 'post_type' ] ) ) { $ moreQuerySettings [ 'post_type' ] = Post :: TYPE_POST ; } $ querySettings = [ 'post_type' => [ $ moreQuerySettings [ 'post_type' ] , ] , 'post__in' => $ sticky_posts , 'posts_per_page' => $ limit , ] ; if ( $ offset ) { $ querySettings [ 'offset' ] = $ offset ; } $ querySettings = array_merge ( $ querySettings , $ moreQuerySettings ) ; $ loop = new \ WP_Query ( $ querySettings ) ; return self :: loopQueryPosts ( $ loop ) ; }
Return the fixed posts

@return array<Post>
Return the fixed posts