Skip to content

Commit 7f68b25

Browse files
committed
Merge pull request #9 from seb86/dev
= 1.3.2 : 20th May 2015 =
2 parents afae789 + abc8103 commit 7f68b25

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2470
-143
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform EOL normalization
2+
* text=auto

.gitignore

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Windows image file caches
2+
Thumbs.db
3+
ehthumbs.db
4+
5+
# Folder config file
6+
Desktop.ini
7+
8+
# Recycle Bin used on file shares
9+
$RECYCLE.BIN/
10+
11+
# Mac crap
12+
.DS_Store
13+
14+
# Sublime
15+
*.sublime-project
16+
*.sublime-workspace
17+
18+
# PhpStorm
19+
.idea/
20+
21+
# Bin
22+
bin/
23+
24+
# Screenshots
25+
screenshots/
26+
27+
# Wiki
28+
wiki/
29+
30+
# Grunt
31+
node_modules/
32+
build/
33+
npm-debug.log
34+
35+
# Transifex
36+
tx.exe

.tx/config

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[main]
2+
host = https://www.transifex.com
3+
4+
[auto-load-next-post.auto-load-next-post]
5+
file_filter = auto-load-next-post/languages/auto-load-next-post-<lang>.po
6+
source_file = auto-load-next-post/languages/auto-load-next-post.pot
7+
source_lang = en_US
8+
type = PO

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
## 1.3.2 (20th May 2015)
2+
* Added more theme support with compatible theme template file which can be overrided.
3+
* Added option to enable auto loading posts for specific post types.
4+
* Added option for comments. Now you can choose to show or hide rather than forcing it to hide automatically.
5+
* Added Chosen (v1.4.2) Javascript by [Harvest](http://harvesthq.github.io/chosen/)
6+
* Added console.logs in the Javascript for debugging.
7+
* Corrected text domain name in plugin header.
8+
* Corrected access to function load_file() from private to public
9+
* Corrected access to function register_scripts_and_styles() from private to public
10+
* Corrected error with uninstall.php file
11+
* Moved function register_scripts_and_styles() to class-auto-load-next-post-admin.php
12+
* Filtered the Javascript to load only on singular posts and the enabled post types.
13+
* Removed security issue in the main plugin file by accessing $GLOBALS directly.
14+
* Removed all closing PHP tags omitting at the end of each file.
15+
116
## 1.0.0 (4th April 2015)
217

318
* Initial Release

Gruntfile.js

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
module.exports = function(grunt) {
2+
3+
// Load multiple grunt tasks using globbing patterns
4+
require('load-grunt-tasks')(grunt);
5+
6+
// Project configuration.
7+
grunt.initConfig({
8+
pkg: grunt.file.readJSON('package.json'),
9+
10+
makepot: {
11+
target: {
12+
options: {
13+
domainPath: 'languages/', // Where to save the POT file.
14+
exclude: ['build/.*'],
15+
mainFile: 'auto-load-next-post.php', // Main project file.
16+
potComments: 'Auto Load Next Post Copyright (c) {{year}}', // The copyright at the beginning of the POT file.
17+
potFilename: 'auto-load-next-post.pot', // Name of the POT file.
18+
type: 'wp-plugin', // Type of project.
19+
updateTimestamp: true, // Whether the POT-Creation-Date should be updated without other changes.
20+
processPot: function( pot, options ) {
21+
pot.headers['report-msgid-bugs-to'] = 'https://github.com/seb86/Auto-Load-Next-Post/issues\n';
22+
pot.headers['plural-forms'] = 'nplurals=2; plural=n != 1;\n';
23+
pot.headers['last-translator'] = 'Auto Load Next Post <mailme@sebastiendumont.com>\n';
24+
pot.headers['language-team'] = 'WP-Translations <wpt@wp-translations.org>\n';
25+
pot.headers['x-poedit-basepath'] = '..\n';
26+
pot.headers['x-poedit-language'] = 'English\n';
27+
pot.headers['x-poedit-country'] = 'UNITED STATES\n';
28+
pot.headers['x-poedit-sourcecharset'] = 'utf-8\n';
29+
pot.headers['x-poedit-searchpath-0'] = '.\n';
30+
pot.headers['x-poedit-keywordslist'] = '__;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c;_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n';
31+
pot.headers['x-textdomain-support'] = 'yes\n';
32+
return pot;
33+
}
34+
}
35+
}
36+
},
37+
38+
exec: {
39+
npmUpdate: {
40+
command: 'npm update'
41+
},
42+
txpull: { // Pull Transifex translation - grunt exec:txpull
43+
cmd: 'tx pull -a --minimum-perc=60' // Change the percentage with --minimum-perc=yourvalue
44+
},
45+
txpush_s: { // Push pot to Transifex - grunt exec:txpush_s
46+
cmd: 'tx push -s'
47+
},
48+
},
49+
50+
dirs: {
51+
lang: 'languages',
52+
},
53+
54+
potomo: {
55+
dist: {
56+
options: {
57+
poDel: false // Set to true if you want to erase the .po
58+
},
59+
files: [{
60+
expand: true,
61+
cwd: '<%= dirs.lang %>',
62+
src: ['*.po'],
63+
dest: '<%= dirs.lang %>',
64+
ext: '.mo',
65+
nonull: true
66+
}]
67+
}
68+
},
69+
70+
});
71+
72+
// Default task. - grunt makepot
73+
grunt.registerTask( 'default', 'makepot' );
74+
75+
// Makepot and push it on Transifex task(s).
76+
grunt.registerTask( 'txpush', [ 'makepot', 'exec:txpush_s' ] );
77+
78+
// Pull from Transifex and create .mo task(s).
79+
grunt.registerTask( 'txpull', [ 'exec:txpull', 'potomo' ] );
80+
81+
};

README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
## Auto Load Next Post
22

3-
Auto Load Next Post is a lightweight plugin that simply loads the next post after one another as you scroll down the page. To do this, it reads the post navigation in your theme at the end of each post and collects the post URL. With this, it asks WordPress to do a partial content load and the javascript places the content of the next post underneath the parent post.
3+
[![Built with Grunt](https://cdn.gruntjs.com/builtwith.png?style=flat)](http://gruntjs.com/) [![GitHub forks](https://img.shields.io/github/forks/seb86/Auto-Load-Next-Post.svg?style=flat)](https://github.com/seb86/Auto-Load-Next-Post/network) [![GitHub license](https://img.shields.io/badge/license-GPLv3-blue.svg?style=flat)](https://raw.githubusercontent.com/seb86/Auto-Load-Next-Post/master/license.txt) [![WordPress plugin](https://img.shields.io/wordpress/plugin/v/auto-load-next-post.svg?style=flat)](https://wordpress.org/plugins/auto-load-next-post/) [![WordPress](https://img.shields.io/wordpress/plugin/dt/auto-load-next-post.svg?style=flat)](https://wordpress.org/plugins/auto-load-next-post/) [![WordPress](https://img.shields.io/wordpress/v/auto-load-next-post.svg?style=flat)](https://wordpress.org/plugins/auto-load-next-post/)
44

5-
It also updates your web history by manipulating the web address and page title so if you were to hit refresh, you will be taken to the post you were viewing last. You will find that when pressing the previous button in your browser to go back you will be taken to the previous post.
5+
Have you ever felt tired of going back and forth between blog posts? I know I have so I decided to develop a solution. One where you would need to do very little coding and require very little to set up on your blog.
6+
7+
[![Auto Load Next Post Video](https://raw.githubusercontent.com/seb86/Auto-Load-Next-Post/master/youtube-video-screenshot.png)](https://www.youtube.com/watch?v=EvBCPXVe2U4)
8+
9+
### What is it?
10+
Auto Load Next Post is a lightweight plugin that simply loads the previous post, one after another as you scroll down the page. It simply reads the post navigation in your theme at the end of each post and collects the post URL for the previous post. WordPress will then do a partial load and place the content of the previous post underneath the parent post.
11+
12+
Not only that, it updates your web history by manipulating the web address and page title. This allows you to return to any post you have looked at in your browser history. When you refresh the page, the page will take you to the post you were viewing last.
613

714
### Features
15+
* Can restrict it to load only on specific post types. - NEW in v1.3.2
16+
* You now have the option to hide the comments if you wish. - NEW in v1.3.2
817
* Track each post load with Google Analytics. ( Requires Google Analytics to be applied for this to work. )
918

1019
### Documentation
@@ -21,12 +30,9 @@ If you need help with customization. Please consider [hiring me](http://www.seba
2130
### Demo Site
2231
Want to try it out? [Go to the demo site](http://demos.sebastiendumont.com/auto-load-next-post/) and view a post. Scroll down and see the plugin in action.
2332

24-
The demo uses a child theme that includes the required support for the plugin to work. [Download the child theme source from GitHub](https://github.com/seb86/Auto-Load-Next-Post-Twenty-Fifteen-Support).
25-
2633
### Donations and Reviews
2734
To keep this plugin working and support many themes as possible, please consider making a [donation](http://www.sebastiendumont.com/donation/) or [write a review](https://wordpress.org/support/view/plugin-reviews/auto-load-next-post?rate=5#postform).
2835

2936
### More information
3037
* Other [WordPress plugins](http://profiles.wordpress.org/sebd86/) by [Sébastien Dumont](http://www.sebastiendumont.com/)
3138
* Contact Sebastien on Twitter: [@sebd86](http://twitter.com/sebd86)
32-
* If you're a developer yourself, follow or contribute to the [Auto Load Next Post plugin on GitHub](https://github.com/seb86/Auto-Load-Next-Post)

assets/css/admin/activation.css

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
.auto-load-next-post-message {
2+
position: relative;
3+
border-left-color: #EC8642 !important;
4+
overflow: hidden;
5+
}
6+
7+
.auto-load-next-post-message a.button-primary,
8+
p.auto-load-next-post-actions a.button-primary {
9+
background: #EC8642;
10+
border-color: #EB6D19;
11+
-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);
12+
box-shadow: inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);
13+
color: #fff;
14+
text-decoration: none;
15+
}
16+
17+
.auto-load-next-post-message a.button-primary:hover,
18+
p.auto-load-next-post-actions a.button-primary:hover {
19+
background: #EB6D19;
20+
border-color: #EB6D19;
21+
-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);
22+
box-shadow: inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);
23+
}
24+
25+
.auto-load-next-post-message a.button-primary:active,
26+
p.auto-load-next-post-actions a.button-primary:active {
27+
background: #fac75a;
28+
border-color: #EC8642;
29+
}
30+
31+
.auto-load-next-post-message a.docs,
32+
p.auto-load-next-post-actions a.docs {
33+
opacity: .7;
34+
}

0 commit comments

Comments
 (0)