Skip to content

Commit

Permalink
Revert "#3997 - Merged in 1.0-deploy"
Browse files Browse the repository at this point in the history
This reverts commit c8fa08b.
  • Loading branch information
WasimM3 committed Feb 11, 2020
1 parent bea3a8b commit 697131b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
11 changes: 0 additions & 11 deletions includes/options/admin-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -2704,17 +2704,6 @@ function ampforwp_featured_video_default(){
'desc' => esc_html__('check your markup here (enter markup between BODY tag) : https://validator.ampproject.org/',
'accelerated-mobile-pages'),
'default' => ''
),
array(
'id' => 'amp-dns-prefetch-urls',
'type' => 'textarea',
'title' => esc_html__('DNS Prefetch URL(s)', 'accelerated-mobile-pages'),
'placeholder'=>esc_html__('https://example1.com/
https://example2.com/
https://example3.com/', 'accelerated-mobile-pages'),
'tooltip-subtitle' => sprintf( '%s<a href="%s" target="_blank">%s</a>%s', esc_html__("DNS Prefetch ask your browser to do a DNS lookup and connection before you need any resources from that domain. ",'accelerated-mobile-pages'),esc_url('https://ampforwp.com/tutorials/article/how-to-use-dns-prefetch-urls-in-amp/'),esc_html__('Click Here','accelerated-mobile-pages'),esc_html__(' for more info','accelerated-mobile-pages')),
'desc' => esc_html__('Please enter DNS Prefetch URL(s) here and each URL should be in new line.', 'accelerated-mobile-pages'),
'default' => ''
),
array(
'id' => 'ampforwp-auto-amp-menu-link',
Expand Down
19 changes: 0 additions & 19 deletions templates/features.php
Original file line number Diff line number Diff line change
Expand Up @@ -7966,23 +7966,4 @@ function ampforwp_seo_selection_notice() {
if(!empty($seo)){
echo sprintf(('<div class="notice notice-error"><p>%s <a href="%s">%s</a></p></div>'), esc_html__('The configuration of AMPforWP and '.esc_html($seo).' plugin is seems incorrect. Please go to AMPforWP plugin settings and select '.esc_html($seo).' from SEO Plugin Integration or ','accelerated-mobile-pages'),esc_url(admin_url('admin.php?page=amp_options&tab=5')),esc_html__('Click Here','accelerated-mobile-pages'));
}
}
global $dns_uls;
$dns_uls = sanitize_text_field(ampforwp_get_setting('amp-dns-prefetch-urls'));
if($dns_uls!=""){
add_action('amp_post_template_head', 'ampforwp_set_dns_prefetch_urls');
if(!function_exists('ampforwp_set_dns_prefetch_urls')){
function ampforwp_set_dns_prefetch_urls(){
global $dns_uls;
$match = preg_split ( '/(\r|\n|\s)/' , $dns_uls, 0, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE );
for($m=0;$m<count($match);$m++){
$dfu = trim($match[$m]);
if($dfu!=""){
?>
<link rel="preconnect dns-prefetch" href="<?php echo esc_url($dfu);?>" crossorigin>
<?php
}
}
}
}
}

0 comments on commit 697131b

Please sign in to comment.