is_admin() returns false when used in a REST API flow, even when the API request is made on an admin page.
In stick_post(), get_option( 'sticky_posts' ) is called. This then calls bogo_option_sticky_posts() which reduces $stickies posts. This is the direct cause of this issue.
The intention Bogo adds a filter for the sticky posts option is to show only sticky posts in the current locale.
is_admin()
returns false when used in a REST API flow, even when the API request is made on an admin page.stick_post()
,get_option( 'sticky_posts' )
is called. This then callsbogo_option_sticky_posts()
which reduces$stickies
posts. This is the direct cause of this issue.is_home
is true.is_home()
check can be used as a better alternative thanis_admin()
.