예제 #1
0
/**
 * Get embed anchor for page.
 *
 * @param int $page_id The ID of the page we are getting the anchor for.
 * @param bool $echo Whether to echo the anchor or not.
 * @return void|string The anchor markup or void, we $echo is set to true (and we echo the markup).
 * @author Paul Hughes
 * @since 3.0
 */
function muut_page_embed($page_id = null, $echo = true)
{
    if (is_null($page_id)) {
        $page_id = get_the_ID();
    }
    return Muut_Post_Utility::forumPageEmbedMarkup($page_id, $echo);
}
예제 #2
0
 /**
  * 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;
 }