Skip to content

Commit

Permalink
Covering single news article prev/next pages as of #3
Browse files Browse the repository at this point in the history
  • Loading branch information
acrylian committed Jan 30, 2015
1 parent eb22e75 commit 35bd23f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Based on the jQuery plugin touchSwipe http://labs.rampinteractive.co.uk/touchSwi

The plugin triggers on the `<html>` main element so you can swipe on the whole page.

Please not that this plugin only triggers the loading the pages. It does not and cannot provide any swipe animation. This would be theme domain.

Usage
------

Expand Down
21 changes: 15 additions & 6 deletions swipe_gestures.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,21 @@ static function swipejs() {
break;
case 'news.php':
if(getOption('swipe_gestures_news') && getOption('zp_plugin_zenpage')) {
if(getPrevNewsPageURL()) {
$prevurl = getPrevNewsPageURL();
}
if(getNextNewsPageURL()) {
$nexturl = getNextNewsPageURL();
}
if(is_NewsArticle()) {
if(getPrevNewsURL()) {
$prevurl = getPrevNewsURL();
}
if(getNextNewsURL()) {
$nexturl = getNextNewsURL();
}
} else {
if(getPrevNewsPageURL()) {
$prevurl = getPrevNewsPageURL();
}
if(getNextNewsPageURL()) {
$nexturl = getNextNewsPageURL();
}
{
}
break;
}
Expand Down

0 comments on commit 35bd23f

Please sign in to comment.