__( 'Header Menu', 'tijaji' ),
'footer-menu' => __( 'Footer Menu', 'tijaji' ),
)
);
}
add_theme_support( 'menus' );
$tijaji_args = array(
'default' => get_template_directory_uri() . '/images/default-1.jpg',
'width' => 1920,
'height' => 600,
'uploads' => true,
'header-text' => false,
'default-text-color' => '000000',
'video' => true,
);
add_theme_support( 'custom-header', $tijaji_args );
register_default_headers( array(
'default-image' => array(
'url' => get_template_directory_uri() . '/images/default-1.jpg',
'thumbnail_url' => get_template_directory_uri() . '/images/default-1.jpg',
),
'default-image_2' => array(
'url' => get_template_directory_uri() . '/images/default-2.jpg',
'thumbnail_url' => get_template_directory_uri() . '/images/default-2.jpg',
),
'default-image_3' => array(
'url' => get_template_directory_uri() . '/images/default-3.jpg',
'thumbnail_url' => get_template_directory_uri() . '/images/default-3.jpg',
),
) );
add_theme_support('custom-logo');
$tijaji_background_param = array(
'default-color' => 'f9f9f9'
);
add_theme_support( 'custom-background', $tijaji_background_param );
}
add_action( 'after_setup_theme', 'tijaji_theme_support' );
function tijaji_remove_tagline($tijaji_title) {
if ( isset($tijaji_title['tagline']) ) {
unset( $tijaji_title['tagline'] );
}
return $tijaji_title;
}
add_filter( 'document_title_parts', 'tijaji_remove_tagline' );
function tijaji_title_separator($tijaji_sep) {
$tijaji_sep = '|';
return $tijaji_sep;
}
add_filter( 'document_title_separator', 'tijaji_title_separator' );
function tijaji_link_dashicons() {
wp_enqueue_style('dashicons');
}
add_action('wp_enqueue_scripts', 'tijaji_link_dashicons');
function tijaji_widgets_init() {
register_sidebar(array(
'name' => __( 'Sidebar', 'tijaji' ),
'id' => 'sidebar',
'before_widget' => '
',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
',
));
register_sidebar(array(
'name' => __( 'Footer', 'tijaji' ),
'id' => 'footer',
'before_widget' => '',
'before_title' => '',
'after_title' => '
',
));
register_sidebar(array(
'name' => __( 'Content top', 'tijaji' ),
'id' => 'content_top',
'description' => __( 'Ideal for displaying bread crumbs.', 'tijaji' ),
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
',
));
register_sidebar(array(
'name' => __( 'Content bottom', 'tijaji' ),
'id' => 'content_bottom',
'description' => __( 'It is displayed directly under the article.', 'tijaji' ),
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
',
));
}
add_action( 'widgets_init','tijaji_widgets_init' );
if ( !function_exists( 'tijaji_excerpt_length' ) ) {
function tijaji_excerpt_length( ) {
return 180;
}
}
add_filter( 'excerpt_length', 'tijaji_excerpt_length', 999 );
function tijaji_page_navi() {
the_posts_pagination( array( 'mid_size' => 2 ) );
}
require get_template_directory() . '/inc/header-images.php';
require get_template_directory() . '/inc/customizer.php';
require get_template_directory() . '/inc/customizer-sidebar.php';
require get_template_directory() . '/inc/theme-info.php';
if( tijaji_layout() == 'one' ) {
if ( ! isset( $content_width ) ) $content_width = 955;
}else{
if( tijaji_max_content_width() == 'width800' ) { if ( ! isset( $content_width ) ) $content_width = '446'; }
if( tijaji_max_content_width() == 'width850' ) { if ( ! isset( $content_width ) ) $content_width = '492'; }
if( tijaji_max_content_width() == 'width900' ) { if ( ! isset( $content_width ) ) $content_width = '538'; }
if( tijaji_max_content_width() == 'width950' ) { if ( ! isset( $content_width ) ) $content_width = '584'; }
if( tijaji_max_content_width() == 'width1000' ) { if ( ! isset( $content_width ) ) $content_width = '630'; }
if( tijaji_max_content_width() == 'width1050' ) { if ( ! isset( $content_width ) ) $content_width = '676'; }
if( tijaji_max_content_width() == 'width1100' ) { if ( ! isset( $content_width ) ) $content_width = '722'; }
if( tijaji_max_content_width() == 'width1150' ) { if ( ! isset( $content_width ) ) $content_width = '768'; }
if( tijaji_max_content_width() == 'width1200' ) { if ( ! isset( $content_width ) ) $content_width = '814'; }
if( tijaji_max_content_width() == 'width1250' ) { if ( ! isset( $content_width ) ) $content_width = '860'; }
if( tijaji_max_content_width() == 'width1300' ) { if ( ! isset( $content_width ) ) $content_width = '906'; }
if( tijaji_max_content_width() == 'width1350' ) { if ( ! isset( $content_width ) ) $content_width = '952'; }
if( tijaji_max_content_width() == 'width1400' ) { if ( ! isset( $content_width ) ) $content_width = '998'; }
if( tijaji_max_content_width() == 'widthfull' ) { if ( ! isset( $content_width ) ) $content_width = '998'; }
}
function rss_comment_footer($tijaji_content) {
if (is_feed()) {
if (comments_open()) {
$tijaji_content .= 'Comments are open! Add yours!';
}
}
return $tijaji_content;
}
function category_id_class($tijaji_classes) {
global $post;
if( !is_search() && !is_404() ) {
foreach((get_the_category($post->ID)) as $category)
$tijaji_classes [] = 'cat-' . $category->cat_ID . '-id';
}
return $tijaji_classes;
}
add_filter('post_class', 'category_id_class');
add_filter('body_class', 'category_id_class');
function has_thumb_class($tijaji_classes) {
global $post;
if( has_post_thumbnail($post->ID) ) { $tijaji_classes[] = 'has_thumb'; }
return $tijaji_classes;
}
add_filter('post_class', 'has_thumb_class');
function tijaji_custom_comments_list($tijaji_comment, $tijaji_args, $tijaji_depth){
?>
id="li-comment-">
id="li-comment-">
\s*\((\d+)\)/',' ($1)',$tijaji_linkindata);
return $tijaji_linkindata;
}
add_filter( 'get_archives_link', 'tijaji_archives_link' );
function tijaji_archives_link( $tijaji_linkindata ) {
$tijaji_linkindata = preg_replace('/<\/a>\s*( )\((\d+)\)/',' ($2)',$tijaji_linkindata);
return $tijaji_linkindata;
}
function tijaji_editor_style(){
add_editor_style();
}
add_action('after_setup_theme', 'tijaji_editor_style');
if ( class_exists( 'WP_Customize_Control' ) && ! class_exists( 'tijaji_Custom_Content' ) ) :
class tijaji_Custom_Content extends WP_Customize_Control {
public $content = '';
public function render_content() {
$allowed_html = array(
'a' => array( 'href' => array (), 'onclick' => array (), 'target' => array() ),
'div' => array( 'style' => array (), 'class' => array (), 'align' => array () ),
'p' => array( 'style' => array (), 'class' => array (), 'align' => array () ),
'span' => array( 'style' => array (), 'class' => array (), 'align' => array () ),
'br' => array( 'style' => array (), 'class' => array (), 'align' => array () ),
'h2' => array( 'style' => array (), 'class' => array (), 'align' => array () ),
'h3' => array( 'style' => array (), 'class' => array (), 'align' => array () ),
);
if ( isset( $this->content ) ) {
echo wp_kses( $this->content , $allowed_html );
}
}
}
endif;
function tijaji_scripts() {
wp_enqueue_style( 'tijaji_style', get_template_directory_uri() . '/style.css' );
if( tijaji_footerwidget() == '2') wp_enqueue_style( 'tijaji_style_fw', get_template_directory_uri() . '/css/fw2.css' );
if( tijaji_footerwidget() == '3') wp_enqueue_style( 'tijaji_style_fw', get_template_directory_uri() . '/css/fw3.css' );
if( tijaji_footerwidget() == '4') wp_enqueue_style( 'tijaji_style_fw', get_template_directory_uri() . '/css/fw4.css' );
if( tijaji_footerwidget() == '5') wp_enqueue_style( 'tijaji_style_fw', get_template_directory_uri() . '/css/fw5.css' );
if( tijaji_sp_headermenu() == '1') wp_enqueue_style( 'tijaji_sp_menu', get_template_directory_uri() . '/css/sp_menu_pc.css' );
if( tijaji_sp_headermenu() == '2') wp_enqueue_style( 'tijaji_sp_menu', get_template_directory_uri() . '/css/sp_menu_block.css' );
if( tijaji_sp_headermenu() == '3') wp_enqueue_style( 'tijaji_sp_menu', get_template_directory_uri() . '/css/sp_menu_fixed.css' );
if( tijaji_slider_number() == '2') wp_enqueue_style( 'tijaji_style_slider', get_template_directory_uri() . '/css/slider2.css' );
if( tijaji_slider_number() == '3') wp_enqueue_style( 'tijaji_style_slider', get_template_directory_uri() . '/css/slider3.css' );
if( tijaji_slider_number() == '4') wp_enqueue_style( 'tijaji_style_slider', get_template_directory_uri() . '/css/slider4.css' );
if( tijaji_slider_number() == '5') wp_enqueue_style( 'tijaji_style_slider', get_template_directory_uri() . '/css/slider5.css' );
wp_enqueue_script( 'tijaji_script', 'http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js' );
wp_enqueue_script( 'tijaji_script-up', get_template_directory_uri() . '/js/up.js' );
if (is_singular()) wp_enqueue_script('comment-reply');
}
add_action( 'wp_enqueue_scripts', 'tijaji_scripts' );
' . esc_html_e('Your comment is awaiting approval.','tijaji') . '
';?>