Commit a4593bc6 authored by shammash's avatar shammash Committed by lechuck
Browse files

updated wptouch to 1.9.34

parent 0585f861
This diff is collapsed.
......@@ -7,14 +7,14 @@ function wptouch_core_header_enqueue() {
$version = get_bloginfo('version');
if (!bnc_wptouch_is_exclusive()) {
wp_enqueue_script('jquery-form');
wp_enqueue_script('wptouch-core', '' . compat_get_plugin_url( 'wptouch' ) . '/themes/core/core.min.js', array('jquery'), '1.9.22.1' );
wp_enqueue_script('wptouch-core', '' . compat_get_plugin_url( 'wptouch' ) . '/themes/core/core.js', array('jquery'), '1.9.22.1' );
wp_head();
} elseif (bnc_wptouch_is_exclusive()) {
echo "<script src='" . get_bloginfo('wpurl') . "/wp-includes/js/jquery/jquery.js?ver=1.9.22.1' type='text/javascript' charset='utf-8'></script>\n";
echo "<script src='" . get_bloginfo('wpurl') . "/wp-includes/js/jquery/jquery.form.js?ver=1.9.22.1' type='text/javascript' charset='utf-8'></script>\n";
echo "<script src='" . compat_get_plugin_url( 'wptouch' ) . "/themes/core/core.min.js?ver=1.9.22.1' type='text/javascript' charset='utf-8'></script>\n";
}
} elseif ( bnc_wptouch_is_exclusive() ) {
echo "<script src='" . get_bloginfo('wpurl') . "/wp-includes/js/jquery/jquery.js?wptouch' type='text/javascript' charset='utf-8'></script>\n";
echo "<script src='" . get_bloginfo('wpurl') . "/wp-includes/js/jquery/jquery.form.js?wptouch' type='text/javascript' charset='utf-8'></script>\n";
echo "<script src='" . compat_get_plugin_url( 'wptouch' ) . "/themes/core/core.js?wptouch' type='text/javascript' charset='utf-8'></script>\n";
}
}
function wptouch_core_header_home() {
......@@ -92,22 +92,52 @@ function wptouch_tags_link() {
function wptouch_cats_link() {
echo '<a href="#head-cats">' . __( "Categories", "wptouch" ) . '</a>';
}
function bnc_get_ordered_cat_list( $num ) {
global $wpdb;
function bnc_get_ordered_cat_list() {
// We created our own function for this as wp_list_categories doesn't make the count linkable
if ( wptouch_excluded_cats() ) {
$excluded_cats = wptouch_excluded_cats();
} else {
$excluded_cats = 0;
}
echo '<ul>';
$sql = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}term_taxonomy INNER JOIN {$wpdb->prefix}terms ON {$wpdb->prefix}term_taxonomy.term_id = {$wpdb->prefix}terms.term_id WHERE taxonomy = 'category' AND {$wpdb->prefix}term_taxonomy.term_id NOT IN ($excluded_cats) AND count >= 1 ORDER BY count DESC LIMIT 0, $num");
if ( $sql ) {
foreach ( $sql as $result ) {
if ( $result ) {
echo "<li><a href=\"" . get_category_link( $result->term_id ) . "\">" . $result->name . " <span>(" . $result->count . ")</span></a></li>";
}
}
}
echo '</ul>';
}
global $table_prefix;
function wptouch_ordered_tag_list( $num ) {
global $wpdb;
$sql = "select * from " . $table_prefix . "term_taxonomy inner join " . $table_prefix . "terms on " . $table_prefix . "term_taxonomy.term_id = " . $table_prefix . "terms.term_id where taxonomy = 'category' and count > 0 order by count desc";
$results = $wpdb->get_results( $sql );
foreach ($results as $result) {
echo "<li><a href=\"" . get_category_link( $result->term_id ) . "\">" . $result->name . " (" . $result->count . ")</a></li>";
if ( wptouch_excluded_tags() ) {
$excluded_tags = wptouch_excluded_tags();
} else {
$excluded_tags = 0;
}
echo '<ul>';
$sql = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}term_taxonomy INNER JOIN {$wpdb->prefix}terms ON {$wpdb->prefix}term_taxonomy.term_id = {$wpdb->prefix}terms.term_id WHERE taxonomy = 'post_tag' AND {$wpdb->prefix}term_taxonomy.term_id NOT IN ($excluded_tags) AND count >= 1 ORDER BY count DESC LIMIT 0, $num");
if ( $sql ) {
foreach ( $sql as $result ) {
if ( $result ) {
echo "<li><a href=\"" . get_tag_link( $result->term_id ) . "\">" . $result->name . " <span>(" . $result->count . ")</span></a></li>";
}
}
}
echo '</ul>';
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// WPtouch Core Body Functions
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
......@@ -161,7 +191,7 @@ function wptouch_core_else_text() {
}
function wptouch_core_footer_switch_link() {
echo '<script type="text/javascript">function switch_delayer() { window.location = "' . get_bloginfo( 'url' ) . '/?wptouch_view=normal&wptouch_redirect=' . $_SERVER['REQUEST_URI'] .'"}</script>';
echo '<script type="text/javascript">function switch_delayer() { window.location = "' . get_bloginfo( 'url' ) . '/?wptouch_view=normal&wptouch_redirect_nonce=' . wp_create_nonce( 'wptouch_redirect' ) . '&wptouch_redirect=' . $_SERVER['REQUEST_URI'] .'"}</script>';
echo '' . __( "Mobile Theme", "wptouch" ) . ' <a id="switch-link" onclick="wptouch_switch_confirmation();" href="javascript:return false;"></a>';
}
......@@ -229,6 +259,12 @@ function wptouch_idevice_classes() {
}
}
// Remove the admin bar when logged in and looking at WPtouch
if ( bnc_wptouch_is_mobile() && function_exists( 'show_admin_bar' ) ) {
add_filter( 'show_admin_bar', '__return_false' );
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// WPtouch Filters
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
......@@ -247,4 +283,4 @@ remove_filter('the_content', 'Add_Like_Button');
//Sharebar Plugin
remove_filter('the_content', 'sharebar_auto');
remove_action('wp_head', 'sharebar_header');
\ No newline at end of file
remove_action('wp_head', 'sharebar_header');
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head profile="http://gmpg.org/xfn/11">
<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<?php if ( bnc_is_zoom_enabled() ) { ?>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=2.0, user-scalable=yes" />
<?php } else { ?>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<?php } ?>
<title><?php wp_title('&laquo;', true, 'right'); ?> <?php $str = bnc_get_header_title(); echo stripslashes($str); ?></title>
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
<link <?php if (bnc_is_flat_icon_enabled()) { echo 'rel="apple-touch-icon-precomposed"'; } else { echo 'rel="apple-touch-icon"';} ?> href="<?php echo bnc_get_title_image(); ?>" />
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/style.min.css?ver=1.9.22.1" type="text/css" media="screen" />
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/style.css?ver=1.9.22.1" type="text/css" media="screen" />
<?php if (bnc_is_gigpress_enabled() && function_exists( 'gigpress_shows' )) { ?>
<link rel="stylesheet" href="<?php echo compat_get_plugin_url( 'wptouch' ); ?>/themes/core/core-css/gigpress.css" type="text/css" media="screen" />
<?php } ?>
<?php wptouch_core_header_styles(); wptouch_core_header_enqueue(); ?>
<?php if (!is_single()) { ?>
<script type="text/javascript">
function hideURLbar() {
window.scrollTo(0,1);
}
addEventListener("load", function() {
setTimeout(hideURLbar, 0);
}, false);
// Hides the addressbar on non-post pages
function hideURLbar() { window.scrollTo(0,1); }
addEventListener('load', function() { setTimeout(hideURLbar, 0); }, false );
</script>
<?php } ?>
</head>
\ No newline at end of file
$wptouch=jQuery.noConflict();if((navigator.platform=="iPhone"||navigator.platform=="iPod")&&typeof orientation!="undefined"){var touchStartOrClick="touchstart"}else{var touchStartOrClick="click"}if(top.location!=self.location){top.location=self.location.href}$wptouch.fn.wptouchFadeToggle=function(a,c,b){return this.animate({opacity:"toggle"},a,c,b)};function wptouch_switch_confirmation(a){if(document.cookie&&document.cookie.indexOf("wptouch_switch_toggle")>-1){$wptouch("a#switch-link").toggleClass("offimg");setTimeout("switch_delayer()",1250)}else{if(confirm("Switch to regular view? \n \n You can switch back again in the footer.")){$wptouch("a#switch-link").toggleClass("offimg");setTimeout("switch_delayer()",1350)}else{a.preventDefault();a.stopImmediatePropagation()}}}if($wptouch("#prowl-success").length){setTimeout(function(){$wptouch("#prowl-success").fadeOut(350)},5250)}if($wptouch("#prowl-fail").length){setTimeout(function(){$wptouch("#prowl-fail").fadeOut(350)},5250)}$wptouch(function(){var a=$wptouch("#menu-head > ul");$wptouch("#tabnav a").bind(touchStartOrClick,function(){a.hide().filter(this.hash).show();$wptouch("#tabnav a").removeClass("selected");$wptouch(this).addClass("selected");return false}).filter(":first").trigger(touchStartOrClick)});function bnc_showhide_coms_toggle(){$wptouch("#commentlist").wptouchFadeToggle(350);$wptouch("img#com-arrow").toggleClass("com-arrow-down");$wptouch("h3#com-head").toggleClass("comhead-open")}function doWPtouchReady(){$wptouch.timerId=setInterval(function(){var b=$wptouch.timers;for(var a=0;a<b.length;a++){if(!b[a]()){b.splice(a--,1)}}if(!b.length){clearInterval($wptouch.timerId);$wptouch.timerId=null}},83);$wptouch("#headerbar-menu a").bind(touchStartOrClick,function(a){$wptouch("#wptouch-menu").wptouchFadeToggle(350);$wptouch("#headerbar-menu a").toggleClass("open")});$wptouch("a#searchopen, #wptouch-search-inner a").bind(touchStartOrClick,function(a){$wptouch("#wptouch-search").wptouchFadeToggle(350)});$wptouch("a#prowlopen").bind(touchStartOrClick,function(a){$wptouch("#prowl-message").wptouchFadeToggle(350)});$wptouch("a#wordtwitopen").bind(touchStartOrClick,function(a){$wptouch("#wptouch-wordtwit").wptouchFadeToggle(350)});$wptouch("a#gigpressopen").bind(touchStartOrClick,function(a){$wptouch("#wptouch-gigpress").wptouchFadeToggle(350)});$wptouch("a#loginopen, #wptouch-login-inner a").bind(touchStartOrClick,function(a){$wptouch("#wptouch-login").wptouchFadeToggle(350)});$wptouch("a#obook").bind(touchStartOrClick,function(){$wptouch("#bookmark-box").wptouchFadeToggle(350)});$wptouch(".singlentry img, .singlentry .wp-caption").each(function(){if($wptouch(this).width()<=250){$wptouch(this).addClass("aligncenter")}});if($wptouch("#FollowMeTabLeftSm").length){$wptouch("#FollowMeTabLeftSm").remove()}}$wptouch(document).ready(function(){doWPtouchReady()});
\ No newline at end of file
var $wpt=jQuery.noConflict();if((navigator.platform=="iPhone"||navigator.platform=="iPod")&&typeof orientation!="undefined"){var touchStartOrClick="touchstart"}else{var touchStartOrClick="click"}if(top.location!=self.location){top.location=self.location.href}$wpt.fn.wptouchFadeToggle=function(a,c,b){return this.animate({opacity:"toggle"},a,c,b)};function wptouch_switch_confirmation(a){if(document.cookie&&document.cookie.indexOf("wptouch_switch_toggle")>-1){$wpt("a#switch-link").toggleClass("offimg");setTimeout("switch_delayer()",1250)}else{if(confirm("Switch to regular view? \n \n You can switch back again in the footer.")){$wpt("a#switch-link").toggleClass("offimg");setTimeout("switch_delayer()",1350)}else{a.preventDefault();a.stopImmediatePropagation()}}}if($wpt("#prowl-success").length){setTimeout(function(){$wpt("#prowl-success").fadeOut(350)},5250)}if($wpt("#prowl-fail").length){setTimeout(function(){$wpt("#prowl-fail").fadeOut(350)},5250)}$wpt(function(){var a=$wpt("#menu-head > ul");$wpt("#tabnav a").bind(touchStartOrClick,function(){a.hide().filter(this.hash).show();$wpt("#tabnav a").removeClass("selected");$wpt(this).addClass("selected");return false}).filter(":first").trigger(touchStartOrClick)});function bnc_showhide_coms_toggle(){$wpt("#commentlist").wptouchFadeToggle(350);$wpt("img#com-arrow").toggleClass("com-arrow-down");$wpt("h3#com-head").toggleClass("comhead-open")}function doWPtouchReady(){$wpt.timerId=setInterval(function(){var b=$wpt.timers;for(var a=0;a<b.length;a++){if(!b[a]()){b.splice(a--,1)}}if(!b.length){clearInterval($wpt.timerId);$wpt.timerId=null}},83);$wpt("#headerbar-menu a").bind(touchStartOrClick,function(a){$wpt("#wptouch-menu").wptouchFadeToggle(350);$wpt("#headerbar-menu a").toggleClass("open")});$wpt("a#searchopen, #wptouch-search-inner a").bind(touchStartOrClick,function(a){$wpt("#wptouch-search").wptouchFadeToggle(350)});$wpt("a#prowlopen").bind(touchStartOrClick,function(a){$wpt("#prowl-message").wptouchFadeToggle(350)});$wpt("a#wordtwitopen").bind(touchStartOrClick,function(a){$wpt("#wptouch-wordtwit").wptouchFadeToggle(350)});$wpt("a#gigpressopen").bind(touchStartOrClick,function(a){$wpt("#wptouch-gigpress").wptouchFadeToggle(350)});$wpt("a#loginopen, #wptouch-login-inner a").bind(touchStartOrClick,function(a){$wpt("#wptouch-login").wptouchFadeToggle(350)});$wpt("a#obook").bind(touchStartOrClick,function(){$wpt("#bookmark-box").wptouchFadeToggle(350)});$wpt(".singlentry img, .singlentry .wp-caption").each(function(){if($wpt(this).width()<=250){$wpt(this).addClass("aligncenter")}});if($wpt("#FollowMeTabLeftSm").length){$wpt("#FollowMeTabLeftSm").remove()}}$wpt(document).ready(function(){doWPtouchReady()});
\ No newline at end of file
......@@ -36,8 +36,8 @@
<?php if (is_single()) { ?>
<span><?php wptouch_moderate_comment_link(get_comment_ID()); ?></span>
<?php } ?>
<?php if (function_exists('time_since')) {
echo time_since(abs(strtotime($comment->comment_date_gmt . " GMT")), time()) . " " . __( 'ago', 'wptouch' ); } else { the_time('F jS, Y');
<?php if (function_exists('wptouch_time_since')) {
echo wptouch_time_since(abs(strtotime($comment->comment_date_gmt . " GMT")), time()) . " " . __( 'ago', 'wptouch' ); } else { the_time('F jS, Y');
} ?>
</div>
......
......@@ -71,13 +71,13 @@ include( dirname(__FILE__) . '/../core/core-header.php' );
<?php if (bnc_is_cats_button_enabled()) { ?>
<ul id="head-cats">
<?php bnc_get_ordered_cat_list(); ?>
<?php bnc_get_ordered_cat_list( 35 ); ?>
</ul>
<?php } ?>
<?php if (bnc_is_tags_button_enabled()) { ?>
<ul id="head-tags">
<li><?php wp_tag_cloud('smallest=13&largest=13&unit=px&number=20&order=asc&format=list'); ?></li>
<li><?php wptouch_ordered_tag_list( 35 ); ?></li>
</ul>
<?php } ?>
......@@ -210,4 +210,4 @@ include( dirname(__FILE__) . '/../core/core-header.php' );
<?php } ?>
</div>
<?php
wptouch_core_header_check_use();
\ No newline at end of file
wptouch_core_header_check_use();
......@@ -73,18 +73,18 @@ bloginfo('name'); ?>- <?php the_title_attribute();?>&body=<?php _e( "Check out t
jQuery(document).ready( function() {
// Ajaxify '#commentform'
var formoptions = {
beforeSubmit: function() {$wptouch("#loading").fadeIn(400);},
beforeSubmit: function() {$wpt("#loading").fadeIn(400);},
success: function() {
$wptouch("#commentform").hide();
$wptouch("#loading").fadeOut(400);
$wptouch("#refresher").fadeIn(400);
$wpt("#commentform").hide();
$wpt("#loading").fadeOut(400);
$wpt("#refresher").fadeIn(400);
}, // end success
error: function() {
$wptouch('#errors').show();
$wptouch("#loading").fadeOut(400);
$wpt('#errors').show();
$wpt("#loading").fadeOut(400);
} //end error
} //end options
$wptouch('#commentform').ajaxForm(formoptions);
$wpt('#commentform').ajaxForm(formoptions);
}); //End onReady
</script>
<?php endif; ?>
......
......@@ -155,7 +155,7 @@ blockquote {
margin-right: auto;
}
.post object, .post embed, .post video, .post iframe {
.post object, .post embed, .post video {
width: 100% !important;
height: auto;
max-height: 280px;
......
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment