Skip to content

Commit 43cc1c1

Browse files
committed
Initial commit
0 parents  commit 43cc1c1

File tree

7 files changed

+823
-0
lines changed

7 files changed

+823
-0
lines changed

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Grunt
2+
/releases/
3+
/node_modules/
4+
npm-debug.log
5+
6+
# Various file types to ignore when exporting.
7+
.DS_Store
8+
Thumbs.db
9+
*.sh
10+
.gitconfig
11+
*.zip
12+
package-lock.json

Gruntfile.js

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
module.exports = function(grunt) {
2+
'use strict';
3+
4+
require('load-grunt-tasks')(grunt);
5+
6+
// Project configuration.
7+
grunt.initConfig({
8+
pkg: grunt.file.readJSON('package.json'),
9+
10+
// Generate .pot file
11+
makepot: {
12+
target: {
13+
options: {
14+
type: 'wp-plugin', // Type of project (wp-plugin or wp-theme).
15+
domainPath: 'languages', // Where to save the POT file.
16+
mainFile: '<%= pkg.name %>.php', // Main project file.
17+
potFilename: '<%= pkg.name %>.pot', // Name of the POT file.
18+
potHeaders: {
19+
'Report-Msgid-Bugs-To': 'https://github.com/autoloadnextpost/alnp-divi-support/issues',
20+
'language-team': 'Sébastien Dumont <mailme@sebastiendumont.com>',
21+
'language': 'en_US'
22+
},
23+
exclude: [
24+
'releases',
25+
'node_modules'
26+
]
27+
}
28+
}
29+
},
30+
31+
checktextdomain: {
32+
options:{
33+
text_domain: '<%= pkg.name %>', // Project text domain.
34+
keywords: [
35+
'__:1,2d',
36+
'_e:1,2d',
37+
'_x:1,2c,3d',
38+
'esc_html__:1,2d',
39+
'esc_html_e:1,2d',
40+
'esc_html_x:1,2c,3d',
41+
'esc_attr__:1,2d',
42+
'esc_attr_e:1,2d',
43+
'esc_attr_x:1,2c,3d',
44+
'_ex:1,2c,3d',
45+
'_n:1,2,4d',
46+
'_nx:1,2,4c,5d',
47+
'_n_noop:1,2,3d',
48+
'_nx_noop:1,2,3c,4d'
49+
]
50+
},
51+
files: {
52+
src: [
53+
'*.php',
54+
'**/*.php', // Include all files
55+
'!node_modules/**' // Exclude node_modules/
56+
],
57+
expand: true
58+
},
59+
},
60+
61+
potomo: {
62+
dist: {
63+
options: {
64+
poDel: false
65+
},
66+
files: [{
67+
expand: true,
68+
cwd: 'languages',
69+
src: ['*.po'],
70+
dest: 'languages',
71+
ext: '.mo',
72+
nonull: false
73+
}]
74+
}
75+
},
76+
77+
// Bump version numbers (replace with version in package.json)
78+
replace: {
79+
Version: {
80+
src: [
81+
'readme.txt',
82+
'<%= pkg.name %>.php'
83+
],
84+
overwrite: true,
85+
replacements: [
86+
{
87+
from: /Stable tag:.*$/m,
88+
to: "Stable tag: <%= pkg.version %>"
89+
},
90+
{
91+
from: /Version:.*$/m,
92+
to: "Version: <%= pkg.version %>"
93+
},
94+
{
95+
from: /public \$version = \'.*.'/m,
96+
to: "public $version = '<%= pkg.version %>'"
97+
}
98+
]
99+
}
100+
},
101+
102+
// Copies the plugin to create deployable plugin.
103+
copy: {
104+
deploy: {
105+
src: [
106+
'**',
107+
'!.*',
108+
'!*.md',
109+
'!.*/**',
110+
'.htaccess',
111+
'!Gruntfile.js',
112+
'!package.json',
113+
'!package-lock.json',
114+
'!releases/**',
115+
'!node_modules/**',
116+
'!.DS_Store',
117+
'!npm-debug.log',
118+
'!*.sh',
119+
'!*.zip',
120+
'!*.jpg',
121+
'!*.jpeg',
122+
'!*.gif',
123+
'!*.png'
124+
],
125+
dest: '<%= pkg.name %>',
126+
expand: true,
127+
dot: true
128+
}
129+
},
130+
131+
// Compresses the deployable plugin folder.
132+
compress: {
133+
zip: {
134+
options: {
135+
archive: './releases/<%= pkg.name %>-v<%= pkg.version %>.zip',
136+
mode: 'zip'
137+
},
138+
files: [
139+
{
140+
expand: true,
141+
cwd: './<%= pkg.name %>/',
142+
src: '**',
143+
dest: '<%= pkg.name %>'
144+
}
145+
]
146+
}
147+
},
148+
149+
// Deletes the deployable plugin folder once zipped up.
150+
clean: [ '<%= pkg.name %>' ]
151+
});
152+
153+
// Set the default grunt command to run test cases.
154+
grunt.registerTask( 'default', [ 'test' ] );
155+
156+
// Checks for errors.
157+
grunt.registerTask( 'test', [ 'checktextdomain' ]);
158+
159+
// Checks for errors, updates version and runs i18n tasks.
160+
grunt.registerTask( 'dev', [ 'replace', 'makepot' ]);
161+
162+
/**
163+
* Run i18n related tasks.
164+
*
165+
* This includes extracting translatable strings, updating the master pot file.
166+
* If this is part of a deploy process, it should come before zipping everything up.
167+
*/
168+
grunt.registerTask( 'update-pot', [ 'checktextdomain', 'makepot' ]);
169+
170+
/**
171+
* Creates a deployable plugin zipped up ready to upload
172+
* and install on a WordPress installation.
173+
*/
174+
grunt.registerTask( 'zip', [ 'copy', 'compress', 'clean' ]);
175+
};

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Auto Load Next Post: Divi Support
2+
3+
Provides theme support for Divi by Elegant Themes
4+
5+
###### Follow us
6+
7+
💻 [Website](https://autoloadnextpost.com) 🐦[Twitter](https://twitter.com/autoloadnxtpost)
8+
9+
## Requires
10+
11+
* Auto Load Next Post v1.5.0 or above.
12+
* Divi Theme v3+
13+
14+
#### Installation 💽
15+
16+
1. Download a `.zip` file with the [latest version](https://github.com/autoloadnextpost/alnp-divi-support/releases).
17+
2. Go to **WordPress Admin > Plugins > Add New**.
18+
3. Click **Upload Plugin** at the top.
19+
4. **Choose File** and select the `.zip` file you downloaded in **Step 1**.
20+
5. Click **Install Now** and **Activate** the plugin.
21+
22+
#### Reporting Issues 📝
23+
24+
If you think you have found a bug in the plugin, please [open a new issue](https://github.com/autoloadnextpost/alnp-divi-support/issues/new) and I will do my best to help you out.
25+
26+
##### License
27+
28+
Auto Load Next Post: Divi Support is released under [GNU General Public License v3.0](http://www.gnu.org/licenses/gpl-3.0.html).

0 commit comments

Comments
 (0)