Skip to content

Commit

Permalink
Improvements for the next release. v1.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastien committed May 17, 2015
1 parent 0711dc2 commit c9fdee7
Show file tree
Hide file tree
Showing 41 changed files with 2,466 additions and 129 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
@@ -0,0 +1,2 @@
# Auto detect text files and perform EOL normalization
* text=auto
36 changes: 36 additions & 0 deletions .gitignore
@@ -0,0 +1,36 @@
# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Mac crap
.DS_Store

# Sublime
*.sublime-project
*.sublime-workspace

# PhpStorm
.idea/

# Bin
bin/

# Screenshots
screenshots/

# Wiki
wiki/

# Grunt
node_modules/
build/
npm-debug.log

# Transifex
tx.exe
8 changes: 8 additions & 0 deletions .tx/config
@@ -0,0 +1,8 @@
[main]
host = https://www.transifex.com

[wordpress-plugin-boilerplate.wordpress-plugin-boilerplate]
file_filter = wordpress-plugin-boilerplate/languages/wordpress-plugin-boilerplate-<lang>.po
source_file = wordpress-plugin-boilerplate/languages/wordpress-plugin-boilerplate.pot
source_lang = en_US
type = PO
15 changes: 15 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,18 @@
## 1.3.2 (17th May 2015)
* Added more theme support with compatible theme template file which can be overrided.
* Added option to enable auto loading posts for specific post types.
* Added option for comments. Now you can choose to show or hide rather than forcing it to hide automatically.
* Added Chosen (v1.4.2) Javascript by [Harvest](http://harvesthq.github.io/chosen/)
* Added console.logs in the Javascript for debugging.
* Corrected text domain name in plugin header.
* Corrected access to function load_file() from private to public
* Corrected access to function register_scripts_and_styles() from private to public
* Corrected error with uninstall.php file
* Moved function register_scripts_and_styles() to class-auto-load-next-post-admin.php
* Filtered the Javascript to load only on singular posts and the enabled post types.
* Removed security issue by accessing $GLOBALS directly.
* Removed all closing PHP tags omitting at the end of each file.

## 1.0.0 (4th April 2015)

* Initial Release
81 changes: 81 additions & 0 deletions Gruntfile.js
@@ -0,0 +1,81 @@
module.exports = function(grunt) {

// Load multiple grunt tasks using globbing patterns
require('load-grunt-tasks')(grunt);

// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),

makepot: {
target: {
options: {
domainPath: 'languages/', // Where to save the POT file.
exclude: ['build/.*'],
mainFile: 'auto-load-next-post.php', // Main project file.
potComments: 'Auto Load Next Post Copyright (c) {{year}}', // The copyright at the beginning of the POT file.
potFilename: 'auto-load-next-post.pot', // Name of the POT file.
type: 'wp-plugin', // Type of project.
updateTimestamp: true, // Whether the POT-Creation-Date should be updated without other changes.
processPot: function( pot, options ) {
pot.headers['report-msgid-bugs-to'] = 'https://github.com/seb86/Auto-Load-Next-Post/issues\n';
pot.headers['plural-forms'] = 'nplurals=2; plural=n != 1;\n';
pot.headers['last-translator'] = 'Auto Load Next Post <mailme@sebastiendumont.com>\n';
pot.headers['language-team'] = 'WP-Translations <wpt@wp-translations.org>\n';
pot.headers['x-poedit-basepath'] = '..\n';
pot.headers['x-poedit-language'] = 'English\n';
pot.headers['x-poedit-country'] = 'UNITED STATES\n';
pot.headers['x-poedit-sourcecharset'] = 'utf-8\n';
pot.headers['x-poedit-searchpath-0'] = '.\n';
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';
pot.headers['x-textdomain-support'] = 'yes\n';
return pot;
}
}
}
},

exec: {
npmUpdate: {
command: 'npm update'
},
txpull: { // Pull Transifex translation - grunt exec:txpull
cmd: 'tx pull -a --minimum-perc=60' // Change the percentage with --minimum-perc=yourvalue
},
txpush_s: { // Push pot to Transifex - grunt exec:txpush_s
cmd: 'tx push -s'
},
},

dirs: {
lang: 'languages',
},

potomo: {
dist: {
options: {
poDel: false // Set to true if you want to erase the .po
},
files: [{
expand: true,
cwd: '<%= dirs.lang %>',
src: ['*.po'],
dest: '<%= dirs.lang %>',
ext: '.mo',
nonull: true
}]
}
},

});

// Default task. - grunt makepot
grunt.registerTask( 'default', 'makepot' );

// Makepot and push it on Transifex task(s).
grunt.registerTask( 'txpush', [ 'makepot', 'exec:txpush_s' ] );

// Pull from Transifex and create .mo task(s).
grunt.registerTask( 'txpull', [ 'exec:txpull', 'potomo' ] );

};
4 changes: 4 additions & 0 deletions README.md
@@ -1,10 +1,14 @@
## Auto Load Next Post

[![Built with Grunt](https://cdn.gruntjs.com/builtwith.png?style=flat)](http://gruntjs.com/) [![GitHub version](https://badge.fury.io/gh/seb86%2FAuto-Load-Next-Post.svg?style=flat)](http://badge.fury.io/gh/seb86%2FWordPress-Plugin-Boilerplate) [![GPL license](https://img.shields.io/badge/license-GPLv3-blue.svg?style=flat)

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.

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.

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

### Documentation
Expand Down
34 changes: 34 additions & 0 deletions assets/css/admin/activation.css
@@ -0,0 +1,34 @@
.auto-load-next-post-message {
position: relative;
border-left-color: #EC8642 !important;
overflow: hidden;
}

.auto-load-next-post-message a.button-primary,
p.auto-load-next-post-actions a.button-primary {
background: #EC8642;
border-color: #EB6D19;
-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);
box-shadow: inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);
color: #fff;
text-decoration: none;
}

.auto-load-next-post-message a.button-primary:hover,
p.auto-load-next-post-actions a.button-primary:hover {
background: #EB6D19;
border-color: #EB6D19;
-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);
box-shadow: inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);
}

.auto-load-next-post-message a.button-primary:active,
p.auto-load-next-post-actions a.button-primary:active {
background: #fac75a;
border-color: #EC8642;
}

.auto-load-next-post-message a.docs,
p.auto-load-next-post-actions a.docs {
opacity: .7;
}

0 comments on commit c9fdee7

Please sign in to comment.