array( 'name' => esc_html__( 'Theme Settings', 'awake' ), 'description' => '' )
);
parent::__construct( __CLASS__, $args );
}
public function settings( $form )
{
$form->add_panel( 'mega_global', array( 'title' => esc_html__( 'Global', 'awake' )));
$form->add_section( 'global_settings', array( 'title' => esc_html__( 'Settings', 'awake' ), 'panel' => 'mega_global' ));
$form->add_section( 'mega_block_logo_section', array( 'title' => esc_html__( 'Logo', 'awake' ), 'panel' => 'mega_global' ));
$form->add_panel( 'mega_front', array( 'title' => esc_html__( 'Front Page', 'awake' )));
$form->add_section( 'front_settings', array( 'title' => esc_html__( 'Settings', 'awake' ), 'description' => sprintf( __( '
To setup a custom front page, utlize the settings > reading option and setup a page that has the "Front" template assigned to. Do the following steps:
- Make sure you have selected a static page
- Choose a page from the dropdown to act as the "Front Page"
- Go to the edit screen of the page which you selected previously
- Locate the select box called "Template" (on the right side)
- Choose "Front Page" and save the changes.
', 'awake' ), admin_url( 'options-reading.php' ), admin_url( 'edit.php?post_type=page' ) ), 'panel' => 'mega_front' ));
$form->add_panel( 'mega_blog', array( 'title' => esc_html__( 'Blog Page', 'awake' )));
$form->add_section( 'blog_settings', array( 'title' => esc_html__( 'Settings', 'awake' ), 'panel' => 'mega_blog' ));
$form->add_section( 'mega_block_breadcrumbs_section', array( 'title' => esc_html__( 'Breadcrumbs', 'awake' ), 'panel' => 'mega_blog' ));
$form->add_section( 'mega_block_meta_section', array( 'title' => esc_html__( 'Meta', 'awake' ), 'panel' => 'mega_blog' ));
$form->add_section( 'mega_block_content_section', array( 'title' => esc_html__( 'Content', 'awake' ), 'panel' => 'mega_blog' ));
$form->add_section( 'awake_block_toolbar_section', array( 'title' => esc_html__( 'Toolbar', 'awake' ), 'panel' => 'mega_blog' ));
$form->add_section( 'mega_block_paginate_section', array( 'title' => esc_html__( 'Paginate', 'awake' ), 'panel' => 'mega_blog' ));
$form->add_section( 'awake_block_comments_loop_section', array( 'title' => esc_html__( 'Comments Loop', 'awake' ), 'panel' => 'mega_blog' ));
$form->add_panel( 'mega_slider', array( 'title' => esc_html__( 'Slider', 'awake' )));
$this->_global( $form );
$this->front( $form );
$this->blog( $form );
}
public function _global( $form )
{
$form->section = 'global_settings';
$form->add_control( 'Mega_Control_Select', array( 'label' => esc_html__( 'Layout', 'awake' ), 'pro' => 1, 'value' => mega_float(), 'name' => 'layout',
'choices' => array(
'left' => esc_html__( 'Left', 'awake' ),
'right' => esc_html__( 'Right', 'awake' ),
'fullwidth' => esc_html__( 'Full Width', 'awake' )
)
));
$form->add_control( 'Mega_Control_Textarea', array( 'label' => esc_html__( 'Contact Page - Default Contact Info Text', 'awake' ), 'name' => 'default_contact_info_text', 'desc' => esc_html__( 'This is the default text for the contact info block in the contact page, you can overide these by using widgets from the widgets interface.', 'awake' ), 'value' => __( "Lorem ipsum dolor sit amet, id elit lorem, id morbi eu volutpat vitae mauris donec, porta nulla potenti varius tempor nec. Mollis sed vel, massa odio interdum pretium ipsum, malesuada dolor. Nunc nulla lacinia tincidunt vel, nunc proin wisi.\n\nMaecenas ullamcorper venenatis mattis.\nSed tempor augue ut arcu iaculis bibendum. Aenean nisi nunc, eleifend non mollis sed, vehicula non odio. Fusce mauris nisl, commodo id risus a, malesuada ultricies lectus.", 'awake' )));
$form->add_control( 'Mega_Control_onOff', array( 'label' => esc_html__( 'Show Top Button', 'awake' ), 'value' => 1, 'name' => 'show_top_button' ));
$form->add_sub_control( 'Mega_Control_Text', array( 'control' => 'show_top_button', 'control_value' => 'true', 'label' => esc_html__( 'Button Label', 'awake' ), 'value' => esc_html__( 'Sign up', 'awake' ), 'name' => 'top_button_label' ));
$form->add_sub_control( 'Mega_Control_Text', array( 'control' => 'show_top_button', 'control_value' => 'true', 'label' => esc_html__( 'Button Link', 'awake' ), 'value' => wp_registration_url(), 'name' => 'top_button_link' ));
$form->add_control( 'Mega_Control_onOff', array( 'label' => esc_html__( 'Show Footer', 'awake' ), 'pro' => 1, 'value' => 1, 'name' => 'show_footer' ));
$form->add_control( 'Mega_Control_Textarea', array( 'label' => esc_html__( 'Hook Footer (JS)', 'awake' ), 'name' => 'hook_footer', 'desc' => esc_html__( 'This hook will be automatically added to the footer. It can only contain javascript code and should be wrapped around "script" tags.', 'awake' ), 'sanitize' => 'mega_wp_kses_js' ));
$form->add_control( 'Mega_Control_Textarea', array( 'label' => esc_html__( 'Custom CSS', 'awake' ), 'name' => 'custom_css', 'desc' => esc_html__( 'Add your custom CSS in this box, it will be applied to the theme. No need to wrap it inside "style" tags.', 'awake' ), 'sanitize' => 'wp_strip_all_tags' ));
}
public function front( $form )
{
global $mega_package;
$form->section = 'front_settings';
if ( $mega_package > 0 )
$form->add_control( 'Mega_Control_onOff', array( 'label' => esc_html__( 'Show Front Page', 'awake' ), 'pro' => 1, 'desc' => esc_html__( 'This setting will overwrite the display > reading behavior, to setup a front page, utlize the display > reading option and setup a page that has the "Front" template assigned to.', 'awake' ), 'value' => 0, 'name' => 'show_front' ));
$form->add_control( 'Mega_Control_onOff', array( 'label' => esc_html__( 'Show Box 1 (Features)', 'awake' ), 'value' => 1, 'name' => 'show_box_1' ));
$form->add_control( 'Mega_Control_onOff', array( 'label' => esc_html__( 'Show Box 2 (CTA)', 'awake' ), 'value' => 1, 'pro' => 1, 'name' => 'show_box_2' ));
$form->add_sub_control( 'Mega_Control_Text', array( 'control' => 'show_box_2', 'control_value' => 'true', 'label' => esc_html__( 'Title', 'awake' ), 'value' => esc_html__( 'Our mission is to help you build a company people love', 'awake' ), 'name' => 'cta2_title' ));
$form->add_sub_control( 'Mega_Control_Text', array( 'control' => 'show_box_2', 'control_value' => 'true', 'label' => esc_html__( 'Button label', 'awake' ), 'value' => esc_html__( 'Continue reading', 'awake' ), 'name' => 'cta2_button_label' ));
$form->add_sub_control( 'Mega_Control_Text', array( 'control' => 'show_box_2', 'control_value' => 'true', 'label' => esc_html__( 'Button link', 'awake' ), 'value' => '#', 'name' => 'cta2_button_link' ));
$form->add_control( 'Mega_Control_onOff', array( 'label' => esc_html__( 'Show Box 3 (Features)', 'awake' ), 'value' => 1, 'name' => 'show_box_3' ));
$form->add_sub_control( 'Mega_Control_Text', array( 'control' => 'show_box_3', 'control_value' => 'true', 'label' => esc_html__( 'Title', 'awake' ), 'value' => esc_html__( 'Just a few random posts', 'awake' ), 'name' => 'features2_title' ));
$form->add_sub_control( 'Mega_Control_Text', array( 'control' => 'show_box_3', 'control_value' => 'true', 'label' => esc_html__( 'Sub Title', 'awake' ), 'value' => esc_html__( 'Few random posts from our blog to get you started being curious! Comment, share and subscribe if you like what you see.', 'awake' ), 'name' => 'features2_sub_title' ));
$form->add_control( 'Mega_Control_onOff', array( 'label' => esc_html__( 'Show Box 4 (Latest Enteries)', 'awake' ), 'value' => 1, 'name' => 'show_box_4' ));
$form->add_sub_control( 'Mega_Control_Text', array( 'control' => 'show_box_4', 'control_value' => 'true', 'label' => esc_html__( 'Title', 'awake' ), 'value' => esc_html__( 'Latest Enteries', 'awake' ), 'name' => 'enteries_title' ));
$form->add_sub_control( 'Mega_Control_Text', array( 'control' => 'show_box_4', 'control_value' => 'true', 'label' => esc_html__( 'Sub Title', 'awake' ), 'value' => esc_html__( 'Come and join us with interesting tips and tricks posted every week on our blog.', 'awake' ), 'name' => 'enteries_sub_title' ));
$form->add_control( 'Mega_Control_onOff', array( 'label' => esc_html__( 'Show Box 5 (CTA)', 'awake' ), 'value' => 1, 'name' => 'show_box_5' ));
$form->add_control( 'Mega_Control_onOff', array( 'label' => esc_html__( 'Show Box 6', 'awake' ), 'value' => 1, 'name' => 'show_box_6' ));
}
public function blog( $form )
{
$form->section = 'blog_settings';
$form->add_control( 'Mega_Control_Select', array( 'label' => esc_html__( 'Pull Posts From Categories', 'awake' ), 'pro' => 1, 'value' => 0, 'name' => 'cat', 'use_list' => 1, 'list' => 'mega_cat_list' ));
$form->add_control( 'Mega_Control_Number', array( 'label' => esc_html__( 'Offset Posts', 'awake' ), 'desc' => esc_html__( "Enter a number to hide your newest posts, if you'll enter 2 in here, your 2 newest posts won't be shown.", 'awake' ), 'pro' => 1, 'value' => 0, 'name' => 'offset', 'min' => 0 ));
$form->add_control( 'Mega_Control_onOff', array( 'label' => esc_html__( 'Show Pagination', 'awake' ), 'value' => 1, 'name' => 'show_pagination' ));
$form->add_sub_control( 'Mega_Control_onOff', array( 'control' => 'show_pagination', 'control_value' => 'true', 'label' => esc_html__( 'Above Posts', 'awake' ), 'pro' => 1, 'value' => 0, 'name' => 'paginate_above_posts' ));
$form->add_sub_control( 'Mega_Control_onOff', array( 'control' => 'show_pagination', 'control_value' => 'true', 'label' => esc_html__( 'Below Posts', 'awake' ), 'value' => 1, 'name' => 'paginate_below_posts' ));
$form->add_sub_control( 'Mega_Control_onOff', array( 'control' => 'show_pagination', 'control_value' => 'true', 'label' => esc_html__( 'Above Comments', 'awake' ), 'pro' => 1, 'value' => 0, 'name' => 'paginate_above_comms' ));
$form->add_sub_control( 'Mega_Control_onOff', array( 'control' => 'show_pagination', 'control_value' => 'true', 'label' => esc_html__( 'Below Comments', 'awake' ), 'value' => 1, 'name' => 'paginate_below_comms' ));
$form->add_control( 'Mega_Control_onOff', array( 'label' => esc_html__( 'Show Comments', 'awake' ), 'pro' => 1, 'value' => 1, 'name' => 'show_comments' ));
}
}