tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); /* * Enable support for Post Thumbnails on posts and pages. * * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails */ add_theme_support( 'post-thumbnails' ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primary' => esc_html__( 'Primary Menu', 'bloog-lite' ), ) ); /* * 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', ) ); /* * Enable support for Post Formats. * See http://codex.wordpress.org/Post_Formats */ add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link', ) ); // Set up the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'bloog_lite_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); } endif; // bloog_lite_setup add_action( 'after_setup_theme', 'bloog_lite_setup' ); /** * Set the content width in pixels, based on the theme's design and stylesheet. * * Priority 0 to make it available to lower priority callbacks. * * @global int $content_width */ function bloog_lite_content_width() { $GLOBALS['content_width'] = apply_filters( 'bloog_lite_content_width', 640 ); } add_action( 'after_setup_theme', 'bloog_lite_content_width', 0 ); //adding class to body boxed/full-width function bloog_lite_bodyclass($classes){ $classes[]= get_theme_mod('layout_option'); return $classes; } add_filter('body_class','bloog_lite_bodyclass' ); /** * Enqueue scripts and styles. */ function bloog_lite_scripts() { $query_args = array('family' => 'Oswald:400,300,700|Raleway:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic|Lato:400,300,700,900,100|Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic'); wp_enqueue_style('bloog-lite-google-fonts-css', add_query_arg($query_args, "//fonts.googleapis.com/css")); wp_enqueue_style( 'bloog-lite-style', get_stylesheet_uri() ); wp_enqueue_style( 'bloog-lite-respond', get_template_directory_uri() . '/css/responsive.css', array() ); wp_enqueue_script( 'bloog-lite-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true ); wp_enqueue_script( 'bloog-lite-customjs', get_template_directory_uri() . '/js/custom.js', array('jquery'), '4.2.2', true ); wp_enqueue_script( 'bloog-lite-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true ); wp_enqueue_script ( 'bloog-lite-main-script', get_template_directory_uri() . '/js/main.js', array('jquery'), '', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'bloog_lite_scripts' ); /** * Cropping image to a required size */ add_image_size('bloog-post-image-size', 940, 627, true); // post image size add_image_size('bloog-homeslider-image-size', 450, 300, true); // post image home slider size add_image_size('bloog-homepage_post_fullwidth',970,400,true); // home page full width image add_image_size('bloog-post-image-withsidebar', 650, 479, true); // home page with sidebar add_image_size('bloog-about-us-page-img', 380, 380, true); // home page with sidebar add_image_size('bloog-grid-view-img', 300, 200, true); // home page with sidebar add_image_size ('bloog-feature-page-img', 292, 169); // feature page image display in sidebar and footer sidebar add_image_size ('bloog-recent-post-thumb', 86, 57, true); /** * Implement the Custom Header feature. */ require get_template_directory() . '/inc/custom-header.php'; /** * Custom template tags for this theme. */ require get_template_directory() . '/inc/template-tags.php'; /** * Custom functions that act independently of the theme templates. */ require get_template_directory() . '/inc/extras.php'; /** * Customizer additions. */ require get_template_directory() . '/inc/customizer.php'; /** * Load Jetpack compatibility file. */ require get_template_directory() . '/inc/jetpack.php'; /** * Load Jetpack compatibility file. */ require get_template_directory() . '/inc/bloog-functions.php'; /** * Load customizer line */ require get_template_directory() . '/inc/bloog-customizer.php'; /** * Load post dropdown selector */ require get_template_directory() . '/inc/post-dropdown.php'; /** * Load post dropdown selector */ require get_template_directory() . '/inc/category-dropdown.php'; /** * Load bloog widgets in site */ require get_template_directory() . '/inc/bloog-widgets.php'; /** * Load bloog widgets in site */ require get_template_directory() . '/inc/bloog-tgm.php'; /** * 8Degree More Themes */ // If this file is called directly, abort. if ( ! defined( 'WPINC' ) ) { die; } // Add stylesheet and JS for upsell page. function bloog_lite_upsell_style() { wp_enqueue_style( 'upsell-style', get_template_directory_uri() . '/css/upsell.css'); } // Add upsell page to the menu. function bloog_lite_add_upsell() { $page = add_theme_page( __( 'More Themes', 'bloog-lite' ), __( 'More Themes', 'bloog-lite' ), 'administrator', 'bloog-lite-themes', 'bloog_lite_display_upsell' ); add_action( 'admin_print_styles-' . $page, 'bloog_lite_upsell_style' ); } add_action( 'admin_menu', 'bloog_lite_add_upsell', 11 ); // Define markup for the upsell page. function bloog_lite_display_upsell() { // Set template directory uri $directory_uri = get_template_directory_uri(); ?>
'8degreethemes', ); // Set the $request array. $request = array( 'body' => array( 'action' => 'query_themes', 'request' => serialize( (object)$args ) ) ); $themes = bloog_lite_get_themes( $request ); $active_theme = wp_get_theme()->get( 'Name' ); $counter = 1; // For currently active theme. foreach ( $themes->themes as $theme ) { if( $active_theme == $theme->name ) {?>

description; ?>

name . ':' . __( 'Current theme', 'bloog-lite' ); ?> Customize
themes as $theme ) { if( $active_theme != $theme->name ) { // Set the argument array with author name. $args = array( 'slug' => $theme->slug, ); // Set the $request array. $request = array( 'body' => array( 'action' => 'theme_information', 'request' => serialize( (object)$args ) ) ); $theme_details = bloog_lite_get_themes( $request ); ?>
">

description; ?>

name; ?> slug )->exists() ) { ?> Activate 'install-theme', 'theme' => $theme->slug, ), self_admin_url( 'update.php' ) ); ?>
'8 Degree Coming Soon Page', 'slug' => '8-degree-coming-soon-page', 'required' => false, 'force_activation' => false, 'force_deactivation' => true, ), array( 'name' => 'AccessPress Social Icons', 'slug' => 'accesspress-social-icons', 'required' => false, 'force_activation' => false, 'force_deactivation' => true, ), ); /** * Array of configuration settings. Amend each line as needed. * If you want the default strings to be available under your own theme domain, * leave the strings uncommented. * Some of the strings are added into a sprintf, so see the comments at the * end of each line for what each argument will be. */ $config = array( 'default_path' => '', 'menu' => 'bloog-lite-install-plugins', 'has_notices' => true, 'dismissable' => false, 'dismiss_msg' => '', 'is_automatic' => true, 'message' => '', 'strings' => array( 'page_title' => __( 'Install Required Plugins', 'bloog-lite' ), 'menu_title' => __( 'Install Plugins', 'bloog-lite' ), 'installing' => __( 'Installing Plugin: %s', 'bloog-lite' ), 'oops' => __( 'Something went wrong with the plugin API.', 'bloog-lite' ), 'notice_can_install_required' => _n_noop( 'This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.','bloog-lite' ), 'notice_can_install_recommended' => _n_noop( 'This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.','bloog-lite' ), 'notice_cannot_install' => _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.','bloog-lite' ), 'notice_can_activate_required' => _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.','bloog-lite' ), 'notice_can_activate_recommended' => _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.','bloog-lite' ), 'notice_cannot_activate' => _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.','bloog-lite' ), 'notice_ask_to_update' => _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.','bloog-lite' ), 'notice_cannot_update' => _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.','bloog-lite' ), 'install_link' => _n_noop( 'Begin installing plugin', 'Begin installing plugins','bloog-lite' ), 'activate_link' => _n_noop( 'Begin activating plugin', 'Begin activating plugins','bloog-lite' ), 'return' => __( 'Return to Required Plugins Installer', 'bloog-lite' ), 'plugin_activated' => __( 'Plugin activated successfully.', 'bloog-lite' ), 'complete' => __( 'All plugins installed and activated successfully. %s', 'bloog-lite' ), 'nag_type' => 'updated' ) ); tgmpa( $plugins, $config ); } add_action( 'tgmpa_register', 'bloog_lite_required_plugins' );