Make WordPress Themes

source: newsday/1.1.7/functions.php

Last change on this file was 295483, checked in by themedropbox, 4 weeks ago

New version of NewsDay - 1.1.7

File size: 3.0 KB
Line 
1<?php
2if (!function_exists('newsday_theme_enqueue_styles')) {
3    add_action('wp_enqueue_scripts', 'newsday_theme_enqueue_styles');
4
5    function newsday_theme_enqueue_styles()
6    {
7        $newsday_version = wp_get_theme()->get('Version');
8        $min = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
9        $parent_style = 'morenews-style';
10        wp_enqueue_style('bootstrap', get_template_directory_uri() . '/assets/bootstrap/css/bootstrap' . $min . '.css');
11        wp_enqueue_style($parent_style, get_template_directory_uri() . '/style.css');
12        wp_enqueue_style(
13            'newsday',
14            get_stylesheet_directory_uri() . '/style.css',
15            array('bootstrap', $parent_style),
16            wp_get_theme()->get('Version')
17        );
18
19        // Enqueue RTL Styles if the site is in RTL mode
20        if (is_rtl()) {
21            wp_enqueue_style(
22                'morenews-rtl',
23                get_template_directory_uri() . '/rtl.css',
24                array($parent_style),
25                $newsday_version
26            );
27        }
28    }
29}
30
31// Set up the WordPress core custom background feature.
32add_theme_support('custom-background', apply_filters('newsday_custom_background_args', array(
33    'default-color' => 'f7f7f7',
34    'default-image' => '',
35)));
36
37
38function newsday_filter_default_theme_options($defaults)
39{
40
41    $defaults['show_popular_tags_section']  = 1;
42    $defaults['select_popular_tags_mode']  = 'category';
43    $defaults['site_title_font_size'] = 48;
44    $defaults['disable_wp_emoji'] = 1;
45    $defaults['site_title_uppercase']  = 0;
46    $defaults['show_primary_menu_desc']  = 0;
47    $defaults['select_header_image_mode']  = 'above';
48    $defaults['disable_header_image_tint_overlay']  = 1;
49    $defaults['flash_news_title'] = __('Breaking News', 'newsday');
50    $defaults['aft_custom_title']           = __('Watch', 'newsday');
51    $defaults['select_main_banner_layout_section'] = 'layout-5';
52    $defaults['select_main_banner_order'] = 'order-1';
53    $defaults['select_update_post_filterby'] = 'cat';
54    $defaults['list_post_date_author_setting'] = 'show-date-author';
55    $defaults['secondary_color'] = '#F43776';
56    $defaults['global_show_min_read'] = 'no';
57    $defaults['frontpage_content_type']  = 'frontpage-widgets-and-content';
58    $defaults['main_latest_news_section_title'] = __('Recommended', 'newsday');
59    $defaults['main_popular_news_section_title'] = __('Popular', 'newsday');
60    $defaults['main_update_news_section_title'] = __('Archive', 'newsday');
61    $defaults['featured_news_section_title'] = __('Featured News', 'newsday');
62    $defaults['show_featured_post_list_section']  = 1;
63    $defaults['featured_post_list_section_title_1']           = __('General', 'newsday');
64    $defaults['featured_post_list_section_title_2']           = __('Opinion', 'newsday');
65    $defaults['featured_post_list_section_title_3']           = __('More', 'newsday');
66    return $defaults;
67}
68add_filter('morenews_filter_default_theme_options', 'newsday_filter_default_theme_options', 1);
Note: See TracBrowser for help on using the repository browser.