SET ARGUMENTS * All the possible arguments for Redux. * For full documentation on arguments, please refer to: https://github.com/ReduxFramework/ReduxFramework/wiki/Arguments * */ $theme = wp_get_theme(); // For use with some settings. Not necessary. $args = array( 'opt_name' => 'redux_builder_amp', 'display_name' => 'Accelerated Mobile Pages Options', //'display_version' => '0.7.1', 'page_slug' => 'amp_options', 'page_title' => 'Accelerated Mobile Pages Options', 'update_notice' => false, 'intro_text' => 'Need Help? Support Forum | FAQ | Change Log | Reviews| Donate', 'footer_text' => '', 'admin_bar' => TRUE, 'menu_type' => 'menu', 'menu_title' => 'AMP', 'allow_sub_menu' => TRUE, 'page_parent_post_type' => 'your_post_type', 'default_mark' => '', 'class' => 'amp_options_class', 'hints' => array( 'icon' => 'el el-adjust-alt', 'icon_position' => 'left', 'icon_size' => 'normal', 'tip_style' => array( 'color' => 'light', ), 'tip_position' => array( 'my' => 'top left', 'at' => 'bottom right', ), 'tip_effect' => array( 'show' => array( 'duration' => '500', 'event' => 'mouseover', ), 'hide' => array( 'duration' => '500', 'event' => 'mouseleave unfocus', ), ), ), 'output' => TRUE, 'output_tag' => TRUE, 'settings_api' => TRUE, 'cdn_check_time' => '1440', 'compiler' => TRUE, 'page_permissions' => 'manage_options', 'save_defaults' => TRUE, 'show_import_export' => TRUE, 'database' => 'options', 'transient_time' => '3600', 'network_sites' => TRUE, ); // SOCIAL ICONS -> Setup custom links in the footer for quick links in your panel footer icons. $args['share_icons'][] = array( 'url' => 'https://github.com/ahmedkaludi/Accelerated-Mobile-Pages', 'title' => 'Visit us on GitHub', 'icon' => 'el el-github' //'img' => '', // You can use icon OR img. IMG needs to be a full URL. ); Redux::setArgs( $opt_name, $args ); /* * ---> END ARGUMENTS */ /* * ---> START HELP TABS */ $tabs = array( array( 'id' => 'redux-help-tab-1', 'title' => __( 'Theme Information 1', 'admin_folder' ), 'content' => __( '
This is the tab content, HTML is allowed.
', 'admin_folder' ) ), array( 'id' => 'redux-help-tab-2', 'title' => __( 'Theme Information 2', 'admin_folder' ), 'content' => __( 'This is the tab content, HTML is allowed.
', 'admin_folder' ) ) ); Redux::setHelpTab( $opt_name, $tabs ); // Set the help sidebar $content = __( 'This is the sidebar content, HTML is allowed.
', 'admin_folder' ); Redux::setHelpSidebar( $opt_name, $content ); /* * <--- END HELP TABS */ /* * * ---> START SECTIONS * */ Redux::setSection( $opt_name, array( 'title' => __( 'Basic Field', 'redux-framework-demo' ), 'id' => 'basic', 'desc' => __( 'Basic field with no subsections.', 'redux-framework-demo' ), 'icon' => 'el el-home', 'fields' => array( array( 'id' => 'opt-blank', 'title' => __( 'Example Text', 'redux-framework-demo' ), 'desc' => __( 'Example description.', 'redux-framework-demo' ), 'subtitle' => __( 'Example subtitle.', 'redux-framework-demo' ), ) ) ) ); Redux::setSection( $opt_name, array( 'title' => __( 'Getting Started', 'redux-framework-demo' ), 'id' => 'basic', 'desc' => __( '' . __( '1. User Documentation: ', 'redux-framework-demo' ) . '' . __( 'The AMP for WP plugin is easy to setup but we have some tutorials and guides prepared for you which will help you dive deep with the plugin.' ) . '
' . '' . __( '2. Developer Docs: ', 'redux-framework-demo' ) . '' . __( 'We have created special documentations for developers and semi technical users who are willing to modify the plugin according to their own needs.' ) . '
' . '' . __( '3. Fixing AMP Validation Errors: ', 'redux-framework-demo' ) . '' . __( '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. ' ) . '
' . '' . __( '4. Community Support Forum: ', 'redux-framework-demo' ) . '' . __( '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.' ) . '
' . '' . __( '5. Hire Us / Other queries: ', 'redux-framework-demo' ) . '' . __( '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.' ) . '
' . '' . __( '6. What\'s New in this Version?: ', 'redux-framework-demo' ) . '' . __( 'If you want to know whats new in the latest version of the plugin, then please use this link. ') . '
' . sprintf( __( '
';
}
// ADS SECTION
Redux::setSection( $opt_name, array(
'title' => __( 'Advertisement', 'redux-framework-demo' ),
'desc' => $desc,
'id' => 'amp-ads',
'subsection' => true,
'fields' => array(
// Ad 1 Starts
array(
'id' =>'enable-amp-ads-1',
'type' => 'switch',
'title' => __('AD #1', 'redux-framework-demo'),
'default' => 0,
'subtitle' => __('Below the Header (SiteWide)', 'redux-framework-demo'),
'true' => 'Enabled',
'false' => 'Disabled',
),
array(
'id' => 'enable-amp-ads-select-1',
'type' => 'select',
'title' => __('AD Size', 'redux-framework-demo'),
'required' => array('enable-amp-ads-1', '=' , '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(
'id' =>'enable-amp-ads-text-feild-client-1',
'type' => 'text',
'required' => array('enable-amp-ads-1', '=' , '1'),
'title' => __('Data AD Client', 'redux-framework-demo'),
'subtitle' => __('Enter the Data Ad Client (data-ad-client) from the adsense ad code.', 'redux-framework-demo'),
'default' => '',
'placeholder'=> 'ca-pub-2005XXXXXXXXX342'
),
array(
'id' => 'enable-amp-ads-text-feild-slot-1',
'type' => 'text',
'title' => __('Data AD Slot', 'redux-framework-demo'),
'subtitle' => __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code.', 'redux-framework-demo'),
'default' => '',
'required' => array('enable-amp-ads-1', '=' , '1'),
'placeholder'=> '70XXXXXX12'
),
// Ad 1 ends
// Ad 2 Starts
array(
'id'=>'enable-amp-ads-2',
'type' => 'switch',
'title' => __('AD #2', 'redux-framework-demo'),
'default' => 0,
'subtitle' => __('Below the Footer (SiteWide)', 'redux-framework-demo'),
'true' => 'Enabled',
'false' => 'Disabled',
),
array(
'id' => 'enable-amp-ads-select-2',
'type' => 'select',
'title' => __('AD Size', 'redux-framework-demo'),
'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(
'id' =>'enable-amp-ads-text-feild-client-2',
'type' => 'text',
'required' => array('enable-amp-ads-2', '=' , '1'),
'title' => __('Data AD Client', 'redux-framework-demo'),
'subtitle' => __('Enter the Data Ad Client (data-ad-client) from the adsense ad code.', 'redux-framework-demo'),
'default' => '',
'placeholder'=> 'ca-pub-2005XXXXXXXXX342'
),
array(
'id' => 'enable-amp-ads-text-feild-slot-2',
'type' => 'text',
'title' => __('Data AD Slot', 'redux-framework-demo'),
'subtitle' => __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code.', 'redux-framework-demo'),
'default' => '',
'required' => array('enable-amp-ads-2', '=' , '1'),
'placeholder'=> '70XXXXXX12'
),
// Ad 2 ends
// Ad 3 starts
array(
'id' => 'enable-amp-ads-3',
'type' => 'switch',
'title' => __('AD #3', 'redux-framework-demo'),
'default' => 0,
'subtitle' => __('Above the Post Content (Single Post)', 'redux-framework-demo'),
'true' => 'Enabled',
'false' => 'Disabled',
),
array(
'id' => 'enable-amp-ads-select-3',
'type' => 'select',
'title' => __('AD Size', 'redux-framework-demo'),
'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(
'id' =>'enable-amp-ads-text-feild-client-3',
'type' => 'text',
'required' => array('enable-amp-ads-3', '=' , '1'),
'title' => __('Data AD Client', 'redux-framework-demo'),
'subtitle' => __('Enter the Data Ad Client (data-ad-client) from the adsense ad code.', 'redux-framework-demo'),
'default' => '',
'placeholder'=> 'ca-pub-2005XXXXXXXXX342'
),
array(
'id' => 'enable-amp-ads-text-feild-slot-3',
'type' => 'text',
'title' => __('Data AD Slot', 'redux-framework-demo'),
'subtitle' => __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code.', 'redux-framework-demo'),
'default' => '',
'required' => array('enable-amp-ads-3', '=' , '1'),
'placeholder'=> '70XXXXXX12'
),
// Ad 3 ends
// Ad 4 Starts
array(
'id' => 'enable-amp-ads-4',
'type' => 'switch',
'title' => __('AD #4', 'redux-framework-demo'),
'default' => 0,
'subtitle' => __('Below the Post Content (Single Post)', 'redux-framework-demo'),
'true' => 'Enabled',
'false' => 'Disabled',
),
array(
'id' => 'enable-amp-ads-select-4',
'type' => 'select',
'title' => __('AD Size', 'redux-framework-demo'),
'required' => array('enable-amp-ads-4', '=' , '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(
'id' =>'enable-amp-ads-text-feild-client-4',
'type' => 'text',
'required' => array('enable-amp-ads-4', '=' , '1'),
'title' => __('Data AD Client', 'redux-framework-demo'),
'subtitle' => __('Enter the Data Ad Client (data-ad-client) from the adsense ad code.', 'redux-framework-demo'),
'default' => '',
'placeholder'=> 'ca-pub-2005XXXXXXXXX342'
),
array(
'id' => 'enable-amp-ads-text-feild-slot-4',
'type' => 'text',
'title' => __('Data AD Slot', 'redux-framework-demo'),
'subtitle' => __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code. ', 'redux-framework-demo'),
'default' => '',
'required' => array('enable-amp-ads-4', '=' , '1'),
'placeholder'=> '70XXXXXX12'
)
// Ad 4 ends
),
) );
// Single Section
Redux::setSection( $opt_name, array(
'title' => __( 'Single', 'redux-framework-demo' ),
'desc' => __( 'Additional Options to control the look of Single Click here ', 'redux-framework-demo' ),
'id' => 'amp-single',
'subsection' => true,
'fields' => array(
// Social Icons ON/OFF
array(
'id' => 'enable-single-social-icons',
'type' => 'switch',
'title' => __('Sticky Social Icons', 'redux-framework-demo'),
'default' => 1,
'subtitle' => __('Enable Social Icons in single', 'redux-framework-demo'),
),
//deselectable next previous links
array(
'id' => 'enable-single-next-prev',
'type' => 'switch',
'title' => __('Next-Previous Links', 'redux-framework-demo'),
'default' => 1,
'subtitle' => __('Enable Next-Previous links in single', 'redux-framework-demo'),
),
// Width and Height of Image
array(
'id' => 'enable-single-featured-img-width',
'type' => 'text',
'title' => __('Featured Image Width', 'redux-framework-demo'),
'default' => 512,
'subtitle' => __('Custom featured image width in Units : Px', 'redux-framework-demo'),
'placeholder' =>'Width here',
),
array(
'id' => 'enable-single-featured-img-height',
'type' => 'text',
'title' => __('Featured Image Height', 'redux-framework-demo'),
'default' => 300,
'subtitle' => __('Custom featured image height in Units : Px', 'redux-framework-demo'),
'placeholder' =>'Height here',
),
// Related Post
array(
'id' => 'ampforwp-single-select-type-of-related',
'type' => 'select',
'title' => __('Show Related Post from', 'redux-framework-demo'),
'data' => 'page',
'subtitle' => __('select the type of related posts', 'redux-framework-demo'),
'options' => array(
'1' => 'Tags',
'2' => 'Categories'
),
'default' => '2',
),
array(
'id' => 'ampforwp-number-of-related-posts',
'type' => 'text',
'title' => __('Number of Related Post', 'redux-framework-demo'),
'subtitle' => __('Type the number of related posts you need, Eg : 2', 'redux-framework-demo'),
'validate' => 'numeric',
'default' => '3',
),
),
) );
// Social Section
Redux::setSection( $opt_name, array(
'title' => __( 'Social', 'redux-framework-demo' ),
'id' => 'amp-social',
'subsection' => true,
'fields' => array(
// Facebook ON/OFF
array(
'id' => 'enable-single-facebook-share',
'type' => 'switch',
//'required' => array('enable-single-social-icons', '=' , '1'),
'title' => __('Facebook', 'redux-framework-demo'),
'default' => 0,
),
// Facebook app ID
array(
'id' => 'amp-facebook-app-id',
'title' => __('Facebook App ID', 'redux-framework-demo'),
'subtitle' => __('In order to use Facebook share you need to register an app ID, you can register one here: https://developers.facebook.com/apps.', 'redux-framework-demo'),
'type' => 'text',
'required' => array('enable-single-facebook-share', '=' , '1'),
'placeholder' => 'Enter your facebook app id',
'default' => ''
),
// Twitter ON/OFF
array(
'id' => 'enable-single-twitter-share',
'type' => 'switch',
'title' => __('Twitter', 'redux-framework-demo'),
'default' => 1,
),
// GooglePlus ON/OFF
array(
'id' => 'enable-single-gplus-share',
'type' => 'switch',
'title' => __('GooglePlus', 'redux-framework-demo'),
'default' => 1,
),
// Email ON/OFF
array(
'id' => 'enable-single-email-share',
'type' => 'switch',
'title' => __('Email', 'redux-framework-demo'),
'default' => 1,
),
// Pinterest ON/OFF
array(
'id' => 'enable-single-pinterest-share',
'type' => 'switch',
'title' => __('Pinterest', 'redux-framework-demo'),
'default' => 1,
),
// LinkedIn ON/OFF
array(
'id' => 'enable-single-linkedin-share',
'type' => 'switch',
'title' => __('LinkedIn', 'redux-framework-demo'),
'default' => 1,
),
// WhatsApp
array(
'id' => 'enable-single-whatsapp-share',
'type' => 'switch',
'title' => __('WhatsApp', 'redux-framework-demo'),
'default' => 1,
),
)
) );
// Structured Data
Redux::setSection( $opt_name, array(
'title' => __( 'Structured Data', 'redux-framework-demo' ),
'id' => 'opt-structured-data',
'subsection' => true,
'fields' => array(
array(
'id' => 'amp-structured-data-logo',
'type' => 'media',
'url' => true,
'title' => __('Default Structured Data Logo', 'redux-framework-demo'),
'subtitle' => __('Upload the logo you want to show in Google Structured Data. ', 'redux-framework-demo'),
),
array(
'id' => 'amp-structured-data-placeholder-image',
'type' => 'media',
'url' => true,
'title' => __('Default Post Image', 'redux-framework-demo'),
'subtitle' => __('Upload the Image you want to show as Placeholder Image.', 'redux-framework-demo'),
'placeholder' => 'when there is no featured image set in the post',
),
array(
'id' => 'amp-structured-data-placeholder-image-width',
'title' => __('Default Post Image Width', 'redux-framework-demo'),
'type' => 'text',
'placeholder' => '550',
'subtitle' => 'Please don\'t add "PX" in the image size.',
'default' => ''
),
array(
'id' => 'amp-structured-data-placeholder-image-height',
'title' => __('Default Post Image Height', 'redux-framework-demo'),
'type' => 'text',
'placeholder' => '350',
'subtitle' => 'Please don\'t add "PX" in the image size.',
'default' => ''
),
)
) );
// Notifications SECTION
Redux::setSection( $opt_name, array(
'title' => __( 'Notifications', 'redux-framework-demo' ),
'desc' => __( 'Add notifications to your AMP pages'),
'id' => 'amp-notifications',
'subsection' => true,
'fields' => array(
array(
'id' =>'amp-enable-notifications',
'type' => 'switch',
'title' => __('Enable Notifications', 'redux-framework-demo'),
'default' => '',
'subtitle' => __('Show notifications on all of your AMP pages for cookie purposes, or anything else.', 'redux-framework-demo'),
'true' => 'Enabled',
'false' => 'Disabled',
),
array(
'id' => 'amp-notification-text',
'title' => __('Notification text', 'redux-framework-demo'),
'type' => 'text',
'required' => array('amp-enable-notifications', '=' , '1'),
'default' => 'This website uses cookies.',
'placeholder' => 'Enter Text here',
),
array(
'id' => 'amp-accept-button-text',
'title' => __('Notification accept button text', 'redux-framework-demo'),
'type' => 'text',
'required' => array('amp-enable-notifications', '=' , '1'),
'default' => 'Accept',
'placeholder' => 'Enter Text here',
),
),
) );
// Translation Panel
Redux::setSection( $opt_name, array(
'title' => __( 'Translation Panel', 'redux-framework-demo' ),
'desc' => __( 'Please translate the following words of page accordingly else default content is in English Language', 'redux-framework-demo' ),
'id' => 'amp-translator',
'subsection' => true,
'fields' => array(
array(
'id' => 'amp-translator-top-text',
'type' => 'text',
'title' => __('Top', 'redux-framework-demo'),
'default' => 'Top',
'placeholder'=>'write here'
),
array(
'id' => 'amp-translator-non-amp-page-text',
'type' => 'text',
'title' => __('View Non-AMP Version', 'redux-framework-demo'),
'default' => 'View Non-AMP Version',
'placeholder'=>'write here'
),
array(
'id' => 'amp-translator-related-text',
'type' => 'text',
'title' => __('Related Post', 'redux-framework-demo'),
'default' => 'Related Post',
'placeholder'=>'write here'
),
array(
'id' => 'amp-translator-navigate-text',
'type' => 'text',
'title' => __('Navigate', 'redux-framework-demo'),
'default' => 'Navigate',
'placeholder'=>'write here'
),
array(
'id' => 'amp-translator-on-text',
'type' => 'text',
'title' => __('On', 'redux-framework-demo'),
'default' => 'On',
'placeholder'=>'write here'
),
array(
'id' => 'amp-translator-next-text',
'type' => 'text',
'title' => __('Next', 'redux-framework-demo'),
'default' => 'Next',
'placeholder'=>'write here'
),
array(
'id' => 'amp-translator-previous-text',
'type' => 'text',
'title' => __('Previous', 'redux-framework-demo'),
'default' => 'Previous',
'placeholder'=>'write here'
),
array(
'id' => 'amp-translator-footer-text',
'type' => 'textarea',
'title' => __('Footer', 'redux-framework-demo'),
'default' => 'All Rights Reserved',
'placeholder'=>'write here'
),
array(
'id' => 'amp-translator-categories-text',
'type' => 'text',
'title' => __('Categories', 'redux-framework-demo'),
'default' => 'Categories: ',
'placeholder'=>'write here'
),
array(
'id' => 'amp-translator-tags-text',
'type' => 'text',
'title' => __('Tags', 'redux-framework-demo'),
'default' => 'Tags: ',
'placeholder'=>'write here'
),
array(
'id' => 'amp-translator-by-text',
'type' => 'text',
'title' => __('By', 'redux-framework-demo'),
'default' => 'By',
'placeholder'=>'write here'
),
array(
'id' => 'amp-translator-view-comments-text',
'type' => 'text',
'title' => __('View Comments', 'redux-framework-demo'),
'default' => 'View Comments',
'placeholder'=>'write here'
),
array(
'id' => 'amp-translator-leave-a-comment-text',
'type' => 'text',
'title' => __('Leave a Comment', 'redux-framework-demo'),
'default' => 'Leave a Comment',
'placeholder'=>'write here'
),
array(
'id' => 'amp-translator-at-text',
'type' => 'text',
'title' => __('at', 'redux-framework-demo'),
'default' => 'at',
'placeholder'=>'write here'
),
array(
'id' => 'amp-translator-says-text',
'type' => 'text',
'title' => __('says', 'redux-framework-demo'),
'default' => 'says',
'placeholder'=>'write here'
),
array(
'id' => 'amp-translator-Edit-text',
'type' => 'text',
'title' => __('Edit', 'redux-framework-demo'),
'default' => 'Edit',
'placeholder'=>'write here'
),
array(
'id' => 'amp-translator-ago-date-text',
'type' => 'text',
'title' => __('ago', 'redux-framework-demo'),
'default' => 'ago',
'placeholder'=>'write here'
),
)
) );
// // CSS
// Redux::setSection( $opt_name, array(
// 'title' => __( 'Custom CSS Editor', 'redux-framework-demo' ),
// // 'desc' => __( 'For full documentation on this field, visit: ', 'redux-framework-demo' ) . 'http://docs.reduxframework.com/core/fields/textarea/',
// 'id' => 'opt-css-editor',
// 'subsection' => true,
// 'fields' => array(
// array(
// 'id' => 'css_editor',
// 'type' => 'ace_editor',
// 'title' => __('Custom CSS', 'redux-framework-demo'),
// 'subtitle' => __('You can customize the Stylesheet of the AMP version by using this option.', 'redux-framework-demo'),
// 'mode' => 'css',
// 'theme' => 'monokai',
// 'desc' => '',
// 'default' => "/******* Paste your Custom CSS in this Editor *******/"
// ),
// )
// ) );
//
// // Advance Settings SECTION
// Redux::setSection( $opt_name, array(
// 'title' => __( 'Advance Settings', 'redux-framework-demo' ),
// 'desc' => __( 'This section has Advance settings'),
// 'id' => 'amp-advance',
// 'subsection' => true,
// 'fields' => array(
//
// ),
//
// ) );
//
// Extension Section
Redux::setSection( $opt_name, array(
'title' => __( 'Extensions', 'redux-framework-demo' ),
// 'desc' => __( 'For full documentation on this field, visit: ', 'redux-framework-demo' ) . 'http://docs.reduxframework.com/core/fields/textarea/',
'id' => 'opt-go-premium',
'subsection' => false,
'desc' => '
',
'icon' => 'el el-puzzle',
) );
// Priority Support
Redux::setSection( $opt_name, array(
'title' => __( 'Fix AMP Errors', 'redux-framework-demo' ),
// 'desc' => __( 'For full documentation on this field, visit: ', 'redux-framework-demo' ) . 'http://docs.reduxframework.com/core/fields/textarea/',
'id' => 'opt-go-premium-support',
'subsection' => false,
'desc' => '
',
'icon' => 'el el-hand-right',
) );
/*
* <--- END SECTIONS
*/