90,
'height' => 90,
'flex-width' => true,
) );
/*
* Enable support for Post Thumbnails on posts and pages.
*/
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 825, 510, true );
// Add menus.
register_nav_menus( array(
'primary' => __( 'Primary Menu', 'app' ),
) );
/*
* Switch default core markup for search form, comment form, and comments
* to output valid HTML5.
*/
add_theme_support( 'html5', array(
'search-form', 'comment-form', 'comment-list', 'gallery', 'caption'
) );
/**
* Sets the content width in pixels, based on the theme's design and stylesheet.
* @global int $content_width
*/
function app_content_width() {
$GLOBALS['content_width'] = apply_filters( 'app_content_width', 840 );
}
add_action( 'after_setup_theme', 'app_content_width', 0 );
}
add_action( 'after_setup_theme', 'app_setup' );
function app_init() {
// Use categories and tags with attachments
register_taxonomy_for_object_type( 'category', 'attachment' );
register_taxonomy_for_object_type( 'post_tag', 'attachment' );
}
add_action( 'init', 'app_init' );
function app_widgets_init() {
/*
* Register widget areas.
*/
register_sidebar( array(
'name' => __( 'Sidebar', 'app' ),
'id' => 'sidebar-1',
'before_widget' => '
',
'after_widget' => '',
'before_title' => ''
) );
}
add_action( 'widgets_init', 'app_widgets_init' );
function app_customize_register( $wp_customize ) {
// Do stuff with $wp_customize, the WP_Customize_Manager object.
/* Banner layout */
$wp_customize->add_section( 'banner_section', array(
'title' => __( 'Banner Layout', 'app' )
));
$wp_customize->add_setting( 'banner_section_title', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'theme_mod',
'default' => 'app'
));
$wp_customize->add_control( 'banner_section_title', array(
'label' => __( 'Title', 'app' ),
'type' => 'text',
'section' => 'banner_section'
));
$wp_customize->add_setting( 'banner_section_btn_label', array(
'type' => 'theme_mod',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'default' => 'DOWNLOAD'
));
$wp_customize->add_control( 'banner_section_btn_label', array(
'label' => __( 'Button text', 'app' ),
'type' => 'text',
'section' => 'banner_section'
));
$wp_customize->add_setting( 'banner_section_btn_url', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'theme_mod',
'default' => '#'
));
$wp_customize->add_control( 'banner_section_btn_url', array(
'label' => __( 'Buton URL', 'app' ),
'type' => 'text',
'section' => 'banner_section'
));
$wp_customize->add_setting( 'banner_section_text', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'theme_mod',
'default' => 'Start downloading from the mobile application you expected'
));
$wp_customize->add_control( 'banner_section_text', array(
'label' => __( 'Statement', 'app' ),
'type' => 'text',
'section' => 'banner_section'
));
$wp_customize->add_setting( 'banner_section_btn_url_1', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'theme_mod',
'default' => '#'
));
$wp_customize->add_control( 'banner_section_btn_url_1', array(
'label' => __( '1 . Buton URL', 'app' ),
'type' => 'text',
'section' => 'banner_section'
));
$wp_customize->add_setting( 'banner_section_btn_url_2', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'theme_mod',
'default' => '#'
));
$wp_customize->add_control( 'banner_section_btn_url_2', array(
'label' => __( '2 . Buton URL', 'app' ),
'type' => 'text',
'section' => 'banner_section'
));
$wp_customize->add_setting( 'banner_section_img', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'theme_mod'
));
$wp_customize->add_control( new WP_Customize_Media_Control( $wp_customize, 'banner_section_img', array(
'label' => __( 'Picture', 'app' ),
'description' => __( 'Your images must be at 430x500', 'app' ),
'type' => 'media',
'mime_type' => 'image',
'section' => 'banner_section'
) ) );
/* Feature Layouts 1 */
$wp_customize->add_section( 'feature1_section', array(
'title' => __( 'Feature Layouts 1', 'app' )
));
$wp_customize->add_setting( 'feature1_section_title', array(
'type' => 'theme_mod',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'default' => 'Easy, but powerful'
));
$wp_customize->add_control( 'feature1_section_title', array(
'label' => __( 'Title', 'app' ),
'type' => 'text',
'section' => 'feature1_section'
));
$wp_customize->add_setting( 'feature1_section_textarea', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'theme_mod',
'default' => 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.'
));
$wp_customize->add_control( 'feature1_section_textarea', array(
'label' => __( 'Statement', 'app' ),
'type' => 'textarea',
'section' => 'feature1_section'
));
$wp_customize->add_setting( 'feature1_section_btn_label', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'theme_mod',
'default' => 'DOWNLOAD'
));
$wp_customize->add_control( 'feature1_section_btn_label', array(
'label' => __( 'Button text', 'app' ),
'type' => 'text',
'section' => 'feature1_section'
));
$wp_customize->add_setting( 'feature1_section_btn_url', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'theme_mod',
'default' => '#'
));
$wp_customize->add_control( 'feature1_section_btn_url', array(
'label' => __( 'Buton URL', 'app' ),
'type' => 'text',
'section' => 'feature1_section'
));
$wp_customize->add_setting( 'feature1_section_img', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'theme_mod'
));
$wp_customize->add_control( new WP_Customize_Media_Control( $wp_customize, 'feature1_section_img', array(
'label' => __( 'Picture', 'app' ),
'description' => __( 'Your images must be at 250x600', 'app' ),
'type' => 'media',
'mime_type' => 'image',
'section' => 'feature1_section'
) ) );
/* Feature Layouts 2 */
$wp_customize->add_section( 'feature2_section', array(
'title' => __( 'Feature Layouts 2', 'app' )
));
$wp_customize->add_setting( 'feature2_section_title', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'theme_mod',
'default' => 'Works everywhere'
));
$wp_customize->add_control( 'feature2_section_title', array(
'label' => __( 'Title', 'app' ),
'type' => 'text',
'section' => 'feature2_section'
));
$wp_customize->add_setting( 'feature2_section_textarea', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'theme_mod',
'default' => 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.'
));
$wp_customize->add_control( 'feature2_section_textarea', array(
'label' => __( 'Statement', 'app' ),
'type' => 'textarea',
'section' => 'feature2_section'
));
$wp_customize->add_setting( 'feature2_section_btn_label_1', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'theme_mod',
'default' => 'DOWNLOAD'
));
$wp_customize->add_control( 'feature2_section_btn_label_1', array(
'label' => __( 'Button text', 'app' ),
'type' => 'text',
'section' => 'feature2_section'
));
$wp_customize->add_setting( 'feature2_section_btn_url_1', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'theme_mod',
'default' => '#'
));
$wp_customize->add_control( 'feature2_section_btn_url_1', array(
'label' => __( 'Buton URL', 'app' ),
'type' => 'text',
'section' => 'feature2_section'
));
$wp_customize->add_setting( 'feature2_section_img', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'theme_mod'
));
$wp_customize->add_control( new WP_Customize_Media_Control( $wp_customize, 'feature2_section_img', array(
'label' => __( 'Picture ', 'app' ),
'description' => __( 'Your images must be at 1200x970', 'app' ),
'type' => 'media',
'mime_type' => 'image',
'section' => 'feature2_section'
) ) );
/* Subarea Layout */
$wp_customize->add_section( 'bottom_section', array(
'title' => __( 'Subarea Layout', 'app' )
));
$wp_customize->add_setting( 'bottom_section_img', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'theme_mod'
));
$wp_customize->add_control( new WP_Customize_Media_Control( $wp_customize, 'bottom_section_img', array(
'label' => __( 'Picture ', 'app' ),
'description' => __( 'Your pictures must be in 550x370', 'app' ),
'type' => 'media',
'mime_type' => 'image',
'section' => 'bottom_section'
) ) );
$wp_customize->add_setting( 'bottom_section_title', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'theme_mod',
'default' => 'App'
));
$wp_customize->add_control( 'bottom_section_title', array(
'label' => __( 'Title', 'app' ),
'type' => 'text',
'section' => 'bottom_section'
));
$wp_customize->add_setting( 'bottom_section_text', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'theme_mod',
'default' => 'Get your mobile phone now'
));
$wp_customize->add_control( 'bottom_section_text', array(
'label' => __( 'Statement', 'app' ),
'type' => 'text',
'section' => 'bottom_section'
));
$wp_customize->add_setting( 'bottom_section_btn_url_1', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'theme_mod',
'default' => '#'
));
$wp_customize->add_control( 'bottom_section_btn_url_1', array(
'label' => __( '1 . Button URL', 'app' ),
'type' => 'text',
'section' => 'bottom_section'
));
$wp_customize->add_setting( 'bottom_section_btn_url_2', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'theme_mod',
'default' => '#'
));
$wp_customize->add_control( 'bottom_section_btn_url_2', array(
'label' => __( '2 . Button URL', 'app' ),
'type' => 'text',
'section' => 'bottom_section'
));
/* Social Connections */
$wp_customize->add_section( 'footer_section', array(
'title' => __( 'Social Connections', 'app' )
));
$wp_customize->add_setting( 'footer_section_textarea', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'theme_mod',
'default' => 'Get support to take advantage of our uninterrupted services
SUPPORT'
));
$wp_customize->add_control( 'footer_section_textarea', array(
'label' => __( 'Knowledge area', 'app' ),
'type' => 'textarea',
'section' => 'footer_section'
));
$wp_customize->add_setting( 'footer_section_facebook_url', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'theme_mod',
'default' => '#'
));
$wp_customize->add_control( 'footer_section_facebook_url', array(
'label' => __( 'Facebook URL', 'app' ),
'type' => 'text',
'section' => 'footer_section'
));
$wp_customize->add_setting( 'footer_section_twitter_url', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'theme_mod',
'default' => '#'
));
$wp_customize->add_control( 'footer_section_twitter_url', array(
'label' => __( 'Twitter URL', 'app' ),
'type' => 'text',
'section' => 'footer_section'
));
$wp_customize->add_setting( 'footer_section_instagram_url', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'theme_mod',
'default' => '#'
));
$wp_customize->add_control( 'footer_section_instagram_url', array(
'label' => __( 'Instagram URL', 'app' ),
'type' => 'text',
'section' => 'footer_section'
));
/* Copyright */
$wp_customize->add_section( 'copyright_section', array(
'title' => __( 'Copyright', 'app' )
));
$wp_customize->add_setting( 'copyright_section_text', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'theme_mod',
'default' => 'Copyright 2017 APP - All Rights Reserved'
));
$wp_customize->add_control( 'copyright_section_text', array(
'label' => __( 'Copyright', 'app' ),
'type' => 'textarea',
'section' => 'copyright_section'
));
}
add_action( 'customize_register', 'app_customize_register' );
function app_enqueue_scripts() {
/* JS */
wp_enqueue_script( 'jquery' );
wp_enqueue_script( '', 'https://code.jquery.com/jquery-3.1.1.min.js', false, null, true);
wp_enqueue_script( 'tether', 'https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js', false, null, true);
wp_enqueue_script( 'bootstrapalpha', 'https://pingendo.com/assets/bootstrap/bootstrap-4.0.0-alpha.6.min.js', false, null, true);
wp_enqueue_script( 'smoothscroll', 'https://pingendo.com/assets/scripts/smooth-scroll.js', false, null, true);
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
/* Style */
wp_enqueue_style( 'style', get_bloginfo('stylesheet_url'), false, null, 'all');
wp_enqueue_style( 'fontawesome', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css', false, null, 'all');
}
add_action( 'wp_enqueue_scripts', 'app_enqueue_scripts' );
/* Navwalker */
require_once "inc/bootstrap/wp_bootstrap_navwalker.php";
/**
* Custom header.
*/
require get_template_directory() . '/inc/custom-header.php';
/*
* Load customize pro
*/
require_once( trailingslashit( get_template_directory() ) . 'customize-pro/class-customize.php' );
?>