Exemplo n.º 1
0
function puzzle_scripts()
{
    /* Google fonts */
    wp_enqueue_style('puzzle-google-fonts', '//fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i');
    /* Main styles */
    $puzzle_style_location = '/assets/css/main.css';
    wp_enqueue_style('puzzle-style', get_template_directory_uri() . $puzzle_style_location, array(), filemtime(get_stylesheet_directory() . $puzzle_style_location));
    /* Custom styles generated from user options */
    $puzzle_custom_style_location = '/assets/css/custom.css';
    puzzle_check_if_custom_style_exists();
    wp_enqueue_style('puzzle-custom-style', get_template_directory_uri() . $puzzle_custom_style_location, array(), filemtime(get_stylesheet_directory() . $puzzle_custom_style_location));
    /* Main script */
    $puzzle_script_location = '/assets/js/main.js';
    wp_enqueue_script('puzzle-script', get_template_directory_uri() . $puzzle_script_location, array('jquery'), filemtime(get_stylesheet_directory() . $puzzle_script_location));
}
Exemplo n.º 2
0
<?php

/*
 * Puzzle
 * Custom Editor Style
 */
/*
 * Add editor stylesheets so the content looks more like it will on the frontend
 * Commas must be HTML encoded as %2C
 */
puzzle_check_if_custom_style_exists();
add_editor_style(array('//fonts.googleapis.com/css?family=Open+Sans:300%2C300i%2C400%2C400i%2C600%2C600i%2C700%2C700i', 'assets/css/editor-style.css', 'assets/css/custom.css'));