/** * Theme functions and definitions * * @package Newsbulk */ if ( ! function_exists( 'newsbulk_enqueue_styles' ) ) : /** * @since 0.1 */ function newsbulk_enqueue_styles() { wp_enqueue_style( 'newsup-style-parent', get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'newsbulk-style', get_stylesheet_directory_uri() . '/style.css', array( 'newsup-style-parent' ), '1.0' ); wp_enqueue_style('bootstrap', get_template_directory_uri() . '/css/bootstrap.css'); wp_dequeue_style( 'newsup-default',get_template_directory_uri() .'/css/colors/default.css'); wp_enqueue_style( 'newsbulk-default-css', get_stylesheet_directory_uri()."/css/colors/default.css" ); if(is_rtl()){ wp_enqueue_style( 'newsup_style_rtl', trailingslashit( get_template_directory_uri() ) . 'style-rtl.css' ); } } endif; add_action( 'wp_enqueue_scripts', 'newsbulk_enqueue_styles', 9999 ); function newsbulk_theme_setup() { //Load text domain for translation-ready load_theme_textdomain('newsbulk', get_stylesheet_directory() . '/languages'); require( get_stylesheet_directory() . '/hooks/hooks.php' ); require( get_stylesheet_directory() . '/customizer-default.php' ); require( get_stylesheet_directory() . '/frontpage-options.php' ); // custom header Support $args = array( 'default-image' => get_stylesheet_directory_uri() .'/images/head-back.jpg', 'width' => '1600', 'height' => '600', 'flex-height' => false, 'flex-width' => false, 'header-text' => true, 'default-text-color' => '#143745' ); add_theme_support( 'custom-header', $args ); add_theme_support( 'title-tag' ); // Add default posts and comments RSS feed links to head. add_theme_support( 'automatic-feed-links' ); } add_action( 'after_setup_theme', 'newsbulk_theme_setup' ); add_action( 'customize_register', 'newsbulk_customize_remove_register', 1000 ); function newsbulk_customize_remove_register($wp_customize) { $wp_customize->remove_control('tabbed_section_title'); $wp_customize->remove_control('latest_tab_title'); $wp_customize->remove_control('popular_tab_title'); $wp_customize->remove_control('trending_tab_title'); $wp_customize->remove_control('select_trending_tab_news_category'); }/** * Newsup functions and definitions * * @package Newsup */ // Global variables define define( 'NEWSUP_THEME_DIR', get_template_directory() . '/' ); define( 'NEWSUP_THEME_URI', get_template_directory_uri() . '/' ); define( 'NEWS_THEME_SETTINGS', 'newsup-settings' ); if ( is_admin() ) { require_once get_template_directory() . '/admin/admin.php'; } $newsup_theme_path = get_template_directory() . '/inc/ansar/'; require( $newsup_theme_path . '/newsup-custom-navwalker.php' ); require( $newsup_theme_path . '/default_menu_walker.php' ); require( $newsup_theme_path . '/font/font.php'); require( $newsup_theme_path . '/template-tags.php'); require( $newsup_theme_path . '/template-functions.php'); require( $newsup_theme_path . '/widgets/widgets-common-functions.php'); require ( $newsup_theme_path . '/custom-control/custom-control.php'); require ( $newsup_theme_path . '/customizer-admin/newsup-admin-plugin-install.php'); require_once( trailingslashit( get_template_directory() ) . 'inc/ansar/customize-pro/class-customize.php' ); // Theme version. $newsup_theme = wp_get_theme(); if ( ! defined( 'NEWSUP_THEME_VERSION' ) ) { define( 'NEWSUP_THEME_VERSION', $newsup_theme->get( 'Version' ) ); } if ( ! defined( 'NEWSUP_THEME_NAME' ) ) { define( 'NEWSUP_THEME_NAME', $newsup_theme->get( 'Name' ) ); } /*-----------------------------------------------------------------------------------*/ /* Enqueue scripts and styles. /*-----------------------------------------------------------------------------------*/ require( $newsup_theme_path .'/enqueue.php'); /* ----------------------------------------------------------------------------------- */ /* Customizer */ /* ----------------------------------------------------------------------------------- */ require( $newsup_theme_path . '/customize/customizer.php'); /* ----------------------------------------------------------------------------------- */ /* Customizer */ /* ----------------------------------------------------------------------------------- */ require( $newsup_theme_path . '/widgets/widgets-init.php'); /* ----------------------------------------------------------------------------------- */ /* Widget */ /* ----------------------------------------------------------------------------------- */ require( $newsup_theme_path . '/hooks/hooks-init.php'); require_once( trailingslashit( get_template_directory() ) . 'inc/ansar/customize-pro/class-customize.php' ); /** * Load Jetpack compatibility file. */ if (defined('JETPACK__VERSION')) { require get_template_directory() . '/inc/ansar/jetpack.php'; } if ( ! function_exists( 'newsup_setup' ) ) : /** * Sets up theme defaults and registers support for various WordPress features. * * Note that this function is hooked into the after_setup_theme hook, which * runs before the init hook. The init hook is too late for some features, such * as indicating support for post thumbnails. */ function newsup_setup() { /* * Make theme available for translation. * Translations can be filed in the /languages/ directory. * If you're building a theme based on newsup, use a find and replace * to change 'newsup' to the name of your theme in all the template files. */ load_theme_textdomain( 'newsup', get_template_directory() . '/languages' ); // Add default posts and comments RSS feed links to head. add_theme_support( 'automatic-feed-links' ); /* * Let WordPress manage the document title. * By adding theme support, we declare that this theme does not use a * hard-coded