esc_html__( 'Primary', 'abdum' ),
)
);
/*
* 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',
'style',
'script',
)
);
add_theme_support( 'post-formats', array(
'image',
'gallery',
'video',
) );
// Set up the WordPress core custom background feature.
add_theme_support(
'custom-background',
apply_filters(
'abdum_custom_background_args',
array(
'default-color' => 'ffffff',
'default-image' => '',
)
)
);
// Add theme support for selective refresh for widgets.
add_theme_support( 'customize-selective-refresh-widgets' );
/**
* Add support for core custom logo.
*
* @link https://codex.wordpress.org/Theme_Logo
*/
add_theme_support(
'custom-logo',
array(
'height' => 250,
'width' => 250,
'flex-width' => true,
'flex-height' => true,
)
);
/**
* Changing excerpt length for abdum theme
*/
function abdum_excerpt_length( $length ) {
if ( ! is_admin() ) {
return 50;
} else {
return $length;
}
}
add_filter( 'excerpt_length', 'abdum_excerpt_length', 999 );
}
endif;
add_action( 'after_setup_theme', 'abdum_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 abdum_content_width() {
$GLOBALS['content_width'] = apply_filters( 'abdum_content_width', 1140 );
}
add_action( 'after_setup_theme', 'abdum_content_width', 0 );
/**
* Register widget area.
*
* @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
*/
function abdum_widgets_init() {
register_sidebar(
array(
'name' => esc_html__( 'Sidebar', 'abdum' ),
'id' => 'sidebar-1',
'description' => esc_html__( 'Add widgets here.', 'abdum' ),
'before_widget' => '',
'before_title' => '
',
)
);
}
add_action( 'widgets_init', 'abdum_widgets_init' );
/**
* Enqueue scripts and styles.
*/
function abdum_scripts() {
// Add custom fonts, used in the main stylesheet.
wp_enqueue_style( 'abdum-fonts', abdum_fonts_url(), array(), null );
// Add Font Awesome Icons. Unminified version included.
wp_enqueue_style('fontAwesome', get_template_directory_uri() . '/inc/font-awesome/css/fontawesome-all.min.css', array(), '5.0.12' );
// Load our responsive stylesheet based on Bootstrap. Unminified version included.
wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css', array( ), '3.3.5' );
wp_enqueue_style( 'abdum-style', get_stylesheet_uri(), array(), ABDUM_VERSION );
wp_enqueue_script( 'abdum-navigation', get_template_directory_uri() . '/js/navigation.js', array(), ABDUM_VERSION, true );
// customjs
wp_enqueue_script( 'article-main-js', get_template_directory_uri() . '/js/main.js', array('jquery'), '1.0.0', true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
add_action( 'wp_enqueue_scripts', 'abdum_scripts' );
/**
* Register Google fonts.
* @return string Google fonts URL for the theme.
*/
if ( ! function_exists( 'abdum_fonts_url' ) ) :
function abdum_fonts_url() {
$abdum_fonts_url = '';
$abdum_fonts = array();
$abdum_font_subsets = 'latin,latin-ext';
// Translators: If there are characters in your language that are not supported by Open Sans, translate this to 'off'. Do not translate into your own language.
if ( 'off' !== esc_html_x( 'on', 'Open Sans font: on or off', 'abdum' ) ) {
$abdum_fonts[] = 'Open Sans:400,600,700';
}
// Translators: If there are characters in your language that are not supported by Bad Script, translate this to 'off'. Do not translate into your own language.
if ( 'off' !== esc_html_x( 'on', 'Bad Script font: on or off', 'abdum' ) ) {
$abdum_fonts[] = 'Bad Script:400';
}
if ( $abdum_fonts ) {
$abdum_fonts_url = add_query_arg( array(
'family' => urlencode( implode( '|', $abdum_fonts ) ),
'subset' => urlencode( $abdum_font_subsets ),
), 'https://fonts.googleapis.com/css' );
}
return $abdum_fonts_url;
}
endif;
/**
* Custom template tags for this theme.
*/
require get_template_directory() . '/inc/template-tags.php';
/**
* Functions which enhance the theme by hooking into WordPress.
*/
require get_template_directory() . '/inc/template-functions.php';
/**
* Customizer additions.
*/
require get_template_directory() . '/inc/customizer.php';
/**
* Abdum upsell link
*/
require get_template_directory() . '/inc/blaze-upsells/blaze-pro-btn/class-customize.php';