Commit 647d6c3c authored by lechuck's avatar lechuck Committed by lucha
Browse files

Path template v 0.2.1.2

parent 5aa96c66
19.8.2013 - version 0.2.1
* Updated Hybrid Core to version 1.6.
* Menu + sign updated for sub menus. Not using image anymore.
* Chat post format updated.
* .pot file added.
* Finnish translations added.
* style.min.css added.
4.1.2013 - version 0.2
* Updated Hybrid Core to version 1.5.
* Remove global layout from theme settings. Note! This might mean that you have to set global layout again under Appearance >> Customize.
23.10.2012 - version 0.1.4
* Updated Hybrid Core to version 1.4.3.
......
<?php
/**
* Chat Content Template
*
* Template used for 'chat' post format.
*
* @package Path
* @subpackage Template
* @since 0.2.1
*/
do_atomic( 'before_entry' ); // path_before_entry ?>
<article id="post-<?php the_ID(); ?>" class="<?php hybrid_entry_class(); ?>">
<?php do_atomic( 'open_entry' ); // path_open_entry ?>
<?php if ( is_singular() ) { ?>
<header class="entry-header">
<?php echo apply_atomic_shortcode( 'entry_title', '[entry-title]' ); ?>
<?php echo apply_atomic_shortcode( 'byline', '<div class="byline">' . __( '[post-format-link] published on [entry-published] [entry-comments-link before=" | "] [entry-edit-link before=" | "]', 'path' ) . '</div>' ); ?>
</header><!-- .entry-header -->
<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', 'path' ), 'after' => '</p>' ) ); ?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php echo apply_atomic_shortcode( 'entry_meta', '<div class="entry-meta">' . __( '[entry-terms taxonomy="category" before="Posted in "] [entry-terms before="Tagged "]', 'path' ) . '</div>' ); ?>
</footer><!-- .entry-footer -->
<?php } else { ?>
<header class="entry-header">
<?php echo apply_atomic_shortcode( 'entry_title', '[entry-title]' ); ?>
</header><!-- .entry-header -->
<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', 'path' ), 'after' => '</p>' ) ); ?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php echo apply_atomic_shortcode( 'entry_meta', '<div class="entry-meta">' . __( '[post-format-link] published on [entry-published] [entry-permalink before="| "] [entry-comments-link before="| "] [entry-edit-link before="| "]', 'path' ) . '</div>' ); ?>
</footer><!-- .entry-footer -->
<?php } ?>
<?php do_atomic( 'close_entry' ); // path_close_entry ?>
</article><!-- .hentry -->
<?php do_atomic( 'after_entry' ); // path_after_entry ?>
\ No newline at end of file
......@@ -38,7 +38,7 @@ do_atomic( 'before_entry' ); // path_before_entry ?>
<?php if ( current_theme_supports( 'get-the-image' ) ) get_the_image( array( 'meta_key' => 'Thumbnail', 'size' => 'path-thumbnail' ) ); ?>
<header class="entry-header">
<h2 class="entry-title"><a href="<?php echo esc_url( path_url_grabber() ); ?>" title="<?php the_title_attribute(); ?>"><?php printf( '%s <span class="meta-nav">&rarr;</span>', the_title( '', '', false ) ); ?></a></h2>
<h2 class="entry-title"><a href="<?php echo esc_url( hybrid_get_the_post_format_url() ); ?>" title="<?php the_title_attribute(); ?>"><?php printf( '%s <span class="meta-nav">&rarr;</span>', the_title( '', '', false ) ); ?></a></h2>
</header><!-- .entry-header -->
<?php } else { ?>
......
......@@ -160,6 +160,7 @@ html[xmlns] .slides {
-webkit-transition: all .3s ease;
width: 40px;
height: 40px;
z-index: 120;
}
.flex-direction-nav .flex-next {
background-position: 0 -50px;
......
......@@ -30,10 +30,6 @@ function path_theme_setup() {
/* Get action/filter hook prefix. */
$prefix = hybrid_get_prefix();
/* Add theme settings. */
if ( is_admin() )
require_once( trailingslashit ( get_template_directory() ) . 'admin/functions-admin.php' );
/* Add theme support for core framework features. */
add_theme_support( 'hybrid-core-menus', array( 'primary', 'secondary', 'subsidiary' ) );
......@@ -41,7 +37,8 @@ function path_theme_setup() {
add_theme_support( 'hybrid-core-widgets' );
add_theme_support( 'hybrid-core-shortcodes' );
add_theme_support( 'hybrid-core-theme-settings', array( 'about', 'footer' ) );
add_theme_support( 'hybrid-core-drop-downs' );
add_theme_support( 'hybrid-core-scripts', array( 'drop-downs' ) );
add_theme_support( 'hybrid-core-styles', array( 'style' ) );
add_theme_support( 'hybrid-core-seo' );
add_theme_support( 'hybrid-core-template-hierarchy' );
......@@ -55,6 +52,7 @@ function path_theme_setup() {
add_theme_support( 'entry-views' );
add_theme_support( 'cleaner-gallery' );
add_theme_support( 'cleaner-caption' );
add_theme_support( 'hybrid-core-media-grabber' );
/* Add theme support for WordPress features. */
......@@ -65,7 +63,7 @@ function path_theme_setup() {
add_theme_support( 'automatic-feed-links' );
/* Add support for post formats. */
add_theme_support( 'post-formats', array( 'aside', 'audio', 'image', 'gallery', 'link', 'quote', 'status', 'video' ) );
add_theme_support( 'post-formats', array( 'aside', 'audio', 'chat', 'image', 'gallery', 'link', 'quote', 'status', 'video' ) );
/* Add custom background feature. */
add_theme_support( 'custom-background', array(
......@@ -140,12 +138,6 @@ function path_theme_setup() {
/* Add social media buttons after singular post entry. Facebook like, twitter tweet and google+. This uses Social Path Plugin. */
add_action( "{$prefix}_singular-post_after_singular", 'path_add_social_media' );
/* Set global layout. */
add_filter( 'get_theme_layout', 'path_theme_layout' );
/* Add Customize link to Appearance menu in admin. */
add_action ( 'admin_menu', 'path_admin_customize' );
/* Add layout option in Customize. */
add_action( 'customize_register', 'path_customize_register' );
......@@ -158,6 +150,9 @@ function path_theme_setup() {
/* Register additional widgets. */
add_action( 'widgets_init', 'path_register_widgets' );
/* Add menu-item-parent class to parent menu items. */
add_filter( 'wp_nav_menu_objects', 'path_add_menu_parent_class' );
}
/**
......@@ -304,6 +299,7 @@ function path_google_fonts() {
* format to easily find the link for the post.
*
* @since 0.1.0
* @deprecated since 0.2.1. Use hybrid_get_the_post_format_url() insted.
* @return string The link if found. Otherwise, the permalink to the post.
*
* @note This is a modified version of the twentyeleven_url_grabber() function in the TwentyEleven theme. And this modified version is from MyLife (themehybrid.com) theme.
......@@ -325,7 +321,7 @@ function path_url_grabber() {
*/
function path_default_footer_settings( $settings ) {
$settings['footer_insert'] = '<p class="copyright">' . __( 'Copyright &#169; [the-year] [site-link].', 'path' ) . '</p>' . "\n\n" . '<p class="credit">' . __( 'Powered by [wp-link] and [theme-link].', 'path' ) . __( ' <a class="top" href="#container">Back to Top</a>', 'path' ) . '</p>';
$settings['footer_insert'] = '<p class="copyright">' . _x( 'Copyright &#169; [the-year] [site-link].', 'Filter footer info', 'path' ) . '</p>' . "\n\n" . '<p class="credit">' . _x( 'Powered by [wp-link] and [theme-link].', 'Filter footer info', 'path' ) . __( ' <a class="top" href="#container">Back to Top</a>', 'path' ) . '</p>';
return $settings;
}
......@@ -521,36 +517,6 @@ function path_add_social_media() {
}
/**
* Filter global layout, which is defined under Appearance >> Theme Settings.
* @since 0.1.0
*/
function path_theme_layout( $layout ) {
/* Get global layout. */
$path_global_layout = hybrid_get_setting( 'path_global_layout' );
if ( !$path_global_layout )
return $layout;
if ( 'layout-default' == $layout )
$layout = $path_global_layout;
return $layout;
}
/**
* Add the Customize link to the admin menu.
* @link: http://ottopress.com/2012/theme-customizer-part-deux-getting-rid-of-options-pages/
* @since 0.1.0
*/
function path_admin_customize() {
add_theme_page( __( 'Customize', 'path' ), __( 'Customize', 'path' ), 'edit_theme_options', 'customize.php' );
}
/**
* Add layout option in theme Customize.
* @link: http://ottopress.com/2012/how-to-leverage-the-theme-customizer-in-your-own-themes/
......@@ -566,42 +532,6 @@ function path_customize_register( $wp_customize ) {
}
$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
// Layout section
$wp_customize->add_section( 'path_customize_layout', array(
'title' => __( 'Layout', 'path' ),
'priority' => 20,
) );
// Layout setting
$wp_customize->add_setting( 'path_theme_settings[path_global_layout]', array(
'type' => 'option',
'default' => 'layout-default',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_key',
'transport' => 'postMessage',
) );
/* Get theme layouts. */
$path_supported_layouts = get_theme_support( 'theme-layouts' );
$path_layouts = $path_supported_layouts[0]; // Array of all layouts without the 'layout-' prefix.
/* Add layout-default to $path_layout_choices. */
$path_layout_choices['layout-default'] = theme_layouts_get_string( 'default' );
/* Then add rest of what user had added in add_theme_support( 'theme-layouts' ). */
foreach ( $path_layouts as $path_layout ) {
$path_layout_choices["layout-{$path_layout}"] = theme_layouts_get_string( $path_layout );
}
// Layout control
$wp_customize->add_control( 'path_theme_settings[path_global_layout]', array(
'label' => __( 'Global Layout:', 'path' ),
'section' => 'path_customize_layout',
'settings' => 'path_theme_settings[path_global_layout]',
'type' => 'radio',
'choices' => $path_layout_choices,
) );
}
/**
......@@ -661,4 +591,31 @@ function path_register_widgets() {
}
/**
* Add menu-item-parent class to parent menu items. Thanks to Chip Bennett.
*
* @since 0.2.1
*/
function path_add_menu_parent_class( $items ) {
$parents = array();
foreach ( $items as $item ) {
if ( $item->menu_item_parent && $item->menu_item_parent > 0 )
$parents[] = $item->menu_item_parent;
}
foreach ( $items as $item ) {
if ( in_array( $item->ID, $parents ) )
$item->classes[] = 'menu-item-parent';
}
return $items;
}
?>
\ No newline at end of file
......@@ -21,9 +21,6 @@
<!-- Mobile viewport optimized -->
<meta name="viewport" content="width=device-width,initial-scale=1" />
<!-- My styles -->
<link rel="stylesheet" href="<?php echo get_stylesheet_uri(); ?>" type="text/css" media="all" />
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
......@@ -87,4 +84,4 @@
<?php do_atomic( 'open_main' ); // path_open_main ?>
<?php if ( current_theme_supports( 'breadcrumb-trail' ) ) breadcrumb_trail( array( 'container' => 'nav', 'before' => __( 'You are here:', 'path' ), 'separator' => __( '&#8764;', 'path' ) ) ); ?>
\ No newline at end of file
<?php if ( current_theme_supports( 'breadcrumb-trail' ) ) breadcrumb_trail( array( 'container' => 'nav', 'labels' => array( 'browse' => __( 'You are here:', 'path' ) ), 'separator' => __( '&#8764;', 'path' ) ) ); ?>
\ No newline at end of file
......@@ -194,7 +194,7 @@ class Path_Widget_Most_Viewed extends WP_Widget {
?>
<p>
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'path' ); ?></label>
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _ex( 'Title:', 'For most viewed widget', 'path' ); ?></label>
<input type="text" class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo $instance['title']; ?>" />
</p>
......
......@@ -9,11 +9,4 @@
$( '#site-description' ).html( to );
} );
} );
wp.customize( 'path_theme_settings[path_global_layout]', function( value ) {
value.bind( function( to ) {
var classes = $( 'body' ).attr( 'class' ).replace( /layout-[a-zA-Z0-9_-]*/g, '' ); // replace class with prefix layout- to ''
$( 'body' ).attr( 'class', classes ).addClass( to ); // add new class
} );
} );
} )( jQuery );
// Basic FitVids
jQuery(document).ready(function() {
jQuery('#content').fitVids();
// Basic FitVids
jQuery(document).ready(function() {
jQuery('#main').fitVids();
});
\ No newline at end of file
/*global jQuery */
/*!
/*jshint multistr:true browser:true */
/*!
* FitVids 1.0
*
* Copyright 2011, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
* Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
* Released under the WTFPL license - http://sam.zoy.org/wtfpl/
*
......@@ -11,67 +12,63 @@
(function( $ ){
"use strict";
$.fn.fitVids = function( options ) {
var settings = {
customSelector: null
};
if(!document.getElementById('fit-vids-style')) {
var div = document.createElement('div'),
ref = document.getElementsByTagName('base')[0] || document.getElementsByTagName('script')[0],
cssStyles = '&shy;<style>.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}</style>';
div.className = 'fit-vids-style';
div.id = 'fit-vids-style';
div.style.display = 'none';
div.innerHTML = cssStyles;
ref.parentNode.insertBefore(div,ref);
}
var div = document.createElement('div'),
ref = document.getElementsByTagName('base')[0] || document.getElementsByTagName('script')[0];
div.className = 'fit-vids-style';
div.innerHTML = '&shy;<style> \
.fluid-width-video-wrapper { \
width: 100%; \
position: relative; \
padding: 0; \
} \
\
.fluid-width-video-wrapper iframe, \
.fluid-width-video-wrapper object, \
.fluid-width-video-wrapper embed { \
position: absolute; \
top: 0; \
left: 0; \
width: 100%; \
height: 100%; \
} \
</style>';
ref.parentNode.insertBefore(div,ref);
if ( options ) {
if ( options ) {
$.extend( settings, options );
}
return this.each(function(){
var selectors = [
"iframe[src*='player.vimeo.com']",
"iframe[src*='www.youtube.com']",
"iframe[src*='www.kickstarter.com']",
"object",
"iframe[src*='player.vimeo.com']",
"iframe[src*='youtube.com']",
"iframe[src*='youtube-nocookie.com']",
"iframe[src*='kickstarter.com'][src*='video.html']",
"object",
"embed"
];
if (settings.customSelector) {
selectors.push(settings.customSelector);
}
var $allVideos = $(this).find(selectors.join(','));
$allVideos = $allVideos.not("object object"); // SwfObj conflict patch
$allVideos.each(function(){
var $this = $(this);
if (this.tagName.toLowerCase() == 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; }
var height = this.tagName.toLowerCase() == 'object' ? $this.attr('height') : $this.height(),
aspectRatio = height / $this.width();
if(!$this.attr('id')){
var videoID = 'fitvid' + Math.floor(Math.random()*999999);
$this.attr('id', videoID);
}
if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; }
var height = ( this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10))) ) ? parseInt($this.attr('height'), 10) : $this.height(),
width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(),
aspectRatio = height / width;
if(!$this.attr('id')){
var videoID = 'fitvid' + Math.floor(Math.random()*999999);
$this.attr('id', videoID);
}
$this.wrap('<div class="fluid-width-video-wrapper"></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+"%");
$this.removeAttr('height').removeAttr('width');
});
});
}
})( jQuery );
\ No newline at end of file
};
// Works with either jQuery or Zepto
})( window.jQuery || window.Zepto );
\ No newline at end of file
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Path\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-11-10 20:47+0200\n"
"PO-Revision-Date: 2012-11-10 20:47+0200\n"
"POT-Creation-Date: 2013-01-04 14:13+0200\n"
"PO-Revision-Date: 2013-01-04 14:13+0200\n"
"Last-Translator: Sami Keijonen <sami.keijonen@foxnet.fi>\n"
"Language-Team: Foxnet <sami.keijonen@foxnet.fi>\n"
"Language: en\n"
......@@ -158,73 +158,61 @@ msgid ""
"before=\"| Tagged \"]"
msgstr ""
#: functions.php:328
#: functions.php:322
msgid "Copyright &#169; [the-year] [site-link]."
msgstr ""
#: functions.php:328
#: functions.php:322
msgid "Powered by [wp-link] and [theme-link]."
msgstr ""
#: functions.php:328
#: functions.php:322
msgid " <a class=\"top\" href=\"#container\">Back to Top</a>"
msgstr ""
#: functions.php:339
#: functions.php:333
msgid "Please comment with your real name using good manners."
msgstr ""
#: functions.php:350
#: functions.php:344
msgid "Read more &rarr;"
msgstr ""
#: functions.php:386
#: functions.php:380
msgid "Twitter Username"
msgstr ""
#: functions.php:405
#: functions.php:399
msgid "Author of the article"
msgstr ""
#: functions.php:405
#: functions.php:399
msgid "Authors of the article"
msgstr ""
#: functions.php:422 functions.php:443 functions.php:463
#: functions.php:416 functions.php:437 functions.php:457
#, php-format
msgid "Follow %1$s %2$s &#64;%3$s on Twitter."
msgstr ""
#: functions.php:453
#: functions.php:447
msgid "Article written by [entry-author]"
msgstr ""
#: functions.php:483 functions.php:502
#: functions.php:477 functions.php:496
msgid "and"
msgstr ""
#: functions.php:484
#: functions.php:478
msgid ""
" [entry-published] [entry-comments-link before=\" | \"] [entry-edit-link "
"before=\" | \"]"
msgstr ""
#: functions.php:503
#: functions.php:497
msgid " [entry-published]"
msgstr ""
#: functions.php:550
msgid "Customize"
msgstr ""
#: functions.php:571 admin/functions-admin.php:56
msgid "Layout"
msgstr ""
#: functions.php:598 admin/functions-admin.php:118
msgid "Global Layout:"
msgstr ""
#: header.php:90
msgid "You are here:"
msgstr ""
......@@ -342,6 +330,10 @@ msgstr ""
msgid "Background"
msgstr ""
#: admin/functions-admin.php:56
msgid "Layout"
msgstr ""
#: admin/functions-admin.php:74
msgid "Custom logo:"
msgstr ""
......@@ -364,12 +356,15 @@ msgid ""
"Appearance &gt;&gt; Background</a>. "
msgstr ""
#: admin/functions-admin.php:128
#: admin/functions-admin.php:118
msgid "Customize:"
msgstr ""
#: admin/functions-admin.php:121
#, php-format
msgid ""
"Set the layout for the entire site. The default layout is 2 columns with "
"content on the left. You can overwrite this value in individual post or "
"page. Note! Three column layouts will only work if you use Primary and "
"Secondary Widget areas and browser window is wide enough."
"Want to set Global layout and set other features? <a href=\"%s\">Go to "
"Appearance &gt;&gt; Customize</a>. "
msgstr ""
#: includes/widget-most-viewed.php:32
......
This diff is collapsed.
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Path PL\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-11-10 20:50+0200\n"
"PO-Revision-Date: 2012-11-10 20:50+0200\n"
"POT-Creation-Date: 2013-01-04 14:13+0200\n"
"PO-Revision-Date: 2013-01-04 14:13+0200\n"
"Last-Translator: Sami Keijonen <sami.keijonen@foxnet.fi>\n"
"Language-Team: Persoft.pl <powrozek@persoft.pl>\n"
"Language: en\n"
......@@ -180,52 +180,52 @@ msgstr ""
"[entry-terms taxonomy=\"category\" before=\"Kategorie: \"] [entry-terms "
"before=\"| Tagi: \"]"
#: functions.php:328
#: functions.php:322
msgid "Copyright &#169; [the-year] [site-link]."
msgstr "Copyright &#169; [the-year] [site-link]."
#: functions.php:328
#: functions.php:322
msgid "Powered by [wp-link] and [theme-link]."