$postID, 'order' => esc_attr($comment_order), 'status' => 'approve' //Change this to the type of comments to be displayed )); if ( $comments ) { ?>

add_query_arg( array('cpage' => '%#%', 'amp' => '1'), get_permalink() ), 'format' => '', 'total' => $max_page, 'echo' => false, 'add_fragment' => '#comments', ); if(true == ampforwp_get_setting('ampforwp-amp-takeover')){ $args['base'] = get_the_permalink().'comment-page-%#%'; } if ( paginate_comments_links($args) ) { ?>
>
'; } else { $facebook_comments_markup = '
'; if(true == ampforwp_get_setting('ampforwp-facebook-comments-title')){ $facebook_comments_markup .= '
'. esc_html__(ampforwp_translation(ampforwp_get_setting('ampforwp-facebook-comments-title'), 'Leave a Comment'),'accelerated-mobile-pages') .'
'; } $facebook_comments_markup .= 'post_name); $disqus_script_host_url = "https://ampforwp.appspot.com/?api=". AMPFORWP_DISQUS_URL; if( $redux_builder_amp['ampforwp-disqus-host-position'] == 0 ) { $disqus_script_host_url = esc_url( $redux_builder_amp['ampforwp-disqus-host-file'] ); } $disqus_url = $disqus_script_host_url.'?disqus_title='.$post_slug.'&url='.rawurlencode(get_permalink()).'&disqus_name='. esc_url( ampforwp_get_setting('ampforwp-disqus-comments-name') ) ."/embed.js" ; ?>
width= layout="" sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts" resizable frameborder="0" data-block-on-consent src="" title="">
ID, $srcUrl); $spotim_html = '
'.esc_html__('Load more...','accelerated-mobile-pages').'
'; echo $spotim_html; // escaped above } // Comments Scripts add_filter( 'ampforwp_post_template_data', 'ampforwp_framework_comments_scripts' ); function ampforwp_framework_comments_scripts( $data ) { $facebook_comments_check = ampforwp_framework_get_facebook_comments(); global $redux_builder_amp; $is_pb_enabled = ''; $is_pb_enabled = checkAMPforPageBuilderStatus(get_the_ID()); $display_comments_on = ""; $display_comments_on = ampforwp_get_comments_status(); $isBBPress = (function_exists('is_bbpress') ? is_bbpress() : false ); if ( $facebook_comments_check && true == ampforwp_get_setting('ampforwp-facebook-comments-support') && $display_comments_on && !is_front_page() && !$is_pb_enabled && !$isBBPress ) { if ( empty( $data['amp_component_scripts']['amp-facebook-comments'] ) ) { $data['amp_component_scripts']['amp-facebook-comments'] = 'https://cdn.ampproject.org/v0/amp-facebook-comments-0.1.js'; } } if ( $redux_builder_amp['ampforwp-disqus-comments-support'] && $display_comments_on && comments_open() && !$is_pb_enabled ) { if( $redux_builder_amp['ampforwp-disqus-comments-name'] !== '' ) { if ( empty( $data['amp_component_scripts']['amp-iframe'] ) ) { $data['amp_component_scripts']['amp-iframe'] = 'https://cdn.ampproject.org/v0/amp-iframe-0.1.js'; } } } if ( isset($redux_builder_amp['ampforwp-vuukle-comments-support']) && $redux_builder_amp['ampforwp-vuukle-comments-support'] && $display_comments_on && comments_open() && !$is_pb_enabled ) { if ( empty( $data['amp_component_scripts']['amp-iframe'] ) ) { $data['amp_component_scripts']['amp-iframe'] = 'https://cdn.ampproject.org/v0/amp-iframe-0.1.js'; } if (ampforwp_get_setting('ampforwp-vuukle-Ads-before-comments') && empty( $data['amp_component_scripts']['amp-ad'] ) ) { $data['amp_component_scripts']['amp-ad'] = 'https://cdn.ampproject.org/v0/amp-ad-0.1.js'; } } //spotim if ( isset($redux_builder_amp['ampforwp-spotim-comments-support']) && $redux_builder_amp['ampforwp-spotim-comments-support'] && $display_comments_on && comments_open() ) { if ( empty( $data['amp_component_scripts']['amp-iframe'] ) ) { $data['amp_component_scripts']['amp-iframe'] = 'https://cdn.ampproject.org/v0/amp-iframe-0.1.js'; } } return $data; }