: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
'required' => array('ampforwp-seo-selection', '=' , 'yoast'),
'id' => 'ampforwp-yoast-seo-analysis',
'tooltip-subtitle' => esc_html__('Get the Yoast Analysis from AMP PageBuilder Content', 'accelerated-mobile-pages'),
'title' => esc_html__( 'Yoast Analysis for AMP PageBuilder', 'accelerated-mobile-pages' ),
'required' => array(array('ampforwp-seo-selection', '=' , 'yoast'),array('ampforwp-amp-takeover', '=' , '1')),
'id' => 'ampforwp-seo-aioseo',
'desc' => esc_html__("All in One SEO works out of the Box with our plugin. It deosn't requires any extra config except Canonicals.", 'accelerated-mobile-pages'),
'required' => array('ampforwp-seo-selection', '=', 'aioseo')
'id' => 'ampforwp-seo-aioseo-canonical',
'tooltip-subtitle' => esc_html__('Pull Canonical from All In One SEO for AMP pages', 'accelerated-mobile-pages'),
'title' =>esc_html__( 'Canonical from All In One SEO', 'accelerated-mobile-pages' ),
'required' => array('ampforwp-seo-selection', '=' , 'aioseo'),
'id' => 'ampforwp-seo-index-noindex-sub-section',
'title' => esc_html__('Advanced Indexing', 'accelerated-mobile-pages'),
'layout_type' => 'accordion',
'id' => 'amp-paginated-pages-indexing',
'title' => esc_html__('Remove Paginated Pages Indexing', 'accelerated-mobile-pages'),
'tooltip-subtitle' => sprintf( '%s<a href="%s" target="_blank">%s</a>', esc_html__("You can read more about it ",'accelerated-mobile-pages'),esc_url('https://ampforwp.com/tutorials/article/how-to-remove-paginated-pages-indexing-in-amp/'),esc_html__('here','accelerated-mobile-pages')),
'id' => 'amp-inspection-tool',
'title' => esc_html__('URL Inspection Tool Compatibility', 'accelerated-mobile-pages'),
'tooltip-subtitle' => sprintf( '%s<a href="%s" target="_blank">%s</a>', esc_html__("You can read about it ",'accelerated-mobile-pages'),esc_url('https://webmasters.googleblog.com/2018/06/new-url-inspection-tool-more-in-search.html'),esc_html__('here','accelerated-mobile-pages')),
'id' => 'ampforwp-robots-archive-sub-pages-sitewide',
'title' => esc_html__('Archive subpages (sitewide)', 'accelerated-mobile-pages'),
'tooltip-subtitle' => esc_html__("Such as /page/2 so on and so forth",'accelerated-mobile-pages'),
'required' => array('amp-inspection-tool', '=' , '0'),
'id' => 'ampforwp-robots-archive-author-pages',
'title' => esc_html__('Author Archives', 'accelerated-mobile-pages'),
'tooltip-subtitle' => esc_html__("Enable it to set Indexing for Author Archives",'accelerated-mobile-pages'),
'required' => array('amp-inspection-tool', '=' , '0'),
'id' => 'ampforwp-robots-archive-date-pages',
'title' => esc_html__('Date Archives', 'accelerated-mobile-pages'),
'tooltip-subtitle' => esc_html__("Enable it to set Indexing for Date Archives",'accelerated-mobile-pages'),
'required' => array('amp-inspection-tool', '=' , '0'),
'id' => 'ampforwp-robots-archive-category-pages',
'title' => esc_html__('Categories', 'accelerated-mobile-pages'),
'tooltip-subtitle' => esc_html__("Enable it to set Indexing for Categories",'accelerated-mobile-pages'),
'required' => array('amp-inspection-tool', '=' , '0'),
'id' => 'ampforwp-robots-archive-tag-pages',
'title' => esc_html__('Tags', 'accelerated-mobile-pages'),
'tooltip-subtitle' => esc_html__("Enable it to set Indexing for Tags",'accelerated-mobile-pages'),
'required' => array('amp-inspection-tool', '=' , '0'),
if ( ! function_exists('amp_activate') ) {
ampforwp_page_builders_support_options($opt_name);
ampforwp_admin_page_booster_options($opt_name);
ampforwp_admin_performance_options($opt_name);
ampforwp_analytics_options($opt_name);
// Structured Data section
ampforwp_structure_data_options($opt_name);
ampforwp_notice_bar_options($opt_name);
// Push Notifications section
ampforwp_push_notification_options($opt_name);
ampforwp_admin_contact_form_options($opt_name);
Redux::setSection( $opt_name, array(
'title' => esc_html__( 'Comments', 'accelerated-mobile-pages' ),
'id' => 'disqus-comments',
'id' => 'ampforwp-display-comments',
'title' => esc_html__('Display', 'accelerated-mobile-pages'),
'layout_type' => 'accordion',
'id' => 'ampforwp-display-on-pages',
'title' => esc_html__('Display on Pages', 'accelerated-mobile-pages'),
'tooltip-subtitle' => esc_html__('Enable/Disable comments on pages using this switch.', 'accelerated-mobile-pages'),
'id' => 'ampforwp-display-on-posts',
'title' => esc_html__('Display on Posts', 'accelerated-mobile-pages'),
'tooltip-subtitle' => esc_html__('Enable/Disable comments on posts using this switch.', 'accelerated-mobile-pages'),
'id' => 'ampforwp-comments',
'title' => esc_html__('Discussion', 'accelerated-mobile-pages'),
'layout_type' => 'accordion',
'title' =>esc_html__('WordPress Comments','accelerated-mobile-pages'),
'id' => 'wordpress-comments-support',
'tooltip-subtitle' => esc_html__('Enable/Disable WordPress comments using this switch.', 'accelerated-mobile-pages'),
'class' => 'child_opt child_opt_arrow',
'id' => 'ampforwp-number-of-comments',
'tooltip-subtitle' => esc_html__('This refers to the normal comments','accelerated-mobile-pages'),
'title' => esc_html__('No of Comments', 'accelerated-mobile-pages'),
'required' => array('wordpress-comments-support' , '=' , 1
'class' => 'child_opt child_opt_arrow',
'id' => 'ampforwp-display-avatar',
'title' => esc_html__('User Avatar', 'accelerated-mobile-pages'),
'tooltip-subtitle' => esc_html__('Enable/Disable user Avatar.', 'accelerated-mobile-pages'),
'required' => array('wordpress-comments-support' , '=' , 1
'class' => 'child_opt child_opt_arrow',
'id' => 'ampforwp-nofollow-comment-btn',
'title' => esc_html__('No follow button', 'accelerated-mobile-pages'),
'tooltip-subtitle' => esc_html__('Add or remove No follow in comment button', 'accelerated-mobile-pages'),
'required' => array('wordpress-comments-support' , '=' , 1 ),
'id' => 'ampforwp-disqus-comments-support',
'title' => esc_html__('Disqus', 'accelerated-mobile-pages'),
'tooltip-subtitle' => sprintf('%s <a href="%s" target="_blank">%s</a> %s',
esc_html__('Enable/Disable Disqus comments using this switch and', 'accelerated-mobile-pages'), esc_url('https://ampforwp.com/tutorials/article/how-to-add-disqus-comments-in-amp/'), esc_html__('Click Here','accelerated-mobile-pages'), esc_html__('to view the tutorial','accelerated-mobile-pages')),
'class' => 'child_opt child_opt_arrow',
'id' => 'ampforwp-disqus-comments-name',
'title' => esc_html__('Disqus Name', 'accelerated-mobile-pages'),
'tooltip-subtitle' => esc_html__('Eg: https://xyz.disqus.com', 'accelerated-mobile-pages'),
'required' => array('ampforwp-disqus-comments-support', '=' , '1'),
'id' => 'ampforwp-disqus-host-position',
'title' => esc_html__('Host on AMPforWP API', 'accelerated-mobile-pages'),
'tooltip-subtitle' => esc_html__('Use AMPforWP secure servers to serve Comments file. Recommended if your site is non HTTPS', 'accelerated-mobile-pages'),
'required' => array('ampforwp-disqus-comments-support', '=' , '1'),
'id' => 'ampforwp-disqus-host-file',
'title' => esc_html__('Disqus Host File', 'accelerated-mobile-pages'),
'desc' => '<a href="https://ampforwp.com/host-disqus-comments/" target="_blank"> Click here to know, How to Setup Disqus Host file on your servers </a>',
'tooltip-subtitle' => esc_html__('Enter the URL of host file', 'accelerated-mobile-pages'),
'placeholder' => 'https://comments.example.com/disqus.php',
'required' => array('ampforwp-disqus-host-position', '=' , '0'),
'id' => 'ampforwp-disqus-layout',
'title' => esc_html__('Disqus Layout', 'accelerated-mobile-pages'),
'responsive' => 'Responsive'
'default' => 'responsive',
'required'=>array('ampforwp-disqus-comments-support','=','1'),
'id' => 'ampforwp-disqus-height',
'title' => esc_html__('Disqus Iframe Height', 'accelerated-mobile-pages'),
'placeholder' => 'Enter the height',
'required'=>array('ampforwp-disqus-comments-support','=','1'),
'id' => 'ampforwp-facebook-comments-support',
'title' => esc_html__('Facebook Comments', 'accelerated-mobile-pages'),
'tooltip-subtitle' => esc_html__('Enable/Disable Facebook comments using this switch.', 'accelerated-mobile-pages'),
'class' => 'child_opt child_opt_arrow',
'id' => 'ampforwp-fb-moderation-app-id',
sprintf('%s <a href="https://developers.facebook.com/docs/plugins/comments/#moderation-setup-instructions" target="_blank">%s</a>.',esc_html__( 'If your site has many comments boxes, we recommend you specify a Facebook app ID as the managing entity, which means that all app administrators can moderate comments. Doing this enables a moderator interface on Facebook where comments from all plugins administered by your app ID can be easily moderated together. For details, see the','accelerated-mobile-pages' ),esc_html__('Facebook Moderation Setup documentation','accelerated-mobile-pages') ),
'title' => esc_html__('Facebook APP ID', 'accelerated-mobile-pages'),
array('ampforwp-facebook-comments-support', '=' , 1),
'class' => 'child_opt child_opt_arrow',
'id' => 'ampforwp-fb-moderation-admin-id',
sprintf('%s <a href="https://developers.facebook.com/docs/plugins/comments/#moderation-setup-instructions" target="_blank">%s</a>.',esc_html__( 'To assign a Facebook account to be the admin of a comments plugin implementation, see the','accelerated-mobile-pages' ),esc_html__('Facebook Moderation Setup documentation','accelerated-mobile-pages') ),
'title' => esc_html__('Facebook Admin User ID', 'accelerated-mobile-pages'),
'desc' => 'You can add multiple ID(S) separated by comma(,) sign',
array('ampforwp-facebook-comments-support', '=' , 1),
'class' => 'child_opt child_opt_arrow',
'id' => 'ampforwp-facebook-comments-title',
'title' => esc_html__('Title', 'accelerated-mobile-pages'),
'default' => 'Leave a Comment',
array('ampforwp-facebook-comments-support', '=' , 1),
'class' => 'child_opt child_opt_arrow',
'id' => 'ampforwp-number-of-fb-no-of-comments',
sprintf('%s <a href="https://developers.facebook.com/docs/plugins/comments" target="_blank">%s</a>.',esc_html__( 'Enter the number of comments to show, Currently Facebook SDK limits this to max 100. For details, see the','accelerated-mobile-pages' ),esc_html__('Facebook comments documentation','accelerated-mobile-pages') ),
'title' => esc_html__('No of Comments', 'accelerated-mobile-pages'),
array('ampforwp-facebook-comments-support', '=' , 1),
'class' => 'child_opt child_opt_arrow',
'id' => 'ampforwp-fb-comments-lang',
'tooltip-subtitle' => esc_html__('Enter the Language code','accelerated-mobile-pages'),
'title' => esc_html__('Language', 'accelerated-mobile-pages'),
'desc' => '<a href="https://developers.facebook.com/docs/internationalization" target="_blank">Locales and Languages Supported by Facebook </a>',
'default' => get_locale(),
array('ampforwp-facebook-comments-support', '=' , 1)
'id' => 'ampforwp-vuukle-comments-support',
'title' => esc_html__('Vuukle Comments', 'accelerated-mobile-pages'),
'tooltip-subtitle' => esc_html__('Enable/Disable Vuukle comments using this switch.', 'accelerated-mobile-pages'),
'class' => 'child_opt child_opt_arrow',
'id' => 'ampforwp-vuukle-comments-apiKey',
'tooltip-subtitle' => esc_html__('Enter the API key of Vuukle','accelerated-mobile-pages'),
'title' => esc_html__('API Key', 'accelerated-mobile-pages'),
'desc' => "For Example xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
array('ampforwp-vuukle-comments-support', '=' , 1),
'class' => 'child_opt child_opt_arrow',
'id' => 'ampforwp-vuukle-comments-emoji',
'title' => esc_html__('Vuukle Emoji', 'accelerated-mobile-pages'),
'tooltip-subtitle' => esc_html__('Enable/Disable Vuukle comments emoji using this switch.', 'accelerated-mobile-pages'),
array('ampforwp-vuukle-comments-support', '=' , 1),
'id' => 'ampforwp-spotim-comments-support',
'title' => esc_html__('Spot.IM Conversation', 'accelerated-mobile-pages'),
'tooltip-subtitle' => esc_html__('Enable/Disable Spot.IM Conversation using this switch.', 'accelerated-mobile-pages'),
'class' => 'child_opt child_opt_arrow',
'id' => 'ampforwp-spotim-comments-apiKey',
'tooltip-subtitle' => esc_html__('Enter the SPOT_ID of Spot.IM','accelerated-mobile-pages'),
'title' => esc_html__('SPOT ID', 'accelerated-mobile-pages'),
'desc' => "For Example xxxxxxxx-xxxx-xxxx-xxxx",
array('ampforwp-spotim-comments-support', '=' , 1),
function ampforwp_fb_instant_article() {
$fb_instant_article_feed = '';
$feedname = 'instant_articles';
if(get_option('permalink_structure') == ''){
$feedname = '?feed=instant_articles';
$fb_instant_article_feed = trailingslashit( get_home_url() ).$feedname ;
$input = '<a href=" '. esc_url_raw($fb_instant_article_feed) . '" target="_blank">' . esc_url_raw( $fb_instant_article_feed ). '</a>' ;
return strip_tags($input, '<a>');
// Facebook Instant Articles
Redux::setSection( $opt_name, array(
'title' => esc_html__( 'Instant Articles', 'accelerated-mobile-pages' ),
'id' => 'fb-instant-article',
'id' => 'ampforwp-fbia_1',
'title' => esc_html__('Facebook Instant Articles Setup', 'accelerated-mobile-pages'),
'layout_type' => 'accordion',
'id' =>'fb-instant-article-switch',
'title' => esc_html__('Instant Articles', 'accelerated-mobile-pages'),
'desc' => esc_html__('Re-Save permalink when you enable this option, please have a look', 'accelerated-mobile-pages').' <a href="https://ampforwp.com/flush-rewrite-urls/">'.esc_html__('here', 'accelerated-mobile-pages').'</a> '.esc_html__('on how to do it', 'accelerated-mobile-pages'),
'id' => 'fb-instant-article-feed-url',
'desc' => ampforwp_fb_instant_article(),
'title' => esc_html__('Facebook Instant Articles Feed URL', 'accelerated-mobile-pages'),
'required' => array('fb-instant-article-switch', '=', 1)
'id' => 'fb-instant-page-id',
'title' => esc_html__('Facebook Page ID', 'accelerated-mobile-pages'),
'desc' => esc_html__('Follow ','accelerated-mobile-pages').'<a href="https://www.facebook.com/instant_articles/signup" target="_blank">'.esc_html__('these instructions.','accelerated-mobile-pages').'</a>'.esc_html__(' to sign up to Instant Articles and get your Facebook Page ID.', 'accelerated-mobile-pages'),
'required' => array('fb-instant-article-switch', '=', 1)
'title' => esc_html__('Facebook Instant Articles Settings', 'accelerated-mobile-pages'),
'layout_type' => 'accordion',
'required' => array('fb-instant-article-switch', '=', 1),
'id' => 'fb-instant-article-order-by',
'title' => esc_html__('Show instant article on', 'accelerated-mobile-pages'),
'tooltip-subtitle' => esc_html__('Select the type to show instant article on Publish Date/Updated Date.', 'accelerated-mobile-pages'),
'required' => array('fb-instant-article-switch', '=', 1)
'id' => 'ampforwp-fb-instant-article-posts',
'title' => esc_html__('Number of Posts', 'accelerated-mobile-pages'),
'tooltip-subtitle' => esc_html__('Enter the number of posts to generate for Instant Articles.', 'accelerated-mobile-pages'),
'desc' => esc_html__('Leave this empty to generate All Posts (50).', 'accelerated-mobile-pages'),
'required' => array('fb-instant-article-switch', '=', 1),
'id' => 'ampforwp-instant-article-author-meta',
'title' => esc_html__('Author Meta', 'accelerated-mobile-pages'),
'tooltip-subtitle' => esc_html__('Enable/Disable Author Meta', 'accelerated-mobile-pages'),
'required' => array('fb-instant-article-switch', '=', 1)
'id' => 'ampforwp-instant-article-author-bio',
'title' => esc_html__('Author Bio', 'accelerated-mobile-pages'),
'tooltip-subtitle' => esc_html__('Enable/Disable Author Bio', 'accelerated-mobile-pages'),
'required' => array('fb-instant-article-switch', '=', 1)
'id' => 'ampforwp-ia-related-articles',
'title' => esc_html__('Related Articles', 'accelerated-mobile-pages'),
'tooltip-subtitle' => esc_html__('Show/Hide Related Articles', 'accelerated-mobile-pages'),
'required' => array('fb-instant-article-switch', '=', 1)
'id' => 'fb-instant-article-ads',
'title' => esc_html__('Advertisement', 'accelerated-mobile-pages'),