hooks(); $this->run_adds(); } public function hooks() { // WordPress & plugins hooks $this->add_filter( 'post_class', $this, 'filter_post_class', 10, 3 ); } /** * Change post class based on location and configuration * * @param $classes * @param $class * @param $post_id * * @return array */ public function filter_post_class( $classes, $class, $post_id ) { if ( is_sticky() && is_home() && ! is_paged() ) { $classes[] = '-sticky-article'; } // Return the array return $classes; } } }