_post = $post; $this->header = new Header(); } /** * Fake get_canonical_url method. * @return string Returns a url for testing. */ public function get_canonical_url() { $url = get_permalink( $this->_post ); return $url; } /** * Gets the header * @return Header Returns the header. */ public function getHeader() { return $this->header; } /** * Hook the is_active_sidebar filter to always return true. * * @wp-hook is_active_sidebar * @return Returns true. */ static function fake_is_active_sidebar() { return true; } /** * Hook the sidebars_widgets filter. * * @wp-hook sidebars_widgets * @return Returns true. */ static function fake_wp_get_sidebars_widgets() { $ret = array( 'facebook_ia_header_ads' => array( 'adplugg' ) ); return $ret; } }