DID YOU KNOW?You can create your own Custom theme with AMP Theme Framework';
// #1093 Display only If AMP Comments is Not Installed
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
if(!is_plugin_active( 'amp-comments/amp-comments.php' )){
$comment_AD_URL = "http://ampforwp.com/amp-comments/#utm_source=options-panel&utm_medium=comments-tab&utm_campaign=AMP%20Plugin";
$comment_desc = '
';
}
// Display only If AMP Cache is Not Installed
$cache_desc ="";
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
if(!is_plugin_active( 'amp-cache/ampforwp-cache.php' )){
$cache_AD_URL = "http://ampforwp.com/amp-cache/#utm_source=options-panel&utm_medium=performance-tab&utm_campaign=AMP%20Plugin";
$cache_desc = '
';
}
// If CTA is not Activated
$cta_desc = "";
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
if(!is_plugin_active( 'AMP-cta/amp-cta.php' )){
$cta_AD_URL = "http://ampforwp.com/call-to-action/#utm_source=options-panel&utm_medium=call-to-action_banner_in_notification_bar&utm_campaign=AMP%20Plugin";
$cta_desc = '
';
}
$all_extensions_data = array();
global $all_extensions_data;
$extension_listing_array = array(
array(
'name'=>'ADS for WP',
'desc'=>'A Revolutionary way of adding ADS in your WordPress',
'img_src'=>AMPFORWP_IMAGE_DIR . '/click.png',
'price'=>'$29',
'url_link'=>'http://ampforwp.com/ads-for-wp/#utm_source=options-panel&utm_medium=extension-tab_advanced-amp-ads&utm_campaign=AMP%20Plugin',
'plugin_active_path'=> 'ads-for-wp/ads-for-wp.php',
'item_name'=>'ADS for WP',
'store_url'=>'https://accounts.ampforwp.com',
'is_activated'=>(is_plugin_active('ads-for-wp/ads-for-wp.php')? 1: 2),
'settingUrl'=>admin_url('edit.php?post_type=ads-for-wp-ads'),
),
array(
'name'=>'Advanced AMP ADS',
'desc'=>'Add Advertisement directly in the content',
'img_src'=>AMPFORWP_IMAGE_DIR . '/click.png',
'price'=>'$29',
'url_link'=>'http://ampforwp.com/advanced-amp-ads/#utm_source=options-panel&utm_medium=extension-tab_advanced-amp-ads&utm_campaign=AMP%20Plugin',
'plugin_active_path'=> 'amp-incontent-ads/amptoolkit-incontent-ads.php',
'item_name'=>'Advanced AMP Ads',
'store_url'=>'https://accounts.ampforwp.com',
'is_activated'=>(is_plugin_active('amp-incontent-ads/amptoolkit-incontent-ads.php')? 1:2),
'settingUrl'=>'{ampforwp-incontent-ads-subsection}',
),
array(
'name'=>'Contact Form 7',
'desc'=>'Add Contact Us Form in AMP.',
'img_src'=>AMPFORWP_IMAGE_DIR . '/cf7.png',
'price'=>'$39',
'url_link'=>'http://ampforwp.com/contact-form-7/#utm_source=options-panel&utm_medium=extension-tab_cf7&utm_campaign=AMP%20Plugin',
'plugin_active_path'=> 'amp-cf7/amp-cf7.php',
'item_name'=>'Contact Form 7 for AMP',
'store_url'=>'https://accounts.ampforwp.com',
'is_activated'=>(is_plugin_active('amp-cf7/amp-cf7.php')? 1 : 2),
'settingUrl'=>'{ampforwp-cf7-subsection}',
),
array(
'name'=>'Gravity Forms',
'desc'=>'Add Gravity Forms Support in AMP.',
'img_src'=>AMPFORWP_IMAGE_DIR . '/gf.png',
'price'=>'$79',
'url_link'=>'http://ampforwp.com/gravity-forms/#utm_source=options-panel&utm_medium=extension-tab_gf&utm_campaign=AMP%20Plugin',
'plugin_active_path'=> 'amp-gravity-forms/amp-gravity-forms.php',
'item_name'=>'Gravity Forms',
'store_url'=>'https://accounts.ampforwp.com',
'is_activated'=>(is_plugin_active('amp-gravity-forms/amp-gravity-forms.php')? 1 : 2),
'settingUrl'=>'{ampforwp-gf-subsection}',
),
array(
'name'=>'bbPress For AMP',
'desc'=>'Add bbPress Forum Compatibility to your AMP version',
'img_src'=>AMPFORWP_IMAGE_DIR . '/bbp-icon.png',
'price'=>'$89',
'url_link'=>'http://ampforwp.com/bbpress/#utm_source=options-panel&utm_medium=extension-tab_bbpress-for-wordpress&utm_campaign=AMP%20Plugin',
'plugin_active_path'=> 'bbpress-for-amp/bbpress-for-amp.php',
'item_name'=>'bbPress for AMP',
'store_url'=>'https://accounts.ampforwp.com',
'is_activated'=>(is_plugin_active('bbpress-for-amp/bbpress-for-amp.php')? 1 : 2),
),
array(
'name'=>'Ninja Forms for AMP',
'desc'=>'Add Ninja Forms Support in AMP.',
'img_src'=>AMPFORWP_IMAGE_DIR . '/nf.png',
'price'=>'$79',
'url_link'=>'http://ampforwp.com/ninja-forms/#utm_source=options-panel&utm_medium=extension-tab_gf&utm_campaign=AMP%20Plugin',
'plugin_active_path'=> 'amp-ninja-forms/amp-ninja-forms.php',
'item_name'=>'Ninja Forms',
'store_url'=>'https://accounts.ampforwp.com',
'is_activated'=>(is_plugin_active('amp-ninja-forms/amp-ninja-forms.php')? 1 : 2),
'settingUrl'=>'{ampforwp-nf-subsection}',
),
array(
'name'=>'WP Forms for AMP',
'desc'=>'Add WP Forms Support in AMP.',
'img_src'=>AMPFORWP_IMAGE_DIR . '/wpf.png',
'price'=>'$79',
'url_link'=>'http://ampforwp.com/wp-forms/#utm_source=options-panel&utm_medium=extension-tab_gf&utm_campaign=AMP%20Plugin',
'plugin_active_path'=> 'wp-forms-for-amp/amp-wpforms.php',
'item_name'=>'WP Forms for AMP',
'store_url'=>'https://accounts.ampforwp.com',
'is_activated'=>(is_plugin_active('wp-forms-for-amp/amp-wpforms.php')? 1 : 2),
'settingUrl'=>'{ampforwp-wpf-subsection}',
),
array(
'name'=>'Email Opt-in Forms',
'desc'=>'Capture Leads with Email Subscription.',
'img_src'=>AMPFORWP_IMAGE_DIR . '/email.png',
'price'=>'$79',
'url_link'=>'http://ampforwp.com/opt-in-forms/#utm_source=options-panel&utm_medium=extension-tab_opt-in-forms&utm_campaign=AMP%20Plugin',
'plugin_active_path'=> 'amp-optin/amp-optin.php',
'item_name'=>'Opt-in-Forms for AMP',
'store_url'=>'https://accounts.ampforwp.com',
'is_activated'=>(is_plugin_active('amp-optin/amp-optin.php')? 1 : 2),
'settingUrl'=>'{ampforwp-optin-subsection}'
),
array(
'name'=>'AMP Cache',
'desc'=>'AMP Cache is a Revolutionary Cache System for AMP',
'img_src'=>AMPFORWP_IMAGE_DIR . '/cache-icon.png',
'price'=>'$89',
'url_link'=>'http://ampforwp.com/amp-cache/#utm_source=options-panel&utm_medium=extension-tab_cache&utm_campaign=AMP%20Plugin',
'plugin_active_path'=> 'amp-cache/ampforwp-cache.php',
'item_name'=>'AMP Cache',
'store_url'=>'https://accounts.ampforwp.com',
'is_activated'=>(is_plugin_active('amp-cache/ampforwp-cache.php')? 1 : 2),
'settingUrl'=>'{opt-go-amp-cache}',
),
array(
'name'=>'PWA For WordPress',
'desc'=>'Add Progressive Web App support for WordPress website',
'img_src'=>AMPFORWP_IMAGE_DIR . '/pwa-icon.png',
'price'=>'$89',
'url_link'=>'http://ampforwp.com/pwa/#utm_source=options-panel&utm_medium=extension-tab_pwa-for-wordpress&utm_campaign=AMP%20Plugin',
'plugin_active_path'=> 'pwa-for-wordpress/amp-pwa.php',
'item_name'=>'PWA For WordPress',
'store_url'=>'https://accounts.ampforwp.com',
'is_activated'=>(is_plugin_active('pwa-for-wordpress/amp-pwa.php')? 1 : 2),
'settingUrl'=>admin_url( 'admin.php?page=ampforwp-pwa' ),
),
array(
'name'=>'AMP Popup',
'desc'=>'Pop-Up Functionality for AMP in WordPress. Most easiest and the best way to include Pop-Up in AMP.',
'img_src'=>AMPFORWP_IMAGE_DIR . '/pwa-icon.png',
'price'=>'$39',
'url_link'=>'#',
'plugin_active_path'=> 'amp-popup/amp-popup.php',
'item_name'=>'AMP Popup',
'store_url'=>'https://accounts.ampforwp.com',
'is_activated'=>(is_plugin_active('amp-popup/amp-popup.php')? 1 : 2),
),
array(
'name'=>'Call To Action (CTA)',
'desc'=>'Higher Visibility & More Conversions',
'img_src'=>AMPFORWP_IMAGE_DIR . '/mac-click.png',
'price'=>'$29',
'url_link'=>'http://ampforwp.com/call-to-action/#utm_source=options-panel&utm_medium=extension-tab_amp-cta&utm_campaign=AMP%20Plugin',
'plugin_active_path'=> 'amp-cta/amp-cta.php',
'item_name'=>'Call To Action for AMP',
'store_url'=>'https://accounts.ampforwp.com',
'is_activated'=>(is_plugin_active('amp-cta/amp-cta.php')? 1 : 2),
'settingUrl'=>'{ampforwp-cta-subsection}',
),
array(
'name'=>'AMP WooCommerce Pro',
'desc'=>'Advanced WooCommerce in AMP in two clicks.',
'img_src'=>AMPFORWP_IMAGE_DIR . '/woo.png',
'price'=>'$79',
'url_link'=>'https://ampforwp.com/woocommerce/#utm_source=options-panel&utm_medium=extension-tab_woocommerce&utm_campaign=AMP%20Plugin',
'plugin_active_path'=> 'amp-woocommerce-pro/amp-woocommerce.php',
'item_name'=>'WooCommerce',
'store_url'=>'https://accounts.ampforwp.com',
'is_activated'=>(is_plugin_active('amp-woocommerce-pro/amp-woocommerce.php')? 1 : 2),
'settingUrl'=>'{ampforwp-wcp-subsection}',
),
array(
'name'=> 'EDD for AMP',
'desc'=> 'EDD compatibility with AMP',
'img_src'=> AMPFORWP_IMAGE_DIR . '/edd-icon.png',
'price'=> '$19',
'url_link'=>'https://ampforwp.com/edd-for-amp/#utm_source=options-panel&utm_medium=extension-tab_edd-for-amp&utm_campaign=AMP%20Plugin',
'plugin_active_path'=> 'edd-for-amp/edd-for-amp.php',
'item_name'=>'EDD for AMP',
'store_url'=>'https://accounts.ampforwp.com',
'is_activated'=>(is_plugin_active('edd-for-amp/edd-for-amp.php')? 1 : 2),
),
array(
'name'=>'AMP Layouts',
'desc'=>'Design system built for AMP that makes easy to create your own AMP website.',
'img_src'=>AMPFORWP_IMAGE_DIR . '/amplayouts.png',
'price'=>'$89',
'url_link'=>'https://ampforwp.com/amp-layouts/#utm_source=options-panel&utm_medium=extension-tab_amp-layouts&utm_campaign=AMP%20Plugin',
'plugin_active_path'=> 'amp-layouts/amp-layouts.php',
'item_name'=>'AMP Layouts',
'store_url'=>'https://accounts.ampforwp.com',
'is_activated'=>(is_plugin_active('amp-layouts/amp-layouts.php')? 1 : 2),
'settingUrl'=>'{amp-theme-settings}',
),
array(
'name'=>'Newspaper AMP Theme',
'desc'=>'Advanced News Magazine theme built for AMP.',
'img_src'=>AMPFORWP_IMAGE_DIR . '/click.png',
'price'=>'$49',
'url_link'=>'http://ampforwp.com/themes/newspaper/#utm_source=options-panel&utm_medium=extension-tab_themes/newspaper&utm_campaign=AMP%20Plugin',
'plugin_active_path'=> 'amp-newspaper-theme/ampforwp-custom-theme.php',
'item_name'=>'Newspaper Theme for AMP',
'store_url'=>'https://accounts.ampforwp.com',
'is_activated'=>(is_plugin_active('amp-newspaper-theme/ampforwp-custom-theme.php')? 1 : 2),
'settingUrl'=>'{ampforwp-theme-subsection}',
),
array(
'name'=>'ACF for AMP',
'desc'=>'Easily add ACF support in AMP.',
'img_src'=>AMPFORWP_IMAGE_DIR . '/acf.png',
'price'=>'$29',
'url_link'=>'http://ampforwp.com/acf-amp/#utm_source=options-panel&utm_medium=extension-tab_opt-in-forms&utm_campaign=AMP%20Plugin',
'plugin_active_path'=> 'acf-for-amp-v2/amp-acf.php',
'item_name'=>'ACF for AMP',
'store_url'=>'https://accounts.ampforwp.com',
'is_activated'=>(is_plugin_active('acf-for-amp-v2/amp-acf.php')? 1 : 2),
'settingUrl'=>admin_url('edit.php?post_type=amp_acf'),
),
array(
'name'=>'AMP Comments',
'desc'=>'You can now allow the same comment functionality on AMP.',
'img_src'=>AMPFORWP_IMAGE_DIR . '/comments.png',
'price'=>'$29.99',
'url_link'=>'https://ampforwp.com/amp-comments/#utm_source=options-panel&utm_medium=extension-tab_amp-comments&utm_campaign=AMP%20Plugin',
'plugin_active_path'=> 'amp-comments/amp-comments.php',
'item_name'=>'AMP Comments',
'store_url'=>'https://accounts.ampforwp.com',
'is_activated'=>(is_plugin_active('amp-comments/amp-comments.php')? 1: 2),
'settingUrl'=>'{ampforwp-cmt-subsection}',
),
array(
'name'=>'Star Ratings',
'desc'=>'Star Review Ratings for AMP.',
'img_src'=>AMPFORWP_IMAGE_DIR . '/star.png',
'price'=>'$19',
'url_link'=>'http://ampforwp.com/amp-ratings/#utm_source=options-panel&utm_medium=extension-tab_amp-ratings&utm_campaign=AMP%20Plugin',
'plugin_active_path'=> 'amp-rating/amp-rating.php',
'item_name'=>'AMP Rating',
'store_url'=>'https://accounts.ampforwp.com',
'is_activated'=>(is_plugin_active('amp-rating/amp-rating.php')? 1 : 2),
'settingUrl'=>'{ampforwp-ratings-subsection}',
),
array(
'name'=>'Custom Post Type',
'desc'=>'Enable Custom Post type support in AMP.',
'img_src'=>AMPFORWP_IMAGE_DIR . '/comments.png',
'price'=>'$19',
'url_link'=>'http://ampforwp.com/custom-post-type/#utm_source=options-panel&utm_medium=extension-tab_custom-post-type&utm_campaign=AMP%20Plugin',
'plugin_active_path'=> 'amp-custom-post-type/amp-custom-post-type.php',
'item_name'=>'Custom Post Type Support for AMP',
'store_url'=>'https://accounts.ampforwp.com',
'is_activated'=>(is_plugin_active('amp-custom-post-type/amp-custom-post-type.php')? 1 : 2),
'settingUrl'=>'{ampforwp-cpt-subsection}',
),
array(
'name'=>'AMP Stories',
'desc'=>'A Revolutionary new way to share your stories',
'img_src'=>AMPFORWP_IMAGE_DIR . '/cache-icon.png',
'price'=>'$79',
'url_link'=>'https://ampforwp.com/amp-stories/#utm_source=options-panel&utm_medium=extension-tab_stories&utm_campaign=AMP%20Plugin',
'plugin_active_path'=> 'amp-stories/ampforwp-stories.php',
'item_name'=>'AMP Stories',
'store_url'=>'https://accounts.ampforwp.com',
'is_activated'=>(is_plugin_active('amp-stories/ampforwp-stories.php')? 1 : 2),
'settingUrl'=>admin_url( 'edit.php?post_type=ampforwp_story' ),
),
array(
'name'=>'Structured Data for WP',
'desc'=>'Structured Data for your site and for AMP',
'img_src'=>AMPFORWP_IMAGE_DIR . '/sd-icon.png',
'price'=>'$29',
'url_link'=>'https://ampforwp.com/structuredata-for-wp/#utm_source=options-panel&utm_medium=extension-tab_structuredata-for-wp&utm_campaign=AMP%20Plugin',
'plugin_active_path'=> 'structured-data-for-wp/structured-data-for-wp.php',
'item_name'=>'Structured Data for WP',
'store_url'=>'https://accounts.ampforwp.com',
'is_activated'=>(is_plugin_active('structured-data-for-wp/structured-data-for-wp.php')? 1: 2),
//'settingUrl'=>'',
),
array(
'name'=>'Polylang For AMP',
'desc'=>'Polylang compatibility with AMP',
'img_src'=>AMPFORWP_IMAGE_DIR . '/polylang-icon.png',
'price'=>'$19',
'url_link'=>'https://ampforwp.com/polylang-for-amp/#utm_source=options-panel&utm_medium=extension-tab_polylang-for-amp&utm_campaign=AMP%20Plugin',
'plugin_active_path'=> 'polylang-for-amp/amp_polylang.php',
'item_name'=>'Polylang For AMP',
'store_url'=>'https://accounts.ampforwp.com',
'is_activated'=>(is_plugin_active('polylang-for-amp/amp_polylang.php')? 1: 2),
),
array(
'name'=>'WPML For AMP',
'desc'=>'WPML compatibility with AMP',
'img_src'=>AMPFORWP_IMAGE_DIR . '/wpml-icon.png',
'price'=>'$19',
'url_link'=>'https://ampforwp.com/wpml-for-amp/#utm_source=options-panel&utm_medium=extension-tab_wpml-for-amp&utm_campaign=AMP%20Plugin',
'plugin_active_path'=> 'wpml-for-amp/wpml_for_amp.php',
'item_name'=>'WPML For AMP',
'store_url'=>'https://accounts.ampforwp.com',
'is_activated'=>(is_plugin_active('wpml-for-amp/wpml_for_amp.php')? 1: 2),
),
array(
'name'=>'AMP Teaser',
'desc'=>'AMP Teaser automatically clips the content based on your selection',
'img_src'=>AMPFORWP_IMAGE_DIR . '/teaser-icon.png',
'price'=>'$29',
'url_link'=>'https://ampforwp.com/amp-teaser/#utm_source=options-panel&utm_medium=extension-tab_amp-teaser&utm_campaign=AMP%20Plugin',
'plugin_active_path'=> 'amp-teaser/amp-teaser.php',
'item_name'=>'AMP Teaser',
'store_url'=>'https://accounts.ampforwp.com',
'is_activated'=>(is_plugin_active('amp-teaser/amp-teaser.php')? 1: 2),
'settingUrl'=>'{ampforwp-teaser-subsection}',
),
array(
'name'=>'View All Extensions',
'desc'=>'See all the extensions available for AMP',
'img_src'=>AMPFORWP_IMAGE_DIR . '/comments.png',
'price'=>'FREE',
'url_link'=>'https://ampforwp.com/extensions/#utm_source=options-panel&utm_medium=extension-tab_amp-more-comingsoon&utm_campaign=AMP%20Plugin',
'plugin_active_path'=> '',
'item_name'=>'',
'store_url'=>'',
'is_activated'=>2,
'settingUrl'=>'',
),
);
$extension_listing_array = apply_filters( 'ampforwp_extension_lists_filter', $extension_listing_array );
$all_extensions_data = $extension_listing_array;
$ampforwp_extension_list_html = '';
$ampforwp_nameOfUser = "";
$ampforwp_is_productActivated = false;
function ampforwp_sort_extension_array($a, $b){
if ($a['is_activated'] == $b['is_activated']) {
return 0;
}
return ($a['is_activated'] < $b['is_activated']) ? -1 : 1;
}
usort($extension_listing_array, 'ampforwp_sort_extension_array');
foreach ($extension_listing_array as $key => $extension) {
$currentStatus = "";
$onclickUrl = '';
$onclickUrlclose = '';
$settingPageUrl = '';
$pluginReview = '
'.$extension['desc'].'
'.$pluginReview.'Take your AMP to the next level with these premium extensions which gives you advanced features.
'.$ampforwp_extension_list_html.'
Take your AMP to the next level with more beautiful themes, great extensions and more powerful features.
BUY NOW
Includes a suite of advanced features like Ads, Email Optin, Contact Forms, E-Commerce, CTA, Cache and 15+ premium extensions.
Wide Variety of AMP Theme Designs included with AMP Layouts. We are dedicated to release 2-3 new designs every month.
Get private ticketing help from our full-time staff who helps you with the technical issues.
We take bug reports and feature requests seriously. We’re continiously developing & improve this product for last 2 years with passion and love.
We\'re constantly expanding the plugin and make it more useful. We have wide variety of features which will fit any use-case.
We have 4 Built in themes for AMP which elevates your AMP exeprience.
We have a full time team which helps you with each and every issue regarding AMP.
Advanced Ad slots, Incontent ads & Supports all Ad networks.
Revolutionary cache system for AMP which makes it insanely fast.
Gravity Forms and Contact form 7 Support for the AMP.
WooCommerce & Easy Digital Downloads Support.
Native Email optin forms to capture email with 17+ company integrations.
Get your message, product or offering to your visitors.
Integrates with WPML, Polylang and WeGlot to provide localization.
Advanced Schema integration in AMP and WordPress.
Built-in tools to help you impliment ACF easily in AMP.
Easily add Rating to the posts. Supports 3 popular rating plugins.
AMP Layouts has 6 pre-built designs, We are constantly adding every week.
With a Dedicated person helping you with the extension setup and questions.
We\'re continiously updating our premium features and releasing them.
Be the first one to get the innovative features that we build in the future.
More than 130k Websites, Blogs & E-Commerce website are powered by our AMP making it the #1 Rated AMP plugin in WordPress Community.
Read The ReviewsNo. There are no setup fees on any of our plans
All the plans are year-to-year which are subscribed annually.
All the plans are year-to-year which are subscribed annually.
Yes! Top-notch customer support for our paid customers is key for a quality product, so we’ll do our very best to resolve any issues you encounter via our support page.
Yes. You can cancel your membership by contacting us.
Yes. You can upgrade or downgrade your plan by contacting us.
You are fully protected by our 100% Money Back Guarantee Unconditional. If during the next 14 days you experience an issue that makes the plugin unusable and we are unable to resolve it, we’ll happily offer a full refund.
All the plans are year-to-year which are subscribed annually.
All the plans are year-to-year which are subscribed annually.
Contact a HumanTake your AMP to the next level with these premium extensions which gives you advanced features.

Add Advertisement directly in the content

Capture Leads with Email Subscription.

Higher Visibility & More Conversions

Enable Custom Post type support in AMP.

Easily add ACF support in AMP.

Enable DFP Support for AMP.

Star Review Ratings for AMP.

Advanced WooCommerce in AMP in two clicks.

Remove Category Base Support in AMP

See all the extensions available for AMP
This is the tab content, HTML is allowed.
', 'accelerated-mobile-pages' ) ), array( 'id' => 'redux-help-tab-2', 'title' => __( 'Theme Information 2', 'accelerated-mobile-pages' ), 'content' => __( 'This is the tab content, HTML is allowed.
', 'accelerated-mobile-pages' ) ) ); Redux::setHelpTab( $opt_name, $tabs ); // Set the help sidebar $content = __( 'This is the sidebar content, HTML is allowed.
', 'accelerated-mobile-pages' ); Redux::setHelpSidebar( $opt_name, $content ); /* * <--- END HELP TABS */ /* * * ---> START SECTIONS * */ Redux::setSection( $opt_name, array( 'title' => __( 'Basic Field', 'accelerated-mobile-pages' ), 'id' => 'basic', 'desc' => __( 'Basic field with no subsections.', 'accelerated-mobile-pages' ), 'icon' => 'el el-home', 'fields' => array( array( 'id' => 'opt-blank', 'title' => __( 'Example Text', 'accelerated-mobile-pages' ), 'desc' => __( 'Example description.', 'accelerated-mobile-pages' ), 'tooltip-subtitle' => __( 'Example subtitle.', 'accelerated-mobile-pages' ), ) ) ) ); Redux::setSection( $opt_name, array( 'title' => __( 'Settings', 'accelerated-mobile-pages' ), 'id' => 'basic', 'desc' => __( '' . __( '1. Fixing AMP Validation Errors: ', 'accelerated-mobile-pages' ) . '' . __( 'We will personally take care that your website’s AMP version is perfectly validated. We will make sure that your AMP version gets approved and indexed by Google Webmaster Tools properly and we will even keep an eye on AMP updates from Google and implement them into your website.' ) . '
' . '' . __( '2. Community Support Forum: ', 'accelerated-mobile-pages' ) . '' . __( 'We have a special community support forum where you can ask us questions and get help about your AMP related questions. Delivering a good user experience means alot to us and so we try our best to reply each and every question that gets asked.' ) . '
' . '' . __( '3. Hire Us / Other queries: ', 'accelerated-mobile-pages' ) . '' . __( 'We try to answer each and every email, so remember to give us some time. For any other queries, please use the contact form. Please be descriptive as possible.' ) . '
' . '' . __( '4. What\'s New in this Version?: ', 'accelerated-mobile-pages' ) . '' . __( 'If you want to know whats new in the latest version of the plugin, then please use this link. ') . '
' . '
';
}
// ADS SECTION
Redux::setSection( $opt_name, array(
'title' => __( 'Advertisement', 'accelerated-mobile-pages' ),
'desc' => $desc,
'id' => 'amp-ads',
'subsection' => true,
'fields' => array(
array(
'id' => 'amp-ads_1',
'type' => 'section',
'title' => __('Advertisement Positions', 'accelerated-mobile-pages'),
'indent' => true,
'layout_type' => 'accordion',
'accordion-open'=> 1,
),
// Ad 1 Starts
array(
'id' =>'enable-amp-ads-1',
'type' => 'switch',
'title' => __('AD #1', 'accelerated-mobile-pages'),
'default' => 0,
'desc' => __('Below the Header (SiteWide)', 'accelerated-mobile-pages'),
'true' => 'Enabled',
'false' => 'Disabled',
),
array(
'class' => 'child_opt child_opt_arrow',
'id' => 'enable-amp-ads-select-1',
'type' => 'select',
'title' => __('AD Size', 'accelerated-mobile-pages'),
'required' => array('enable-amp-ads-1', '=' , '1'),
// Must provide key => value pairs for select options
'options' => array(
'1' => __('300x250','accelerated-mobile-pages'),
'2' => __('336x280','accelerated-mobile-pages'),
'3' => __('728x90','accelerated-mobile-pages'),
'4' => __('300x600','accelerated-mobile-pages'),
'5' => __('320x100','accelerated-mobile-pages'),
'6' => __('200x50','accelerated-mobile-pages'),
'7' => __('320x50','accelerated-mobile-pages'), ),
'default' => '2',
),
array(
'class' => 'child_opt',
'id' =>'enable-amp-ads-text-feild-client-1',
'type' => 'text',
'required' => array('enable-amp-ads-1', '=' , '1'),
'title' => __('Data AD Client', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Enter the Data Ad Client (data-ad-client) from the adsense ad code.', 'accelerated-mobile-pages'),
'default' => '',
'placeholder'=> 'ca-pub-2005XXXXXXXXX342'
),
array(
'class' => 'child_opt',
'id' => 'enable-amp-ads-text-feild-slot-1',
'type' => 'text',
'title' => __('Data AD Slot', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code.', 'accelerated-mobile-pages'),
'default' => '',
'required' => array('enable-amp-ads-1', '=' , '1'),
'placeholder'=> '70XXXXXX12'
),
array(
'class' => 'child_opt',
'id' =>'enable-amp-ads-resp-1',
'type' => 'switch',
'title' => __('Responsive Ad unit', 'accelerated-mobile-pages'),
'default' => 0,
'required' => array('enable-amp-ads-1', '=' , '1'),
),
// Ad 1 ends
// Ad 2 Starts
array(
'id'=>'enable-amp-ads-2',
'type' => 'switch',
'title' => __('AD #2', 'accelerated-mobile-pages'),
'default' => 0,
'desc' => __('Below the Footer (SiteWide)', 'accelerated-mobile-pages'),
'true' => 'Enabled',
'false' => 'Disabled',
),
array(
'class' => 'child_opt child_opt_arrow',
'id' => 'enable-amp-ads-select-2',
'type' => 'select',
'title' => __('AD Size', 'accelerated-mobile-pages'),
'required' => array('enable-amp-ads-2', '=' , '1'),
// Must provide key => value pairs for select options
'options' => array(
'1' => '300x250',
'2' => '336x280',
'3' => '728x90',
'4' => '300x600',
'5' => '320x100',
'6' => '200x50',
'7' => '320x50'
),
'default' => '2',
),
array(
'class' => 'child_opt',
'id' =>'enable-amp-ads-text-feild-client-2',
'type' => 'text',
'required' => array('enable-amp-ads-2', '=' , '1'),
'title' => __('Data AD Client', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Enter the Data Ad Client (data-ad-client) from the adsense ad code.', 'accelerated-mobile-pages'),
'default' => '',
'placeholder'=> 'ca-pub-2005XXXXXXXXX342'
),
array(
'class' => 'child_opt',
'id' => 'enable-amp-ads-text-feild-slot-2',
'type' => 'text',
'title' => __('Data AD Slot', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code.', 'accelerated-mobile-pages'),
'default' => '',
'required' => array('enable-amp-ads-2', '=' , '1'),
'placeholder'=> '70XXXXXX12'
),
array(
'class' => 'child_opt',
'id' =>'enable-amp-ads-resp-2',
'type' => 'switch',
'title' => __('Responsive Ad unit', 'accelerated-mobile-pages'),
'default' => 0,
'required' => array('enable-amp-ads-2', '=' , '1'),
),
// Ad 2 ends
// Ad 3 starts
array(
'id' => 'enable-amp-ads-3',
'type' => 'switch',
'title' => __('AD #3', 'accelerated-mobile-pages'),
'default' => 0,
'desc' => __('Above the Post Content', 'accelerated-mobile-pages'),
'true' => 'Enabled',
'false' => 'Disabled',
),
array(
'class' => 'child_opt child_opt_arrow',
'id' => 'made-amp-ad-3-global',
'type' => 'select',
'title' => __('Display on', 'accelerated-mobile-pages'),
'options' => array (
'1' => 'Single',
'2' => 'Pages',
'3' => 'Custom Post Types',
'4' => 'Global'
),
'multi' => true,
'default' => '1',
'desc' => __('Display the Ad on only post or on all posts and pages ', 'accelerated-mobile-pages'),
'required' => array('enable-amp-ads-3', '=' , '1')
),
array(
'class' => 'child_opt child_opt_arrow',
'id' => 'enable-amp-ads-select-3',
'type' => 'select',
'title' => __('AD Size', 'accelerated-mobile-pages'),
'required' => array('enable-amp-ads-3', '=' , '1'),
// Must provide key => value pairs for select options
'options' => array(
'1' => '300x250',
'2' => '336x280',
'3' => '728x90',
'4' => '300x600',
'5' => '320x100',
'6' => '200x50',
'7' => '320x50'
),
'default' => '2',
),
array(
'class' => 'child_opt',
'id' =>'enable-amp-ads-text-feild-client-3',
'type' => 'text',
'required' => array('enable-amp-ads-3', '=' , '1'),
'title' => __('Data AD Client', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Enter the Data Ad Client (data-ad-client) from the adsense ad code.', 'accelerated-mobile-pages'),
'default' => '',
'placeholder'=> 'ca-pub-2005XXXXXXXXX342'
),
array(
'class' => 'child_opt',
'id' => 'enable-amp-ads-text-feild-slot-3',
'type' => 'text',
'title' => __('Data AD Slot', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code.', 'accelerated-mobile-pages'),
'default' => '',
'required' => array('enable-amp-ads-3', '=' , '1'),
'placeholder'=> '70XXXXXX12'
),
array(
'class' => 'child_opt',
'id' =>'enable-amp-ads-resp-3',
'type' => 'switch',
'title' => __('Responsive Ad unit', 'accelerated-mobile-pages'),
'default' => 0,
'required' => array('enable-amp-ads-3', '=' , '1'),
),
// Ad 3 ends
// Ad 4 Starts
array(
'id' => 'enable-amp-ads-4',
'type' => 'switch',
'title' => __('AD #4', 'accelerated-mobile-pages'),
'default' => 0,
'desc' => __('Below the Post Content (Single Post)', 'accelerated-mobile-pages'),
'true' => 'Enabled',
'false' => 'Disabled',
),
array(
'class' => 'child_opt child_opt_arrow',
'id' => 'enable-amp-ads-select-4',
'type' => 'select',
'title' => __('AD Size', 'accelerated-mobile-pages'),
'required' => array('enable-amp-ads-4', '=' , '1'),
// Must provide key => value pairs for select options
'options' => array(
'1' => __('300x250','accelerated-mobile-pages'),
'2' => __('336x280','accelerated-mobile-pages'),
'3' => __('728x90','accelerated-mobile-pages'),
'4' => __('300x600','accelerated-mobile-pages'),
'5' => __('320x100','accelerated-mobile-pages'),
'6' => __('200x50','accelerated-mobile-pages'),
'7' => __('320x50','accelerated-mobile-pages')
),
'default' => '2',
),
array(
'class' => 'child_opt',
'id' =>'enable-amp-ads-text-feild-client-4',
'type' => 'text',
'required' => array('enable-amp-ads-4', '=' , '1'),
'title' => __('Data AD Client', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Enter the Data Ad Client (data-ad-client) from the adsense ad code.', 'accelerated-mobile-pages'),
'default' => '',
'placeholder'=> 'ca-pub-2005XXXXXXXXX342'
),
array(
'class' => 'child_opt',
'id' => 'enable-amp-ads-text-feild-slot-4',
'type' => 'text',
'title' => __('Data AD Slot', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code. ', 'accelerated-mobile-pages'),
'default' => '',
'required' => array('enable-amp-ads-4', '=' , '1'),
'placeholder'=> '70XXXXXX12'
),
array(
'class' => 'child_opt',
'id' =>'enable-amp-ads-resp-4',
'type' => 'switch',
'title' => __('Responsive Ad unit', 'accelerated-mobile-pages'),
'default' => 0,
'required' => array('enable-amp-ads-4', '=' , '1'),
),
// Ad 4 ends
//Ad 5 Starts
array(
'id' => 'enable-amp-ads-5',
'type' => 'switch',
'title' => __('AD #5', 'accelerated-mobile-pages'),
'default' => 0,
'desc' => __('Below The Title (Single Post)', 'accelerated-mobile-pages'),
'true' => 'Enabled',
'false' => 'Disabled',
),
array(
'class' => 'child_opt child_opt_arrow',
'id' => 'enable-amp-ads-select-5',
'type' => 'select',
'title' => __('AD Size', 'accelerated-mobile-pages'),
'required' => array('enable-amp-ads-5', '=' , '1'),
// Must provide key => value pairs for select options
'options' => array(
'1' => __('300x250','accelerated-mobile-pages'),
'2' => __('336x280','accelerated-mobile-pages'),
'3' => __('728x90','accelerated-mobile-pages'),
'4' => __('300x600','accelerated-mobile-pages'),
'5' => __('320x100','accelerated-mobile-pages'),
'6' => __('200x50','accelerated-mobile-pages'),
'7' => __('320x50','accelerated-mobile-pages')
),
'default' => '2',
),
array(
'class' => 'child_opt',
'id' =>'enable-amp-ads-text-feild-client-5',
'type' => 'text',
'required' => array('enable-amp-ads-5', '=' , '1'),
'title' => __('Data AD Client', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Enter the Data Ad Client (data-ad-client) from the adsense ad code.', 'accelerated-mobile-pages'),
'default' => '',
'placeholder'=> 'ca-pub-2005XXXXXXXXX342'
),
array(
'class' => 'child_opt',
'id' => 'enable-amp-ads-text-feild-slot-5',
'type' => 'text',
'title' => __('Data AD Slot', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code. ', 'accelerated-mobile-pages'),
'default' => '',
'required' => array('enable-amp-ads-5', '=' , '1'),
'placeholder'=> '70XXXXXX12'
),
array(
'class' => 'child_opt',
'id' =>'enable-amp-ads-resp-5',
'type' => 'switch',
'title' => __('Responsive Ad unit', 'accelerated-mobile-pages'),
'default' => 0,
'required' => array('enable-amp-ads-5', '=' , '1'),
),
//Ad 6 Starts
array(
'id' => 'enable-amp-ads-6',
'type' => 'switch',
'title' => __('AD #6', 'accelerated-mobile-pages'),
'default' => 0,
'desc' => __('Above the Related Posts (Single Post)', 'accelerated-mobile-pages'),
'true' => 'Enabled',
'false' => 'Disabled',
),
array(
'class' => 'child_opt child_opt_arrow',
'id' => 'enable-amp-ads-select-6',
'type' => 'select',
'title' => __('AD Size', 'accelerated-mobile-pages'),
'required' => array('enable-amp-ads-6', '=' , '1'),
// Must provide key => value pairs for select options
'options' => array(
'1' => __('300x250','accelerated-mobile-pages'),
'2' => __('336x280','accelerated-mobile-pages'),
'3' => __('728x90','accelerated-mobile-pages'),
'4' => __('300x600','accelerated-mobile-pages'),
'5' => __('320x100','accelerated-mobile-pages'),
'6' => __('200x50','accelerated-mobile-pages'),
'7' => __('320x50','accelerated-mobile-pages')
),
'default' => '2',
),
array(
'class' => 'child_opt',
'id' =>'enable-amp-ads-text-feild-client-6',
'type' => 'text',
'required' => array('enable-amp-ads-6', '=' , '1'),
'title' => __('Data AD Client', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Enter the Data Ad Client (data-ad-client) from the adsense ad code.', 'accelerated-mobile-pages'),
'default' => '',
'placeholder'=> 'ca-pub-2005XXXXXXXXX342'
),
array(
'class' => 'child_opt',
'id' => 'enable-amp-ads-text-feild-slot-6',
'type' => 'text',
'title' => __('Data AD Slot', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code. ', 'accelerated-mobile-pages'),
'default' => '',
'required' => array('enable-amp-ads-6', '=' , '1'),
'placeholder'=> '70XXXXXX12'
),
array(
'class' => 'child_opt',
'id' =>'enable-amp-ads-resp-6',
'type' => 'switch',
'title' => __('Responsive Ad unit', 'accelerated-mobile-pages'),
'default' => 0,
'required' => array('enable-amp-ads-6', '=' , '1'),
),
array(
'id' => 'amp-ads_2',
'type' => 'section',
'title' => __('Ad Performance', 'accelerated-mobile-pages'),
'indent' => true,
'layout_type' => 'accordion',
'accordion-open'=> 1,
),
array(
'id' => 'amp-ads_2',
'type' => 'section',
'title' => __('Ad Performance', 'accelerated-mobile-pages'),
'indent' => true,
'layout_type' => 'accordion',
'accordion-open'=> 1,
),
array(
'id' =>'ampforwp-ads-data-loading-strategy',
'type' => 'switch',
'title' => __('Optimize For Viewability', 'accelerated-mobile-pages'),
'default' => 0,
'tooltip-subtitle' => __('This will increase the loading speed of the Ads', 'accelerated-mobile-pages'),
'true' => 'Enabled',
'false' => 'Disabled',
),
array(
'id' => 'amp-ads_3',
'type' => 'section',
'title' => __('General', 'accelerated-mobile-pages'),
'indent' => true,
'layout_type' => 'accordion',
'accordion-open'=> 1,
),
array(
'id' =>'ampforwp-ads-sponsorship',
'type' => 'switch',
'title' => __('Sponsorship Label', 'accelerated-mobile-pages'),
'default' => 0,
'true' => 'Enabled',
'false' => 'Disabled',
),
array(
'id' =>'ampforwp-ads-sponsorship-label',
'type' => 'text',
'required' => array('ampforwp-ads-sponsorship', '=' , '1'),
'title' => __('Sponsorship Label Text', 'accelerated-mobile-pages'),
'class' => 'child_opt child_opt_arrow',
'default' => '',
'placeholder'=> 'Sponsored'
),
),
) );
if ( ! function_exists('ampforwp_seo_default') ) {
function ampforwp_seo_default() {
$default = '';
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
if ( is_plugin_active('wordpress-seo/wp-seo.php') ) {
$default = 1;
}
elseif ( is_plugin_active('all-in-one-seo-pack/all_in_one_seo_pack.php') ) {
$default = 2;
}
return $default;
}
}
// SEO SECTION
Redux::setSection( $opt_name, array(
'title' => __( 'SEO', 'accelerated-mobile-pages' ),
'id' => 'amp-seo',
'subsection' => true,
'fields' => array(
array(
'id' => 'ampforwp-seo-general-section',
'type' => 'section',
'title' => __('General', 'accelerated-mobile-pages'),
'indent' => true,
'layout_type' => 'accordion',
'accordion-open'=> 1,
),
array(
'id' => 'ampforwp-seo-meta-description',
'type' => 'switch',
'title' => __('Meta Description', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('The meta tag that displays in head', 'accelerated-mobile-pages'),
'default' => 0
),
array(
'id' => 'ampforwp-seo-custom-additional-meta',
'type' => 'textarea',
'title' => __('Head Section', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Adds additional Meta to the head section', 'accelerated-mobile-pages', 'accelerated-mobile-pages'),
'placeholder' => __('','accelerated-mobile-pages')
),
array(
'id' => 'ampforwp-seo-plugins-section',
'type' => 'section',
'title' => __('SEO Plugin Integration', 'accelerated-mobile-pages'),
'indent' => true,
'layout_type' => 'accordion',
'accordion-open'=> 1,
),
array(
'id' => 'ampforwp-seo-selection',
'type' => 'select',
'title' => __('Select SEO Plugin', 'accelerated-mobile-pages'),
'options' => array(
'1' => 'Yoast',
'2' => 'All in One SEO'
),
'default' => ampforwp_seo_default(),
),
array(
'class' => 'child_opt child_opt_arrow',
'id' => 'ampforwp-seo-yoast-meta',
'type' => 'switch',
'tooltip-subtitle' => __('Adds Social and Open Graph Meta Tags from Yoast', 'accelerated-mobile-pages'),
'title' => __( 'Meta Tags from Yoast', 'accelerated-mobile-pages' ),
'default' => '1',
'required' => array('ampforwp-seo-selection', '=' , '1'),
),
array(
'class' => 'child_opt',
'id' => 'ampforwp-seo-yoast-description',
'type' => 'switch',
'tooltip-subtitle' => __('Adds Yoast Custom description to ld+json for AMP page', 'accelerated-mobile-pages'),
'title' => __( 'Yoast Description in ld+json', 'accelerated-mobile-pages' ),
'default' => 0,
'required' => array('ampforwp-seo-selection', '=' , '1'),
),
array(
'class' => 'child_opt',
'id' => 'ampforwp-seo-yoast-canonical',
'type' => 'switch',
'tooltip-subtitle' => __('Pull Canonical from Yoast for AMP pages', 'accelerated-mobile-pages'),
'title' => __( 'Canonical from Yoast', 'accelerated-mobile-pages' ),
'default' => 0,
'required' => array('ampforwp-seo-selection', '=' , '1'),
),
array(
'id' => 'ampforwp-seo-aioseo',
'type' => 'info',
'style' => 'success',
'desc' => __("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', '=', '2')
),
array(
'class' => 'child_opt',
'id' => 'ampforwp-seo-aioseo-canonical',
'type' => 'switch',
'tooltip-subtitle' => __('Pull Canonical from All In One SEO for AMP pages', 'accelerated-mobile-pages'),
'title' => __( 'Canonical from All In One SEO', 'accelerated-mobile-pages' ),
'default' => 0,
'required' => array('ampforwp-seo-selection', '=' , '2'),
),
array(
'id' => 'ampforwp-seo-index-noindex-sub-section',
'type' => 'section',
'title' => __('Advanced Indexing', 'accelerated-mobile-pages'),
'indent' => true,
'layout_type' => 'accordion',
'accordion-open'=> 1,
),
array(
'id' => 'amp-inspection-tool',
'type' => 'switch',
'title' => __('URL Inspection Tool Compatibility', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __("You can read about it here",'accelerated-mobile-pages'),
'default' => 1,
),
array(
'id' => 'ampforwp-robots-archive-sub-pages-sitewide',
'type' => 'switch',
'title' => __('Archive subpages (sitewide)', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __("Such as /page/2 so on and so forth",'accelerated-mobile-pages'),
'default' => 0,
'on' => 'index',
'off' => 'noindex',
'required' => array('amp-inspection-tool', '=' , '0'),
'switch-text' => true,
),
array(
'id' => 'ampforwp-robots-archive-author-pages',
'type' => 'switch',
'title' => __('Author Archives', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __("Enable it to set Indexing for Author Archives",'accelerated-mobile-pages'),
'default' => 1,
'on' => 'index',
'off' => 'noindex',
'required' => array('amp-inspection-tool', '=' , '0'),
'switch-text' => true,
),
array(
'id' => 'ampforwp-robots-archive-date-pages',
'type' => 'switch',
'title' => __('Date Archives', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __("Enable it to set Indexing for Date Archives",'accelerated-mobile-pages'),
'default' => 1,
'on' => 'index',
'off' => 'noindex',
'required' => array('amp-inspection-tool', '=' , '0'),
'switch-text' => true,
),
array(
'id' => 'ampforwp-robots-archive-category-pages',
'type' => 'switch',
'title' => __('Categories', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __("Enable it to set Indexing for Categories",'accelerated-mobile-pages'),
'default' => 1,
'on' => 'index',
'off' => 'noindex',
'required' => array('amp-inspection-tool', '=' , '0'),
'switch-text' => true,
),
array(
'id' => 'ampforwp-robots-archive-tag-pages',
'type' => 'switch',
'title' => __('Tags', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __("Enable it to set Indexing for Tags",'accelerated-mobile-pages'),
'default' => 1,
'on' => 'index',
'off' => 'noindex',
'required' => array('amp-inspection-tool', '=' , '0'),
'switch-text' => true,
),
)
)
);
// Performance SECTION
Redux::setSection( $opt_name, array(
'title' => __( 'Performance', 'accelerated-mobile-pages' ),
'id' => 'amp-performance',
'desc' => $cache_desc,
'subsection' => true,
'fields' => array(
array(
'id' => 'ampforwp-performance',
'type' => 'section',
'title' => __('Performance Enhancement', 'accelerated-mobile-pages'),
'indent' => true,
'layout_type' => 'accordion',
'accordion-open'=> 1,
),
array(
'id' => 'ampforwp_cache_minimize_mode',
'type' => 'switch',
'title' => __('Minify', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Improve the Page Speed and Loading time with Minification option', 'accelerated-mobile-pages'),
'default' => 0
),
)
)
);
function ampforwp_get_default_analytics($param=""){
$options = $default = '';
$options = get_option('redux_builder_amp', true);
$default = $options['amp-analytics-select-option'];
if($param == $default){
return true;
}
else
return false;
}
// Analytics SECTION
Redux::setSection( $opt_name, array(
'title' => __('Analytics'),
// 'icon' => 'el el-th-large',
'subsection' => true,
'fields' =>
array(
array(
'id' => 'amp-analytics-select-option',
'type' => 'select',
'title' => __( 'Analytics Type', 'accelerated-mobile-pages' ),
'class' => 'hide',
'tooltip-subtitle' => __( 'Select your Analytics provider.', 'accelerated-mobile-pages' ),
'options' => array(
'1' => __('Google Analytics', 'accelerated-mobile-pages' ),
'2' => __('Segment Analytics', 'accelerated-mobile-pages' ),
'3' => __('Matomo (Piwik) Analytics', 'accelerated-mobile-pages' ),
'4' => __('Quantcast Measurement', 'accelerated-mobile-pages' ),
'5' => __('comScore', 'accelerated-mobile-pages' ),
'6' => __('Effective Measure', 'accelerated-mobile-pages' ),
'7' => __('StatCounter', 'accelerated-mobile-pages' ),
'8' => __('Histats Analytics', 'accelerated-mobile-pages'),
'9' => __('Yandex Metrika', 'accelerated-mobile-pages'),
'10' => __('Chartbeat Analytics', 'accelerated-mobile-pages'),
'11' => __('Alexa Metrics', 'accelerated-mobile-pages'),
'12' => __('AFS Analytics', 'accelerated-mobile-pages'),
'13' => __('Adobe Analytics', 'accelerated-mobile-pages'),
),
'required' => array(
array('amp-use-gtm-option', '=' , '0'),
),
'default' => '1',
),
array(
'id' => 'ampforwp-analytics_1',
'type' => 'section',
'title' => __('Primary Analytic Providers', 'accelerated-mobile-pages'),
'indent' => true,
'layout_type' => 'accordion',
'accordion-open'=> 1,
),
// Google Analytics
array(
'id' => 'ampforwp-ga-switch',
'type' => 'switch',
'title' => 'Google Analytics',
'default' => ampforwp_get_default_analytics('1'),
'required' => array(
array('amp-use-gtm-option', '=' , '0'),
),
),
array(
'class' => 'child_opt child_opt_arrow',
'id' => 'ga-feild',
'type' => 'text',
'title' => __( 'Tracking ID', 'accelerated-mobile-pages' ),
'required' => array(
array('amp-use-gtm-option', '=' , '0'),
array('ampforwp-ga-switch', '=' , '1'),
array('ampforwp-ga-field-advance-switch', '=' , '0')
),
'tooltip-subtitle' => __( 'Enter your Google Analytics ID. Example: UA-XXXXX-Y', 'accelerated-mobile-pages' ),
'default' => 'UA-XXXXX-Y',
),
// Advance Tracking options for Google Analytics
array(
'class' => 'child_opt',
'id' => 'ampforwp-ga-field-advance-switch',
'type' => 'switch',
'title' => __( 'Advanced Google Analytics', 'accelerated-mobile-pages' ),
'required' => array(
array('amp-use-gtm-option', '=' , '0'),
array('ampforwp-ga-switch', '=' , '1')
),
'default' => 0,
),
array(
'class' => 'child_opt',
'id' => 'ampforwp-ga-field-anonymizeIP',
'type' => 'switch',
'title' => __( 'IP Anonymization', 'accelerated-mobile-pages' ),
'required' => array(
array('amp-use-gtm-option', '=' , '0'),
array('ampforwp-ga-switch', '=' , '1')
),
'default' => 1,
),
array(
'class' => 'child_opt',
'id' => 'ampforwp-ga-field-advance',
'type' => 'ace_editor',
'title' => __('Analytics Code in JSON Format', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Tutorial: How To Add Advanced Google Analytics in AMP?', 'accelerated-mobile-pages'),
'required' => array(
array('amp-use-gtm-option', '=' , '0'),
array('ampforwp-ga-switch', '=' , '1'),
array('ampforwp-ga-field-advance-switch', '=' , '1')
),
'mode' => 'javascript',
'theme' => 'monokai',
'desc' => '',
'default' => __('{
"vars": {
"account": "UA-xxxxxxx-x" //Replace this with your Tracking ID
},
"triggers": {
"trackPageview": {
"on": "visible",
"request": "pageview",
},
/**
* Enter your Advanced Analytics code here
*/
}
}','accelerated-mobile-pages')
),
//GTM
array(
'id' => 'amp-use-gtm-option',
'type' => 'switch',
'title' => __( 'Google Tag Manager', 'accelerated-mobile-pages' ),
'tooltip-subtitle' => __( 'Enable GTM Support in AMP.', 'accelerated-mobile-pages' ),
'default' => 0,
),
array(
'class'=>'child_opt child_opt_arrow',
'id' =>'amp-gtm-id',
'type' => 'text',
'title' => __('Tag Manager ID (Container ID)','accelerated-mobile-pages'),
'default' => '',
'tooltip-subtitle' => __('Eg: GTM-5XXXXXP (Getting Started?)','accelerated-mobile-pages'),
// 'validate' => 'not_empty',
'required' => array(
array('amp-use-gtm-option', '=' , '1')
),
),
array(
'class' => 'child_opt',
'id' =>'amp-gtm-analytics-type',
'type' => 'text',
'title' => __('Analytics Type','accelerated-mobile-pages'),
'default' => '',
'desc' => __('Eg: googleanalytics','accelerated-mobile-pages'),
// 'validate' => 'not_empty',
'required' => array(
array('amp-use-gtm-option', '=' , '1')
),
),
array(
'class'=>'child_opt',
'id' =>'amp-gtm-analytics-code',
'type' => 'text',
'title' => __('Analytics ID','accelerated-mobile-pages'),
'default' => '',
'tooltip-subtitle' => 'Eg: UA-XXXXXX-Y',
// 'validate' => 'not_empty',
'required' => array(
array('amp-use-gtm-option', '=' , '1')),
),
array(
'class' => 'child_opt',
'id' => 'ampforwp-gtm-field-anonymizeIP',
'type' => 'switch',
'title' => __( 'IP Anonymization', 'accelerated-mobile-pages' ),
'required' => array(
array('amp-use-gtm-option', '=' , '1'),
),
'default' => 1,
),
// Google Cliend ID API
array(
'id' => 'ampforwp-ga-clientid-api-gtm',
'type' => 'info',
'style' => 'info',
'desc' => 'Check this Tutorial to set it up',
'title' => __('Set up Google AMP Client ID API', 'accelerated-mobile-pages'),
'required' => array(
array('amp-use-gtm-option', '=' , '1'),
),
),
array(
'id' => 'ampforwp-analytics_2',
'type' => 'section',
'title' => __('General Analytics Providers', 'accelerated-mobile-pages'),
'indent' => true,
'layout_type' => 'accordion',
'accordion-open'=> 1,
),
array(
'id' =>'amp-fb-pixel',
'type' => 'switch',
'title' => __('Facebook Pixel','accelerated-mobile-pages'),
'default' => 0,
),
array(
'id' =>'amp-fb-pixel-id',
'type' => 'text',
'title' => __('Facebook Pixel ID','accelerated-mobile-pages'),
'default' => '',
'desc' => 'Example: 153246987501548',
'required' => array(
array('amp-fb-pixel', '=' , '1')),
), // Segment Analytics
array(
'id' => 'ampforwp-Segment-switch',
'type' => 'switch',
'title' => 'Segment Analytics',
'default' => ampforwp_get_default_analytics('2'),
),
array(
'id' => 'sa-feild',
'type' => 'text',
'title' => __( 'Segment Analytics', 'accelerated-mobile-pages' ),
'tooltip-subtitle' => __( 'Enter your Segment Analytics Key.', 'accelerated-mobile-pages' ),
'required' => array(
array('ampforwp-Segment-switch', '=' , '1')
),
'default' => 'SEGMENT-WRITE-KEY',
),
// Piwik Analytics
array(
'id' => 'ampforwp-Piwik-switch',
'type' => 'switch',
'title' => 'Matomo (Piwik) Analytics',
'default' => ampforwp_get_default_analytics('3'),
),
array(
'id' => 'pa-feild',
'type' => 'text',
'title' => __( ' Matomo (Piwik) Analytics', 'accelerated-mobile-pages' ),
'required' => array(
array('ampforwp-Piwik-switch', '=' , '1')
),
'desc' => __( 'Example: https://piwik.example.org/piwik.php?idsite=YOUR_SITE_ID&rec=1&action_name=TITLE&urlref=DOCUMENT_REFERRER&url=CANONICAL_URL&rand=RANDOM', 'accelerated-mobile-pages' ),
'tooltip-subtitle' => __('Enter your Matomo (Piwik) Analytics URL.', 'accelerated-mobile-pages' ),
'default' => '#',
),
// Quantcast
array(
'id' => 'ampforwp-Quantcast-switch',
'type' => 'switch',
'title' => 'Quantcast Measurement',
'default' => ampforwp_get_default_analytics('4'),
),
array(
'id' =>'amp-quantcast-analytics-code',
'type' => 'text',
'title' => __('p-code','accelerated-mobile-pages'),
'default' => '',
'required' => array(
array('ampforwp-Quantcast-switch', '=' , '1')),
),
// comScore
array(
'id' => 'ampforwp-comScore-switch',
'type' => 'switch',
'title' => 'comScore',
'default' => ampforwp_get_default_analytics('5'),
),
array(
'id' =>'amp-comscore-analytics-code-c1',
'type' => 'text',
'title' => __('C1','accelerated-mobile-pages'),
'default' => 1,
'required' => array(
array('ampforwp-comScore-switch', '=' , '1')),
),
array(
'id' =>'amp-comscore-analytics-code-c2',
'type' => 'text',
'title' => __('C2','accelerated-mobile-pages'),
'default' => '',
'required' => array(
array('ampforwp-comScore-switch', '=' , '1')),
),
// Effective Measure
array(
'id' => 'ampforwp-Effective-switch',
'type' => 'switch',
'title' => 'Effective Measure',
'default' => ampforwp_get_default_analytics('6'),
),
array(
'id' => 'eam-feild',
'type' => 'text',
'title' => __( 'Effective Measure Analytics', 'accelerated-mobile-pages' ),
'required' => array(
array('ampforwp-Effective-switch', '=' , '1')
),
'desc' => __( 'Example: https://s.effectivemeasure.net/d/6/i?pu=CANONICAL_URL&ru=DOCUMENT_REFERRER&rnd=RANDOM', 'accelerated-mobile-pages' ),
'tooltip-subtitle' => __('Enter your Effective Measure URL.', 'accelerated-mobile-pages' ),
'default' => '#',
),
// StatCounter
array(
'id' => 'ampforwp-StatCounter-switch',
'type' => 'switch',
'title' => 'StatCounter',
'default' => ampforwp_get_default_analytics('7'),
),
array(
'id' => 'sc-feild',
'type' => 'text',
'title' => __( 'StatCounter', 'accelerated-mobile-pages' ),
'required' => array(
array('ampforwp-StatCounter-switch', '=' , '1')
),
'desc' => __( 'Example: https://c.statcounter.com/PROJECT_ID/0/SECURITY_CODE/1/', 'accelerated-mobile-pages' ),
'tooltip-subtitle' => __('Enter your StatCounter URL.', 'accelerated-mobile-pages' ),
'default' => '#',
),
// Histats Analytics
array(
'id' => 'ampforwp-Histats-switch',
'type' => 'switch',
'title' => 'Histats Analytics',
'default' => ampforwp_get_default_analytics('8'),
),
array(
'id' => 'histats-feild',
'type' => 'text',
'title' => __( 'Histats Analytics', 'accelerated-mobile-pages' ),
'required' => array(
array('ampforwp-Histats-switch', '=' , '1')
),
'tooltip-subtitle' => __( 'Enter your Histats Analytics ID.', 'accelerated-mobile-pages' ),
'desc' => 'Tutorial: How to get Histats Analytics ID for AMP?',
'default' => '',
),
// Yandex Metrika
array(
'id' => 'ampforwp-Yandex-switch',
'type' => 'switch',
'title' => 'Yandex Metrika',
'default' => ampforwp_get_default_analytics('9'),
),
array(
'id' =>'amp-Yandex-Metrika-analytics-code',
'type' => 'text',
'title' => __('Yandex Metrika Analytics ID','accelerated-mobile-pages'),
'default' => '',
'required' => array(
array('ampforwp-Yandex-switch', '=' , '1')),
'tooltip-subtitle' => __( 'Enter your Counter ID.', 'accelerated-mobile-pages' ),
),
// Chartbeat Analytics
array(
'id' => 'ampforwp-Chartbeat-switch',
'type' => 'switch',
'title' => 'Chartbeat Analytics',
'default' => ampforwp_get_default_analytics('10'),
),
array(
'id' =>'amp-Chartbeat-analytics-code',
'type' => 'text',
'title' => __('Chartbeat Analytics ID','accelerated-mobile-pages'),
'default' => '',
'required' => array(
array('ampforwp-Chartbeat-switch', '=' , '1')),
'tooltip-subtitle' => __( 'Enter your Account ID.', 'accelerated-mobile-pages' ),
),
// Alexa Metrics
array(
'id' => 'ampforwp-Alexa-switch',
'type' => 'switch',
'title' => 'Alexa Metrics',
'default' => ampforwp_get_default_analytics('11'),
),
array(
'id' => 'ampforwp-alexa-account',
'type' => 'text',
'title' => __( 'Alexa Metrics Account', 'accelerated-mobile-pages' ),
'required' => array(
array('ampforwp-Alexa-switch', '=' , '1')
),
'tooltip-subtitle' => __( 'Enter Account Number given by Alexa Metrics', 'accelerated-mobile-pages' ),
'default' => '',
),
array(
'id' => 'ampforwp-alexa-domain',
'type' => 'text',
'title' => __( 'Alexa Metrics Domain', 'accelerated-mobile-pages' ),
'required' => array(
array('ampforwp-Alexa-switch', '=' , '1')
),
'tooltip-subtitle' => __( 'Enter the domain', 'accelerated-mobile-pages' ),
'default' => '',
),
// AFS Analytics
array(
'id' => 'ampforwp-afs-analytics-switch',
'type' => 'switch',
'title' => 'AFS Analytics',
'default' => ampforwp_get_default_analytics('12'),
),
array(
'id' => 'ampforwp-afs-siteid',
'type' => 'text',
'title' => __( 'Website ID', 'accelerated-mobile-pages' ),
'required' => array(
array('ampforwp-afs-analytics-switch', '=' , '1')
),
'tooltip-subtitle' => __( 'Enter the Website ID', 'accelerated-mobile-pages' ),
'default' => '',
'desc' => 'example: 00000003',
),
//Adobe Analytics
array(
'id' => 'ampforwp-adobe-analytics-switch',
'type' => 'switch',
'title' => 'Adobe Analytics',
'default' => ampforwp_get_default_analytics('13'),
'required' => array(
array('amp-use-gtm-option', '=' , '0'),
),
),
array(
'id' => 'ampforwp-adobe-host',
'type' => 'text',
'title' => __( 'Host Name', 'accelerated-mobile-pages' ),
'required' => array(
array('amp-use-gtm-option', '=' , '0'),
array('ampforwp-adobe-analytics-switch', '=' , '1')
),
'tooltip-subtitle' => __( 'Enter the Website domain', 'accelerated-mobile-pages' ),
'default' => '',
'desc' => 'example: metrics.example.com',
),
array(
'id' => 'ampforwp-adobe-reportsuiteid',
'type' => 'text',
'title' => __( 'ReportSuite ID', 'accelerated-mobile-pages' ),
'required' => array(
array('amp-use-gtm-option', '=' , '0'),
array('ampforwp-adobe-analytics-switch', '=' , '1')
),
'tooltip-subtitle' => __( 'Enter the ReportSuite ID', 'accelerated-mobile-pages' ),
'default' => '',
'desc' => 'example: 00000003',
),
//Adobe Analytics
)
)
);
//Get options for Structured Data Type
if( !function_exists('ampforwp_get_sd_types') ){
function ampforwp_get_sd_types(){
$options = array();
$options = array(
'BlogPosting' => 'BlogPosting',
'NewsArticle' => 'NewsArticle',
'Recipe' => 'Recipe',
'Product' => 'Product',
'VideoObject' => 'VideoObject',
'Article' => 'Article',
'WebPage' => 'WebPage'
);
return $options;
}
}
if( ! is_plugin_active('structured-data-for-wp/structured-data-for-wp.php') ) {
add_filter('ampforwp_sd_custom_fields', 'ampforwp_add_extra_fields');
function ampforwp_add_extra_fields($fields){
$post_types = '';
$custom_fields = array();
$extra_fields = array();
$post_types = get_option('ampforwp_custom_post_types');
if($post_types){
foreach ($post_types as $post_type) {
if( $post_type == 'post' || $post_type == 'page' ) {
continue;
}
$custom_fields[] = array(
'id' => 'ampforwp-sd-type-'. $post_type,
'type' => 'select',
'title' => __($post_type, 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Select the Structured Data Type for '.$post_type, 'accelerated-mobile-pages'),
'options' => ampforwp_get_sd_types(),
'default' => 'BlogPosting',
);
$extra_fields = array_merge($extra_fields, $custom_fields);
}
}
array_splice($fields, 2, 0, $extra_fields);
return $fields;
}
}
add_filter('ampforwp_sd_custom_fields', 'ampforwp_add_sd_fields');
function ampforwp_add_sd_fields($fields){
if( is_plugin_active('structured-data-for-wp/structured-data-for-wp.php') ) {
$fields[] = array(
'id' => 'amp-cf7-SSL-info',
'type' => 'info',
'desc' =>"
',
),
),
) );
// Push Notifications section
Redux::setSection( $opt_name, array(
'title' => __( 'Push Notifications', 'accelerated-mobile-pages' ),
// 'icon' => 'el el-podcast',
'id' => 'ampforwp-push-notifications',
'desc' => " ",
'subsection' => true,
'fields' => array(
array(
'id' => 'ampforwp-pushnot-1',
'type' => 'section',
'title' => __('Push Notification Support', 'accelerated-mobile-pages'),
'indent' => true,
'layout_type' => 'accordion',
'accordion-open'=> 1,
),
array(
'id' => 'ampforwp-web-push-onesignal',
'type' => 'switch',
'title' => 'OneSignal',
'tooltip-subtitle' => 'View Integration Tutorial (HTTPS is required)',
'true' => 'true',
'false' => 'false',
'default' => 0,
),
array(
'required' => array(
array( 'ampforwp-web-push-onesignal', '=' , 1 ),
),
'id' => 'ampforwp-one-signal-app-id',
'type' => 'text',
'title' => 'APP ID',
'class' => 'child_opt child_opt_arrow',
),
array(
'id' => 'ampforwp-onesignal-positioning',
'type' => 'section',
'title' => __('Positioning', 'accelerated-mobile-pages'),
'required' => array(
array( 'ampforwp-web-push-onesignal', '=' , 1 ),
array( 'amp-use-pot', '=' , 0 )
),
'indent' => true,
'layout_type' => 'accordion',
'accordion-open'=> 1,
),
array(
'id' => 'ampforwp-web-push-onesignal-below-content',
'type' => 'switch',
'title' => 'Below the Content',
'true' => 'true',
'false' => 'false',
'default' => 1,
'tooltip-subtitle' => 'Show Subscribe Button Below the Content',
'required' => array('ampforwp-web-push-onesignal', '=' , '1'),
),
array(
'id' => 'ampforwp-web-push-onesignal-above-content',
'type' => 'switch',
'title' => 'Above the Content',
'true' => 'true',
'false' => 'false',
'default' => 0,
'tooltip-subtitle' => 'Show Subscribe Button Above the Content',
'required' => array('ampforwp-web-push-onesignal', '=' , '1'),
),
array(
'id' => 'translation',
'type' => 'section',
'title' => __('Translation', 'accelerated-mobile-pages'),
'indent' => true,
'layout_type' => 'accordion',
'accordion-open'=> 1,
),
array(
'id' => 'ampforwp-onesignal-translator-subscribe',
'type' => 'text',
'title' => __('Subscribe', 'accelerated-mobile-pages'),
'default' => __('Subscribe to updates','accelerated-mobile-pages'),
'placeholder'=>__('Add some text','accelerated-mobile-pages'),
),
array(
'id' => 'ampforwp-onesignal-translator-unsubscribe',
'type' => 'text',
'title' => __('Unsubsribe', 'accelerated-mobile-pages'),
'default' => __('Unsubscribe from updates','accelerated-mobile-pages'),
'placeholder'=>__('Add some text','accelerated-mobile-pages'),
),
array(
'id' => 'ampforwp-onesignal-exper',
'type' => 'section',
'title' => __('Experimental', 'accelerated-mobile-pages'),
'required' => array(
array( 'ampforwp-web-push-onesignal', '=' , 1 ),
array( 'amp-use-pot', '=' , 0 )
),
'indent' => true,
'layout_type' => 'accordion',
'accordion-open'=> 1,
),
array(
'id' => 'ampforwp-onesignal-http-site',
'type' => 'switch',
'title' => 'HTTP Site',
'tooltip-subtitle' => 'For HTTP Sites Only',
'required' => array('ampforwp-web-push-onesignal', '=' , '1'),
'true' => 'true',
'false' => 'false',
'default' => 0
),
array(
'id' => 'ampforwp-onesignal-subdomain',
'type' => 'text',
'title' => 'Subdomain',
'desc' => __('Example: ampforwp', 'accelerated-mobile-pages'),
'required' => array(
array('ampforwp-web-push-onesignal', '=' , '1'),
array('ampforwp-onesignal-http-site', '=','1')),
),
)
)
);
// contact form 7
$forms_support[] = array(
'id' => 'ampforwp-cfs_1',
'type' => 'section',
'title' => __('CF7 Compatibility', 'accelerated-mobile-pages'),
'indent' => true,
'layout_type' => 'accordion',
'accordion-open'=> 1,
);
$forms_support[] = array(
'id' =>'amp-enable-contactform',
'type' => 'switch',
'title' => __('Contact Form 7 Support', 'accelerated-mobile-pages'),
'default' => '',
'true' => 'Enabled',
'false' => 'Disabled',
);
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
if(!is_plugin_active( 'amp-cf7/amp-cf7.php' ) ){
$forms_support[]= array(
'id' => 'info_normal_cf7',
'type' => 'info',
'required' => array('amp-enable-contactform', '=' , '1'),
'desc' => '',
);
}
// Gravity Forms
$forms_support[] = array(
'id' => 'ampforwp-cfs_2',
'type' => 'section',
'title' => __('Gravity Forms Compatibility', 'accelerated-mobile-pages'),
'indent' => true,
'layout_type' => 'accordion',
'accordion-open'=> 1,
);
$forms_support[] = array(
'id' =>'amp-enable-gravityforms_support',
'type' => 'switch',
'title' => __('Gravity Forms Support', 'accelerated-mobile-pages'),
'default' => '',
'true' => 'Enabled',
'false' => 'Disabled',
);
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
if(!is_plugin_active( 'amp-gravity-forms/amp-gravity-forms.php' ) ){
$forms_support[]= array(
'id' => 'info_normal_2',
'type' => 'info',
'required' => array('amp-enable-gravityforms_support', '=' , '1'),
'desc' => '',
);
}
// Ninja Forms
$forms_support[] = array(
'id' => 'ampforwp-ninja-forms',
'type' => 'section',
'title' => __('Ninja Forms Compatibility', 'accelerated-mobile-pages'),
'indent' => true,
'layout_type' => 'accordion',
'accordion-open'=> 1,
);
$forms_support[] = array(
'id' =>'amp-enable-ninja-forms-support',
'type' => 'switch',
'title' => __('Ninja Forms Support', 'accelerated-mobile-pages'),
'default' => '',
'true' => 'Enabled',
'false' => 'Disabled',
);
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
if(!is_plugin_active( 'amp-gravity-forms/amp-ninja-forms.php' ) ){
$forms_support[]= array(
'id' => 'info_normal_2',
'type' => 'info',
'required' => array('amp-enable-ninja-forms-support', '=' , '1'),
'desc' => '',
);
}
// Contact Form SECTION
Redux::setSection( $opt_name, array(
'title' => __( 'Contact Form', 'accelerated-mobile-pages' ),
// 'desc' => 'Contact forms will automatically be converted into AMP compatible.',
'id' => 'amp-contact',
'subsection' => true,
'fields' => $forms_support
) );
// comments
Redux::setSection( $opt_name, array(
'title' => __( 'Comments', 'accelerated-mobile-pages' ),
'desc' => $comment_desc,
'id' => 'disqus-comments',
'subsection' => true,
'fields' => array(
array(
'id' => 'ampforwp-display-comments',
'type' => 'section',
'title' => __('Display', 'accelerated-mobile-pages'),
'indent' => true,
'layout_type' => 'accordion',
'accordion-open'=> 1,
),
array(
'id' => 'ampforwp-display-on-pages',
'type' => 'switch',
'title' => __('Display on Pages', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Enable/Disable comments on pages using this switch.', 'accelerated-mobile-pages'),
'default' => 1
),
array(
'id' => 'ampforwp-display-on-posts',
'type' => 'switch',
'title' => __('Display on Posts', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Enable/Disable comments on posts using this switch.', 'accelerated-mobile-pages'),
'default' => 1
),
array(
'id' => 'ampforwp-comments',
'type' => 'section',
'title' => __('Discussion', 'accelerated-mobile-pages'),
'indent' => true,
'layout_type' => 'accordion',
'accordion-open'=> 1,
),
array(
'title' =>__('WordPress Comments','accelerated-mobile-pages'),
'id' => 'wordpress-comments-support',
'tooltip-subtitle' => __('Enable/Disable WordPress comments using this switch.', 'accelerated-mobile-pages'),
'type' => 'switch',
'default' => 1,
),
array(
'class' => 'child_opt child_opt_arrow',
'id' => 'ampforwp-number-of-comments',
'type' => 'text',
'tooltip-subtitle' => __('This refers to the normal comments','accelerated-mobile-pages'),
'title' => __('No of Comments', 'accelerated-mobile-pages'),
'default' => 10,
'required' => array('wordpress-comments-support' , '=' , 1
),
),
array(
'class' => 'child_opt child_opt_arrow',
'id' => 'ampforwp-display-avatar',
'type' => 'switch',
'title' => __('Display on User Avatar', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Enable/Disable user Avatar.', 'accelerated-mobile-pages'),
'default' => 1,
'required' => array('wordpress-comments-support' , '=' , 1
),
),
array(
'id' => 'ampforwp-disqus-comments-support',
'type' => 'switch',
'title' => __('Disqus', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Enable/Disable Disqus comments using this switch.', 'accelerated-mobile-pages'),
'default' => 0
),
array(
'class' => 'child_opt child_opt_arrow',
'id' => 'ampforwp-disqus-comments-name',
'type' => 'text',
'title' => __('Disqus Name', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Eg: https://xyz.disqus.com', 'accelerated-mobile-pages'),
'required' => array('ampforwp-disqus-comments-support', '=' , '1'),
'default' => ''
),
array(
'class' => 'child_opt',
'id' => 'ampforwp-disqus-host-position',
'type' => 'switch',
'title' => __('Host on AMPforWP API', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Use AMPforWP secure servers to serve Comments file. Recommended if your site is non HTTPS', 'accelerated-mobile-pages'),
'default' => 1,
'required' => array('ampforwp-disqus-comments-support', '=' , '1'),
),
array(
'class' => 'child_opt',
'id' => 'ampforwp-disqus-host-file',
'type' => 'text',
'title' => __('Disqus Host File', 'accelerated-mobile-pages'),
'desc' => ' Click here to know, How to Setup Disqus Host file on your servers ',
'tooltip-subtitle' => __('Enter the URL of host file', 'accelerated-mobile-pages'),
'placeholder' => 'https://comments.example.com/disqus.php',
'required' => array('ampforwp-disqus-host-position', '=' , '0'),
),
array(
'id' => 'ampforwp-disqus-layout',
'title' => __('Disqus Layout', 'accelerated-mobile-pages'),
'type' => 'select',
'options' => array(
'fixed' => 'Fixed',
'responsive' => 'Responsive'
),
'default' => 'responsive',
'required'=>array('ampforwp-disqus-comments-support','=','1'),
),
array(
'id' => 'ampforwp-disqus-height',
'type' => 'text',
'title' => __('Disqus Iframe Height', 'accelerated-mobile-pages'),
'placeholder' => 'Enter the height',
'default' => '420',
'required' => array('ampforwp-disqus-layout', '=' , 'fixed'),
),
array(
'id' => 'ampforwp-facebook-comments-support',
'type' => 'switch',
'title' => __('Facebook Comments', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Enable/Disable Facebook comments using this switch.', 'accelerated-mobile-pages'),
'default' => 0,
),
array(
'class' => 'child_opt child_opt_arrow',
'id' => 'ampforwp-number-of-fb-no-of-comments',
'type' => 'text',
'tooltip-subtitle' => __('Enter the number of comments','accelerated-mobile-pages'),
'title' => __('No of Comments', 'accelerated-mobile-pages'),
'default' => 10,
'required' => array(
array('ampforwp-facebook-comments-support', '=' , 1),
),
),
array(
'class' => 'child_opt child_opt_arrow',
'id' => 'ampforwp-fb-comments-lang',
'type' => 'text',
'tooltip-subtitle' => __('Enter the Language code','accelerated-mobile-pages'),
'title' => __('Language', 'accelerated-mobile-pages'),
'desc' => 'Locales and Languages Supported by Facebook ',
'default' => get_locale(),
'required' => array(
array('ampforwp-facebook-comments-support', '=' , 1)
),
),
//Vuukle options
array(
'id' => 'ampforwp-vuukle-comments-support',
'type' => 'switch',
'title' => __('Vuukle Comments', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Enable/Disable Vuukle comments using this switch.', 'accelerated-mobile-pages'),
'default' => 0,
),
array(
'class' => 'child_opt child_opt_arrow',
'id' => 'ampforwp-vuukle-comments-apiKey',
'type' => 'text',
'tooltip-subtitle' => __('Enter the API key of Vuukle','accelerated-mobile-pages'),
'title' => __('API Key', 'accelerated-mobile-pages'),
'default' => '',
'desc' => "For Example xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
'required' => array(
array('ampforwp-vuukle-comments-support', '=' , 1),
),
),
//SpotIM Options
array(
'id' => 'ampforwp-spotim-comments-support',
'type' => 'switch',
'title' => __('Spot.IM Conversation', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Enable/Disable Spot.IM Conversation using this switch.', 'accelerated-mobile-pages'),
'default' => 0,
),
array(
'class' => 'child_opt child_opt_arrow',
'id' => 'ampforwp-spotim-comments-apiKey',
'type' => 'text',
'tooltip-subtitle' => __('Enter the SPOT_ID of Spot.IM','accelerated-mobile-pages'),
'title' => __('SPOT ID', 'accelerated-mobile-pages'),
'default' => '',
'desc' => "For Example xxxxxxxx-xxxx-xxxx-xxxx",
'required' => array(
array('ampforwp-spotim-comments-support', '=' , 1),
),
),
)
) );
function fb_instant_article() {
$feedname = '';
$fb_instant_article_feed = '';
$input = '';
$feedname = 'instant_articles';
$fb_instant_article_feed = trailingslashit( site_url() ).$feedname ;
$input = '' . esc_url( $fb_instant_article_feed ). '' ;
return strip_tags($input, '');
}
// Facebook Instant Articles
Redux::setSection( $opt_name, array(
'title' => __( 'Instant Articles', 'accelerated-mobile-pages' ),
'id' => 'fb-instant-article',
'subsection' => true,
'fields' => array(
array(
'id' => 'ampforwp-fbia_1',
'type' => 'section',
'title' => __('Facebook Instant Articles Setup', 'accelerated-mobile-pages'),
'indent' => true,
'layout_type' => 'accordion',
'accordion-open'=> 1,
),
array(
'id' =>'fb-instant-article-switch',
'type' => 'switch',
'title' => __('Instant Articles', 'accelerated-mobile-pages'),
'default' => 0,
'true' => 'true',
'false' => 'false',
'desc' => __('Re-Save permalink when you enable this option, please have a look here on how to do it', 'accelerated-mobile-pages'),
),
array(
'id' => 'fb-instant-article-feed-url',
'type' => 'info',
'style' => 'critical',
'desc' => fb_instant_article(),
'title' => __('Facebook Instant Articles Feed URL', 'accelerated-mobile-pages'),
'required' => array('fb-instant-article-switch', '=', 1)
),
array(
'id' => 'fb-instant-page-id',
'type' => 'text',
'title' => __('Facebook Page ID', 'accelerated-mobile-pages'),
'desc' => __('Follow these instructions to sign up to Instant Articles and get your Facebook Page ID.', 'accelerated-mobile-pages'),
'required' => array('fb-instant-article-switch', '=', 1)
),
array(
'id' => 'amp-fbia_2',
'type' => 'section',
'title' => __('Facebook Instant Articles Settings', 'accelerated-mobile-pages'),
'indent' => true,
'layout_type' => 'accordion',
'accordion-open'=> 1,
'required' => array('fb-instant-article-switch', '=', 1),
),
array(
'id' => 'ampforwp-fb-instant-article-posts',
'type' => 'text',
'title' => __('Number of Posts', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Enter the number of posts to generate for Instant Articles.', 'accelerated-mobile-pages'),
'desc' => __('Leave this empty to generate All Posts.', 'accelerated-mobile-pages'),
'required' => array('fb-instant-article-switch', '=', 1),
'default' => '50'
),
array(
'id' => 'ampforwp-instant-article-author-meta',
'type' => 'switch',
'title' => __('Author Meta', 'accelerated-mobile-pages'),
'default' => 1,
'true' => 'true',
'false' => 'false',
'tooltip-subtitle' => __('Enable/Disable Author Meta', 'accelerated-mobile-pages'),
'required' => array('fb-instant-article-switch', '=', 1)
),
array(
'id' => 'ampforwp-instant-article-author-bio',
'type' => 'switch',
'title' => __('Author Bio', 'accelerated-mobile-pages'),
'default' => 0,
'true' => 'true',
'false' => 'false',
'tooltip-subtitle' => __('Enable/Disable Author Bio', 'accelerated-mobile-pages'),
'required' => array('fb-instant-article-switch', '=', 1)
),
array(
'id' => 'ampforwp-ia-related-articles',
'type' => 'switch',
'title' => __('Related Articles', 'accelerated-mobile-pages'),
'default' => 0,
'true' => 'true',
'false' => 'false',
'tooltip-subtitle' => __('Show/Hide Related Articles', 'accelerated-mobile-pages'),
'required' => array('fb-instant-article-switch', '=', 1)
),
array(
'id' => 'fb-instant-article-ads',
'type' => 'switch',
'title' => __('Advertisement', 'accelerated-mobile-pages'),
'default' => 0,
'true' => 'true',
'false' => 'false',
'desc' => __('Switch this on to enable advertising on Instant Article pages.', 'accelerated-mobile-pages'),
'required' => array('fb-instant-article-switch', '=', 1)
),
array(
'id' => 'fb-instant-article-ad-type',
'type' => 'select',
'title' => __('Select Advertisement Format', 'accelerated-mobile-pages'),
'default' => '1',
'desc' => __('Select the type of advertising on Instant Article pages you want to display.', 'accelerated-mobile-pages'),
'options' => array(
'1' => 'Facebook Audience Network',
'2' => 'Custom iframe URL',
'3' => 'Custom Embed Code'
),
'required' => array('fb-instant-article-ads', '=', 1)
),
array(
'id' => 'fb-instant-article-ad-id',
'type' => 'text',
'title' => __('Enter your Audience Network Placement ID', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('You can find out more about this here. ', 'accelerated-mobile-pages'),
'desc' => __('Click here on how to get Audience Network Placement Id.', 'accelerated-mobile-pages'),
'required' => array('fb-instant-article-ad-type', '=', '1')
),
array(
'id' => 'fb-instant-article-custom-iframe-ad',
'type' => 'text',
'placeholder'=> 'https://www.adserver.com/ss',
'title' => __('Enter your Custom iframe ad source URL'),
'required' => array('fb-instant-article-ad-type', '=', '2')
),
array(
'id' => 'fb-instant-article-custom-embed-ad',
'type' => 'textarea',
'placeholder'=> '',
'title' => __('Enter your Custom Embed ad code'),
'required' => array('fb-instant-article-ad-type', '=', '3')
),
array(
'id' => 'fb-instant-article-ad-density-setup',
'type' => 'select',
'title' => __('How often should ads show in Instant Article pages', 'accelerated-mobile-pages'),
'options' => array(
'default' => __('Every 250 words', 'accelerated-mobile-pages' ),
'medium' => __('Every 350 words', 'accelerated-mobile-pages' ),
'low' => __('Every 500 words', 'accelerated-mobile-pages' ),
),
'required' => array('fb-instant-article-ads', '=', 1),
'default' => 'default',
),
array(
'id' => 'fb-instant-article-analytics',
'type' => 'switch',
'title' => __('Analytics', 'accelerated-mobile-pages'),
'default' => 0,
'true' => 'true',
'false' => 'false',
'desc' => __('Switch this on to enable analytics on Instant Article pages.', 'accelerated-mobile-pages'),
'required' => array('fb-instant-article-switch', '=', 1)
),
array(
'id' => 'fb-instant-article-analytics-code',
'type' => 'textarea',
'title' => __('Enter your Analytics script code', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Do not enter iframe tag. Find out more about support here ', 'accelerated-mobile-pages'),
'required' => array('fb-instant-article-analytics', '=', 1)
),
array(
'id' => 'fb-instant-crawler-ingestion',
'type' => 'switch',
'title' => __('Crawler Ingestion', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Add ia:markup meta tag. Find out more abouthere ', 'accelerated-mobile-pages'),
'required' => array('fb-instant-article-switch', '=', 1)
),
array(
'id' => 'fbia-header-text-area',
'type' => 'textarea',
'title' => __('Custom HTML in Head Tag', 'accelerated-mobile-pages'),
'desc' => __('Add custom HTML in Head Tag in Instant Articles Markup. Click here for more info on Instant Articles Markup', 'accelerated-mobile-pages'),
'default' => '',
'required' => array('fb-instant-article-switch', '=', 1)
),
array(
'id' => 'fbia-body-text-area',
'type' => 'textarea',
'title' => __('Custom HTML in Body Tag', 'accelerated-mobile-pages'),
'desc' => __('Add custom HTML in Body Tag in Instant Articles Markup. Click here for more info on Instant Articles Markup', 'accelerated-mobile-pages'),
'default' => '',
'required' => array('fb-instant-article-switch', '=', 1)
),
array(
'id' => 'fbia-footer-text-area',
'type' => 'textarea',
'title' => __('Custom HTML in Footer Tag', 'accelerated-mobile-pages'),
'desc' => __('Add custom HTML in Footer Tag in Instant Articles Markup. Click here for more info on Instant Articles Markup', 'accelerated-mobile-pages'),
'default' => '',
'required' => array('fb-instant-article-switch', '=', 1)
),
),
)
);
// Hide AMP Bulk Tools
Redux::setSection( $opt_name, array(
'title' => __( 'Hide AMP Bulk Tools', 'accelerated-mobile-pages' ),
'id' => 'hide-amp-section',
'subsection' => true,
'desc' => 'Here are some Advanced options to help you exclude AMP from your prefered pages',
'fields' => array(
array(
'id' => 'amp-pages-meta-default',
'type' => 'select',
'title' => __( 'Individual AMP Page (Bulk Edit)', 'accelerated-mobile-pages' ),
'tooltip-subtitle' => __( 'Allows you to Show or Hide AMP from All pages, so it can be changed individually later. This option will change the Default value of AMP metabox in Pages', 'accelerated-mobile-pages' ),
'desc' => __( 'NOTE: Changes will overwrite the previous settings.', 'accelerated-mobile-pages' ),
'options' => array(
'show' => __('Show by Default', 'accelerated-mobile-pages' ),
'hide' => __('Hide by default', 'accelerated-mobile-pages' ),
),
'default' => 'show',
'required'=>array('amp-on-off-for-all-pages','=','1'),
),
array(
'id' =>'hide-amp-categories',
'type' => 'checkbox_hierarchy',
'title' => __('Select Categories to Hide AMP'),
'tooltip-subtitle' => __( 'Hide AMP from all the posts of a selected category.', 'accelerated-mobile-pages' ),
'default' => 0,
'data' => 'category_list_hierarchy',
),
array(
'id' =>'hide-amp-tags-bulk-option',
'type' => 'checkbox',
'title' => __('Select Tags to Hide AMP'),
'tooltip-subtitle' => __( 'Hide AMP from all the posts of a selected tags.', 'accelerated-mobile-pages' ),
'default' => 0,
'data' => 'tags',
),
)
)
);
// Advance Settings SECTION
Redux::setSection( $opt_name, array(
'title' => __( 'Advance Settings', 'accelerated-mobile-pages' ),
'desc' => __( 'This section has some advanced settings, please use it with care','accelerated-mobile-pages'),
'id' => 'amp-advance',
'subsection' => true,
'fields' => array(
/* array(
'id' => 'ampforwp-homepage-on-off-support',
'type' => 'switch',
'title' => __('Homepage Support', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Enable/Disable Home page using this switch.', 'accelerated-mobile-pages'),
'default' => '1'
),*/
array(
'id' => 'amp-mobile-redirection',
'type' => 'switch',
'title' => __('Mobile Redirection', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('
Enable AMP for your mobile users. Give your visitors a Faster mobile User Experience.','accelerated-mobile-pages'),
'default' => 0,
),
array(
'id' => 'convert-internal-nonamplinks-to-amp',
'type' => 'switch',
'title' => __('Change Internal Links to AMP', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Enable if you want all your links inside the article to go to /amp/. All the outbound links will remain untouched.','accelerated-mobile-pages'),
'default' => 0,
),
// End-point option
array(
'id' => 'amp-core-end-point',
'type' => 'switch',
'title' => ('Change End Point to ?amp'),
'default' => 0,
'tooltip-subtitle' => 'Enable this option when /amp/ is giving 404 after resaving the permalink settings.',
'desc' => __( 'Making endpoints to ?amp will help you get the amp in tricky setups with taxonomies & post typs. Question mark in the url will not make any difference in the SEO.' ),
),
array(
'id' => 'amp-header-text-area-for-html',
'type' => 'textarea',
'title' => __('Enter HTML in Head', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('please enter markup that is AMP validated', 'accelerated-mobile-pages'),
'desc' => __('check your markup here (enter markup between HEAD tag) : https://validator.ampproject.org/', 'accelerated-mobile-pages'),
'default' => ''
),
array(
'id' => 'amp-body-text-area',
'type' => 'textarea',
'title' => __('Enter HTML in Body (beginning of body tag) ', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('please enter markup that is AMP validated', 'accelerated-mobile-pages'),
'desc' => __('check your markup here (enter markup in the beginning of body tag) : https://validator.ampproject.org/', 'accelerated-mobile-pages'),
'default' => ''
),
array(
'id' => 'amp-footer-text-area-for-html',
'type' => 'textarea',
'title' => __('Enter HTML in Footer', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('please enter markup that is AMP validated', 'accelerated-mobile-pages'),
'desc' => __('check your markup here (enter markup between BODY tag) : https://validator.ampproject.org/',
'accelerated-mobile-pages'),
'default' => ''
),
array(
'id' => 'ampforwp-auto-amp-menu-link',
'type' => 'switch',
'title' => __('Auto Add AMP in Menu URL', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Automatically add AMP at the end of menu url', 'accelerated-mobile-pages'),
'true' => 'true',
'false' => 'false',
'default' => 0,
//'required' => array('ampforwp-amp-menu', '=' , '1')
),
//Category Base Removal in AMP
array(
'id' => 'ampforwp-category-base-removel-link',
'type' => 'switch',
'title' => __('Category base remove in AMP', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Category base removal in AMP from url', 'accelerated-mobile-pages'),
'true' => 'true',
'false' => 'false',
'default' => 0,
),
//Tag base Removal in AMP
array(
'id' => 'ampforwp-tag-base-removal-link',
'type' => 'switch',
'title' => __('Tag base remove in AMP', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Tag base remove in AMP from url', 'accelerated-mobile-pages'),
'true' => 'true',
'false' => 'false',
'default' => 0,
),
// Featured Image from Custom Fields
array(
'id' => 'ampforwp-custom-fields-featured-image-switch',
'type' => 'switch',
'title' => __('Featured Image from Custom Fields', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('This will allow you to add Featured Image from Custom Fields', 'accelerated-mobile-pages'),
'true' => 'true',
'false' => 'false',
'default' => 0,
),
array(
'id' => 'ampforwp-custom-fields-featured-image',
'type' => 'text',
'title' => __('Custom Field For Featured Image', 'accelerated-mobile-pages'),
'default' => __ ('','accelerated-mobile-pages'),
'placeholder'=>__('Write the Custom Field of Featured Image','accelerated-mobile-pages'),
'required' => array( 'ampforwp-custom-fields-featured-image-switch', '=' , 1 )
),
// Grab the First Image for Featured Image if there is none
array(
'id' => 'ampforwp-featured-image-from-content',
'type' => 'switch',
'title' => __('Featured Image from The Content', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Show the first image of the content as Featured Image if there is no featured image', 'accelerated-mobile-pages'),
'true' => 'true',
'false' => 'false',
'default' => 0,
),
// Duplicate Featured Image
array(
'id' => 'ampforwp-duplicate-featured-image',
'type' => 'switch',
'title' => __('Duplicate Featured Image', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Turn On the support if you want to show the Featured Image if it already exists in post content.', 'accelerated-mobile-pages'),
'true' => 'true',
'false' => 'false',
'default' => 0,
),
// Retina Images
array(
'id' => 'ampforwp-retina-images',
'type' => 'switch',
'title' => __('Retina Images', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Enable if your current images looking blured on Apple Devices.', 'accelerated-mobile-pages'),
'default' => 0,
),
array(
'id' => 'ampforwp-retina-images-res',
'type' => 'select',
'options' => array(
'2' => '2x',
'3' => '3x',
'4' => '4x',
),
'title' => __('Retina Images Resolution', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Select the Resolution', 'accelerated-mobile-pages'),
'default' => '2',
'required' => array('ampforwp-retina-images', '=', 1)
),
array(
'id' => 'amp-meta-permissions',
'type' => 'select',
'title' => __('Show Metabox in Post Editor to', 'accelerated-mobile-pages'),
'options' => array(
'all' => 'All users who can post',
'admin' => 'Only to Admin'
),
'default' => 'all',
),
array(
'id' => 'ampforwp-development-mode',
'type' => 'switch',
'title' => __('Dev Mode in AMP'),
'tooltip-subtitle' => __('This will enable the Development mode in AMP', 'accelerated-mobile-pages'),
'true' => 'true',
'false' => 'false',
'default' => 0,
),
array(
'id' => 'ampforwp-development-mode-notice',
'type' => 'info',
'style' => 'info',
'desc' => __('Add /amp at the end of url to view the AMP version of the site. Search Engines will not be able to Crawl the AMP site when in Dev Mode.', 'accelerated-mobile-pages'),
'title' => __('Dev Mode', 'accelerated-mobile-pages'),
'required' => array('ampforwp-development-mode', '=', 1)
),
array(
'id' => 'ampforwp-update-notification-bar',
'type' => 'switch',
'title' => __('Plugin Update Notification Bar'),
'tooltip-subtitle' => __('Enable/Disable the Plugin Update Notification Bar', 'accelerated-mobile-pages'),
'true' => 'true',
'false' => 'false',
'default' => 1,
),
array(
'id' => 'ampforwp-wptexturize',
'type' => 'switch',
'title' => __('Disable wptexturize'),
'tooltip-subtitle' => __('Enable this option to Disable wptexturize Globally', 'accelerated-mobile-pages'),
'true' => 'true',
'false' => 'false',
'default' => 0,
),
array(
'id' => 'ampforwp-content-builder',
'type' => 'switch',
'title' => __('Legacy Page Builder (widgets)', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Build AMP Landing pages in minutes.', 'accelerated-mobile-pages'),
'true' => 'true',
'false' => 'false',
'default' => 0
),
// Delete Data on Deletion
array(
'id' => 'ampforwp-delete-on-uninstall',
'type' => 'switch',
'title' => __('Delete Data on Uninstall?', 'accelerated-mobile-pages'),
'default' => 0,
'tooltip-subtitle' => __('Enable this if you would like AMPforWP to completely remove all of its data when uninstalling via Plugins > Delete.'),
),
),
) );
// WooCommerce Compatibility
$e_commerce_support[] = array(
'id' => 'ampforwp-woocommerce',
'type' => 'section',
'title' => __('WooCommerce Compatibility', 'accelerated-mobile-pages'),
'indent' => true,
'layout_type' => 'accordion',
'accordion-open'=> 1,
);
$e_commerce_support[] = array(
'id' =>'amp-enable-woocommerce',
'type' => 'switch',
'title' => __('WooCommerce Support', 'accelerated-mobile-pages'),
'default' => '',
'true' => 'Enabled',
'false' => 'Disabled',
);
if(!is_plugin_active( 'amp-woocommerce/amp-woocommerce.php' ) && !is_plugin_active( 'amp-woocommerce-pro/amp-woocommerce.php' ) ){
$e_commerce_support[]= array(
'id' => 'info_normal_woocommerce',
'type' => 'info',
'required' => array('amp-enable-woocommerce', '=' , '1'),
'desc' => '
',
// ),
//
$fields = array(
'id' => 'info_normal',
'type' => 'info',
'class' => 'extension_banner_bg',
'desc' => $single_extension_listing
)
);
/*Yarpp enable option
if( is_plugin_active( 'yet-another-related-posts-plugin/yarpp.php' )){
$yarpp_options = array(array(
'id' => 'ampforwp-related-posts-yarpp-switch',
'type' => 'switch',
'class' => 'child_opt',
'title' => __('YARPP Compatibility', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Related post options can be used from the YARPP Plugin', 'accelerated-mobile-pages'),
'default' => 0,
'required' => array(
array('ampforwp-single-related-posts-switch', '=' , '1')
),
));
array_splice($single_page_options, 23, 0, $yarpp_options);
}else{
foreach ($single_page_options as $key => $optionArray) {
if(isset($optionArray['id']) && $optionArray['id']=='ampforwp-number-of-related-posts'){
$requiredValues = $optionArray['required'];
foreach ($requiredValues as $reqkey => $reqValue) {
if($reqValue[0]=='ampforwp-related-posts-yarpp-switch'){
unset($single_page_options[$key]['required'][$reqkey]);
}
}
}elseif(isset($optionArray['id']) && $optionArray['id']=='ampforwp-single-select-type-of-related'){
$requiredValues = $optionArray['required'];
foreach ($requiredValues as $reqkey => $reqValue) {
if($reqValue[0]=='ampforwp-related-posts-yarpp-switch'){
unset($single_page_options[$key]['required'][$reqkey]);
}
}
}elseif(isset($optionArray['id']) && $optionArray['id']=='ampforwp-related-posts-days-switch'){
$requiredValues = $optionArray['required'];
foreach ($requiredValues as $reqkey => $reqValue) {
if($reqValue[0]=='ampforwp-related-posts-yarpp-switch'){
unset($single_page_options[$key]['required'][$reqkey]);
}
}
}elseif(isset($optionArray['id']) && $optionArray['id']=='ampforwp-related-posts-days-text'){
$requiredValues = $optionArray['required'];
foreach ($requiredValues as $reqkey => $reqValue) {
if($reqValue[0]=='ampforwp-related-posts-yarpp-switch'){
unset($single_page_options[$key]['required'][$reqkey]);
}
}
}elseif(isset($optionArray['id']) && $optionArray['id']=='ampforwp-single-order-of-related-posts'){
$requiredValues = $optionArray['required'];
foreach ($requiredValues as $reqkey => $reqValue) {
if($reqValue[0]=='ampforwp-related-posts-yarpp-switch'){
unset($single_page_options[$key]['required'][$reqkey]);
}
}
}
}
}*/
// Single Section
Redux::setSection( $opt_name, array(
'title' => __( 'Single', 'accelerated-mobile-pages' ),
// 'desc' => __( 'Additional Options to control the look of Single Click here ', 'accelerated-mobile-pages' ),
'id' => 'amp-single',
'subsection' => true,
'fields' => $single_page_options
) );
// Footer Section
Redux::setSection( $opt_name, array(
'title' => __( 'Footer', 'accelerated-mobile-pages' ),
'id' => 'amp-theme-footer-settings',
'subsection' => true,
'fields' => array(
array(
'id' => 'footer-tab-1',
'type' => 'section',
'title' => __('Footer Design', 'accelerated-mobile-pages'),
'indent' => true,
'layout_type' => 'accordion',
'accordion-open'=> 1,
),
// Swift
array(
'id' => 'footer-type',
'title' => __('Footer Type', 'accelerated-mobile-pages'),
'type' => 'image_select',
'options'=> array(
'1' => array(
'alt'=>' Footer Design 1 ',
'img' =>AMPFORWP_PLUGIN_DIR_URI.'/images/footer-1.png'
),
),
'default'=> '1',
// 'max-width' => 200,
// 'max-height'=> 60,
'required' => array( array('amp-design-selector', '=' , '4') ),
),
array(
'id' => 'footer-tab-3',
'type' => 'section',
'title' => __('General', 'accelerated-mobile-pages'),
'indent' => true,
'layout_type' => 'accordion',
'accordion-open'=> 1,
),
array(
'id' => 'swift-menu',
'type' => 'switch',
'title' => __('Menu', 'accelerated-mobile-pages'),
'default' => 1,
'required' => array( array('amp-design-selector', '=' , '4') ),
'tooltip-subtitle' => __( 'Add Menus to your AMP pages by clicking on this link' , 'accelerated-mobile-pages'),
),
array(
'id' => 'amp-footer-link-non-amp-page',
'type' => 'switch',
'title' => __('Link to Non-AMP page in Footer', 'accelerated-mobile-pages'),
'true' => 'true',
'false' => 'false',
'default' => 1
),
array(
'id' => 'ampforwp-footer-top',
'type' => 'switch',
'title' => __('Back to Top link', 'accelerated-mobile-pages'),
'true' => 'true',
'false' => 'false',
'default' => 1,
'required' => array(
array('amp-design-selector', '!=' , '3')
)
),
array(
'id' => 'ampforwp-footer-top-design3',
'type' => 'switch',
'title' => __('Back to Top link', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Enable / Disable Link to top of the page in the footer', 'accelerated-mobile-pages'),
'true' => 'true',
'false' => 'false',
'default' => 0,
'required' => array( array( 'amp-design-selector', '=' , '3' ) )
),
array(
'id' => 'amp-design-3-credit-link',
'type' => 'switch',
'title' => __( 'Credit link', 'accelerated-mobile-pages' ),
'required' => array(
array('amp-design-selector', '=' , '3')
),
'default' => '1'
),
array(
'id' => 'ampforwp-nofollow-view-nonamp',
'type' => 'switch',
'title' => __('Make "View Non-AMP" link nofollow', 'accelerated-mobile-pages'),
'default' => 0
),
array(
'id' => 'footer-tab-2',
'type' => 'section',
'title' => __('Advanced Footer Options', 'accelerated-mobile-pages'),
'indent' => true,
//'start' => true,
//'label' => 'Tab 2',
'required' => array(
array('amp-design-selector', '=' , '4')
),
'layout_type' => 'accordion',
'accordion-open'=> 0,
),
array(
'id' => 'footer-customize-options',
'type' => 'switch',
'title' => __('Advanced Footer Design', 'accelerated-mobile-pages'),
'default' => 0,
'required' => array( array('amp-design-selector', '=' , '4') ),
),
array(
'id' => 'swift-footer-txt-clr',
'title' => __('Footer Text Color', 'accelerated-mobile-pages'),
'type' => 'color_rgba',
'default' => array(
'color' => '#888888',
),
'required' => array(
array('footer-customize-options','=',1)
)
),
array(
'id' => 'swift-footer-link-clr',
'title' => __('Footer Link Color', 'accelerated-mobile-pages'),
'type' => 'color_rgba',
'default' => array(
'color' => '#fcc118',
),
'required' => array(
array('footer-customize-options','=',1)
)
),
array(
'id' => 'swift-footer-link-hvr',
'title' => __('Footer Link Hover Color', 'accelerated-mobile-pages'),
'type' => 'color_rgba',
'default' => array(
'color' => '#888888',
),
'required' => array(
array('footer-customize-options','=',1)
)
),
array(
'id' => 'swift-footer-bg',
'title' => __('Footer 1 Background', 'accelerated-mobile-pages'),
'type' => 'color_rgba',
'default' => array(
'color' => '#182733',
),
'required' => array(
array('footer-customize-options','=',1)
)
),
array(
'id' =>"ftr1-gapping",
'type' =>'spacing',
'title' => __('Footer 1 Gapping', 'accelerated-mobile-pages'),
'units' => array('px','%'),
'default' =>array(
'padding-top' => '70px',
'padding-right' => '0px',
'padding-bottom' => '70px',
'padding-left' => '0px',
'units' => 'px',
),
'required' => array(
array('footer-customize-options','=',1)
)
),
array(
'id' => 'swift-footer1-cntnsize',
'type' => 'text',
'title' => __('Footer 1 Font Size', 'accelerated-mobile-pages'),
'default' => '14px',
'required' => array(
array('footer-customize-options','=',1)
)
),
array(
'id' => 'swift-head-size',
'type' => 'text',
'title' => __('Footer 1 Heading Font Size', 'accelerated-mobile-pages'),
'default' => '12px',
'required' => array(
array('footer-customize-options','=',1)
)
),
array(
'id' => 'swift-head-fntwgth',
'type' => 'text',
'title' => __('Footer 1 Heading Font Weight', 'accelerated-mobile-pages'),
'default' => '500',
'required' => array(
array('footer-customize-options','=',1)
)
),
array(
'id' => 'swift-footer-heading-clr',
'title' => __('Footer 1 Heading Color', 'accelerated-mobile-pages'),
'type' => 'color_rgba',
'default' => array(
'color' => '#999',
),
'required' => array(
array('footer-customize-options','=',1)
)
),
array(
'id' => 'swift-footer2-bg',
'title' => __('Footer 2 Background', 'accelerated-mobile-pages'),
'type' => 'color_rgba',
'default' => array(
'color' => '#2e2b2e',
),
'required' => array(
array('footer-customize-options','=',1)
)
),
array(
'id' =>"ftr2-gapping",
'type' =>'spacing',
'title' => __('Footer 2 Gapping', 'accelerated-mobile-pages'),
'units' => array('px','%'),
'default' =>array(
'padding-top' => '50px',
'padding-right' => '0px',
'padding-bottom' => '50px',
'padding-left' => '0px',
'units' => 'px',
),
'required' => array(
array('footer-customize-options','=',1)
)
),
array(
'id' => 'swift-footer2-fntsize',
'type' => 'text',
'title' => __('Footer 2 Font Size', 'accelerated-mobile-pages'),
'default' => '12px',
'required' => array(
array('footer-customize-options','=',1)
)
),
array(
'id' => 'swift-footer-brdrclr',
'title' => __('Footer 2 Border Color', 'accelerated-mobile-pages'),
'type' => 'color_rgba',
'default' => array(
'color' => '#eee',
),
'required' => array(
array('footer-customize-options','=',1)
)
),
array(
'id' => 'footer2-position-type',
'title' => __('Footer 2 Menu Position', 'accelerated-mobile-pages'),
'type' => 'select',
'options'=> array(
'1' => 'Center',
'2' => 'Inline'
),
'default'=> '1',
'required' => array(
array('footer-customize-options','=',1)
)
),
)
));
// Page Section
Redux::setSection( $opt_name, array(
'title' => __( 'Page', 'accelerated-mobile-pages' ),
'id' => 'amp-theme-page-settings',
'subsection' => true,
'fields' => array(
/* // Pages Separator
array(
'id' => 'Page',
'type' => 'section',
'title' => __('Pages', 'accelerated-mobile-pages'),
'indent' => true,
),*/
array(
'id' => 'page-tab-1',
'type' => 'section',
'title' => __('General', 'accelerated-mobile-pages'),
'indent' => true,
'layout_type' => 'accordion',
'accordion-open'=> 1,
),
// Meta ON/OFF Pages
array(
'id' => 'featured_image_swift_page',
'type' => 'switch',
'default' => '0',
'title' => __('Featured Image', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Enable Featured Image on Pages.'),
'required' => array('amp-design-selector','=','4'),
),
array(
'id' => 'meta_page',
'type' => 'switch',
'default' => '0',
'title' => __('Meta Information', 'accelerated-mobile-pages'),
),
array(
'id' => 'ampforwp_subpages_list',
'type' => 'switch',
'default' => '0',
'title' => __('Subpages/ChildPages', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Shows a List of Subpages'),
),
array(
'id' => 'ampforwp-page-social',
'type' => 'switch',
'default' => '0',
'title' => __('Social Icons', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Enable Social Sharing on Pages'),
),
array(
'id' => 'ampforwp-page-sticky-social',
'type' => 'switch',
'default' => '0',
'title' => __('Sticky Social Icons', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Enable Social Sticky Icons on Pages'),
),
)
));
// Social Section
Redux::setSection( $opt_name, array(
'title' => __( 'Social', 'accelerated-mobile-pages' ),
'id' => 'amp-social',
'desc' => __('All the Social sharing and the social profile related settings are here','accelerated-mobile-pages'),
'subsection' => true,
'fields' => array(
array(
'id' => 'social-shre',
'type' => 'section',
'title' => __('Social Sharing', 'accelerated-mobile-pages'),
'indent' => true,
//'start' => true,
//'label' => 'Tab 2',
'layout_type' => 'accordion',
'accordion-open'=> 1,
),
// Social Icons Position [Swift] #1722
array(
'id' => 'swift-social-position',
'type' => 'select',
'title' => __( 'Position', 'accelerated-mobile-pages' ),
'options' => array(
'default' => 'Single Sidebar (left side)',
'above-content' => 'Above Content',
'below-content' => 'Below Content'
),
'default' => 'default',
'required' => array(array('amp-design-selector', '=', '4') )
),
// Social Share links to AMP
array(
'id' => 'ampforwp-social-share-amp',
'type' => 'switch',
'title' => __('Social Share links to AMP', 'accelerated-mobile-pages'),
'default' => 0,
),
// Facebook Like
array(
'id' => 'ampforwp-facebook-like-button',
'type' => 'switch',
'title' => __('Facebook Like Button', 'accelerated-mobile-pages'),
'default' => 0,
),
// Facebook ON/OFF
array(
'id' => 'enable-single-facebook-share',
'type' => 'switch',
//'required' => array('enable-single-social-icons', '=' , '1'),
'title' => __('Facebook', 'accelerated-mobile-pages'),
'default' => 0,
),
// Facebook app ID
array(
'id' => 'amp-facebook-app-id',
'title' => __('Facebook App ID', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('In order to use Facebook share you need to register an app ID, You can register one here: https://developers.facebook.com/apps.', 'accelerated-mobile-pages'),
'type' => 'text',
'required' => array('enable-single-facebook-share', '=' , '1'),
'placeholder' => __('Enter your facebook app id','accelerated-mobile-pages'),
'default' => '',
'required' => array(
array('amp-design-selector', '!=' , '4')
),
),
// Twitter ON/OFF
array(
'id' => 'enable-single-twitter-share',
'type' => 'switch',
'title' => __('Twitter', 'accelerated-mobile-pages'),
'default' => 1,
),
array(
'id' => 'enable-single-twitter-share-handle',
'type' => 'text',
'title' => __('Twitter Handle', 'accelerated-mobile-pages'),
'required' => array('enable-single-twitter-share', '=' , '1'),
'placeholder' => __('Eg: @xyx','accelerated-mobile-pages'),
'default' => '',
),
array(
'id' => 'enable-single-twitter-share-link',
'type' => 'switch',
'title' => __('Pretty Permalinks for Twitter Share?', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Enable this to have pretty links for twitter sharing'),
'default' => 0,
'required' => array('enable-single-twitter-share', '=' , '1'),
),
// GooglePlus ON/OFF
array(
'id' => 'enable-single-gplus-share',
'type' => 'switch',
'title' => __('GooglePlus', 'accelerated-mobile-pages'),
'default' => 1,
),
// Email ON/OFF
array(
'id' => 'enable-single-email-share',
'type' => 'switch',
'title' => __('Email', 'accelerated-mobile-pages'),
'default' => 1,
),
// Pinterest ON/OFF
array(
'id' => 'enable-single-pinterest-share',
'type' => 'switch',
'title' => __('Pinterest', 'accelerated-mobile-pages'),
'default' => 1,
),
// LinkedIn ON/OFF
array(
'id' => 'enable-single-linkedin-share',
'type' => 'switch',
'title' => __('LinkedIn', 'accelerated-mobile-pages'),
'default' => 1,
),
// WhatsApp
array(
'id' => 'enable-single-whatsapp-share',
'type' => 'switch',
'title' => __('WhatsApp', 'accelerated-mobile-pages'),
'default' => 1,
),
// LINE
array(
'id' => 'enable-single-line-share',
'type' => 'switch',
'title' => __('Line', 'accelerated-mobile-pages'),
'default' => 1,
),
// VKontakte
array(
'id' => 'enable-single-vk-share',
'type' => 'switch',
'title' => __('VKontakte', 'accelerated-mobile-pages'),
'default' => 0,
),
// Odnoklassniki
array(
'id' => 'enable-single-odnoklassniki-share',
'type' => 'switch',
'title' => __('Odnoklassniki', 'accelerated-mobile-pages'),
'default' => 0,
),
// Reddit
array(
'id' => 'enable-single-reddit-share',
'type' => 'switch',
'title' => __('Reddit', 'accelerated-mobile-pages'),
'default' => 0,
),
// Tumblr
array(
'id' => 'enable-single-tumblr-share',
'type' => 'switch',
'title' => __('Tumblr', 'accelerated-mobile-pages'),
'default' => 0,
),
// Telegram
array(
'id' => 'enable-single-telegram-share',
'type' => 'switch',
'title' => __('Telegram', 'accelerated-mobile-pages'),
'default' => 0,
),
// Digg
array(
'id' => 'enable-single-digg-share',
'type' => 'switch',
'title' => __('Digg', 'accelerated-mobile-pages'),
'default' => 0,
),
// StumbleUpon
array(
'id' => 'enable-single-stumbleupon-share',
'type' => 'switch',
'title' => __('StumbleUpon', 'accelerated-mobile-pages'),
'default' => 0,
),
// Wechat
array(
'id' => 'enable-single-wechat-share',
'type' => 'switch',
'title' => __('Wechat', 'accelerated-mobile-pages'),
'default' => 0,
),
// Viber
array(
'id' => 'enable-single-viber-share',
'type' => 'switch',
'title' => __('Viber', 'accelerated-mobile-pages'),
'default' => 0,
),
// Hatena BookMark
array(
'id' => 'enable-single-hatena-bookmarks',
'type' => 'switch',
'title' => __('Hatena Bookmarks', 'accelerated-mobile-pages'),
'default' => 0,
),
// Pocket
array(
'id' => 'enable-single-pocket-share',
'type' => 'switch',
'title' => __('Pocket', 'accelerated-mobile-pages'),
'default' => 0,
),
// Yummly
array(
'id' => 'enable-single-yummly-share',
'type' => 'switch',
'title' => __('Yummly', 'accelerated-mobile-pages'),
'default' => 0,
'required' => array(
array('amp-design-selector', '=' , '4')
),
),
array(
'id' => 'social-prfl',
'type' => 'section',
'title' => __('Social Media Profile Links', 'accelerated-mobile-pages'),
'indent' => true,
//'start' => true,
//'label' => 'Tab 2',
'required' => array(
array('amp-design-selector', '=' , '4')
),
'layout_type' => 'accordion',
'accordion-open'=> 1,
),
array(
'id' => 'menu-social',
'type' => 'switch',
'title' => __('Menu Social Profile', 'accelerated-mobile-pages'),
'default' => 0,
'required' => array(
array('amp-design-selector', '=' , '4')
),
),
array(
'id' => 'enbl-fb',
'type' => 'switch',
'title' => __('Facebook', 'accelerated-mobile-pages'),
'default' => 1,
'required' => array(
array('menu-social', '=' ,1)
)
),
array(
'id' => 'enbl-fb-prfl-url',
'type' => 'text',
'title' => __('Facebook URL', 'accelerated-mobile-pages'),
'default' => '#',
'required' => array(
array('enbl-fb','=',1)
)
),
array(
'id' => 'enbl-tw',
'type' => 'switch',
'title' => __('Twitter', 'accelerated-mobile-pages'),
'default' => 1,
'required' => array(
array('menu-social','=',1)
)
),
array(
'id' => 'enbl-tw-prfl-url',
'type' => 'text',
'title' => __('Twitter URL', 'accelerated-mobile-pages'),
'default' => '#',
'required' => array(
array('enbl-tw','=',1)
)
),
array(
'id' => 'enbl-gol',
'type' => 'switch',
'title' => __('Google', 'accelerated-mobile-pages'),
'default' => 1,
'required' => array(
array('menu-social','=',1)
)
),
array(
'id' => 'enbl-gol-prfl-url',
'type' => 'text',
'title' => __('Google URL', 'accelerated-mobile-pages'),
'default' => '#',
'required' => array(
array('enbl-gol','=',1)
)
),
array(
'id' => 'enbl-lk',
'type' => 'switch',
'title' => __('Linkedin', 'accelerated-mobile-pages'),
'default' => 1,
'required' => array(
array('menu-social','=',1)
)
),
array(
'id' => 'enbl-lk-prfl-url',
'type' => 'text',
'title' => __('Linkedin URL', 'accelerated-mobile-pages'),
'default' => '#',
'required' => array(
array('enbl-lk','=',1)
)
),
array(
'id' => 'enbl-pt',
'type' => 'switch',
'title' => __('Pinterest', 'accelerated-mobile-pages'),
'default' => 0,
'required' => array(
array('menu-social','=',1)
)
),
array(
'id' => 'enbl-pt-prfl-url',
'type' => 'text',
'title' => __('Pinterest URL', 'accelerated-mobile-pages'),
'default' => '#',
'required' => array(
array('enbl-pt','=',1)
)
),
array(
'id' => 'enbl-yt',
'type' => 'switch',
'title' => __('Youtube', 'accelerated-mobile-pages'),
'default' => 0,
'required' => array(
array('menu-social','=',1)
)
),
array(
'id' => 'enbl-yt-prfl-url',
'type' => 'text',
'title' => __('Youtube URL', 'accelerated-mobile-pages'),
'default' => '#',
'required' => array(
array('enbl-yt','=',1)
)
),
array(
'id' => 'enbl-inst',
'type' => 'switch',
'title' => __('Instagram', 'accelerated-mobile-pages'),
'default' => 0,
'required' => array(
array('menu-social','=',1)
)
),
array(
'id' => 'enbl-inst-prfl-url',
'type' => 'text',
'title' => __('Instagram URL', 'accelerated-mobile-pages'),
'default' => '#',
'required' => array(
array('enbl-inst','=',1)
)
),
array(
'id' => 'enbl-vk',
'type' => 'switch',
'title' => __('VKontakte', 'accelerated-mobile-pages'),
'default' => 0,
'required' => array(
array('menu-social','=',1)
)
),
array(
'id' => 'enbl-vk-prfl-url',
'type' => 'text',
'title' => __('VKontakte URL', 'accelerated-mobile-pages'),
'default' => '#',
'required' => array(
array('enbl-vk','=',1)
)
),
array(
'id' => 'enbl-rd',
'type' => 'switch',
'title' => __('Reddit', 'accelerated-mobile-pages'),
'default' => 0,
'required' => array(
array('menu-social','=',1)
)
),
array(
'id' => 'enbl-rd-prfl-url',
'type' => 'text',
'title' => __('Reddit URL', 'accelerated-mobile-pages'),
'default' => '#',
'required' => array(
array('enbl-rd','=',1)
)
),
array(
'id' => 'enbl-tbl',
'type' => 'switch',
'title' => __('Tumblr', 'accelerated-mobile-pages'),
'default' => 0,
'required' => array(
array('menu-social','=',1)
)
),
array(
'id' => 'enbl-tbl-prfl-url',
'type' => 'text',
'title' => __('Tumblr URL', 'accelerated-mobile-pages'),
'default' => '#',
'required' => array(
array('enbl-tbl','=',1)
)
),
array(
'id' => 'social-media-profiles-subsection',
'type' => 'section',
'title' => __('Social Media Profiles (Design #3)', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Please enter your personal/organizational social media profiles here', 'accelerated-mobile-pages'),
'indent' => true,
'required' => array(
array('amp-design-selector', '=' , '3')
),
'layout_type' => 'accordion',
'accordion-open'=> 1,
),
//#1
array(
'id' => 'enable-single-twittter-profile',
'type' => 'switch',
'title' => __('Twitter ', 'accelerated-mobile-pages'),
'default' => 1,
'required' => array(
array('amp-design-selector', '=' , '3')
),
),
array(
'id' => 'enable-single-twittter-profile-url',
'type' => 'text',
'title' => __('Twitter URL', 'accelerated-mobile-pages'),
'default' => '#',
'required' => array(
array('amp-design-selector', '=' , '3'),
array('enable-single-twittter-profile', '=' , '1')
),
),
//#2
array(
'id' => 'enable-single-facebook-profile',
'type' => 'switch',
'title' => __('Facebook ', 'accelerated-mobile-pages'),
'default' => 1,
'required' => array(
array('amp-design-selector', '=' , '3')
),
),
array(
'id' => 'enable-single-facebook-profile-url',
'type' => 'text',
'title' => __('Facebook URL', 'accelerated-mobile-pages'),
'default' => '#',
'required' => array(
array('amp-design-selector', '=' , '3'),
array('enable-single-facebook-profile', '=' , '1')
),
),
//#3
array(
'id' => 'enable-single-pintrest-profile',
'type' => 'switch',
'title' => __('Pintrest ', 'accelerated-mobile-pages'),
'default' => 1,
'required' => array(
array('amp-design-selector', '=' , '3')
),
),
array(
'id' => 'enable-single-pintrest-profile-url',
'type' => 'text',
'title' => __('Pintrest URL', 'accelerated-mobile-pages'),
'default' => '#',
'required' => array(
array('amp-design-selector', '=' , '3'),
array('enable-single-pintrest-profile', '=' , '1')
),
),
//#4
array(
'id' => 'enable-single-google-plus-profile',
'type' => 'switch',
'title' => __('Google Plus ', 'accelerated-mobile-pages'),
'default' => 0,
'required' => array(
array('amp-design-selector', '=' , '3')
),
),
array(
'id' => 'enable-single-google-plus-profile-url',
'type' => 'text',
'title' => __('Google Plus URL', 'accelerated-mobile-pages'),
'default' => '',
'required' => array(
array('amp-design-selector', '=' , '3'),
array('enable-single-google-plus-profile', '=' , '1')
),
),
//#5
array(
'id' => 'enable-single-linkdin-profile',
'type' => 'switch',
'title' => __('LinkedIn', 'accelerated-mobile-pages'),
'default' => 0,
'required' => array(
array('amp-design-selector', '=' , '3')
),
),
array(
'id' => 'enable-single-linkdin-profile-url',
'type' => 'text',
'title' => __('LinkedIn URL', 'accelerated-mobile-pages'),
'default' => '',
'required' => array(
array('amp-design-selector', '=' , '3'),
array('enable-single-linkdin-profile', '=' , '1')
),
),
//#6
array(
'id' => 'enable-single-youtube-profile',
'type' => 'switch',
'title' => __('Youtube ', 'accelerated-mobile-pages'),
'default' => 1,
'required' => array(
array('amp-design-selector', '=' , '3')
),
),
array(
'id' => 'enable-single-youtube-profile-url',
'type' => 'text',
'default' => '#',
'title' => __('Youtube URL', 'accelerated-mobile-pages'),
'required' => array(
array('amp-design-selector', '=' , '3'),
array('enable-single-youtube-profile', '=' , '1')
),
),
//#7
array(
'id' => 'enable-single-instagram-profile',
'type' => 'switch',
'title' => __('Instagram ', 'accelerated-mobile-pages'),
'default' => 0,
'required' => array(
array('amp-design-selector', '=' , '3')
),
),
array(
'id' => 'enable-single-instagram-profile-url',
'type' => 'text',
'default' => '',
'title' => __('Instagram URL', 'accelerated-mobile-pages'),
'required' => array(
array('amp-design-selector', '=' , '3'),
array('enable-single-instagram-profile', '=' , '1')
),
),
//#8
array(
'id' => 'enable-single-VKontakte-profile',
'type' => 'switch',
'title' => __('VKontakte ', 'accelerated-mobile-pages'),
'default' => 0,
'required' => array(
array('amp-design-selector', '=' , '3')
),
),
array(
'id' => 'enable-single-VKontakte-profile-url',
'type' => 'text',
'default' => '',
'title' => __('VKontakte URL', 'accelerated-mobile-pages'),
'required' => array(
array('amp-design-selector', '=' , '3'),
array('enable-single-VKontakte-profile', '=' , '1')
),
),
//#9
//removed whatsapp
//#10
array(
'id' => 'enable-single-reddit-profile',
'type' => 'switch',
'title' => __('Reddit', 'accelerated-mobile-pages'),
'default' => 0,
'required' => array(
array('amp-design-selector', '=' , '3')
),
),
array(
'id' => 'enable-single-reddit-profile-url',
'type' => 'text',
'title' => __('Reddit URL', 'accelerated-mobile-pages'),
'default' => '',
'required' => array(
array('amp-design-selector', '=' , '3'),
array('enable-single-reddit-profile', '=' , '1')
),
),
//#11
array(
'id' => 'enable-single-snapchat-profile',
'type' => 'switch',
'title' => __('Snapchat ', 'accelerated-mobile-pages'),
'default' => 0,
'required' => array(
array('amp-design-selector', '=' , '3')
),
),
array(
'id' => 'enable-single-snapchat-profile-url',
'type' => 'text',
'title' => __('Snapchat URL', 'accelerated-mobile-pages'),
'default' => '',
'required' => array(
array('amp-design-selector', '=' , '3'),
array('enable-single-snapchat-profile', '=' , '1')
),
),
//#12
array(
'id' => 'enable-single-Tumblr-profile',
'type' => 'switch',
'title' => __('Tumblr', 'accelerated-mobile-pages'),
'default' => 0,
'required' => array(
array('amp-design-selector', '=' , '3')
),
),
array(
'id' => 'enable-single-Tumblr-profile-url',
'type' => 'text',
'title' => __('Tumblr URL', 'accelerated-mobile-pages'),
'default' => '',
'required' => array(
array('amp-design-selector', '=' , '3'),
array('enable-single-Tumblr-profile', '=' , '1')
),
),
)
) );
// Date SECTION
Redux::setSection( $opt_name, array(
'title' => __( 'Date', 'accelerated-mobile-pages' ),
'id' => 'ampforwp-date-section',
'subsection' => true,
'fields' => array(
// Date on Single Design 3
array(
'id' => 'amp-design-3-date-feature',
'type' => 'switch',
'title' => __( 'Date in Posts', 'accelerated-mobile-pages' ),
'required' => array(
array('amp-design-selector', '=' , '3')
),
'tooltip-subtitle' => __('Display date along with author and category in posts', 'accelerated-mobile-pages' ),
'default' => '0'
),
array(
'id' => 'date-tab-1',
'type' => 'section',
'title' => __('General', 'accelerated-mobile-pages'),
'indent' => true,
'layout_type' => 'accordion',
'accordion-open'=> 1,
),
// Show Date As
array(
'id' => 'ampforwp-post-date-global',
'type' => 'select',
'title' => __( 'Show Date As', 'accelerated-mobile-pages' ),
'options' => array(
'1' => 'Published Date',
'2' => 'Modified Date'
),
'default' => '1',
),
// Date Format
array(
'id' =>'ampforwp-post-date-format',
'type' =>'select',
'title' =>__('Date Format','accelerated-mobile-pages'),
'tooltip-subtitle' => __('Select the Date Format of Posts', 'accelerated-mobile-pages'),
'options' => array(
'1' => 'Ago',
'2' => 'Traditional view'
),
'default' =>'1',
),
array(
'id' =>'ampforwp-post-date-format-text',
'type' =>'text',
'title' =>__('Text for the Date Format','accelerated-mobile-pages'),
'desc' =>__('Example: English - % days ago, Spain - ago % days','accelerated-mobile-pages'),
'required' => array( array('ampforwp-post-date-format', '=', '1') ),
'default' =>'% days ago',
),
// Post Modified Date
array(
'id' => 'post-modified-date',
'type' => 'switch',
'title' => __('Modified Date Notice', 'accelerated-mobile-pages'),
'default' => 0,
'tooltip-subtitle' => __('Show Modified date of an article at the end of the post.', 'accelerated-mobile-pages'),
),
)
) );
$redux_option = get_option('redux_builder_amp',true);
if ( 4 == $redux_option['amp-design-selector'] ) {
$post_builder = '';
}
else{
$post_builder = '
';
}
// Misc SECTION
Redux::setSection( $opt_name, array(
'title' => __( 'Misc', 'accelerated-mobile-pages' ),
'desc' => $post_builder,
'id' => 'amp-design',
'subsection' => true,
'fields' => array(
array(
'id' => 'misc-tab-1',
'type' => 'section',
'title' => __('General', 'accelerated-mobile-pages'),
'indent' => true,
'layout_type' => 'accordion',
'accordion-open'=> 1,
),
// RTL
array(
'id' =>'amp-rtl-select-option',
'type' => 'switch',
'title' => __('RTL Support', 'accelerated-mobile-pages'),
'default' => 0,
'tooltip-subtitle' => __('Enable Right to Left language support', 'accelerated-mobile-pages'),
'true' => 'true',
'false' => 'false',
),
array(
'id' => 'ampforwp-sub-categories-support',
'type' => 'switch',
'title' => __('Sub-Categories under Category', 'accelerated-mobile-pages'),
'tooltip-subtitle' => __('Display sub-categories on category pages', 'accelerated-mobile-pages'),
'default' => '0'
),
)
) );
// Extension Section
Redux::setSection( $opt_name, array(
'title' => __( 'Extensions', 'accelerated-mobile-pages' ),
// 'desc' => __( 'For full documentation on this field, visit: ', 'accelerated-mobile-pages' ) . 'http://docs.reduxframework.com/core/fields/textarea/',
'id' => 'opt-go-premium',
'subsection' => false,
'desc' => $extension_listing,
'icon' => 'el el-puzzle',
// 'desc' => '
//
//
//
//
//
//
//
//
//
',
// 'icon' => 'el el-puzzle',
) );
if(!ampforwp_check_extensions()){
Redux::setSection( $opt_name, array(
'title' => __( 'Free vs Pro', 'accelerated-mobile-pages' ),
// 'desc' => __( 'For full documentation on this field, visit: ', 'accelerated-mobile-pages' ) . 'http://docs.reduxframework.com/core/fields/textarea/',
'id' => 'opt-choose',
'subsection' => false,
'desc' => $freepro_listing,
'icon' => 'el el-heart',
) );
}
// Priority Support
Redux::setSection( $opt_name, array(
'title' => __( 'Fix AMP Errors', 'accelerated-mobile-pages' ),
// 'desc' => __( 'For full documentation on this field, visit: ', 'accelerated-mobile-pages' ) . 'http://docs.reduxframework.com/core/fields/textarea/',
'id' => 'opt-go-premium-support',
'subsection' => false,
'desc' => '
',
'icon' => 'el el-hand-right',
) );
// Plugin Manager
Redux::setSection( $opt_name, array(
'title' => __( 'Plugins Manager', 'accelerated-mobile-pages' ),
'id' => 'opt-plugins-manager',
'subsection' => false,
'desc' => 'You can Disable Plugins only in AMP which are causing AMP validation errors. More Information.',
'icon' => 'el el-magic',
'fields' => array(
array(
'id' => 'ampforwp-plugin-manager-core',
'type' => 'switch',
'title' => __('Enable Plugin Manager', 'accelerated-mobile-pages'),
'default' => 0
),
array(
// 'title' => __('Notification text', 'accelerated-mobile-pages'),
'id' => 'info_normal',
'type' => 'info',
'required' => array('ampforwp-plugin-manager-core', '=' , '1'),
'desc' => '',
),
)
) );
Redux::setExtensions( $opt_name, AMPFORWP_PLUGIN_DIR.'includes/options/extensions/demolink_image_select' );
/*
* <--- END SECTIONS
*/