query_string, '', home_url($wp->request)); $parse = parse_url($current_url); $current_url = $parse['scheme'] . '://' . $parse['host'] . $parse['path']; $current_url = str_replace('/amp', '/', $current_url); $amps = get_option('amps'); $amps = MAMP_Render::amps_overwrite_with_custom_settings($amps, $post); $siteurl = get_site_url(); $type = null; $structuredData = array( 'mainEntityOfPage' => $current_url, 'headline' => 'NewsArticle', 'imgUrl' => (!empty($amps['structured_data_logo_image'])) ? $amps['structured_data_logo_image'] : AMP_URL . 'assets/img/logo.png', 'imgWidth' => 100, 'imgHeight' => 140, 'personName' => 'Admin', 'datePublished' => '01-01-2016 00:00:00', 'dateModified' => '01-01-2016 00:00:00', 'description' => 'Description Goes Here', 'publisherName' => 'Admin', 'logoUrl' => AMP_URL . 'assets/img/user.png', 'logoWidth' => 16, 'logoHeight' => 16 ); $homePage = FALSE; $shortcut_icon = AMP_URL . 'assets/img/logo.png'; if (is_single() || is_page()) { $amps_disabled_for_this_post = MAMP_Render::amps_custom_amp_enabled($post); if ((is_single() && empty($amps['on_posts'])) or ( is_page() && empty($amps['on_pages'])) or $amps_disabled_for_this_post) { header('location:' . $current_url); } $type = POST; $first_name_author = get_user_meta($post->post_author, 'first_name', true); $last_name_author = get_user_meta($post->post_author, 'last_name', true); $author = $first_name_author . ' ' . $last_name_author; $author_avatar = get_avatar_url($post->post_author, 16); $RAWcategories = get_the_category($post->ID); $categories = array(); foreach ($RAWcategories as $c) { $categories[] = '' . $c->cat_name . ''; } $RAWtags = wp_get_post_tags($post->ID); $tags = array(); foreach ($RAWtags as $t) { $tags[] = '' . $t->name . ''; } $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'single-post-thumbnail'); $ldImage = !empty($image[0]) ? $image[0] : $shortcut_icon; $ldImage = (!empty($amps['structured_data_logo_image'])) ? $amps['structured_data_logo_image'] : $ldImage ; $dimensions = MAMP_Render::getImageDimensions($ldImage); $structuredData['headline'] = !empty($post->post_title) ? $post->post_title : 'Untitled'; $structuredData['imgUrl'] = $ldImage; $structuredData['imgHeight'] = $dimensions['height']; $structuredData['imgWidth'] = $dimensions['width']; $structuredData['personName'] = (!empty($author) && trim($author) != '') ? $author : 'Admin'; $structuredData['datePublished'] = date('d-m-Y H:i:s', strtotime($post->post_date)); $structuredData['dateModified'] = date('d-m-Y H:i:s', strtotime($post->post_modified)); $postContent = $post->post_content; if(empty($post->post_content)){ if($thrive_editor){ $postContent = get_post_meta( $post->ID, 'tve_content_before_more'); $postContent = $postContent[0]; } if($is_live_editor){ $postContent = get_post_meta( $post->ID, 'dslc_code', true); } } $structuredData['description'] = do_shortcode(MAMP_Render::replaceForAMP($postContent, true)); $structuredData['publisherName'] = (!empty($author) && trim($author) != '') ? $author : 'Admin'; } else { $ampType = MAMP_Render::getAMPtype($data); if($ampType == -1 && (!is_home() && !is_front_page())){ $term = MAMP_Render::isSlug(); if($term != -1){ $ampType = $term['type']; $data = $term['term']; } } if ($ampType == CATE) { if (empty($amps['on_categories'])) { header('location:' . $current_url); } $this_object = get_queried_object(); if(!empty($this_object)){ $data = $this_object->slug; } $type = CATE; $args = array( 'posts_per_page' => 5, 'offset' => 0, 'category' => '', 'category_name' => $data, 'orderby' => 'date', 'order' => 'DESC', 'include' => '', 'exclude' => '', 'meta_key' => '', 'meta_value' => '', 'post_type' => 'post', 'post_mime_type' => '', 'post_parent' => '', 'author' => '', 'post_status' => 'publish', 'suppress_filters' => true ); $posts_array = get_posts($args); $structuredData['headline'] = 'Category: ' . $data; $structuredData['description'] = $data; } elseif ($ampType == TAG) { if (empty($amps['on_tags'])) { header('location:' . $current_url); } $this_cat_data = get_the_category(get_query_var( 'cat' )); $this_object = get_queried_object(); if(!empty($this_object)){ $data = $this_object->slug; } $type = TAG; $args = array( 'tax_query' => array( array( 'taxonomy' => 'post_tag', 'field' => 'slug', 'terms' => $data ) ) ); $posts_array = get_posts($args); $structuredData['headline'] = 'Tag: ' . $data; $structuredData['description'] = $data; } elseif ($ampType == -1) { $homePage = TRUE; if (empty($amps['on_home'])) { header('location:' . $current_url); } if (is_front_page()) { $type = CATE; $args = array('posts_per_page' => 5, 'offset' => 0, 'category' => '', 'category_name' => '', 'orderby' => 'date', 'order' => 'DESC', 'include' => '', 'exclude' => '', 'meta_key' => '', 'meta_value' => '', 'post_type' => 'post', 'post_mime_type' => '', 'post_parent' => '', 'author' => '', 'post_status' => 'publish', 'suppress_filters' => true); $posts_array = get_posts($args); $structuredData['headline'] = 'Home Page'; $structuredData['description'] = 'Home Page Posts'; } else { $postId_on_home_page = get_option('page_on_front'); $post_on_home_page = get_post($postId_on_home_page); $post = $post_on_home_page; setup_postdata($post); $type = POST; $author = get_user_meta($post->post_author, 'first_name', true); $author_avatar = get_avatar_url($post->post_author, 16); $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'single-post-thumbnail'); $ldImage = !empty($image[0]) ? $image[0] : $shortcut_icon; $ldImage = (!empty($amps['structured_data_logo_image'])) ? $amps['structured_data_logo_image'] : $ldImage ; $dimensions = MAMP_Render::getImageDimensions($ldImage); $structuredData['headline'] = !empty($post->post_title) ? $post->post_title : 'Untitled'; $structuredData['imgUrl'] = $ldImage; $structuredData['imgHeight'] = $dimensions['height']; $structuredData['imgWidth'] = $dimensions['width']; $structuredData['personName'] = (!empty($author) && trim($author) != '') ? $author : 'Admin'; $structuredData['datePublished'] = date('d-m-Y H:i:s', strtotime($post->post_date)); $structuredData['dateModified'] = date('d-m-Y H:i:s', strtotime($post->post_modified)); $postContent = $post->post_content; if(empty($post->post_content)){ if($thrive_editor){ $postContent = get_post_meta( $post->ID, 'tve_content_before_more'); $postContent = $postContent[0]; } if($is_live_editor){ $postContent = get_post_meta( $post->ID, 'dslc_code', true); } } $full_post = $post; $structuredData['description'] = do_shortcode(MAMP_Render::replaceForAMP($postContent, true)); $structuredData['publisherName'] = (!empty($author) && trim($author) != '') ? $author : 'Admin'; $post = $full_post; } } } $lightBoxEnabled = (!isset($amps['disable_lightbox_on_images']) || empty($amps['disable_lightbox_on_images'])) ? 1 : 0; if(!empty($posts_array)){ foreach($posts_array as $this_post){ MAMP_Render::replaceForAMP($this_post->post_content); } } if(!in_array(TRUE, $global_content_specs['youtube'])){ do_shortcode($post->post_content); MAMP_Render::replaceForAMP($post->post_content); } ?> <?php echo $structuredData['headline']; ?> '; endif; ?> "; } else { if ( is_plugin_active( 'wordpress-seo/wp-seo.php' ) ) { do_action('wpseo_head'); } else { echo ""; } } if ( is_plugin_active( 'wordpress-seo/wp-seo.php' ) ) {MAMP_Render::ampSupremacyLoadYoastOgData();} } else { echo ""; } ?> term_id; $menu_args = array( 'echo' => false, 'menu' => $amp_selected_menu, 'menu_class' => '', 'container' => '', 'link_before' => '- ' ); $siteMenu = wp_nav_menu($menu_args); if(!empty($siteMenu)): ?>

post_title) ? $post->post_title : 'Untitled'; } ?>

ID) && empty($amps['featured_image_hide'])): $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'single-post-thumbnail'); if(isset($image[0]) && !empty($image[0])): ?>

post_content; if(empty($post->post_content)){ if($thrive_editor){ $postContent = get_post_meta( $post->ID, 'tve_content_before_more'); $postContent = $postContent[0]; } if($is_live_editor){ $postContent = get_post_meta( $post->ID, 'dslc_code', true); } } echo do_shortcode(MAMP_Render::replaceForAMP($postContent)); } if(!isset($amps['disable_recent_posts']) || empty($amps['disable_recent_posts'])){ MAMP_Model::getAMPSupremacyRelatedPosts($post, $amps['relevant_posts_to']); } ?>

Category:

Tag:

$post) { $first_name_author = get_user_meta($post->post_author, 'first_name', true); $last_name_author = get_user_meta($post->post_author, 'last_name', true); $author = $first_name_author . ' ' . $last_name_author; $author_avatar = get_avatar_url($post->post_author, 16); $RAWcategories = get_the_category($post->ID); $categories = array(); foreach ($RAWcategories as $c) { $categories[] = '' . $c->cat_name . ''; } $RAWtags = wp_get_post_tags($post->ID); $tags = array(); foreach ($RAWtags as $t) { $tags[] = '' . $t->name . ''; } ?>
ID)){ ?>

post_title) ? $post->post_title : 'Untitled'; ?>

ID) && empty($amps['featured_image_hide'])): $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'single-post-thumbnail'); if(isset($image[0]) && !empty($image[0])): ?>

post_content; if(empty($post->post_content)){ if($thrive_editor){ $postContent = get_post_meta( $post->ID, 'tve_content_before_more'); $postContent = $postContent[0]; } if($is_live_editor){ $postContent = get_post_meta( $post->ID, 'dslc_code', true); } } echo do_shortcode(MAMP_Render::replaceForAMP($postContent)); ?>

Protected: post_title) ? $post->post_title : 'Untitled'; ?>

Click here to unlock this post