Skip to content
Snippets Groups Projects
Commit bd316b16 authored by lucha's avatar lucha Committed by agata
Browse files

removed googleapis fonts from bliss theme

parent 9f7a9d8f
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@
<footer class="site-footer">
<div class="content">
<?php
wp_nav_menu(array(
'theme_location' => 'footer-nav',
......@@ -12,14 +12,14 @@
'container_id' => 'footerNav',
'container_class' => 'clearfix small'
));
?>
<?php
?>
<?php
// version 0.1.5 introduces widget areas for the footer.
if(is_active_sidebar('footer-widget') || is_active_sidebar('footer-widget-2') || is_active_sidebar('footer-widget-3')){
?>
<section class="thirds clear clearfix spacer small">
<?php
<?php
// footer widgets here.
if(is_active_sidebar('footer-widget')){
dynamic_sidebar('footer-widget');
......@@ -29,13 +29,13 @@
}
if(is_active_sidebar('footer-widget-3')){
dynamic_sidebar('footer-widget-3');
}
}
?>
</section>
<?php
<?php
}
?>
<?php
if(has_nav_menu('social-menu')){
......@@ -47,8 +47,8 @@
));
}
?>
?>
<p class="credit spacer small">
<?php
printf(
......@@ -56,17 +56,12 @@
date('Y'), esc_attr(get_bloginfo('name')), 'http://www.mardesco.com/themes/bliss/', 'http://www.wordpress.org' );
?>
</p>
</div>
</div>
<?php wp_footer(); ?>
</footer>
</div> <!--! end of #container -->
<!--[if lt IE 7 ]>
<script src="//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.2/CFInstall.min.js"></script>
<script>window.attachEvent("onload",function(){CFInstall.check({mode:"overlay"})})</script>
<![endif]-->
</body>
</html>
\ No newline at end of file
......@@ -12,18 +12,18 @@ if(__FILE__ == $_SERVER['SCRIPT_FILENAME']){
# Begin Options #
/*
theme options panel via the Options Framework
/*
theme options panel via the Options Framework
courtesy of Devin Price : http://wptheming.com/options-framework-theme/
*/
define( 'OPTIONS_FRAMEWORK_DIRECTORY', get_template_directory_uri() . '/options/' );
require_once dirname( __FILE__ ) . '/options/options-framework.php';
/*
*
*
* Show / hide the slideshow option when a checkbox is clicked.
*
*
*
*/
function bliss_toggle_slideshow_options() { ?>
......@@ -39,7 +39,7 @@ function bliss_toggle_slideshow_options() { ?>
if (jQuery('#bliss_slideshow1_showhidden:checked').val() !== undefined) {
jQuery('.bliss-slideshow-1').show();
}
// slideshow 2
jQuery('#bliss_slideshow2_showhidden').click(function() {
jQuery('.bliss-slideshow-2').fadeToggle(400);
......@@ -56,7 +56,7 @@ function bliss_toggle_slideshow_options() { ?>
if (jQuery('#bliss_slideshow3_showhidden:checked').val() !== undefined) {
jQuery('.bliss-slideshow-3').show();
}
}
});
</script>
......@@ -73,20 +73,20 @@ add_action( 'optionsframework_custom_scripts', 'bliss_toggle_slideshow_options'
function bliss_style_links(){
$modernizr_url = get_template_directory_uri() . "/js/modernizr-2.6.1.min.js";
wp_enqueue_script('modernizr', $modernizr_url, array(), '2.6.1', false);
// disallowed by theme review: get_template_directory_uri() . "/style.css";
// required: use get_stylesheet_uri()
// required: use get_stylesheet_uri()
$main_stylesheet = get_stylesheet_uri();
wp_enqueue_style( 'bliss_style', $main_stylesheet, false );
// as of version 0.1.1 the font url is now a relative protocol.
$font_url = '//fonts.googleapis.com/css?family=Merriweather:700italic';
wp_enqueue_style( 'Merriweather', $font_url, false);
$font_url = '';
//wp_enqueue_style( 'Merriweather', $font_url, false);
// version 0.1.4 adds icons by Font Awesome
$icon_url = get_template_directory_uri() . '/css/font-awesome.min.css';
wp_enqueue_style( 'font-awesome', $icon_url, false);
}
add_action( 'wp_enqueue_scripts', 'bliss_style_links', 2 );
......@@ -94,43 +94,43 @@ add_action( 'wp_enqueue_scripts', 'bliss_style_links', 2 );
/* default value for $content_width, required by ThemeCheck. */
// it turns out, intended use of $content_width global is NOT the same
// as intended use of: (int) of_get_option('bliss_max_width')
// if not overriden by a plugin, must be set equal to the rendered content area of the theme.
// required: define content_width global via after_setup_theme callback
function bliss_global_width(){
// Note: this variable will not accurately reflect the size of the display area on a mobile device screen.
global $content_width;
if ( ! isset( $content_width ) ){
// Default for $content_width is the width of the content area on a page with a single sidebar at the theme's default container width.
$content_width = 735;
// but that's not necessarily accurate for the current page, is it.
// The size of the content area will depend on the user settings.
// retrieving those settings requires an extra database call.
// TODO: set global vars for all user settings, to reduce the number of database lookups required.
$width = (int) esc_attr(of_get_option('bliss_max_width', '1024'));
$width = (int) esc_attr(of_get_option('bliss_max_width', '1024'));
if($width === 0){
// 100% width display.
// 100% width display.
// size of content area can only be determined by JavaScript.
// use the default setting from above, and do nothing here.
}else{
// determine if this page has sidebars in the first place
if(is_front_page() || is_page_template('page-full-width.php')){
/*
style.css line 1155 says:
#main{padding:2.9%;}
2.9 * 2 = 5.8%
100-5.8 = 94.2
*/
$content_width = $width * 0.942;
$content_width = $width * 0.942;
}else{
// check sidebar status.
$sidebars = bliss_get_sidebar_selection();
......@@ -138,26 +138,26 @@ add_action( 'wp_enqueue_scripts', 'bliss_style_links', 2 );
// "left" and "right" both get the same treatment.
case 'left':
case 'right':
/*
/*
see stylesheet (eg .hasRightNav #main on line 1210)
the use of a single sidebar reduces the width of the content area by 22.45%
5.8 + 22.45 = 28.25
100 - 28.25 = 71.75
*/
$content_width = $width * 0.7175;
break;
case 'both':
// 22.45 * 2 = 44.9
// 44.9 + 5.8 = 50.7
// 100 - 50.7 = 49.3
$content_width = $width * 0.493;
break;
case 'none':
// same as the full width layouts above
......@@ -170,14 +170,14 @@ add_action( 'wp_enqueue_scripts', 'bliss_style_links', 2 );
}
}
}
}
}
}
add_action('after_setup_theme', 'bliss_global_width');
function bliss_user_customizations(){
// user-specified width setting goes AFTER the theme's primary stylesheet.
$width = (int) esc_attr(of_get_option('bliss_max_width', '1024'));
if($width && is_int($width) && $width != 0){
......@@ -191,7 +191,7 @@ function bliss_user_customizations(){
width:90%%;
margin:35px 5%%;
}
}
}
</style>', $width, $breakpoint);
}else{
if(isset($width) && $width === 0){
......@@ -211,7 +211,7 @@ function bliss_user_customizations(){
}
}
$header_background = get_header_image();
// feature support for custom-header image.
if($header_background && $header_background != ''){
printf('
......@@ -220,11 +220,11 @@ function bliss_user_customizations(){
background:transparent url("%s") center center no-repeat;
background-size:cover;
}
</style>
', esc_url($header_background));
}
$header_text_color = get_header_textcolor();
if($header_text_color && $header_text_color != ''){
printf('
......@@ -244,9 +244,9 @@ function bliss_user_customizations(){
.site-header .contrast a{
color: #%s !important;
}
</style>
', esc_attr($header_text_color));
', esc_attr($header_text_color));
}
}
......@@ -270,7 +270,8 @@ function bliss_font_in_footer(){
/*
We put the Google Fonts font in the footer and call it late in the stack, to give it time to load before applying the typeface to the content.
*/
echo '
return;
echo '
<style type="text/css">
h1,h2,h3{font-family: "Merriweather", serif;font-style:italic;font-weight:700}
</style>
......@@ -285,7 +286,7 @@ add_action('wp_footer', 'bliss_font_in_footer', 100);
// per http://codex.wordpress.org/Theme_Development#Untrusted_Data
// define a custom function for cleaning titles, when they are output within an html attribute.
// BUT functions defined in the global scope must be prefixed with the unique theme name!
// BUT functions defined in the global scope must be prefixed with the unique theme name!
// Thanks to nitkr for pointing this out.
function bliss_clean_title_link(){
//http://codex.wordpress.org/Function_Reference/the_title_attribute
......@@ -294,13 +295,13 @@ function bliss_clean_title_link(){
// as per http://codex.wordpress.org/Function_Reference/wp_title#Covering_Homepage
function bliss_homepage_title($title){
if( empty( $title ) && ( is_home() || is_front_page() ) ) {
return esc_attr( get_bloginfo( 'name' ) . ' | ' . get_bloginfo( 'description' ) );
}
return $title;
}
add_filter( 'wp_title', 'bliss_homepage_title', 9);// call early, so it can be overridden by plugins
......@@ -311,7 +312,7 @@ function bliss_add_editor_styles() {
/* Editor styles, recommended by ThemeCheck. */
// http://codex.wordpress.org/Function_Reference/add_editor_style
add_editor_style( 'css/admin.css' );
/* theme support, as recommended by ThemeCheck: */
add_theme_support('post-thumbnails');
add_theme_support('custom-header');
......@@ -319,14 +320,14 @@ function bliss_add_editor_styles() {
add_theme_support('title-tag');// since WordPress 4.1
/* theme support, as REQUIRED by ThemeCheck */
add_theme_support('automatic-feed-links');
add_theme_support('automatic-feed-links');
// theme support for html5, introduced in bliss v.1.0.1
add_theme_support( 'html5', array( 'comment-list', 'comment-form', 'search-form', 'gallery', 'caption', 'widgets' ) );
// theme support for WooCommerce, as of Bliss version 1.0.6
add_theme_support('woocommerce');
}
add_action( 'after_setup_theme', 'bliss_add_editor_styles' );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment