function studenti_akademije()
 {
     // Add default posts and comments RSS feed links to head.
     add_theme_support('automatic-feed-links');
     add_theme_support('title-tag');
     add_theme_support('post-thumbnails');
     set_post_thumbnail_size(650, 220, true);
     // 650 x 220
     add_image_size($name = 'event', $width = 650, $height = 220, $crop = true);
     add_image_size($name = 'student-image', $width = 650, $height = 440, $crop = true);
     register_nav_menus(array('primary' => __('Primary Menu', 'twentyfifteen'), 'social' => __('Social Links Menu', 'twentyfifteen')));
     add_theme_support('html5', array('search-form', 'comment-form', 'comment-list', 'gallery', 'caption'));
     add_editor_style(array('/assets/build/css/editor-style.css', '/assets/build/css/genericons/genericons.css', twentyfifteen_fonts_url()));
 }
Example #2
0
/** 20-15 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.
 *
 * @since Twenty Fifteen 1.0
 */
function twentyfifteen_setup()
{
    /*
     * Make theme available for translation.
     * Translations can be filed in the /languages/ directory.
     * If you're building a theme based on twentyfifteen, use a find and replace
     * to change 'twentyfifteen' to the name of your theme in all the template files
     */
    load_theme_textdomain('twentyfifteen', 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 <title> 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.
     *
     * See: https://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
     */
    add_theme_support('post-thumbnails');
    set_post_thumbnail_size(925, 510, true);
    // This theme uses wp_nav_menu() in two locations.
    register_nav_menus(array('primary' => __('Primary Menu', 'twentyfifteen'), 'social' => __('Social Links Menu', 'twentyfifteen')));
    /*
     * 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: https://codex.wordpress.org/Post_Formats
     */
    add_theme_support('post-formats', array('aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio', 'chat'));
    $color_scheme = twentyfifteen_get_color_scheme();
    $default_color = trim($color_scheme[0], '#');
    // Setup the WordPress core custom background feature.
    add_theme_support('custom-background', apply_filters('twentyfifteen_custom_background_args', array('default-color' => $default_color, 'default-attachment' => 'fixed')));
    /*
     * This theme styles the visual editor to resemble the theme style,
     * specifically font, colors, icons, and column width.
     */
    add_editor_style(array('css/editor-style.css', 'genericons/genericons.css', twentyfifteen_fonts_url()));
}
function google_fonts_load_disable($styles)
{
    $styles->add('open-sans', '');
    // Backend
    $styles->add('twentytwelve-fonts', '');
    // Core themes ...
    $styles->add('twentythirteen-fonts', '');
    $styles->add('twentyfourteen-lato', '');
    $styles->add('twentyfifteen-fonts', '');
    $styles->add('twentysixteen-fonts', '');
    if (is_admin()) {
        // Remove Google fonts injected into WP editor
        global $editor_styles;
        if (function_exists('twentyfifteen_fonts_url')) {
            unset($editor_styles[array_search(twentyfifteen_fonts_url(), $editor_styles)]);
        }
        if (function_exists('twentysixteen_fonts_url')) {
            unset($editor_styles[array_search(twentysixteen_fonts_url(), $editor_styles)]);
        }
    }
}
Example #4
0
/**
 * Enqueue scripts and styles.
 *
 * @since Twenty Fifteen 1.0
 */
function twentyfifteen_scripts()
{
    // Add custom fonts, used in the main stylesheet.
    wp_enqueue_style('twentyfifteen-fonts', twentyfifteen_fonts_url(), array(), null);
    // Add Genericons, used in the main stylesheet.
    wp_enqueue_style('genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.2');
    // Load our main stylesheet.
    wp_enqueue_style('twentyfifteen-style', get_stylesheet_uri());
    // Load the Internet Explorer specific stylesheet.
    wp_enqueue_style('twentyfifteen-ie', get_template_directory_uri() . '/css/ie.css', array('twentyfifteen-style'), '20141010');
    wp_style_add_data('twentyfifteen-ie', 'conditional', 'lt IE 9');
    // Load the Internet Explorer 7 specific stylesheet.
    wp_enqueue_style('twentyfifteen-ie7', get_template_directory_uri() . '/css/ie7.css', array('twentyfifteen-style'), '20141010');
    wp_style_add_data('twentyfifteen-ie7', 'conditional', 'lt IE 8');
    wp_enqueue_script('twentyfifteen-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20141010', true);
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    if (is_singular() && wp_attachment_is_image()) {
        wp_enqueue_script('twentyfifteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array('jquery'), '20141010');
    }
    wp_enqueue_script('twentyfifteen-script', get_template_directory_uri() . '/js/functions.js', array('jquery'), '20150330', true);
    wp_localize_script('twentyfifteen-script', 'screenReaderText', array('expand' => '<span class="screen-reader-text">' . __('expand child menu', 'twentyfifteen') . '</span>', 'collapse' => '<span class="screen-reader-text">' . __('collapse child menu', 'twentyfifteen') . '</span>'));
}
Example #5
0
/**
 * Enqueue scripts and styles.
 *
 * @since Twenty Fifteen 1.0
 */
function twentyfifteen_scripts()
{
    // Add custom fonts, used in the main stylesheet.
    wp_enqueue_style('twentyfifteen-fonts', twentyfifteen_fonts_url(), array(), null);
    // Add Genericons, used in the main stylesheet.
    wp_enqueue_style('genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.2');
    // Load our main stylesheet.
    wp_enqueue_style('twentyfifteen-style', get_stylesheet_uri());
    // Load the Internet Explorer specific stylesheet.
    wp_enqueue_style('twentyfifteen-ie', get_template_directory_uri() . '/css/ie.css', array('twentyfifteen-style'), '20141010');
    wp_style_add_data('twentyfifteen-ie', 'conditional', 'lt IE 9');
    // Load the Internet Explorer 7 specific stylesheet.
    wp_enqueue_style('twentyfifteen-ie7', get_template_directory_uri() . '/css/ie7.css', array('twentyfifteen-style'), '20141010');
    wp_style_add_data('twentyfifteen-ie7', 'conditional', 'lt IE 8');
    wp_enqueue_script('twentyfifteen-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20141010', true);
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    if (is_singular() && wp_attachment_is_image()) {
        wp_enqueue_script('twentyfifteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array('jquery'), '20141010');
    }
    wp_enqueue_script('twentyfifteen-script', get_template_directory_uri() . '/js/functions.js', array('jquery'), '20150330', true);
    //YANKO START THEME
    wp_enqueue_style('fonts-css', get_template_directory_uri() . '/css/font-awesome.min.css');
    wp_enqueue_style('animate-css', get_template_directory_uri() . '/css/animate.min.css');
    wp_enqueue_style('main-css', get_template_directory_uri() . '/css/main.css');
    // wp_enqueue_style( 'hover-buttons-css', get_template_directory_uri() . '/css/hover-buttons/hover-min.css');
    wp_enqueue_style('hover-buttons-css', get_template_directory_uri() . '/css/hover-buttons/hover.css');
    wp_enqueue_script('bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '5754745', true);
    wp_enqueue_script('jquery-min', get_template_directory_uri() . '/js/jquery-1.11.3.min.js', array('jquery'), '4657656', true);
    wp_enqueue_script('main', get_template_directory_uri() . '/js/main.js', array('jquery'), '4657658', true);
    wp_enqueue_script('modernizr', get_template_directory_uri() . '/js/modernizr.custom.js', array('jquery'), '5343634', true);
    wp_enqueue_script('viewportchecker', get_template_directory_uri() . '/js/viewportchecker.js', array('jquery'), '5754747', true);
    //YANKO END THEME
    wp_localize_script('twentyfifteen-script', 'screenReaderText', array('expand' => '<span class="screen-reader-text">' . __('expand child menu', 'twentyfifteen') . '</span>', 'collapse' => '<span class="screen-reader-text">' . __('collapse child menu', 'twentyfifteen') . '</span>'));
}
Example #6
0
 public function filters_after_setup_theme()
 {
     // add filter
     if (false !== $this->conf['patch_force_character_count']) {
         if ('characters_including_spaces' != _x('words', 'Word count type. Do not translate!')) {
             add_filter('gettext_with_context', array($this, 'force_character_count'), 10, 3);
         }
     }
     if (false !== $this->conf['patch_force_twentytwelve_open_sans_off'] && 'twentytwelve' == get_template()) {
         add_action('wp_enqueue_scripts', array($this, 'force_twentytwelve_open_sans_off'), 99);
         add_action('admin_print_styles-appearance_page_custom-header', array($this, 'force_twentytwelve_open_sans_off'), 99);
     }
     if (false !== $this->conf['patch_force_twentythirteen_google_fonts_off'] && 'twentythirteen' == get_template()) {
         add_action('wp_enqueue_scripts', array($this, 'force_twentythirteen_google_fonts_off'), 99);
         add_action('admin_print_styles-appearance_page_custom-header', array($this, 'force_twentythirteen_google_fonts_off'), 99);
     }
     if (false !== $this->conf['patch_force_twentyfourteen_google_fonts_off'] && 'twentyfourteen' == get_template()) {
         add_action('wp_enqueue_scripts', array($this, 'force_twentyfourteen_google_fonts_off'), 99);
         add_action('admin_print_scripts-appearance_page_custom-header', array($this, 'force_twentyfourteen_google_fonts_off'), 99);
     }
     if (false !== $this->conf['patch_force_twentyfifteen_google_fonts_off'] && 'twentyfifteen' == get_template()) {
         add_action('wp_enqueue_scripts', array($this, 'force_twentyfifteen_google_fonts_off'), 99);
         if (function_exists('twentyfifteen_fonts_url')) {
             $this->remove_editor_style(twentyfifteen_fonts_url());
         }
     }
     if (false !== $this->conf['patch_force_twentysixteen_google_fonts_off'] && 'twentysixteen' == get_template()) {
         add_action('wp_enqueue_scripts', array($this, 'force_twentysixteen_google_fonts_off'), 99);
         if (function_exists('twentysixteen_fonts_url')) {
             $this->remove_editor_style(twentysixteen_fonts_url());
         }
     }
 }
/**
 * Enqueue styles to admin screen for custom header display.
 *
 * @since Twenty Fifteen 1.0
 */
function twentyfifteen_admin_fonts()
{
    wp_enqueue_style('twentyfifteen-fonts', twentyfifteen_fonts_url(), array(), null);
    wp_enqueue_style('twentyfifteen-custom-header', get_template_directory_uri() . '/css/admin-custom-header.css', array(), '20141010');
}
/**
 * Enqueue scripts and styles.
 *
 * @since Twenty Fifteen 1.0
 */
function theme_scripts()
{
    // Add custom fonts, used in the main stylesheet.
    wp_enqueue_style('twentyfifteen-fonts', twentyfifteen_fonts_url(), array(), null);
    // Add Genericons, used in the main stylesheet.
    wp_enqueue_style('genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.2');
    // Load our main stylesheet.
    wp_enqueue_style('twentyfifteen-style', get_stylesheet_uri());
    // Load the Internet Explorer specific stylesheet.
    wp_enqueue_style('twentyfifteen-ie', get_template_directory_uri() . '/css/ie.css', array('twentyfifteen-style'), '20141010');
    wp_style_add_data('twentyfifteen-ie', 'conditional', 'lt IE 9');
    // Load the Internet Explorer 7 specific stylesheet.
    wp_enqueue_style('twentyfifteen-ie7', get_template_directory_uri() . '/css/ie7.css', array('twentyfifteen-style'), '20141010');
    wp_style_add_data('twentyfifteen-ie7', 'conditional', 'lt IE 8');
    wp_enqueue_script('twentyfifteen-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20141010', true);
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    if (is_singular() && wp_attachment_is_image()) {
        wp_enqueue_script('twentyfifteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array('jquery'), '20141010');
    }
    //	wp_enqueue_script( 'twentyfifteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20150330', true );
    //	wp_localize_script( 'twentyfifteen-script', 'screenReaderText', array(
    //		'expand'   => '<span class="screen-reader-text">' . __( 'expand child menu', 'twentyfifteen' ) . '</span>',
    //		'collapse' => '<span class="screen-reader-text">' . __( 'collapse child menu', 'twentyfifteen' ) . '</span>',
    //	) );
    wp_enqueue_script('jq-library', get_template_directory_uri() . '/js/jquery.min.js', array(), '1.11.0', true);
    wp_enqueue_script('ddscrollspy-js', get_template_directory_uri() . '/js/ddscrollspy.js', array('jquery'), '1.2.0', true);
    wp_enqueue_script('holdOn-js', get_template_directory_uri() . '/js/HoldOn.js', array('jquery'), '1', true);
    wp_enqueue_script('bootstrap-js', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '3.3.5', true);
    wp_enqueue_script('validator-js', get_template_directory_uri() . '/js/validator.js', array('jquery'), '0.9.0', true);
    wp_enqueue_script('theme-js', get_template_directory_uri() . '/js/suburbanburger.js', array('jquery'), '1.0', true);
    wp_localize_script('theme-js', 'template', array('url' => get_template_directory_uri(), 'ajaxurl' => admin_url('admin-ajax.php'), 'current_url' => currentPageURL()));
}
/**
 * Get the URL for the font that we selected in the customizer
 */
function example_swap_fonts()
{
    if (twentyfifteen_fonts_url() !== example_font_url()) {
        wp_enqueue_style('example-custom-fonts', example_font_url(), array(), null);
    }
}