/** * Checks if the given page is th Muut forum page. * * @param int $page_id The ID of the page we are checking (defaults to the current page). * @return bool Whether the page is a Muut forum page or not. * @author Paul Hughes * @since 3.0 */ function muut_is_forum_page($page_id = null) { if (is_null($page_id)) { $page_id = get_the_ID(); } return Muut_Post_Utility::isMuutForumPage($page_id); }
/** * Filters the content on a page if it is a standalone forum page to include the embed. * * @param string $content The current content string. * @return string The content. * @author Paul Hughes * @since 3.0 */ public function filterForumPageContent($content) { global $post; if ($post->post_type == 'page' && (Muut_Post_Utility::isMuutChannelPage($post->ID) || Muut_Post_Utility::isMuutForumPage($post->ID))) { $content = Muut_Post_Utility::forumPageEmbedMarkup($post->ID, false); } return $content; }