├── src ├── dist │ └── .gitkeep ├── util │ ├── exclude.txt │ └── versionUpdate.js ├── screenshot.png ├── footer.php ├── style.css ├── assets │ ├── scss │ │ ├── components │ │ │ ├── _footer.scss │ │ │ ├── _header.scss │ │ │ └── _social-menu.scss │ │ ├── settings │ │ │ └── _variables.scss │ │ ├── plugins │ │ │ └── _overrides.scss │ │ ├── globals │ │ │ ├── _typography.scss │ │ │ ├── _global.scss │ │ │ └── _wordpress.scss │ │ ├── mixins │ │ │ └── _sugar.scss │ │ └── theme.scss │ └── js │ │ └── theme.js ├── inc │ ├── shortcodes.php │ ├── custom-post-types.php │ ├── thumbnails.php │ ├── enqueues.php │ ├── menus.php │ ├── widgets.php │ ├── tweaks.php │ └── responsive-media.php ├── 404.php ├── sidebar.php ├── single.php ├── archive.php ├── search.php ├── index.php ├── page.php ├── parts │ ├── post-nav.php │ └── meta.php ├── header.php ├── gulpfile.js └── functions.php ├── .npmignore ├── .eslintignore ├── .babelrc ├── .browserslistrc ├── .gitignore ├── .travis.yml ├── documentation ├── gulpfile-customization.md ├── gulp-tasks.md ├── javascript.md ├── intro.md ├── mixins.md ├── getting-started.md ├── styles.md └── wordpress-tweaks-functions.md ├── .editorconfig ├── README.md ├── .eslintrc ├── package.json ├── CHANGELOG.md ├── bin └── cli.js └── LICENSE /src/dist/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | documentation/ 2 | .travis.yml 3 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules/**/*.js 2 | dist/**/* 3 | -------------------------------------------------------------------------------- /src/util/exclude.txt: -------------------------------------------------------------------------------- 1 | CHANGELOG.md 2 | README.md 3 | util/ 4 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["@babel/preset-env"] 3 | } 4 | 5 | -------------------------------------------------------------------------------- /.browserslistrc: -------------------------------------------------------------------------------- 1 | last 2 version 2 | > 1% 3 | maintained node versions 4 | not dead 5 | -------------------------------------------------------------------------------- /src/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/factor1/prelude-wp/HEAD/src/screenshot.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | **/*/.DS_Store 3 | node_modules/ 4 | bower_components/ 5 | *.log 6 | error_log 7 | .cache 8 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "8" 4 | - "9" 5 | 6 | before_script: 7 | - npm install -g gulp-cli 8 | script: gulp build 9 | -------------------------------------------------------------------------------- /src/footer.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/style.css: -------------------------------------------------------------------------------- 1 | /* 2 | Theme Name: 3 | Theme URI: 4 | Author: 5 | Author URI: 6 | Description: 7 | Version: 0.0.1 8 | License: 9 | License URI: 10 | Text Domain: 11 | */ 12 | -------------------------------------------------------------------------------- /documentation/gulpfile-customization.md: -------------------------------------------------------------------------------- 1 | # Gulpfile Customization 2 | 3 | With Prelude 6, gulpfile customization has been drastically reduced and it is reccomended that changes are not made to this file. 4 | -------------------------------------------------------------------------------- /src/assets/scss/components/_footer.scss: -------------------------------------------------------------------------------- 1 | /*------------------------------------------------------------------------------ 2 | Footer 3 | ------------------------------------------------------------------------------*/ -------------------------------------------------------------------------------- /src/assets/scss/components/_header.scss: -------------------------------------------------------------------------------- 1 | /*------------------------------------------------------------------------------ 2 | Header 3 | ------------------------------------------------------------------------------*/ -------------------------------------------------------------------------------- /src/assets/scss/settings/_variables.scss: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------- 2 | Variables 3 | ----------------------------------------------------------------------------*/ -------------------------------------------------------------------------------- /src/assets/scss/plugins/_overrides.scss: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------- 2 | Plugin Overrides 3 | ----------------------------------------------------------------------------*/ -------------------------------------------------------------------------------- /src/inc/shortcodes.php: -------------------------------------------------------------------------------- 1 | 9 | 10 |
11 | 12 |
13 | 14 | 6 | 7 | 8 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /src/single.php: -------------------------------------------------------------------------------- 1 | 2) ); 16 | 17 | endif; 18 | 19 | get_footer(); 20 | -------------------------------------------------------------------------------- /src/index.php: -------------------------------------------------------------------------------- 1 | 2) ); 13 | else : 14 | echo '

Sorry, no posts have been found

'; 15 | endif; 16 | 17 | get_footer(); 18 | -------------------------------------------------------------------------------- /src/page.php: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 |

13 | 14 | 15 | 8 | 9 | 17 | -------------------------------------------------------------------------------- /src/parts/meta.php: -------------------------------------------------------------------------------- 1 | 6 | 7 |
8 | 9 | '; 13 | comments_popup_link( 14 | 'No Comments Yet', '1 Comment', '', 'comments-link', 15 | 'No Comments Allowed' ); 16 | echo ''; 17 | endif; 18 | ?> 19 |
20 | -------------------------------------------------------------------------------- /src/assets/scss/mixins/_sugar.scss: -------------------------------------------------------------------------------- 1 | // Sugar Mixins - mixins to make your styles a little sweeter. 2 | 3 | // rem size calc - converts pixel value to rem 4 | // Usage: `font-size: rem(24);` 5 | @function rem($size) { 6 | $remSize: $size/16; 7 | @return #{$remSize}rem; 8 | } 9 | 10 | // aspect ratio mixin 11 | @mixin aspect-ratio($width, $height) { 12 | position: relative; 13 | &:before { 14 | display: block; 15 | content: ""; 16 | width: 100%; 17 | padding-top: ($height / $width) * 100%; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /documentation/gulp-tasks.md: -------------------------------------------------------------------------------- 1 | # Gulp Tasks 2 | 3 | Prelude uses gulp to run browsersync and compress images for production. You most likely will not need to run these directly. 4 | 5 | ## List of Gulp Tasks 6 | 7 | Below are a list of the default gulp tasks. 8 | 9 | - `gulp build` - runs all build related tasks that are executed with Gulp. (functions in series: `compressImages`). 10 | - `gulp serve` - creates a local development server with live reloading and CSS injection via [Browsersync](https://www.browsersync.io/docs/). Also runs a series of gulp functions to compile your theme files/assets. 11 | -------------------------------------------------------------------------------- /documentation/javascript.md: -------------------------------------------------------------------------------- 1 | # JavaScript 2 | 3 | Prelude includes two JavaScript helpers to aid in your theme's development. It also uses Babel so you can use the latest JavaScript functionality such as arrow functions and more. 4 | 5 | ## Touch Detection 6 | 7 | Removes `no-touch` body class if device has touch. 8 | 9 | ```js 10 | var isTouchDevice = "ontouchstart" in document.documentElement; 11 | if (isTouchDevice) { 12 | $("body").removeClass("no-touch"); 13 | } 14 | ``` 15 | 16 | ## Browser Detection 17 | 18 | Prelude includes [Bowser](https://github.com/lancedikson/bowser) to aid in 19 | browser detection. You can modify these as needed. 20 | -------------------------------------------------------------------------------- /src/inc/thumbnails.php: -------------------------------------------------------------------------------- 1 | ID), $size ); 8 | $url = $thumb['0']; 9 | echo $url; 10 | } 11 | 12 | /*----------------------------------------------------------------------------- 13 | Adds thumbnail support and additional thumbnail sizes 14 | -----------------------------------------------------------------------------*/ 15 | 16 | if( function_exists('prelude_features') ){ 17 | // Use add_image_size below to add additional thumbnail sizes 18 | } 19 | -------------------------------------------------------------------------------- /documentation/intro.md: -------------------------------------------------------------------------------- 1 | # What Is Prelude? 2 | 3 | Prelude is a WordPress starter theme that helps you craft custom themes. It handles your entire build system with no configuration needed. 4 | 5 | ## Features 6 | 7 | ### Compiling 8 | 9 | - Compile & minify Sass/CSS with sourcemaps 10 | - Auto-prefix your Sass/CSS 11 | - Minify and concatenate JavaScript using Babel 12 | - Compress images 13 | - Bump Theme Versions 14 | 15 | ### WordPress Functions 16 | 17 | Prelude has some nifty features built into `functions.php` to make developing a 18 | custom WordPress theme a little easier. 19 | 20 | - Defer jQuery Parsing using the HTML5 defer property 21 | - Customized Read More Links 22 | - Get Featured image as URL 23 | - Other various improvements to default WordPress functions that are too long and/or small to list here, check 'em out! 24 | -------------------------------------------------------------------------------- /src/assets/scss/theme.scss: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | Table of Contents 3 | - Vendor 4 | - Globals 5 | - Plugins 6 | - Pages 7 | - Parts 8 | - Components 9 | -----------------------------------------------------------------------------*/ 10 | // import the Sass partials in the order that you need here 11 | 12 | // vendor 13 | @import "./node_modules/normalize-scss/sass/normalize"; 14 | @include normalize(); 15 | 16 | // Variables 17 | @import "settings/variables"; 18 | 19 | // Mixins 20 | @import "mixins/sugar"; 21 | 22 | // Global Styles 23 | @import "globals/global"; 24 | @import "globals/wordpress"; 25 | @import "globals/typography"; 26 | 27 | // Components 28 | @import "components/social-menu"; 29 | @import "components/header"; 30 | @import "components/footer"; 31 | 32 | // Plugin Overrides 33 | @import "plugins/overrides"; 34 | -------------------------------------------------------------------------------- /src/inc/enqueues.php: -------------------------------------------------------------------------------- 1 | File Location: `assets/scss/mixins/_sugar.scss` 3 | 4 | Prelude includes a few mixins to help your theme development along. We've merged 5 | these mixins in from a prior mixin package we created called Sugar, hence the 6 | file name. 7 | 8 | ## Convert pixel to rem 9 | Easily convert pixel values to rems. 10 | 11 | **Function:** 12 | ```scss 13 | @function rem($size) { 14 | $remSize: $size/16; 15 | @return #{$remSize}rem; 16 | } 17 | ``` 18 | **Usage:** 19 | ```scss 20 | font-size: rem(24); 21 | ``` 22 | 23 | ## Aspect Ratio 24 | Maintain aspect ratio on a certain element. Perfect for use on hero elements. 25 | 26 | **Function:** 27 | ```scss 28 | @mixin aspect-ratio($width, $height) { 29 | position: relative; 30 | &:before { 31 | display: block; 32 | content: ""; 33 | width: 100%; 34 | padding-top: ($height / $width) * 100%; 35 | } 36 | } 37 | ``` 38 | 39 | **Usage:** 40 | ```scss 41 | .hero { 42 | @include aspect-ratio(16,9); 43 | } 44 | ``` 45 | -------------------------------------------------------------------------------- /src/header.php: -------------------------------------------------------------------------------- 1 | 2 | > 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 13 | */ 14 | ?> 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | > 31 | 32 | 33 |
34 | 35 |
36 | 37 | 38 |
39 | -------------------------------------------------------------------------------- /src/inc/menus.php: -------------------------------------------------------------------------------- 1 | 'Primary Menu', 9 | 'footer' => 'Footer Menu', 10 | 'social' => 'Social Menu', 11 | ) 12 | ); 13 | } 14 | add_action( 'init', 'prelude_custom_menus' ); 15 | 16 | // Social media icon menu as per http://justintadlock.com/archives/2013/08/14/social-nav-menus-part-2 17 | function prelude_social_menu() { 18 | if ( has_nav_menu( 'social' ) ) { 19 | wp_nav_menu( 20 | array( 21 | 'theme_location' => 'social', 'container' => 'nav', 22 | 'container_id' => 'menu-social', 'container_class' => 'menu-social', 23 | 'menu_id' => 'menu-social-items', 'menu_class' => 'menu-items', 24 | 'depth' => 1, 25 | 'link_before' => '', 26 | 'link_after' => '', 'fallback_cb' => '', 27 | ) 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/gulpfile.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | require("dotenv").config(); 4 | 5 | const browserSync = require("browser-sync").create(); 6 | const colors = require("colors"); 7 | const imagemin = require("gulp-imagemin"); 8 | const { src, dest, watch } = require("gulp"); 9 | 10 | const NODE_ENV = process.env.NODE_ENV; 11 | const URL = process.env.WP_URL; 12 | 13 | // Project Paths 14 | const phpFiles = ["./**/*.php", "./*.php"]; 15 | const dist = "./dist/"; 16 | const imageFiles = ["./assets/img/*.{jpg,png,gif}"]; 17 | 18 | // compress images 19 | const compressImages = () => { 20 | return src(imageFiles) 21 | .pipe(imagemin()) 22 | .pipe(dest("./assets/img/")); 23 | }; 24 | 25 | // browser sync server 26 | const server = () => { 27 | console.log(colors.green.bold(`🛠 Running in ${NODE_ENV} mode`)); // eslint-disable-line no-console 28 | browserSync.init({ 29 | proxy: URL ? URL : "http://localhost:3000" 30 | }); 31 | 32 | watch(`${dist}/theme.css`).on("change", browserSync.reload); 33 | watch(`${dist}/theme.js`).on("change", browserSync.reload); 34 | watch(phpFiles).on("change", browserSync.reload); 35 | }; 36 | 37 | module.exports = { 38 | build: compressImages, 39 | serve: server 40 | }; 41 | -------------------------------------------------------------------------------- /documentation/getting-started.md: -------------------------------------------------------------------------------- 1 | # Getting Started 2 | 3 | Prelude requires that you have at least Node 10 installed on your machine. 4 | 5 | ## Installation 6 | 7 | **1.** Run `npx prelude-wp your-theme-name` to run in the prelude installer and create your project folder/directory. 8 | 9 | **2.** Create a `.env` file in your project with some key information, like the URL to be used for your project. If no URL is specified it will default to `localhost:3000`. (It's common practice to not commit this file to your repo as it may contain sensative information) 10 | 11 | ``` 12 | WP_URL="http://testproject.local/" 13 | ``` 14 | 15 | After these three steps, you are ready to start developing your theme. 16 | 17 | ## Working on your theme 18 | 19 | To work locally run `yarn start` and the environment will start, create a browsersync server, and watch for any changes. 20 | 21 | #### Building For Production 22 | 23 | To build for production, run `yarn build`. 24 | 25 | #### Testing Javascript 26 | 27 | To run tests on your javascript, run `yarn test` 28 | 29 | #### Format code 30 | 31 | Use prettier to format your code by running `yarn format` 32 | 33 | > Testing and Formatting also happen during the build process. 34 | -------------------------------------------------------------------------------- /src/functions.php: -------------------------------------------------------------------------------- 1 | Normalize.css makes browsers render all elements more consistently and in line 12 | with modern standards. It precisely targets only the styles that need normalizing. 13 | 14 | ## WordPress Styles 15 | > File Location: `assets/scss/globals/_wordpress.scss` 16 | 17 | We include some core WordPress classes such as `alignright` to make sure that when a user makes changes 18 | via a WYSIWYG they are rendered correctly. You may edit these classes as you desire. 19 | 20 | ## Global Styles 21 | > File Location: `assets/scss/globals/_global.scss` 22 | 23 | We include some base styles we found ourselves always using on our sites. These 24 | styles are pretty small and concise but you may also adjust these as you wish. View 25 | the file for more information. 26 | 27 | ### Helper Classes/Styles 28 | Two key things found in `_globals.scss` are the `img` property and the `flex-video` 29 | class. 30 | 31 | - `img` - small css to make sure images do not spill out of their containers. 32 | - `.flex-video` styles for ensuring `iframes` (usually for videos) are responsive. 33 | 34 | #### Example Flex Video Usage 35 | 36 | ```html 37 |
38 | 39 |
40 | ``` 41 | 42 | ## Social Menu Styles 43 | > File Location: `assets/scss/components/_social-menu.scss` 44 | 45 | The social menu styles can be found here. Adjust these when using the `prelude_social_menu()` 46 | function. 47 | -------------------------------------------------------------------------------- /src/util/versionUpdate.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | /* eslint-disable no-console */ 3 | const packageJson = require("../package.json"); 4 | const version = packageJson.version; 5 | const argv = require("yargs").argv; 6 | const colors = require("colors"); // eslint-disable-line no-unused-vars 7 | const replace = require("replace"); 8 | 9 | const updateVersion = (version, releaseType) => { 10 | let currentVersion = version.split(/[.]+/); 11 | let newPatch; 12 | let newMinor; 13 | let newMajor; 14 | let newVersion; 15 | console.log(`Current theme version: ${version}`.yellow); 16 | 17 | if (releaseType.patch) { 18 | console.log("Updating theme version as a patch release.".cyan); 19 | 20 | // increment patch number 21 | currentVersion[2]++; 22 | newPatch = currentVersion[2]; 23 | 24 | // New Version Number 25 | newVersion = currentVersion[0] + "." + currentVersion[1] + "." + newPatch; 26 | console.log("New theme version is: ".green + newVersion.green.bold); 27 | } 28 | 29 | if (releaseType.minor) { 30 | console.log("Updating theme version as a minor release.".cyan); 31 | 32 | // increment minor number 33 | currentVersion[1]++; 34 | newMinor = currentVersion[1]; 35 | 36 | // New Version Number 37 | newVersion = currentVersion[0] + "." + newMinor + "." + "0"; 38 | console.log("New theme version is: ".green + newVersion.green.bold); 39 | } 40 | 41 | if (releaseType.major) { 42 | console.log("Updating theme version as a major release.".cyan); 43 | 44 | // increment minor number 45 | currentVersion[0]++; 46 | newMajor = currentVersion[0]; 47 | 48 | // New Version Number 49 | newVersion = newMajor + "." + "0" + "." + "0"; 50 | console.log("New theme version is: ".green + newVersion.green.bold); 51 | } 52 | 53 | // first replace updates strings 54 | replace({ 55 | regex: version, 56 | replacement: newVersion, 57 | paths: ["./style.css"], 58 | silent: true 59 | }); 60 | 61 | replace({ 62 | regex: `"version": "${version}"`, 63 | replacement: `"version": "${newVersion}"`, 64 | paths: ["./package.json"], 65 | silent: true 66 | }); 67 | }; 68 | 69 | updateVersion(version, argv); 70 | -------------------------------------------------------------------------------- /src/assets/scss/components/_social-menu.scss: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------- 2 | WordPress Social Menu 3 | - make sure to include FontAwesome for this to work! 4 | ----------------------------------------------------------------------------*/ 5 | .menu-social { 6 | ul { 7 | margin: 0; 8 | padding: 0; 9 | text-align: inherit; 10 | list-style: none; 11 | li{ 12 | display: inline-block; 13 | position: relative; 14 | padding: 0 .625rem; 15 | a{ 16 | display: inline-block; 17 | text-align: center; 18 | &:before{ 19 | display: none; 20 | font-family: 'Font Awesome 5 Brands'; 21 | color: blue; 22 | } 23 | .svg-inline--fa { 24 | font-size: rem(30); 25 | } 26 | &:hover { 27 | color: purple; 28 | } 29 | } // end anchor 30 | // Adding the icons 31 | a[href*="facebook.com"]::before { 32 | content: '\f09a'; 33 | } 34 | 35 | a[href*="twitter.com"]::before { 36 | content: '\f099'; 37 | } 38 | 39 | a[href*="dribbble.com"]::before { 40 | content: '\f17d'; 41 | } 42 | 43 | a[href*="plus.google.com"]::before { 44 | content: '\f0d5'; 45 | } 46 | 47 | a[href*="pinterest.com"]::before { 48 | content: '\f0d2'; 49 | } 50 | 51 | a[href*="github.com"]::before { 52 | content: '\f09b'; 53 | } 54 | 55 | a[href*="tumblr.com"]::before { 56 | content: '\f173'; 57 | } 58 | 59 | a[href*="youtube.com"]::before { 60 | content: '\f167'; 61 | } 62 | 63 | a[href*="flickr.com"]::before { 64 | content: '\f16e'; 65 | } 66 | 67 | a[href*="vimeo.com"]::before { 68 | content: '\f194'; 69 | } 70 | 71 | a[href*="instagram.com"]::before { 72 | content: '\f16d'; 73 | } 74 | 75 | a[href*="linkedin.com"]::before { 76 | content: '\f0e1'; 77 | } 78 | 79 | a[href*="yelp.com"]::before { 80 | content: '\f1e9'; 81 | } 82 | 83 | a[href*="mailto:"]::before { 84 | content: '\f003'; 85 | } 86 | } // end li 87 | } // end ul 88 | } // end .menu-social 89 | 90 | // Hide the default Screen Reader text 91 | .screen-reader-text { 92 | display: none; 93 | } 94 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "prelude-wp", 3 | "version": "6.3.2", 4 | "description": "Prelude is a Wordpress starter theme that helps you craft custom themes. It uses Gulp to compile and minify scss/css, concatenate and minify JS, compress images, and more.", 5 | "main": "./bin/cli.js", 6 | "repository": "git@github.com:factor1/prelude-wp.git", 7 | "author": "Eric Stout ", 8 | "license": "MIT", 9 | "private": false, 10 | "scripts": { 11 | "build": "yarn test && yarn format && NODE_ENV=production gulp build && yarn build-js && yarn build-scss", 12 | "build-js": "parcel build ./assets/js/theme.js --out-dir ./dist/ --no-content-hash --log-level 4 --public-url ./ --no-cache", 13 | "build-scss": "parcel build ./assets/scss/theme.scss --out-dir ./dist/ --no-content-hash --log-level 4 --public-url ./ --no-cache", 14 | "format": "prettier *.js *.css --write", 15 | "release-major": "yarn test && node ./util/versionUpdate.js --major && yarn build", 16 | "release-minor": "yarn test && node ./util/versionUpdate.js --minor && yarn build", 17 | "release-patch": "yarn test && node ./util/versionUpdate.js --patch && yarn build", 18 | "start": "NODE_ENV=development yarn test && concurrently \"yarn watch-js\" \"yarn watch-scss\" \"gulp serve\"", 19 | "test": "eslint .", 20 | "watch": "concurrently \"yarn watch-js\" \"yarn watch-scss\"", 21 | "watch-js": "parcel watch ./assets/js/theme.js --out-dir ./dist --log-level 4 --public-url ./ --no-hmr --no-cache", 22 | "watch-scss": "parcel watch ./assets/scss/theme.scss --out-dir ./dist --log-level 4 --public-url ./ --no-hmr --no-cache" 23 | }, 24 | "bin": { 25 | "prelude-wp": "./bin/cli.js" 26 | }, 27 | "dependencies": { 28 | "bowser": "^2.5.2", 29 | "colors": "^1.3.3", 30 | "dotenv": "^8.0.0", 31 | "fs-extra": "^8.1.0", 32 | "lodash": "^4.17.15", 33 | "path": "^0.12.7", 34 | "prompt": "^1.0.0", 35 | "replace": "^1.1.1", 36 | "slugify": "^1.3.4", 37 | "yargs": "^15.0.2" 38 | }, 39 | "devDependencies": { 40 | "@babel/core": "^7.7.7", 41 | "@babel/preset-env": "^7.7.7", 42 | "babel-eslint": "^10.0.3", 43 | "browser-sync": "^2.26.7", 44 | "concurrently": "^5.0.2", 45 | "eslint": "^6.0.1", 46 | "fs-extra": "^8.1.0", 47 | "gulp": "^4.0.2", 48 | "gulp-imagemin": "^6.0.0", 49 | "gulp-sass": "^4.0.2", 50 | "node-sass": "^4.12.0", 51 | "normalize-scss": "^7.0.1", 52 | "parcel-bundler": "^1.12.3", 53 | "prettier": "^1.18.2" 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/inc/widgets.php: -------------------------------------------------------------------------------- 1 | __( 'Sidebar', 'theme-slug' ), 9 | 'id' => 'sidebar-1', 10 | 'description' => '', 11 | 'before_widget' => '', 13 | 'before_title' => '

', 14 | 'after_title' => '

', 15 | ) ); 16 | register_sidebar( 17 | array( 18 | 'name' => __( 'Footer Area 1', 'theme-slug' ), 19 | 'id' => 'footer-widget', 20 | 'description' => 'Appears in the first footer area', 21 | 'before_widget' => '', 23 | 'before_title' => '

', 24 | 'after_title' => '

', 25 | ) ); 26 | register_sidebar( 27 | array( 28 | 'name' => __( 'Footer Area 2', 'theme-slug' ), 29 | 'id' => 'footer-widget-2', 30 | 'description' => 'Appears in the second footer area', 31 | 'before_widget' => '', 33 | 'before_title' => '

', 34 | 'after_title' => '

', 35 | ) ); 36 | register_sidebar( 37 | array( 38 | 'name' => __( 'Footer Area 3', 'theme-slug' ), 39 | 'id' => 'footer-widget-3', 40 | 'description' => 'Appears in the third footer area', 41 | 'before_widget' => '', 43 | 'before_title' => '

', 44 | 'after_title' => '

', 45 | ) ); 46 | register_sidebar( 47 | array( 48 | 'name' => __( 'Footer Area 4', 'theme-slug' ), 49 | 'id' => 'footer-widget-4', 50 | 'description' => 'Appears in the fourth footer area', 51 | 'before_widget' => '', 53 | 'before_title' => '

', 54 | 'after_title' => '

', 55 | ) ); 56 | 57 | unregister_widget( 'WP_Widget_Calendar' ); 58 | unregister_widget( 'WP_Widget_Links' ); 59 | unregister_widget( 'WP_Widget_Meta' ); 60 | unregister_widget( 'WP_Widget_Search' ); 61 | unregister_widget( 'WP_Widget_Recent_Comments' ); 62 | } 63 | add_action( 'widgets_init', 'prelude_widgets_init' ); 64 | -------------------------------------------------------------------------------- /src/assets/scss/globals/_wordpress.scss: -------------------------------------------------------------------------------- 1 | /*------------------------------------------------------------------------------ 2 | WordPress CSS - https://codex.wordpress.org/CSS#WordPress_Generated_Classes 3 | ------------------------------------------------------------------------------*/ 4 | .alignnone { 5 | margin: 5px 20px 20px 0; 6 | } 7 | 8 | 9 | .aligncenter, 10 | div.aligncenter { 11 | display: block; 12 | margin : 5px auto; 13 | } 14 | 15 | 16 | .alignright { 17 | float : right; 18 | margin: 5px 0 20px 20px; 19 | } 20 | 21 | 22 | .alignleft { 23 | float : left; 24 | margin: 5px 20px 20px 0; 25 | } 26 | 27 | 28 | a img.alignright { 29 | float : right; 30 | margin: 5px 0 20px 20px; 31 | } 32 | 33 | 34 | a img.alignnone { 35 | margin: 5px 20px 20px 0; 36 | } 37 | 38 | 39 | a img.alignleft { 40 | float : left; 41 | margin: 5px 20px 20px 0; 42 | } 43 | 44 | 45 | a img.aligncenter { 46 | display : block; 47 | margin-left : auto; 48 | margin-right: auto; 49 | } 50 | 51 | 52 | .wp-caption { 53 | background: #fff; 54 | border : 1px solid #f0f0f0; 55 | max-width : 96%; 56 | /* Image does not overflow the content area */ 57 | padding : 5px 3px 10px; 58 | text-align: center; 59 | } 60 | 61 | 62 | .wp-caption.alignnone { 63 | margin: 5px 20px 20px 0; 64 | } 65 | 66 | 67 | .wp-caption.alignleft { 68 | margin: 5px 20px 20px 0; 69 | } 70 | 71 | 72 | .wp-caption.alignright { 73 | margin: 5px 0 20px 20px; 74 | } 75 | 76 | 77 | .wp-caption img { 78 | border : 0 none; 79 | height : auto; 80 | margin : 0; 81 | max-width: 98.5%; 82 | padding : 0; 83 | width : auto; 84 | } 85 | 86 | 87 | .wp-caption p.wp-caption-text { 88 | font-size : 11px; 89 | line-height: 17px; 90 | margin : 0; 91 | padding : 0 4px 5px; 92 | } 93 | 94 | /* Text meant only for screen readers. */ 95 | .screen-reader-text { 96 | clip : rect(1px, 1px, 1px, 1px); 97 | position: absolute !important; 98 | height : 1px; 99 | width : 1px; 100 | overflow: hidden; 101 | } 102 | 103 | .screen-reader-text:focus { 104 | background-color: #f1f1f1; 105 | border-radius : 3px; 106 | box-shadow : 0 0 2px 2px rgba(0, 0, 0, 0.6); 107 | clip : auto !important; 108 | color : #21759b; 109 | display : block; 110 | font-size : 14px; 111 | font-size : .875rem; 112 | font-weight : bold; 113 | height : auto; 114 | left : 5px; 115 | line-height : normal; 116 | padding : 15px 23px 14px; 117 | text-decoration : none; 118 | top : 5px; 119 | width : auto; 120 | z-index : 100000; 121 | /* Above WP toolbar. */ 122 | } 123 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | All notable changes to this project will be documented in this file. 3 | This project adheres to [Semantic Versioning](http://semver.org/). 4 | 5 | ## [4.2.4] - 2018-06-04 6 | # Adds 7 | - Better source mapping for styles, while it still does not point to the correct scss file, you can now see where it appears in `theme.css` 8 | 9 | ## [4.2.3] - 2018-05-25 10 | # Updated 11 | - npm dependencies 12 | - eslint rule for comma dangle now is silenced 🤫 13 | 14 | # Adds 15 | - JS sourcemaps 16 | 17 | ## [4.2.2] - 2018-04-26 18 | # Updated 19 | - Travis node build 20 | 21 | ## [4.2.1] - 2018-04-26 22 | # Updated 23 | - browser-sync 24 | - gulp-cssnano 25 | 26 | # Removed 27 | - yards 28 | 29 | ## [4.2.0] - 2018-03-21 30 | # Updated 31 | - All node_modules to their current versions 32 | 33 | # Fixed 34 | - Syntax error in Sass Gulp task 35 | 36 | # Added 37 | - npm version command to `gulp version` to auto update npm package versioning 38 | 39 | 40 | ## [4.1.0] - 2018-03-16 41 | # Added 42 | - Font Awesome 5 CDN to enqueues file 43 | - Font Awesome 5 config file per the [Font Awesome documentation](https://fontawesome.com/how-to-use/svg-with-js#pseudo-elements) 44 | 45 | # Update 46 | - Changed social menu syntax to use Font Awesome 5 inline svgs 47 | 48 | ## [4.0.5] - 2018-02-27 49 | # Update 50 | - ESLint rules to be more in line with prelude settings/vision 51 | 52 | ## [4.0.4] - 2018-02-26 53 | # Fix 54 | - Travis file being included in copy script. 55 | 56 | ## [4.0.3] - 2018-01-12 57 | # Fixes 58 | - Fixes file move node script to ignore `util/` folder and all `.md` files. 59 | 60 | # Updates 61 | - Update bowser documentation to reflect correct comparison operator. 62 | 63 | ## [4.0.2] - 2017-10-20 64 | # Fixes 65 | - Fixes typo in bowser function, adjust operator for browser version check. 66 | 67 | ## [4.0.1] - 2017-09-19 68 | # Updates 69 | - Updates `.eslintrc` with custom rules 70 | 71 | # Removes 72 | - "standard" an npm package for ESLint rules 73 | 74 | ## [4.0.0] - 2017-09-15 75 | # Updates 76 | - Clean up of global scss from #104 77 | - Remove vistited link style from #105 78 | - Remove extra css from social menu - close #106 79 | - Update nav menu registration - close #112 80 | 81 | # Additions 82 | - Add browser detection via Bowser - closes #107 83 | - Add ESlint - close #110 84 | - Add Merge Media Queries - closes #108 85 | - Add prelude-init npm script to autopopulate `style.css` and parts of `gulpfile.js` - closes #99 86 | 87 | # Removes 88 | - Remove JSHint - close #110 89 | - Removes `featuredBG` php function from `inc/thumbnails.php` 90 | 91 | ## [3.5.1] - 2017-06-02 92 | # Fixes 93 | - Missing git commit in gulp version tasks 94 | 95 | ## [3.5.0] - 2017-04-10 96 | # Adds 97 | - Adds new version feature, that allows theme version to be updated by `gulp version --minor` 98 | 99 | ## [3.4.3] - 2017-03-27 100 | # Removes 101 | - Removes jQuery enqueue from google CDN from issue #100. Thanks for the heads up @jeremyescott 102 | 103 | ## [3.4.2] - 2017-03-21 104 | # Removes 105 | - Removes opinionated structures from template files. 106 | - Removes WP tweaks that were causing deprecation issues. 107 | 108 | # Adds 109 | - Adds sugar mixins for rems and aspect ratio 110 | - Adds Yelp CSS for social menu 111 | 112 | 113 | ## [3.4.1] - 2016-12-19 114 | # Update 115 | - Updates npm dependencies 116 | 117 | ## [3.4.0] - 2016-12-16 118 | # Update 119 | - Updates default gulp task to run `styles` instead of `sass` 120 | - Moves all theme files out of `/src/` and into the root folder 121 | 122 | ## [3.3.11] - 2016-12-01 123 | # Removes 124 | - Removes hiding of post author div 125 | 126 | ## [3.3.11] - 2016-11-21 127 | ### Fixes and Additions 128 | - Fixes missing dependency `imagemin-pngquant` 129 | - Fixes missing default argument for `featuredURL()` 130 | - Adds `THEME_VERSION` constant to better enqueue JS and CSS files (avoiding cache issues) 131 | 132 | ## [3.3.10] - 2016-10-13 133 | ### Added 134 | - Adds function to expand WordPress toolkit/kitchen sink for all users by default. 135 | 136 | ## [3.3.9] - 2016-10-11 137 | ### Removed 138 | - Removes the `postinstall` script all together to avoid changes to user themes and also greatly increase compatibility across platforms. Also updates readme with this change. 139 | 140 | ## [3.3.8] - 2016-10-05 141 | ### Change 142 | - Changes the WordPress jQuery handle from `prelude_wp` to `jquery` for better plugin compatibility. 143 | 144 | ## [3.3.7] - 2016-09-21 145 | ### Update 146 | - Adds SVG as a supported file time for image compression. 147 | 148 | ## [3.3.6] - 2016-09-15 149 | ### Update 150 | - Updates package gulp task to compile correctly and ignore `node_modules` & `bower_components` / Issue #77 151 | 152 | ## [3.3.5] - 2016-09-13 153 | ### Update 154 | - Updates cssnano optimizations in `gulpfile.js` 155 | 156 | ## [3.3.4] - 2016-08-31 157 | ### Change 158 | - Updates autoprefixer browser support / Issue #75 159 | 160 | ## [3.3.3] - 2016-08-18 161 | ### Added 162 | - Hides empty paragraphs with p:empty style from @bebaps / Issue #74 163 | 164 | ## [3.3.2] - 2015-12-03 165 | ### Added 166 | - Change log 167 | - Touch detection based on Gist from @billerickson 168 | -------------------------------------------------------------------------------- /src/inc/tweaks.php: -------------------------------------------------------------------------------- 1 | ' . 50 | __( 'Continue reading ', 'theme-slug' ) . 51 | ''; 52 | } 53 | 54 | // Customize the default ellipsis (...) 55 | function prelude_auto_excerpt_more( $more ) { 56 | return '…' . prelude_continue_reading_link(); 57 | } 58 | add_filter( 'excerpt_more', 'prelude_auto_excerpt_more' ); 59 | 60 | // Remove the default gallery styling 61 | function prelude_remove_gallery_css( $css ) { 62 | return preg_replace( "##s", '', $css ); 63 | } 64 | add_filter( 'gallery_style', 'prelude_remove_gallery_css' ); 65 | 66 | // Customize which dashboard widgets show 67 | function prelude_remove_dashboard_boxes() { 68 | remove_meta_box('dashboard_right_now', 'dashboard', 'core' ); // Right Now Overview Box 69 | remove_meta_box('dashboard_incoming_links', 'dashboard', 'core' ); // Incoming Links Box 70 | remove_meta_box('dashboard_quick_press', 'dashboard', 'core' ); // Quick Press Box 71 | remove_meta_box( 'dashboard_plugins', 'dashboard', 'core' ); // Plugins Box 72 | remove_meta_box('dashboard_recent_drafts', 'dashboard', 'core' ); // Recent Drafts Box 73 | remove_meta_box('dashboard_recent_comments', 'dashboard', 'core' ); // Recent Comments 74 | remove_meta_box('dashboard_primary', 'dashboard', 'core' ); // WordPress Development Blog 75 | remove_meta_box('dashboard_secondary', 'dashboard', 'core' ); // Other WordPress News 76 | } 77 | add_action( 'admin_menu', 'prelude_remove_dashboard_boxes' ); 78 | 79 | // Remove meta boxes from default posts screen 80 | function prelude_remove_default_post_metaboxes() { 81 | remove_meta_box( 'postcustom', 'post', 'normal' ); // Custom Fields Metabox 82 | //remove_meta_box( 'postexcerpt', 'post', 'normal' ); // Excerpt Metabox 83 | //remove_meta_box( 'commentstatusdiv', 'post', 'normal' ); // Comments Metabox 84 | remove_meta_box( 'trackbacksdiv', 'post', 'normal' ); // Talkback Metabox 85 | //remove_meta_box( 'authordiv', 'post', 'normal' ); // Author Metabox 86 | } 87 | add_action( 'admin_menu', 'prelude_remove_default_post_metaboxes' ); 88 | 89 | // Remove meta boxes from default pages screen 90 | function prelude_remove_default_page_metaboxes() { 91 | remove_meta_box( 'postcustom', 'page', 'normal' ); // Custom Fields Metabox 92 | //remove_meta_box('commentstatusdiv', 'page', 'normal' ); // Discussion Metabox 93 | remove_meta_box( 'authordiv', 'page', 'normal' ); // Author Metabox 94 | } 95 | add_action( 'admin_menu', 'prelude_remove_default_page_metaboxes' ); 96 | 97 | // Stop automatically hyper-linking images to themselves 98 | $image_set = get_option( 'image_default_link_type' ); 99 | 100 | if ( !$image_set == 'none' ) { 101 | update_option( 'image_default_link_type', 'none' ); 102 | } 103 | 104 | // Customize the Yoast SEO columns 105 | add_filter( 'wpseo_use_page_analysis', '__return_false' ); 106 | 107 | // Add touch detection class to body 108 | function be_body_classes( $classes ) { 109 | $classes[] = 'no-touch'; 110 | return $classes; 111 | } 112 | add_filter( 'body_class', 'be_body_classes' ); 113 | 114 | // Keep the WordPress Kitchen Sink Toolkit open for all users. 115 | function enable_more_buttons($buttons) { 116 | $buttons[] = 'fontselect'; 117 | $buttons[] = 'fontsizeselect'; 118 | $buttons[] = 'styleselect'; 119 | $buttons[] = 'backcolor'; 120 | $buttons[] = 'newdocument'; 121 | $buttons[] = 'cut'; 122 | $buttons[] = 'copy'; 123 | $buttons[] = 'charmap'; 124 | $buttons[] = 'hr'; 125 | $buttons[] = 'visualaid'; 126 | 127 | return $buttons; 128 | } 129 | add_filter("mce_buttons_3", "enable_more_buttons"); 130 | -------------------------------------------------------------------------------- /src/inc/responsive-media.php: -------------------------------------------------------------------------------- 1 | providers = array( 18 | ['youtube', 'Youtube', ['#http://((m|www)\.)?youtube\.com/watch.*#i', '#https://((m|www)\.)?youtube\.com/watch.*#i', '#http://((m|www)\.)?youtube\.com/playlist.*#i', '#https://((m|www)\.)?youtube\.com/playlist.*#i', '#http://youtu\.be/.*#i', '#https://youtu\.be/.*#i']], 19 | ['vimeo', 'Vimeo', ['#https?://(.+\.)?vimeo\.com/.*#i']], 20 | ['wordpresstv', 'Wordpress.tv', ['#https?://wordpress.tv/.*#i']], 21 | ['soundcloud', 'Soundcloud', ['#https?://(www\.)?soundcloud\.com/.*#i']], 22 | ['slideshare', 'Slideshare', ['#https?://(.+?\.)?slideshare\.net/.*#i']], 23 | ['ted', 'TED', ['#https?://(www\.|embed\.)?ted\.com/talks/.*#i']], 24 | ['kickstarter', 'Kickstarter', ['#https?://(www\.)?kickstarter\.com/projects/.*#i','#https?://kck\.st/.*#i']], 25 | ['videopress', 'Videopress', ['#https?://videopress.com/v/.*#']], 26 | ['speakerdeck', 'Speakerdeck', ['#https?://(www\.)?speakerdeck\.com/.*#i']], 27 | ['vine', 'Vine', ['#https?://vine.co/v/.*#i']], 28 | ['flickr', 'Flickr', ['#https?://(www\.)?flickr\.com/.*#i','#https?://flic\.kr/.*#i']] 29 | ); 30 | 31 | // set default settings 32 | foreach ( $this->providers as $provider ) { 33 | $slug = $provider[0]; 34 | $this->default_options[$slug] = 'on'; 35 | } 36 | 37 | load_plugin_textdomain('responsive-media', false, basename( dirname( __FILE__ ) ) . '/languages' ); 38 | 39 | add_action( 'admin_menu', array( $this, 'admin_menu' ) ); 40 | add_action( 'admin_init', array( $this, 'page_init' ) ); 41 | 42 | add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), array( $this, 'plugin_settings_link' ) ); 43 | 44 | if( !is_admin() ) { 45 | add_filter('wp_head', array($this, 'add_responsive_style') ); 46 | add_filter('embed_oembed_html', array($this, 'add_reponsive_container'), 10, 3); 47 | } 48 | 49 | if( !get_option( 'responsive_media_option' ) ) { 50 | add_option( 'responsive_media_option', $this->default_options ); 51 | } 52 | } 53 | 54 | 55 | /** 56 | * Get dimensions and add responsive container with calculated aspect ratio 57 | */ 58 | public function add_reponsive_container( $html, $url ) { 59 | $inline_css = ''; 60 | $attr = array(); 61 | $options = get_option( 'responsive_media_option' ); 62 | 63 | foreach ( $this->providers as $provider ) { 64 | $slug = $provider[0]; 65 | $name = $provider[1]; 66 | $patterns = $provider[2]; 67 | 68 | if( $options[$slug] != 'off' ) { 69 | foreach ( $patterns as &$pattern ) { 70 | if ( preg_match( $pattern, $url ) ) { 71 | 72 | $doc = new DOMDocument; 73 | @$doc->loadHTML($html); 74 | $xpath = new DOMXPath($doc); 75 | $entries = $xpath->query("//iframe"); 76 | foreach ($entries as $entry) { 77 | $attr['height'] = $entry->getAttribute("height"); 78 | $attr['width'] = $entry->getAttribute("width"); 79 | } 80 | 81 | if(isset($attr['height']) && isset($attr['width'])) { 82 | $inline_css = ' style="padding-bottom: '. ($attr['height'] / $attr['width']) * 100 .'%"'; 83 | } 84 | 85 | $F1ResponsiveMedia = '

'.$html.'

'; 86 | return $F1ResponsiveMedia; 87 | } 88 | } 89 | } 90 | } 91 | 92 | return $html; 93 | } 94 | 95 | 96 | /** 97 | * Admin menu 98 | */ 99 | function admin_menu() { 100 | add_options_page( 101 | 'Responsive Media', 102 | 'Responsive Media', 103 | 'manage_options', 104 | 'responsive_media_options', 105 | array( 106 | $this, 107 | 'settings_page' 108 | ) 109 | ); 110 | } 111 | 112 | 113 | /** 114 | * Admin menu 115 | */ 116 | function settings_page() { 117 | // Set class property 118 | //$this->options = get_option( 'responsive_media_option' ); 119 | ?> 120 |
121 |

My Settings

122 |
123 | 129 |
130 |
131 | providers as $provider ) { 153 | add_settings_field( 154 | $provider[0], // ID 155 | $provider[1], // Title 156 | array( $this, 'option_callback' ), 157 | 'responsive_media_settings', 158 | 'repsonsive_media_settings_section', 159 | array($provider[0]) // Arguments 160 | ); 161 | } 162 | } 163 | 164 | 165 | /** 166 | * Add settings link for plugin overview page 167 | */ 168 | function plugin_settings_link($links) { 169 | $url = get_admin_url() . 'options-general.php?page=responsive_media_options'; 170 | $settings_link = '' . __( 'Settings', 'responsive-media' ) . ''; 171 | array_unshift( $links, $settings_link ); 172 | return $links; 173 | } 174 | 175 | 176 | /** 177 | * Get the settings option array and print one of its values 178 | */ 179 | public function option_callback($args) { 180 | $options = get_option( 'responsive_media_option' ); 181 | 182 | echo ''; 183 | } 184 | 185 | 186 | /** 187 | * Sanitize each setting field as needed 188 | * 189 | * @param array $input Contains all settings fields as array keys 190 | */ 191 | public function sanitize( $input ) { 192 | $new_input = array(); 193 | 194 | $input = !$input ? array() : $input; 195 | 196 | foreach ( $this->providers as $provider ) { 197 | $slug = $provider[0]; 198 | $new_input[$slug] = array_key_exists($slug, $input) ? 'on' : 'off'; 199 | } 200 | 201 | return $new_input; 202 | } 203 | 204 | 205 | /** 206 | * Print the Section text 207 | */ 208 | public function print_section_info() { 209 | esc_html_e( 'Select the media that should be responsive:', 'responsive-media' ); 210 | } 211 | 212 | 213 | /** 214 | * Add inline CSS with default 16:9 aspect ratio 215 | */ 216 | public function add_responsive_style() { 217 | echo " 218 | "; 233 | } 234 | } 235 | 236 | $responsive_media = new F1ResponsiveMedia(); 237 | -------------------------------------------------------------------------------- /bin/cli.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* eslint-disable no-console */ 4 | 5 | require("colors"); 6 | 7 | const { exec } = require("child_process"); 8 | const fs = require("fs-extra"); 9 | const path = require("path"); 10 | const _ = require("lodash"); 11 | const https = require("https"); 12 | const replace = require("replace"); 13 | const prompt = require("prompt"); 14 | 15 | const packageJson = require("../package.json"); 16 | 17 | const [, , ...project] = process.argv; 18 | 19 | const wpCustomize = () => { 20 | prompt.start(); 21 | 22 | prompt.get( 23 | [ 24 | "Theme_Name", 25 | "Theme_URI", 26 | "Author", 27 | "Author_URI", 28 | "Description", 29 | "License", 30 | "License_URI", 31 | "Text_Domain" 32 | ], 33 | function(err, result) { 34 | let themeName = result.Theme_Name, 35 | themeURI = result.Theme_URI, 36 | author = result.Author, 37 | authorURI = result.Author_URI, 38 | description = result.Description, 39 | license = result.License, 40 | licenseURI = result.License_URI, 41 | textdomain = result.Text_Domain; 42 | 43 | if (themeName) { 44 | replace({ 45 | regex: "Theme Name:", 46 | replacement: "Theme Name: " + themeName, 47 | paths: [`${project}/style.css`], 48 | silent: true 49 | }); 50 | } 51 | 52 | if (themeURI) { 53 | replace({ 54 | regex: "Theme URI:", 55 | replacement: "Theme URI: " + themeURI, 56 | paths: [`${project}/style.css`], 57 | silent: true 58 | }); 59 | } 60 | 61 | if (author) { 62 | replace({ 63 | regex: "Author:", 64 | replacement: "Author: " + author, 65 | paths: [`${project}/style.css`], 66 | silent: true 67 | }); 68 | } 69 | 70 | if (authorURI) { 71 | replace({ 72 | regex: "Author URI:", 73 | replacement: "Author URI: " + authorURI, 74 | paths: [`${project}/style.css`], 75 | silent: true 76 | }); 77 | } 78 | 79 | if (description) { 80 | replace({ 81 | regex: "Description:", 82 | replacement: "Description: " + description, 83 | paths: [`${project}/style.css`], 84 | silent: true 85 | }); 86 | } 87 | 88 | if (license) { 89 | replace({ 90 | regex: "License:", 91 | replacement: "License: " + license, 92 | paths: [`${project}/style.css`], 93 | silent: true 94 | }); 95 | } 96 | 97 | if (licenseURI) { 98 | replace({ 99 | regex: "License URI:", 100 | replacement: "License URI: " + licenseURI, 101 | paths: [`${project}/style.css`], 102 | silent: true 103 | }); 104 | } 105 | 106 | if (textdomain) { 107 | replace({ 108 | regex: "Text Domain:", 109 | replacement: "Text Domain: " + textdomain, 110 | paths: [`${project}/style.css`], 111 | silent: true 112 | }); 113 | } 114 | console.log("✅ WordPress theme configured".green); 115 | console.log("💖 Remember - you're amazing.".cyan); 116 | console.log("✨ Prelude was configured successfully!"); 117 | } 118 | ); 119 | }; 120 | 121 | console.log(`🛠 Creating theme ${project}...`.cyan); 122 | 123 | const setupProject = async () => { 124 | try { 125 | await exec( 126 | `mkdir ${project} && cd ${project} && yarn init --yes`, 127 | initErr => { 128 | if (initErr) { 129 | console.error( 130 | `😭 Something went really wrong... try again: ${initErr}`.red 131 | ); 132 | } 133 | 134 | // copy main theme files 135 | fs.copySync(path.join(__dirname, "../src"), `${project}/`); 136 | 137 | // copy other config files 138 | const otherFiles = [ 139 | ".babelrc", 140 | ".browserslistrc", 141 | ".editorconfig", 142 | ".eslintignore", 143 | ".eslintrc" 144 | ]; 145 | 146 | for (let index = 0; index < otherFiles.length; index++) { 147 | fs.createReadStream( 148 | path.join(__dirname, `../${otherFiles[index]}`) 149 | ).pipe(fs.createWriteStream(`${project}/${otherFiles[index]}`)); 150 | } 151 | 152 | const devDependencies = []; 153 | Object.keys(packageJson.devDependencies).forEach(dep => 154 | devDependencies.push(`${dep}@${packageJson.devDependencies[dep]}`) 155 | ); 156 | 157 | const strippedDevDependencies = _.join(devDependencies, " "); 158 | 159 | const dependencies = []; 160 | Object.keys(packageJson.dependencies).forEach(dep => 161 | dependencies.push(`${dep}@${packageJson.dependencies[dep]}`) 162 | ); 163 | 164 | const strippedDependencies = _.join(dependencies, " "); 165 | 166 | // install deps 167 | console.log("⌛ Installing dependencies...".yellow); 168 | exec( 169 | `cd ${project} && yarn add ${strippedDependencies}`, 170 | (yarnErr, yarnStdout) => { 171 | if (yarnErr) { 172 | console.error(yarnErr); 173 | return; 174 | } 175 | console.log(yarnStdout); 176 | console.log("✅ dependencies installed".green); 177 | // install dev deps 178 | console.log("⌛ Installing devDependencies...".yellow); 179 | exec( 180 | `cd ${project} && yarn add ${strippedDevDependencies} -D`, 181 | (yarnErr, yarnStdout) => { 182 | if (yarnErr) { 183 | console.error(yarnErr); 184 | return; 185 | } 186 | console.log(yarnStdout); 187 | console.log("✅ devDependencies installed".green); 188 | console.log("🙈 Setting up .gitignore...".yellow); 189 | https.get( 190 | "https://raw.githubusercontent.com/factor1/prelude-wp/master/.gitignore", 191 | res => { 192 | res.setEncoding("utf8"); 193 | let body = ""; 194 | res.on("data", data => { 195 | body += data; 196 | }); 197 | res.on("end", async () => { 198 | await fs.writeFile( 199 | `${project}/.gitignore`, 200 | body, 201 | { encoding: "utf-8" }, 202 | err => { 203 | if (err) throw err; 204 | } 205 | ); 206 | console.log("✅ .gitignore configured".green); 207 | console.log("🎨 Configuring WP Theme Info".yellow); 208 | try { 209 | wpCustomize(); 210 | } catch (error) { 211 | console.error( 212 | "❗ Error configuring WP Theme information", 213 | error 214 | ); 215 | } 216 | }); 217 | } 218 | ); 219 | } 220 | ); 221 | } 222 | ); 223 | 224 | // add scripts to package.json 225 | const themePackageJson = `${project}/package.json`; 226 | 227 | const packageScripts = ` 228 | "scripts": { 229 | "build": "yarn test && yarn format && NODE_ENV=production gulp build && yarn build-js && yarn build-scss", 230 | "build-js": "parcel build ./assets/js//theme.js --out-dir ./dist/ --no-content-hash --log-level 4 --public-url ./dist/", 231 | "build-scss": "parcel build ./assets/scss/theme.scss --out-dir ./dist/ --no-content-hash --log-level 4 --public-url ./dist/", 232 | "format": "prettier *.js *.css --write", 233 | "release-major": "yarn test && node ./util/versionUpdate.js --major && yarn build", 234 | "release-minor": "yarn test && node ./util/versionUpdate.js --minor && yarn build", 235 | "release-patch": "yarn test && node ./util/versionUpdate.js --patch && yarn build", 236 | "start": "NODE_ENV=development yarn test && concurrently \\"yarn watch-js\\" \\"yarn watch-scss\\" \\"gulp serve\\"", 237 | "test": "eslint .", 238 | "watch": "concurrently \\"yarn watch-js\\" \\"yarn watch-scss\\"", 239 | "watch-js": "parcel watch ./assets/js//theme.js --out-dir ./dist --log-level 4 --public-url ./dist/", 240 | "watch-scss": "parcel watch ./assets/scss/theme.scss --out-dir ./dist --log-level 4 --public-url ./dist/" 241 | } 242 | `; 243 | 244 | fs.readFile(themePackageJson, (err, file) => { 245 | if (err) { 246 | throw err; 247 | } 248 | const data = file 249 | .toString() 250 | .replace(`"main": "index.js"`, packageScripts); // eslint-disable-line quotes 251 | 252 | fs.writeFile(themePackageJson, data, err2 => err2 || true); 253 | }); 254 | } 255 | ); 256 | } catch (error) { 257 | console.warn("😭 Something terrible happened... Try again."); 258 | throw new Error(error); 259 | } 260 | }; 261 | 262 | setupProject(); 263 | -------------------------------------------------------------------------------- /documentation/wordpress-tweaks-functions.md: -------------------------------------------------------------------------------- 1 | # WordPress Tweaks & functions.php 2 | We include some handy WordPress tweaks for various purposes. Some make developing 3 | a theme easier, some are UX fixes, and some are because we like them. 4 | 5 | ## functions.php 6 | The `functions.php` file should only hold `requires` to files located in `/inc`. 7 | It is (in our opinion) a best practice to put no __actual__ code here. 8 | 9 | ## Custom Post Types 10 | > File Location: `inc/custom-post-types.php` 11 | 12 | If you would like to include custom post types in your theme, they can be added 13 | to `inc/custom-post-types.php`. By default, this file is empty. 14 | 15 | >**Note:** You may want to add custom post types to a custom plugin instead, to ensure 16 | that they are kept from theme to theme. 17 | 18 | ## Script & Style Enqueues 19 | > File Location: `inc/enqueues.php` 20 | 21 | All JavaScript and CSS files should be enqueued here so they can be properly handled 22 | by WordPress. 23 | 24 | ### defer_parsing_of_js() 25 | We also use a function named `defer_parsing_of_js` to defer parsing of JavaScript 26 | files that _aren't_ `jquery.js` to help improve load times for your theme. If you 27 | are experiencing plugin or jQuery issues, try removing this function as part of 28 | your initial troubleshooting but generally does not negatively impact how WordPress 29 | handles JS/jQuery and plugins. 30 | 31 | ```php 32 | if (!(is_admin() )) { 33 | function defer_parsing_of_js ( $url ) { 34 | if ( FALSE === strpos( $url, '.js' ) ) return $url; 35 | if ( strpos( $url, 'jquery.js' ) ) return $url; 36 | // return "$url' defer "; 37 | return "$url' defer onload='"; 38 | } 39 | add_filter( 'clean_url', 'defer_parsing_of_js', 11, 1 ); 40 | } 41 | ``` 42 | 43 | ## WordPress Menus 44 | > File Location: `inc/menus.php` 45 | 46 | By default we include three WordPress Nav Menus: 47 | - primary 48 | - footer 49 | - social 50 | 51 | **Primary** is generally used for main site navigation, **footer** is for footer 52 | menus that may differ from the primary menu, and **social** can be used for social 53 | accounts. The **social** menu is tied to the `prelude_social_menu` function covered 54 | below. 55 | 56 | ### prelude_social_menu() 57 | The prelude social menu function makes it easy to add social media accounts to the 58 | theme. It will automatically add social media icons (via [Font Awesome](http://fontawesome.io)) 59 | to the links in this menu. 60 | 61 | #### Social Menu Styles 62 | > File Location: `assets/scss/components/_social-menu.scss` 63 | 64 | This file contains the styles for when the social media menu is rendered. You can 65 | change these styles to fit your theme. We try to include a well rounded list of 66 | social media services will keeping it lean and mean. If you see a missing service 67 | you'd like to see included, feel free to [open an issue](https://github.com/factor1/prelude-wp/issues/). 68 | 69 | ## Shortcodes 70 | > File Location: `inc/shortcodes.php` 71 | 72 | You may add any theme specific shortcodes here. By default, this file is empty. 73 | 74 | ## Thumbnails 75 | > File Location: `inc/thumbnails.php` 76 | 77 | Be smart! Use thumbnails! Thumbnails ensure that the end client cannot upload 78 | massive images and allow them to be displayed in the theme, ensuring your theme 79 | loads as fast and light as possible. 80 | 81 | You can use this file to add or edit thumbnail sizes but it also includes two 82 | useful functions to get featured images. 83 | 84 | ### featuredURL() 85 | The `featuredURL` function will echo the URL of a featured post. 86 | 87 | #### Arguments 88 | - `$size` - pass the thumbnail size you wish to use. (Accepts a string, default: `'full'`) 89 | 90 | ##### Function: 91 | ```php 92 | function featuredURL($size = 'full'){ 93 | $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), $size ); 94 | $url = $thumb['0']; 95 | echo $url; 96 | } 97 | ``` 98 | 99 | ## WordPress Tweaks 100 | > File Location: `inc/tweaks.php` 101 | 102 | The tweaks file makes some adjustments to your WordPress install. You may adjust 103 | them as you see fit. 104 | 105 | ### Theme Support Additions 106 | The following theme supports have been added by default: 107 | - automatic-feed-links 108 | - post-formats 109 | - post-thumbnails 110 | - HTML5 111 | - title-tag 112 | 113 | ### Theme Support Removals 114 | The following theme supports have been removed by default: 115 | - wp-head 116 | - rsd_link 117 | - wlwmanifest_link 118 | - wp_generator 119 | - start_post_rel_link 120 | - index_rel_link 121 | - adjacent_posts_rel_link 122 | 123 | ### Content Width (`prelude_content_width()`) 124 | `prelude_content_width()` sets the maximum allowed width for any content in the 125 | theme. See: [WordPress Codex](https://codex.wordpress.org/Content_Width) 126 | 127 | ```php 128 | function prelude_content_width() { 129 | $GLOBALS[ 'content_width' ] = apply_filters( 'prelude_content_width', 1200 ); 130 | } 131 | add_action( 'after_setup_theme', 'prelude_content_width', 0 ); 132 | ``` 133 | ### Page Excerpts 134 | There are a few functions to help you control the excerpts that are displayed on 135 | your theme. 136 | 137 | #### Add Page Excerpts 138 | `prelude_page_excerpt()` adds support for excerpts in pages. 139 | 140 | ```php 141 | function prelude_page_excerpt() { 142 | add_post_type_support( 'page', array('excerpt') ); 143 | } 144 | add_action( 'init', 'prelude_page_excerpt' ); 145 | ``` 146 | 147 | #### Customize Default Read More Link 148 | Customize the Read More link that is appended to posts/pages. 149 | 150 | ```php 151 | // Customize the default read more link 152 | function prelude_continue_reading_link() { 153 | return ' ' . 154 | __( 'Continue reading ', 'theme-slug' ) . 155 | ''; 156 | } 157 | ``` 158 | 159 | #### Customize the default ellipsis 160 | By default, this customizes the default ellipses and appends the output from 161 | `prelude_continue_reading_link()`. 162 | 163 | ```php 164 | // Customize the default ellipsis (...) 165 | function prelude_auto_excerpt_more( $more ) { 166 | return '…' . prelude_continue_reading_link(); 167 | } 168 | add_filter( 'excerpt_more', 'prelude_auto_excerpt_more' 169 | ``` 170 | 171 | ### Remove Default Gallery Styling (`prelude_remove_gallery_css`) 172 | Removes the default WordPress gallery styling. 173 | 174 | ```php 175 | function prelude_remove_gallery_css( $css ) { 176 | return preg_replace( "##s", '', $css ); 177 | } 178 | add_filter( 'gallery_style', 'prelude_remove_gallery_css' ); 179 | ``` 180 | 181 | ### Customize Dashboard Widgets (`prelude_remove_dashboard_boxes`) 182 | Removes certain meta boxes from the WordPress dashboard. 183 | 184 | ```php 185 | // Customize which dashboard widgets show 186 | function prelude_remove_dashboard_boxes() { 187 | remove_meta_box('dashboard_right_now', 'dashboard', 'core' ); // Right Now Overview Box 188 | remove_meta_box('dashboard_incoming_links', 'dashboard', 'core' ); // Incoming Links Box 189 | remove_meta_box('dashboard_quick_press', 'dashboard', 'core' ); // Quick Press Box 190 | remove_meta_box( 'dashboard_plugins', 'dashboard', 'core' ); // Plugins Box 191 | remove_meta_box('dashboard_recent_drafts', 'dashboard', 'core' ); // Recent Drafts Box 192 | remove_meta_box('dashboard_recent_comments', 'dashboard', 'core' ); // Recent Comments 193 | remove_meta_box('dashboard_primary', 'dashboard', 'core' ); // WordPress Development Blog 194 | remove_meta_box('dashboard_secondary', 'dashboard', 'core' ); // Other WordPress News 195 | } 196 | add_action( 'admin_menu', 'prelude_remove_dashboard_boxes' ); 197 | ``` 198 | 199 | ### Remove meta boxes from default posts screen 200 | Removes certain meta boxes from post screens. (Some are commented out for easy 201 | reference.) 202 | 203 | ```php 204 | function prelude_remove_default_post_metaboxes() { 205 | remove_meta_box( 'postcustom', 'post', 'normal' ); // Custom Fields Metabox 206 | //remove_meta_box( 'postexcerpt', 'post', 'normal' ); // Excerpt Metabox 207 | //remove_meta_box( 'commentstatusdiv', 'post', 'normal' ); // Comments Metabox 208 | remove_meta_box( 'trackbacksdiv', 'post', 'normal' ); // Talkback Metabox 209 | //remove_meta_box( 'authordiv', 'post', 'normal' ); // Author Metabox 210 | } 211 | add_action( 'admin_menu', 'prelude_remove_default_post_metaboxes' ); 212 | ``` 213 | 214 | ### Remove meta boxes from default pages screens 215 | Removes certain meta boxes from page screens. (Some are commented out for easy 216 | reference) 217 | 218 | ```php 219 | // Remove meta boxes from default pages screen 220 | function prelude_remove_default_page_metaboxes() { 221 | remove_meta_box( 'postcustom', 'page', 'normal' ); // Custom Fields Metabox 222 | //remove_meta_box('commentstatusdiv', 'page', 'normal' ); // Discussion Metabox 223 | remove_meta_box( 'authordiv', 'page', 'normal' ); // Author Metabox 224 | } 225 | add_action( 'admin_menu', 'prelude_remove_default_page_metaboxes' ); 226 | ``` 227 | 228 | ### Stop automatically linking photos to themselves 229 | Stops WordPress from linking to full-size photos. 230 | 231 | ```php 232 | // Stop automatically hyper-linking images to themselves 233 | $image_set = get_option( 'image_default_link_type' ); 234 | if ( !$image_set == 'none' ) { 235 | update_option( 'image_default_link_type', 'none' ); 236 | } 237 | ``` 238 | 239 | ### Customize Yoast SEO Columns 240 | Adjust the Yoast SEO Columns when used. 241 | 242 | ```php 243 | // Customize the Yoast SEO columns 244 | add_filter( 'wpseo_use_page_analysis', '__return_false' ); 245 | ``` 246 | 247 | ### Touch Detection (`be_body_classes()`) 248 | Add touch detection class to body. 249 | 250 | ```php 251 | // Add touch detection class to body 252 | function be_body_classes( $classes ) { 253 | $classes[] = 'no-touch'; 254 | return $classes; 255 | } 256 | add_filter( 'body_class', 'be_body_classes' ); 257 | ``` 258 | 259 | ### Keep the WordPress Kitchen Sink Toolkit open (`enable_more_buttons()`) 260 | Keeps the WordPress Kitchen Sink Toolkit open for all users. This can help the 261 | end user(s) edit their content inside of WYSIWYGs. 262 | 263 | ```php 264 | // Keep the WordPress Kitchen Sink Toolkit open for all users. 265 | function enable_more_buttons($buttons) { 266 | $buttons[] = 'fontselect'; 267 | $buttons[] = 'fontsizeselect'; 268 | $buttons[] = 'styleselect'; 269 | $buttons[] = 'backcolor'; 270 | $buttons[] = 'newdocument'; 271 | $buttons[] = 'cut'; 272 | $buttons[] = 'copy'; 273 | $buttons[] = 'charmap'; 274 | $buttons[] = 'hr'; 275 | $buttons[] = 'visualaid'; 276 | return $buttons; 277 | } 278 | add_filter("mce_buttons_3", "enable_more_buttons"); 279 | ``` 280 | 281 | ## Widgets 282 | > File Location: `inc/widgets.php` 283 | 284 | The widgets file adds a few useful widget areas as well as removing some lesser 285 | used widgets. 286 | 287 | **Widgets Added** 288 | - Sidebar (id: `sidebar-1`) 289 | - Footer Area 1 (id: `footer-widget`) 290 | - Footer Area 2 (id: `footer-widget-2`) 291 | - Footer Area 3 (id: `footer-widget-3`) 292 | - Footer Area 4 (id: `footer-widget-4`) 293 | 294 | **Widgets Removed** 295 | - `WP_Widget_Calendar` 296 | - `WP_Widget_Links` 297 | - `WP_Widget_Meta` 298 | - `WP_Widget_Search` 299 | - `WP_Widget_Recent_Comments` 300 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | --------------------------------------------------------------------------------