├── index.php ├── includes ├── elements │ ├── index.php │ ├── class-testimonial.php │ ├── class-pricing.php │ └── class-products.php └── shortcodes │ ├── index.php │ ├── shortcode-testimonial.php │ ├── shortcode-pricing.php │ └── shortcode-products.php ├── assets ├── css │ ├── sidebar.min.css │ ├── sidebar.css.map │ ├── sidebar.min.css.map │ ├── sidebar.css │ ├── scss │ │ ├── sidebar.scss │ │ ├── tools │ │ │ ├── _clearfix.scss │ │ │ ├── _transform.scss │ │ │ └── _prefixer.scss │ │ ├── frontend.scss │ │ ├── _variables.scss │ │ └── components │ │ │ ├── _testimonial.scss │ │ │ ├── _products.scss │ │ │ └── _pricing.scss │ ├── frontend.css.map │ ├── frontend.min.css.map │ ├── frontend.min.css │ └── frontend.css └── js │ ├── dist │ ├── canvas.min.js │ └── canvas.js │ └── src │ └── canvas │ └── canvas.js ├── uninstall.php ├── partials ├── meta-price.php └── content-product.php ├── readme.md ├── languages └── tailor-woocommerce.pot ├── readme.txt ├── tailor-woocommerce.php └── license.txt /index.php: -------------------------------------------------------------------------------- 1 | 3 | @include prefixer(transform, $property, webkit moz ms o spec); 4 | } 5 | 6 | @mixin transform-origin($axes: 50%) { 7 | // x-axis - left | center | right | length | % 8 | // y-axis - top | center | bottom | length | % 9 | // z-axis - length 10 | @include prefixer(transform-origin, $axes, webkit moz ms o spec); 11 | } 12 | 13 | @mixin transform-style ($style: flat) { 14 | @include prefixer(transform-style, $style, webkit moz ms o spec); 15 | } 16 | -------------------------------------------------------------------------------- /partials/meta-price.php: -------------------------------------------------------------------------------- 1 | 14 | 15 |
16 | 17 |

get_price_html(); ?>

18 | 19 | 20 | 21 | 22 |
-------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # [WooCommerce extension for the Tailor frontend page builder](http://www.gettailor.com/) 2 | 3 | This is the official GitHub repository for the Tailor WooCommerce extension plugin. 4 | 5 | Please visit the [Plugin Repository](http://wordpress.org/plugins/tailor-woocommerce/) on WordPress.org to download the latest stable release. 6 | 7 | You can get in touch with questions or recommendations in a number of ways: 8 | 9 | 1. [Facebook](https://www.facebook.com/tailorwp/) or Twitter at [@tailorwp](https://twitter.com/tailorwp) or [@andrewjworsfold](https://twitter.com/andrewjworsfold). 10 | 2. The [Help Center](http://support.gettailor.com) 11 | 3. The [GitHub project](https://github.com/andrew-worsfold/tailor-woocommerce) 12 | 13 | If you like the plugin, you can help by [rating it](https://wordpress.org/support/view/plugin-reviews/tailor-woocommerce?rate=5#postform). -------------------------------------------------------------------------------- /assets/js/dist/canvas.min.js: -------------------------------------------------------------------------------- 1 | !function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g a",disableOn:function(){return c.hasClass("is-selected")}})})}(window.app,window.Tailor.Api.Element,Tailor.Views||{})},{}]},{},[1]); -------------------------------------------------------------------------------- /assets/js/src/canvas/canvas.js: -------------------------------------------------------------------------------- 1 | 2 | ( function( app, ElementAPI, Views ) { 3 | 4 | 'use strict'; 5 | 6 | ElementAPI.onRender( 'tailor_products', function( atts, model ) { 7 | var $el = this.$el; 8 | var options; 9 | 10 | if ( 'carousel' == atts.layout ) { 11 | options = { 12 | autoplay : '1' == atts.autoplay, 13 | arrows : '1' == atts.arrows, 14 | dots : '1' == atts.dots, 15 | fade : ( '1' == atts.fade && '1' == atts.items_per_row ), 16 | infinite: false, 17 | slidesToShow : parseInt( atts.items_per_row, 10 ) || 2 18 | }; 19 | 20 | this.$el.tailorSimpleCarousel( options ) ; 21 | } 22 | else if ( 'grid' == atts.layout && atts.masonry ) { 23 | $el.tailorMasonry(); 24 | } 25 | 26 | if ( this.el.classList.contains( 'is-lightbox-gallery' ) ) { 27 | $el.tailorLightbox( { 28 | delegate : '.entry__thumbnail > a', 29 | disableOn : function() { 30 | return $el.hasClass( 'is-selected' ); 31 | } 32 | } ); 33 | } 34 | } ); 35 | 36 | } ) ( window.app, window.Tailor.Api.Element, Tailor.Views || {} ); -------------------------------------------------------------------------------- /assets/css/scss/_variables.scss: -------------------------------------------------------------------------------- 1 | 2 | $namespace : ''; 3 | 4 | $primary-color: #0f95ee !default; 5 | $secondary-color: #fd2e7e !default; 6 | $text-color: #404040 !default; 7 | $background-color: #fdfdfd; 8 | $border-color: rgba( 0, 0, 0, 0.1 ) !default; 9 | $border-radius: 0 !default; 10 | $box-shadow: 0 2px 6px rgba( 0, 0, 0, 0.1 ) !default; 11 | $base-line-height: 1.5 !default; 12 | $base-spacing-unit: $base-line-height !default; 13 | 14 | $column-gutter: 2rem !default; 15 | 16 | // 17 | // Media query ranges 18 | // 19 | $x-small: "only screen and (max-width: 480px)" !default; 20 | $small: "only screen and (min-width: 481px) and (max-width: 767px)" !default; 21 | $small-up: "only screen and (min-width: 481px)" !default; 22 | $medium: "only screen and (min-width: 768px) and (max-width: 979px)" !default; 23 | $medium-up: "only screen and (min-width: 768px)" !default; 24 | $large: "only screen and (min-width: 980px) and (max-width: 1199px)" !default; 25 | $large-up: "only screen and (min-width: 980px)" !default; 26 | $x-large: "only screen and (min-width: 1200px)" !default; -------------------------------------------------------------------------------- /assets/css/scss/tools/_prefixer.scss: -------------------------------------------------------------------------------- 1 | $prefix-for-webkit: true !default; 2 | $prefix-for-mozilla: true !default; 3 | $prefix-for-microsoft: true !default; 4 | $prefix-for-opera: true !default; 5 | $prefix-for-spec: true !default; 6 | // required for keyframe mixin 7 | 8 | @mixin disable-prefix-for-all() { 9 | $prefix-for-webkit: false; 10 | $prefix-for-mozilla: false; 11 | $prefix-for-microsoft: false; 12 | $prefix-for-opera: false; 13 | $prefix-for-spec: false; 14 | } 15 | 16 | @mixin prefixer( $property, $value, $prefixes ) { 17 | @each $prefix in $prefixes { 18 | @if $prefix == webkit { 19 | @if $prefix-for-webkit { 20 | -webkit-#{$property}: $value; 21 | } 22 | } @else if $prefix == moz { 23 | @if $prefix-for-mozilla { 24 | -moz-#{$property}: $value; 25 | } 26 | } @else if $prefix == ms { 27 | @if $prefix-for-microsoft { 28 | -ms-#{$property}: $value; 29 | } 30 | } @else if $prefix == o { 31 | @if $prefix-for-opera { 32 | -o-#{$property}: $value; 33 | } 34 | } @else if $prefix == spec { 35 | @if $prefix-for-spec { 36 | #{$property}: $value; 37 | } 38 | } @else { 39 | @warn "Unrecognized prefix: #{$prefix}"; 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /partials/content-product.php: -------------------------------------------------------------------------------- 1 | 20 | 21 |
22 | 23 | $image_size, 27 | 'image_link' => $image_link, 28 | 'aspect_ratio' => $aspect_ratio, 29 | 'stretch' => $stretch, 30 | ) ); 31 | } ?> 32 | 33 |

34 | 35 |

36 | 37 | 41 | 42 |
43 | -------------------------------------------------------------------------------- /assets/css/scss/components/_testimonial.scss: -------------------------------------------------------------------------------- 1 | $testimonial-spacing-unit: $base-spacing-unit !default; 2 | $testimonial-border-width: 1px !default; 3 | $testimonial-border-color: $border-color !default; 4 | $testimonial-border-radius: $border-radius !default; 5 | $testimonial-box-shadow: $box-shadow !default; 6 | 7 | .tailor-ui { 8 | 9 | .testimonial { 10 | position: relative; 11 | padding: 1em; 12 | border: $testimonial-border-width solid $testimonial-border-color; 13 | margin-bottom: #{$testimonial-spacing-unit}em; 14 | 15 | .testimonial__content { 16 | padding-left: 2em; 17 | margin: 0; 18 | border: none; 19 | 20 | .tailor-element:first-child { 21 | position: relative; 22 | 23 | p:first-child { 24 | 25 | &::before { 26 | position: absolute; 27 | top: -0.125em; 28 | left: -0.55em; 29 | display: block; 30 | content: "\201c"; 31 | font-size: 4em; 32 | line-height: 1; 33 | font-family: Calibri, Times New Roman, serif; 34 | } 35 | } 36 | } 37 | } 38 | 39 | .testimonial__attribution { 40 | position: relative; 41 | padding: 0 1em; 42 | font-weight: bold; 43 | float: right; 44 | 45 | &::before { 46 | position: absolute; 47 | left: 0; 48 | content: "\2013\00A0"; 49 | color: #666; 50 | } 51 | 52 | .testimonial__citation { 53 | font-style: italic; 54 | } 55 | 56 | .testimonial__author, 57 | .testimonial__citation { 58 | padding: 0; 59 | margin: 0; 60 | } 61 | } 62 | 63 | @include clearfix; 64 | } 65 | } -------------------------------------------------------------------------------- /assets/js/dist/canvas.js: -------------------------------------------------------------------------------- 1 | (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o a', 30 | disableOn : function() { 31 | return $el.hasClass( 'is-selected' ); 32 | } 33 | } ); 34 | } 35 | } ); 36 | 37 | } ) ( window.app, window.Tailor.Api.Element, Tailor.Views || {} ); 38 | },{}]},{},[1]); 39 | -------------------------------------------------------------------------------- /assets/css/scss/components/_products.scss: -------------------------------------------------------------------------------- 1 | $products-spacing-unit: $base-spacing-unit !default; 2 | 3 | $products-border-width: 1px !default; 4 | $products-border-style: solid !default; 5 | $products-border-color: $border-color !default; 6 | 7 | .tailor-ui { 8 | 9 | .tailor-products { 10 | margin-bottom: #{$products-spacing-unit}em; 11 | border-style: $products-border-style; 12 | border-color: $products-border-color; 13 | 14 | .entry { 15 | margin-bottom: #{$products-spacing-unit}em; 16 | text-align: center; 17 | } 18 | 19 | .entry__title { 20 | margin: 1em 0 0.5em; 21 | 22 | a { 23 | color: inherit; 24 | } 25 | } 26 | 27 | .entry__price { 28 | display: block; 29 | font-size: 0.875em; 30 | } 31 | 32 | .entry__thumbnail { 33 | overflow: hidden; 34 | 35 | a { 36 | display: block; 37 | border: none; 38 | outline: none; 39 | } 40 | 41 | img { 42 | margin: 0; 43 | } 44 | } 45 | } 46 | 47 | .tailor-grid--products { 48 | 49 | .tailor-grid { 50 | display: block; 51 | } 52 | 53 | .tailor-grid__item { 54 | padding: 1em; 55 | } 56 | } 57 | 58 | .tailor-list--products { 59 | 60 | .entry:last-child { 61 | margin-bottom: 0; 62 | } 63 | } 64 | 65 | .tailor-products--boxed { 66 | 67 | .entry { 68 | border: $products-border-width $products-border-style $products-border-color; 69 | background-color: #fff; 70 | overflow: hidden; 71 | } 72 | 73 | .entry__content { 74 | padding-right: 2em; 75 | padding-bottom: 2em; 76 | padding-left: 2em; 77 | } 78 | } 79 | } -------------------------------------------------------------------------------- /assets/css/scss/components/_pricing.scss: -------------------------------------------------------------------------------- 1 | $pricing-spacing-unit: $base-spacing-unit !default; 2 | $pricing-border-width: 1px !default; 3 | $pricing-border-color: $border-color !default; 4 | $pricing-border-radius: $border-radius !default; 5 | $pricing-background-color: $background-color !default; 6 | $pricing-box-shadow: $box-shadow !default; 7 | 8 | .tailor-ui { 9 | 10 | .pricing { 11 | padding: 2em; 12 | border: $pricing-border-width solid $pricing-border-color; 13 | border-radius: $pricing-border-radius; 14 | margin-bottom: #{$pricing-spacing-unit}em; 15 | background-color: #fff; 16 | text-align: center; 17 | 18 | &--featured { 19 | position: relative; 20 | z-index: 99; 21 | box-shadow: $pricing-box-shadow; 22 | 23 | @include transform( scale( 1.1 ) ); 24 | } 25 | 26 | ul { 27 | padding: 0; 28 | margin: 0 0 #{$pricing-spacing-unit}em 0; 29 | 30 | li { 31 | padding: 0; 32 | list-style: none; 33 | display: block; 34 | 35 | &::before { 36 | content: '\2014'; 37 | margin-right: 0.5em; 38 | color: inherit; 39 | } 40 | } 41 | } 42 | } 43 | 44 | .pricing__title { 45 | font-size: 2em; 46 | margin: 0.5em 0 0; 47 | color: #1d211f; 48 | } 49 | 50 | .pricing__currency { 51 | font-size: 0.5em; 52 | vertical-align: super; 53 | } 54 | 55 | .pricing__period { 56 | font-size: 0.25em; 57 | display: inline-block; 58 | padding: 0 0 0 0.5em; 59 | vertical-align: super; 60 | //color: #666; 61 | } 62 | 63 | .pricing__price { 64 | font-size: 5em; 65 | font-weight: 800; 66 | position: relative; 67 | z-index: 100; 68 | } 69 | 70 | .pricing__content { 71 | text-align: initial; 72 | font-size: 0.95em; 73 | margin: 0; 74 | padding: 1.5em 0.5em 2.5em; 75 | list-style: none; 76 | } 77 | } 78 | 79 | @media #{$large-up} { 80 | 81 | .row { 82 | 83 | .pricing { 84 | margin-left: calc( -#{( strip-unit( $column-gutter ) / 2 )}rem - 1px ); 85 | margin-right: calc( -#{( strip-unit( $column-gutter ) / 2 )}rem - 1px ); 86 | } 87 | } 88 | } -------------------------------------------------------------------------------- /assets/css/frontend.css.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "mappings": "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", 4 | "sources": ["scss/components/_products.scss","scss/components/_pricing.scss","scss/tools/_prefixer.scss","scss/components/_testimonial.scss","scss/tools/_clearfix.scss"], 5 | "names": [], 6 | "file": "frontend.css" 7 | } -------------------------------------------------------------------------------- /assets/css/frontend.min.css.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "mappings": "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", 4 | "sources": ["scss/components/_products.scss","scss/components/_pricing.scss","scss/tools/_prefixer.scss","scss/components/_testimonial.scss","scss/tools/_clearfix.scss"], 5 | "names": [], 6 | "file": "frontend.min.css" 7 | } -------------------------------------------------------------------------------- /includes/shortcodes/shortcode-testimonial.php: -------------------------------------------------------------------------------- 1 | empty( $atts['id'] ) ? null : $atts['id'], 28 | 'class' => explode( ' ', "tailor-element testimonial {$atts['class']}" ), 29 | 'data' => array(), 30 | ); 31 | 32 | $author = ! empty( $atts['author'] ) ? '

' . esc_attr( $atts['author'] ) . '

' : ''; 33 | $citation = ! empty( $atts['citation'] ) ? '' . esc_attr( $atts['citation'] ) . '' : ''; 34 | if ( ! empty( $atts['author'] ) || ! empty( $atts['citation'] ) ) { 35 | $attribution = "
{$author}{$citation}
"; 36 | } 37 | else { 38 | $attribution = ''; 39 | } 40 | 41 | /** 42 | * Filter the HTML attributes for the element. 43 | * 44 | * @since 1.2.0 45 | * 46 | * @param array $html_attributes 47 | * @param array $atts 48 | * @param string $tag 49 | */ 50 | $html_atts = apply_filters( 'tailor_shortcode_html_attributes', $html_atts, $atts, $tag ); 51 | $html_atts['class'] = implode( ' ', (array) $html_atts['class'] ); 52 | $html_atts = tailor_get_attributes( $html_atts ); 53 | 54 | $outer_html = "
%s
"; 55 | $inner_html = '
%s
' . 56 | $attribution; 57 | $content = do_shortcode( $content ); 58 | $html = sprintf( $outer_html, sprintf( $inner_html, $content ) ); 59 | 60 | /** 61 | * Filter the HTML for the element. 62 | * 63 | * @since 1.2.0 64 | * 65 | * @param string $html 66 | * @param string $outer_html 67 | * @param string $inner_html 68 | * @param string $html_atts 69 | * @param array $atts 70 | * @param string $content 71 | * @param string $tag 72 | */ 73 | $html = apply_filters( 'tailor_shortcode_html', $html, $outer_html, $inner_html, $html_atts, $atts, $content, $tag ); 74 | 75 | return $html; 76 | } 77 | 78 | add_shortcode( 'tailor_testimonial', 'tailor_shortcode_testimonial' ); 79 | } -------------------------------------------------------------------------------- /assets/css/frontend.min.css: -------------------------------------------------------------------------------- 1 | .tailor-ui .tailor-products{margin-bottom:1.5em;border-style:solid;border-color:rgba(0,0,0,0.1)}.tailor-ui .tailor-products .entry{margin-bottom:1.5em;text-align:center}.tailor-ui .tailor-products .entry__title{margin:1em 0 0.5em}.tailor-ui .tailor-products .entry__title a{color:inherit}.tailor-ui .tailor-products .entry__price{display:block;font-size:0.875em}.tailor-ui .tailor-products .entry__thumbnail{overflow:hidden}.tailor-ui .tailor-products .entry__thumbnail a{display:block;border:none;outline:none}.tailor-ui .tailor-products .entry__thumbnail img{margin:0}.tailor-ui .tailor-grid--products .tailor-grid{display:block}.tailor-ui .tailor-grid--products .tailor-grid__item{padding:1em}.tailor-ui .tailor-list--products .entry:last-child{margin-bottom:0}.tailor-ui .tailor-products--boxed .entry{border:1px solid rgba(0,0,0,0.1);background-color:#fff;overflow:hidden}.tailor-ui .tailor-products--boxed .entry__content{padding-right:2em;padding-bottom:2em;padding-left:2em}.tailor-ui .pricing{padding:2em;border:1px solid rgba(0,0,0,0.1);border-radius:0;margin-bottom:1.5em;background-color:#fff;text-align:center}.tailor-ui .pricing--featured{position:relative;z-index:99;box-shadow:0 2px 6px rgba(0,0,0,0.1);-webkit-transform:scale(1.1);-moz-transform:scale(1.1);-ms-transform:scale(1.1);-o-transform:scale(1.1);transform:scale(1.1)}.tailor-ui .pricing ul{padding:0;margin:0 0 1.5em 0}.tailor-ui .pricing ul li{padding:0;list-style:none;display:block}.tailor-ui .pricing ul li::before{content:'\2014';margin-right:0.5em;color:inherit}.tailor-ui .pricing__title{font-size:2em;margin:0.5em 0 0;color:#1d211f}.tailor-ui .pricing__currency{font-size:0.5em;vertical-align:super}.tailor-ui .pricing__period{font-size:0.25em;display:inline-block;padding:0 0 0 0.5em;vertical-align:super}.tailor-ui .pricing__price{font-size:5em;font-weight:800;position:relative;z-index:100}.tailor-ui .pricing__content{text-align:initial;font-size:0.95em;margin:0;padding:1.5em 0.5em 2.5em;list-style:none}@media only screen and (min-width: 980px){.row .pricing{margin-left:calc( -strip-unit(2rem)/2rem - 1px );margin-right:calc( -strip-unit(2rem)/2rem - 1px )}}.tailor-ui .testimonial{position:relative;padding:1em;border:1px solid rgba(0,0,0,0.1);margin-bottom:1.5em}.tailor-ui .testimonial .testimonial__content{padding-left:2em;margin:0;border:none}.tailor-ui .testimonial .testimonial__content .tailor-element:first-child{position:relative}.tailor-ui .testimonial .testimonial__content .tailor-element:first-child p:first-child::before{position:absolute;top:-0.125em;left:-0.55em;display:block;content:"\201c";font-size:4em;line-height:1;font-family:Calibri, Times New Roman, serif}.tailor-ui .testimonial .testimonial__attribution{position:relative;padding:0 1em;font-weight:bold;float:right}.tailor-ui .testimonial .testimonial__attribution::before{position:absolute;left:0;content:"\2013\00A0";color:#666}.tailor-ui .testimonial .testimonial__attribution .testimonial__citation{font-style:italic}.tailor-ui .testimonial .testimonial__attribution .testimonial__author,.tailor-ui .testimonial .testimonial__attribution .testimonial__citation{padding:0;margin:0}.tailor-ui .testimonial:after{content:"";display:table;clear:both} 2 | /*# sourceMappingURL=frontend.min.css.map */ 3 | -------------------------------------------------------------------------------- /includes/shortcodes/shortcode-pricing.php: -------------------------------------------------------------------------------- 1 | empty( $atts['id'] ) ? null : $atts['id'], 34 | 'class' => $class, 35 | 'data' => array(), 36 | ); 37 | 38 | /** 39 | * Filter the HTML attributes for the element. 40 | * 41 | * @since 1.2.0 42 | * 43 | * @param array $html_attributes 44 | * @param array $atts 45 | * @param string $tag 46 | */ 47 | $html_atts = apply_filters( 'tailor_shortcode_html_attributes', $html_atts, $atts, $tag ); 48 | $html_atts['class'] = implode( ' ', (array) $html_atts['class'] ); 49 | $html_atts = tailor_get_attributes( $html_atts ); 50 | 51 | $title = ( ! empty( $atts['title'] ) ) ? '

' . esc_attr( $atts['title'] ) . '

' : ''; 52 | $price = ''; 53 | if ( ! empty( $atts['price'] ) ) { 54 | $currency = ( ! empty( $atts['currency'] ) ) ? '' . esc_attr( $atts['currency'] ) . '' : ''; 55 | $period = ( ! empty( $atts['period'] ) ) ? '/ ' . esc_attr( $atts['period'] ) . '' : ''; 56 | $price = '
' . 57 | $currency . 58 | esc_attr( $atts['price'] ) . 59 | $period . 60 | '
'; 61 | } 62 | 63 | $outer_html = "
%s
"; 64 | $inner_html = $title . 65 | $price . 66 | '
%s
'; 67 | $content = do_shortcode( $content ); 68 | $html = sprintf( $outer_html, sprintf( $inner_html, $content ) ); 69 | 70 | /** 71 | * Filter the HTML for the element. 72 | * 73 | * @since 1.2.0 74 | * 75 | * @param string $html 76 | * @param string $outer_html 77 | * @param string $inner_html 78 | * @param string $html_atts 79 | * @param array $atts 80 | * @param string $content 81 | * @param string $tag 82 | */ 83 | $html = apply_filters( 'tailor_shortcode_html', $html, $outer_html, $inner_html, $html_atts, $atts, $content, $tag ); 84 | 85 | return $html; 86 | } 87 | 88 | add_shortcode( 'tailor_pricing', 'tailor_shortcode_pricing' ); 89 | } -------------------------------------------------------------------------------- /languages/tailor-woocommerce.pot: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2016 Tailor - WooCommerce extension 2 | # This file is distributed under the same license as the Tailor - WooCommerce extension package. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: Tailor - WooCommerce extension 1.2.0\n" 6 | "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/tailor-woocommerce\n" 7 | "POT-Creation-Date: 2016-10-20 08:10:59+00:00\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n" 12 | "Last-Translator: FULL NAME \n" 13 | "Language-Team: LANGUAGE \n" 14 | 15 | #: includes/elements/class-pricing.php:34 16 | #: includes/elements/class-products.php:33 17 | #: includes/elements/class-testimonial.php:34 18 | msgid "General" 19 | msgstr "" 20 | 21 | #: includes/elements/class-pricing.php:39 22 | #: includes/elements/class-products.php:43 23 | #: includes/elements/class-testimonial.php:39 24 | msgid "Colors" 25 | msgstr "" 26 | 27 | #: includes/elements/class-pricing.php:44 28 | #: includes/elements/class-products.php:48 29 | #: includes/elements/class-testimonial.php:44 30 | msgid "Attributes" 31 | msgstr "" 32 | 33 | #: includes/elements/class-pricing.php:52 34 | msgid "Standard plan" 35 | msgstr "" 36 | 37 | #: includes/elements/class-pricing.php:55 38 | msgid "Title" 39 | msgstr "" 40 | 41 | #: includes/elements/class-pricing.php:66 42 | #: includes/elements/class-products.php:173 43 | msgid "Price" 44 | msgstr "" 45 | 46 | #: includes/elements/class-pricing.php:77 47 | msgid "Currency" 48 | msgstr "" 49 | 50 | #: includes/elements/class-pricing.php:91 51 | msgctxt "pricing period" 52 | msgid "month" 53 | msgstr "" 54 | 55 | #: includes/elements/class-pricing.php:94 56 | msgid "Period" 57 | msgstr "" 58 | 59 | #: includes/elements/class-pricing.php:110 60 | msgid "Featured" 61 | msgstr "" 62 | 63 | #: includes/elements/class-pricing.php:113 64 | msgid "Display as featured?" 65 | msgstr "" 66 | 67 | #: includes/elements/class-products.php:38 68 | msgid "Query" 69 | msgstr "" 70 | 71 | #: includes/elements/class-products.php:79 72 | msgid "Default" 73 | msgstr "" 74 | 75 | #: includes/elements/class-products.php:80 76 | msgid "Boxed" 77 | msgstr "" 78 | 79 | #: includes/elements/class-products.php:90 80 | msgid "List" 81 | msgstr "" 82 | 83 | #: includes/elements/class-products.php:91 84 | msgid "Grid" 85 | msgstr "" 86 | 87 | #: includes/elements/class-products.php:92 88 | msgid "Carousel" 89 | msgstr "" 90 | 91 | #: includes/elements/class-products.php:174 92 | msgid "Product Image" 93 | msgstr "" 94 | 95 | #: includes/elements/class-products.php:250 96 | msgid "Category" 97 | msgstr "" 98 | 99 | #: includes/elements/class-products.php:261 100 | msgid "Tag" 101 | msgstr "" 102 | 103 | #: includes/elements/class-testimonial.php:54 104 | msgid "Author" 105 | msgstr "" 106 | 107 | #: includes/elements/class-testimonial.php:64 108 | msgid "Citation" 109 | msgstr "" 110 | 111 | #: includes/shortcodes/shortcode-products.php:122 112 | msgid "Please configure this element as there is currently nothing to display" 113 | msgstr "" 114 | 115 | #: tailor-woocommerce.php:148 116 | msgid "Please ensure that Tailor 1.7.0 (or newer) is active to use the WooCommerce extension." 117 | msgstr "" 118 | 119 | #: tailor-woocommerce.php:276 120 | msgid "Products" 121 | msgstr "" 122 | 123 | #: tailor-woocommerce.php:277 124 | msgid "Your site's products." 125 | msgstr "" 126 | 127 | #: tailor-woocommerce.php:278 tailor-woocommerce.php:288 128 | #: tailor-woocommerce.php:298 129 | msgid "WooCommerce" 130 | msgstr "" 131 | 132 | #: tailor-woocommerce.php:284 133 | msgid "Pricing" 134 | msgstr "" 135 | 136 | #: tailor-woocommerce.php:285 137 | msgid "A pricing table column." 138 | msgstr "" 139 | 140 | #: tailor-woocommerce.php:294 141 | msgid "Testimonial" 142 | msgstr "" 143 | 144 | #: tailor-woocommerce.php:295 145 | msgid "A testimonial block." 146 | msgstr "" 147 | #. Plugin Name of the plugin/theme 148 | msgid "Tailor - WooCommerce extension" 149 | msgstr "" 150 | 151 | #. Plugin URI of the plugin/theme 152 | msgid "http://www.gettailor.com" 153 | msgstr "" 154 | 155 | #. Description of the plugin/theme 156 | msgid "Adds WooCommerce support and shop functionality to the Tailor plugin." 157 | msgstr "" 158 | 159 | #. Author of the plugin/theme 160 | msgid "Andrew Worsfold" 161 | msgstr "" 162 | 163 | #. Author URI of the plugin/theme 164 | msgid "http://www.andrewworsfold.com" 165 | msgstr "" 166 | -------------------------------------------------------------------------------- /assets/css/frontend.css: -------------------------------------------------------------------------------- 1 | .tailor-ui .tailor-products { 2 | margin-bottom: 1.5em; 3 | border-style: solid; 4 | border-color: rgba(0, 0, 0, 0.1); } 5 | .tailor-ui .tailor-products .entry { 6 | margin-bottom: 1.5em; 7 | text-align: center; } 8 | .tailor-ui .tailor-products .entry__title { 9 | margin: 1em 0 0.5em; } 10 | .tailor-ui .tailor-products .entry__title a { 11 | color: inherit; } 12 | .tailor-ui .tailor-products .entry__price { 13 | display: block; 14 | font-size: 0.875em; } 15 | .tailor-ui .tailor-products .entry__thumbnail { 16 | overflow: hidden; } 17 | .tailor-ui .tailor-products .entry__thumbnail a { 18 | display: block; 19 | border: none; 20 | outline: none; } 21 | .tailor-ui .tailor-products .entry__thumbnail img { 22 | margin: 0; } 23 | .tailor-ui .tailor-grid--products .tailor-grid { 24 | display: block; } 25 | .tailor-ui .tailor-grid--products .tailor-grid__item { 26 | padding: 1em; } 27 | .tailor-ui .tailor-list--products .entry:last-child { 28 | margin-bottom: 0; } 29 | .tailor-ui .tailor-products--boxed .entry { 30 | border: 1px solid rgba(0, 0, 0, 0.1); 31 | background-color: #fff; 32 | overflow: hidden; } 33 | .tailor-ui .tailor-products--boxed .entry__content { 34 | padding-right: 2em; 35 | padding-bottom: 2em; 36 | padding-left: 2em; } 37 | 38 | .tailor-ui .pricing { 39 | padding: 2em; 40 | border: 1px solid rgba(0, 0, 0, 0.1); 41 | border-radius: 0; 42 | margin-bottom: 1.5em; 43 | background-color: #fff; 44 | text-align: center; } 45 | .tailor-ui .pricing--featured { 46 | position: relative; 47 | z-index: 99; 48 | box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); 49 | -webkit-transform: scale(1.1); 50 | -moz-transform: scale(1.1); 51 | -ms-transform: scale(1.1); 52 | -o-transform: scale(1.1); 53 | transform: scale(1.1); } 54 | .tailor-ui .pricing ul { 55 | padding: 0; 56 | margin: 0 0 1.5em 0; } 57 | .tailor-ui .pricing ul li { 58 | padding: 0; 59 | list-style: none; 60 | display: block; } 61 | .tailor-ui .pricing ul li::before { 62 | content: '\2014'; 63 | margin-right: 0.5em; 64 | color: inherit; } 65 | .tailor-ui .pricing__title { 66 | font-size: 2em; 67 | margin: 0.5em 0 0; 68 | color: #1d211f; } 69 | .tailor-ui .pricing__currency { 70 | font-size: 0.5em; 71 | vertical-align: super; } 72 | .tailor-ui .pricing__period { 73 | font-size: 0.25em; 74 | display: inline-block; 75 | padding: 0 0 0 0.5em; 76 | vertical-align: super; } 77 | .tailor-ui .pricing__price { 78 | font-size: 5em; 79 | font-weight: 800; 80 | position: relative; 81 | z-index: 100; } 82 | .tailor-ui .pricing__content { 83 | text-align: initial; 84 | font-size: 0.95em; 85 | margin: 0; 86 | padding: 1.5em 0.5em 2.5em; 87 | list-style: none; } 88 | 89 | @media only screen and (min-width: 980px) { 90 | .row .pricing { 91 | margin-left: calc( -strip-unit(2rem)/2rem - 1px ); 92 | margin-right: calc( -strip-unit(2rem)/2rem - 1px ); } } 93 | .tailor-ui .testimonial { 94 | position: relative; 95 | padding: 1em; 96 | border: 1px solid rgba(0, 0, 0, 0.1); 97 | margin-bottom: 1.5em; } 98 | .tailor-ui .testimonial .testimonial__content { 99 | padding-left: 2em; 100 | margin: 0; 101 | border: none; } 102 | .tailor-ui .testimonial .testimonial__content .tailor-element:first-child { 103 | position: relative; } 104 | .tailor-ui .testimonial .testimonial__content .tailor-element:first-child p:first-child::before { 105 | position: absolute; 106 | top: -0.125em; 107 | left: -0.55em; 108 | display: block; 109 | content: "\201c"; 110 | font-size: 4em; 111 | line-height: 1; 112 | font-family: Calibri, Times New Roman, serif; } 113 | .tailor-ui .testimonial .testimonial__attribution { 114 | position: relative; 115 | padding: 0 1em; 116 | font-weight: bold; 117 | float: right; } 118 | .tailor-ui .testimonial .testimonial__attribution::before { 119 | position: absolute; 120 | left: 0; 121 | content: "\2013\00A0"; 122 | color: #666; } 123 | .tailor-ui .testimonial .testimonial__attribution .testimonial__citation { 124 | font-style: italic; } 125 | .tailor-ui .testimonial .testimonial__attribution .testimonial__author, 126 | .tailor-ui .testimonial .testimonial__attribution .testimonial__citation { 127 | padding: 0; 128 | margin: 0; } 129 | .tailor-ui .testimonial:after { 130 | content: ""; 131 | display: table; 132 | clear: both; } 133 | 134 | /*# sourceMappingURL=frontend.css.map */ 135 | -------------------------------------------------------------------------------- /readme.txt: -------------------------------------------------------------------------------- 1 | === Tailor Page Builder: WooCommerce Extension === 2 | Contributors: andrew.worsfold, enclavely, munirkamal, essamamdani 3 | Tags: frontend, woocommerce, ecommerce, products, product, shop, extension, tailor, content, layout creator, responsive, page builder, visual composer, drag and drop builder, frontend editor 4 | Requires at least: 4.3 5 | Tested up to: 4.7 6 | Stable tag: 1.2.1 7 | License: GPLv3 or later 8 | License URI: http://www.gnu.org/licenses/gpl.html 9 | 10 | Create a stylish storefront with this powerful extension for the free Tailor frontend page builder! 11 | 12 | == Description == 13 | 14 | This extension adds e-commerce functionality to the [Tailor](https://wordpress.org/plugins/tailor) frontend page builder based on the popular WooCommerce plugin. Display products, testimonials and pricing information easily using Tailor's simple and intuitive drag and drop interface. 15 | 16 | > Tailor version 1.7.2 (or newer) must be active to use this extension 17 | 18 | To get started with Tailor, refer to our [documentation](https://support.gettailor.com/hc/en-us/categories/202586427-Getting-started). 19 | 20 | You can get in touch with questions or recommendations in a number of ways: 21 | 22 | 1. [Facebook](https://www.facebook.com/tailorwp/) or Twitter at [@tailorwp](https://twitter.com/tailorwp) or [@andrewjworsfold](https://twitter.com/andrewjworsfold). 23 | 2. The [Help Center](http://support.gettailor.com) 24 | 3. The [GitHub project](https://github.com/andrew-worsfold/tailor-woocommerce) 25 | 4. The [Community Forum](https://support.gettailor.com/hc/en-us/community/topics) 26 | 27 | If you like the plugin, you can help by [rating it](https://wordpress.org/support/view/plugin-reviews/tailor-woocommerce?rate=5#postform). 28 | 29 | == Installation == 30 | 31 | 1. Install [Tailor](https://wordpress.org/plugins/tailor) 32 | 33 | 2. Install the extension via the plugin directory, or by uploading the files manually to your server. 34 | 35 | = From your WordPress dashboard = 36 | 37 | 1. Visit 'Plugins > Add New’. 38 | 39 | 2. Search for ‘Tailor’. 40 | 41 | 3. Activate Tailor from your Plugins page. Do the same for the WooCommerce extension. 42 | 43 | = From WordPress.org = 44 | 45 | 1. Download Tailor and the WooCommerce extension. 46 | 47 | 2. Upload the ‘tailor’ directory to your '/wp-content/plugins/' directory, using your favorite method (ftp, sftp, scp, etc..). Do the same for the 'tailor-woocommerce' directory. 48 | 49 | 3. Activate Tailor and the WooCommerce extension from your Plugins page. 50 | 51 | == Screenshots == 52 | 53 | 1. **Products element** - Display products from your store in highly customizable list, grid and carousel layouts. 54 | 55 | 2. **Pricing element** - Display your pricing structure using pricing tables. Create a column structure to highlight multiple pricing plans. 56 | 57 | 3. **Testimonials element** - Display customer testimonials or any other social proof anywhere on your site. 58 | 59 | == Frequently Asked Questions == 60 | 61 | = Can I use my existing WordPress theme? = 62 | 63 | Yes! Tailor (and this extension) works out-of-the-box with nearly every WordPress theme. 64 | 65 | = Can I include Tailor (and this extension) as part of my theme bundle? = 66 | 67 | Yes, however, users should be directed to the WordPress plugin repository to install the latest version of the plugin/extension. Consider using a tool like [TGM Plugin Activation](http://tgmpluginactivation.com/) to guide users through the installation process. 68 | 69 | == Changelog == 70 | 71 | = 1.2.1 = 72 | * Added - Responsive settings for the Products, Testimonial and Pricing elements. 73 | * Added - Quotation mark color setting to Testimonial element. 74 | 75 | Note: This version requires Tailor version 1.7.2 (or newer). 76 | 77 | = 1.2.0 = 78 | * Added - Filter for HTML attributes of default elements. 79 | * Added - Filter for the rendered HTML of default elements. 80 | * Added - Image link option to the Products element to align with the Posts element. 81 | 82 | = 1.1.1 = 83 | * Added - Filter to modify the rendered HTML of a given element. 84 | * Updated: Compatibility with new method of registering elements in Tailor. Please ensure you upgrade to Tailor 1.6.0 or later. 85 | * Removed - Unnecessary child views. 86 | 87 | = 1.1.0 = 88 | * Updated: Compatibility with new and improved Tailor JS API. Please ensure you upgrade to Tailor 1.5.0 or later. 89 | 90 | = 1.0.1 = 91 | * Added: Check to ensure WooCommerce pages (Shop, Cart, Checkout and My Account) cannot be Tailored. 92 | * Added: Custom icons for WooCommerce related elements. 93 | 94 | = 1.0.0 = 95 | * Initial release. 96 | 97 | == Upgrade Notice == 98 | 99 | = 1.1.1 = 100 | * This update provides compatibility for the new method of registering element child container in Tailor 1.6.0. Please ensure that you also upgrade Tailor to at least 1.6.0. 101 | 102 | = 1.1.0 = 103 | * This update provides compatibility for the new JS API provided in Tailor 1.5.0. Please ensure that you also upgrade Tailor to at least 1.5.0. 104 | -------------------------------------------------------------------------------- /includes/elements/class-testimonial.php: -------------------------------------------------------------------------------- 1 | add_section( 'general', array( 34 | 'title' => __( 'General', 'tailor-woocommerce' ), 35 | 'priority' => 10, 36 | ) ); 37 | 38 | $this->add_section( 'colors', array( 39 | 'title' => __( 'Colors', 'tailor-woocommerce' ), 40 | 'priority' => 20, 41 | ) ); 42 | 43 | $this->add_section( 'attributes', array( 44 | 'title' => __( 'Attributes', 'tailor-woocommerce' ), 45 | 'priority' => 30, 46 | ) ); 47 | 48 | $priority = 0; 49 | 50 | $this->add_setting( 'author', array( 51 | 'sanitize_callback' => 'tailor_sanitize_text', 52 | ) ); 53 | $this->add_control( 'author', array( 54 | 'label' => __( 'Author', 'tailor-woocommerce' ), 55 | 'type' => 'text', 56 | 'priority' => $priority += 10, 57 | 'section' => 'general', 58 | ) ); 59 | 60 | $this->add_setting( 'citation', array( 61 | 'sanitize_callback' => 'tailor_sanitize_text', 62 | ) ); 63 | $this->add_control( 'citation', array( 64 | 'label' => __( 'Citation', 'tailor-woocommerce' ), 65 | 'type' => 'text', 66 | 'priority' => $priority += 10, 67 | 'section' => 'general', 68 | ) ); 69 | 70 | $general_control_types = array( 71 | 'background_image', 72 | 'background_repeat', 73 | 'background_position', 74 | 'background_size', 75 | ); 76 | $general_control_arguments = array(); 77 | tailor_control_presets( $this, $general_control_types, $general_control_arguments, $priority ); 78 | 79 | $priority = 0; 80 | $color_control_types = array( 81 | 'color', 82 | 'link_color', 83 | 'heading_color', 84 | 'background_color', 85 | 'border_color', 86 | ); 87 | $color_control_arguments = array(); 88 | $priority = tailor_control_presets( $this, $color_control_types, $color_control_arguments, $priority ); 89 | 90 | $this->add_setting( 'quote_mark_color', array( 91 | 'sanitize_callback' => 'tailor_sanitize_color', 92 | ) ); 93 | $this->add_control( 'quote_mark_color', array( 94 | 'label' => __( 'Quotation mark color', 'tailor-woocommerce' ), 95 | 'type' => 'colorpicker', 96 | 'priority' => $priority += 10, 97 | 'section' => 'colors', 98 | ) ); 99 | 100 | $priority = 0; 101 | $attribute_control_types = array( 102 | 'class', 103 | 'padding', 104 | 'padding_tablet', 105 | 'padding_mobile', 106 | 'margin', 107 | 'margin_tablet', 108 | 'margin_mobile', 109 | 'border_style', 110 | 'border_width', 111 | 'border_width_tablet', 112 | 'border_width_mobile', 113 | 'border_radius', 114 | 'shadow', 115 | 'background_image', 116 | 'background_repeat', 117 | 'background_position', 118 | 'background_size', 119 | 'background_attachment', 120 | ); 121 | $attribute_control_arguments = array(); 122 | tailor_control_presets( $this, $attribute_control_types, $attribute_control_arguments, $priority ); 123 | } 124 | 125 | /** 126 | * Returns custom CSS rules for the element. 127 | * 128 | * @since 1.0.0 129 | * 130 | * @param array $atts 131 | * 132 | * @return array 133 | */ 134 | public function generate_css( $atts = array() ) { 135 | $css_rules = array(); 136 | $excluded_control_types = array(); 137 | $css_rules = tailor_css_presets( $css_rules, $atts, $excluded_control_types ); 138 | 139 | if ( ! empty( $atts['quote_mark_color'] ) ) { 140 | $css_rules[] = array( 141 | 'selectors' => array( '.testimonial__content .tailor-element:first-child p:first-child::before' ), 142 | 'declarations' => array( 143 | 'color' => esc_attr( $atts['quote_mark_color'] ), 144 | ), 145 | ); 146 | } 147 | 148 | return $css_rules; 149 | } 150 | } 151 | } -------------------------------------------------------------------------------- /includes/shortcodes/shortcode-products.php: -------------------------------------------------------------------------------- 1 | $items_per_row, 37 | 'autoplay' => boolval( $atts['autoplay'] ) ? 'true' : 'false', 38 | 'arrows' => boolval( $atts['arrows'] ) ? 'true' : 'false', 39 | 'dots' => boolval( $atts['dots'] ) ? 'true' : 'false', 40 | 'fade' => boolval( $atts['fade'] && '1' == $items_per_row ) ? 'true' : 'false', 41 | ); 42 | } 43 | 44 | $html_atts = array( 45 | 'id' => empty( $atts['id'] ) ? null : $atts['id'], 46 | 'class' => $class, 47 | 'data' => $data, 48 | ); 49 | 50 | /** 51 | * Filter the HTML attributes for the element. 52 | * 53 | * @since 1.2.0 54 | * 55 | * @param array $html_attributes 56 | * @param array $atts 57 | * @param string $tag 58 | */ 59 | $html_atts = apply_filters( 'tailor_shortcode_html_attributes', $html_atts, $atts, $tag ); 60 | $html_atts['class'] = implode( ' ', (array) $html_atts['class'] ); 61 | $html_atts = tailor_get_attributes( $html_atts ); 62 | 63 | $posts_per_page = intval( $atts['posts_per_page'] ); 64 | $offset = intval( $atts['offset'] ); 65 | $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; 66 | if ( $paged > 1 ) { 67 | $offset = ( ( $paged - 1 ) * $posts_per_page ) + $offset; 68 | } 69 | 70 | $query_args = array( 71 | 'post_type' => 'product', 72 | 'orderby' => $atts['order_by'], 73 | 'order' => $atts['order'], 74 | 'posts_per_page' => $posts_per_page, 75 | 'offset' => $offset, 76 | 'paged' => $paged, 77 | 'tax_query' => array(), 78 | ); 79 | 80 | if ( $atts['product_cat'] ) { 81 | $query_args['tax_query'][] = array( 82 | 'taxonomy' => 'product_cat', 83 | 'field' => 'term_id', 84 | 'terms' => explode( ',', $atts['product_cat'] ), 85 | ); 86 | } 87 | 88 | if ( $atts['product_tag'] ) { 89 | $query_args['tax_query']['relation'] = 'AND'; 90 | $query_args['tax_query'][] = array( 91 | 'taxonomy' => 'product_tag', 92 | 'field' => 'term_id', 93 | 'terms' => explode( ',', $atts['product_tag'] ), 94 | ); 95 | } 96 | 97 | $q = new WP_Query( $query_args ); 98 | 99 | ob_start(); 100 | 101 | tailor_partial( 'loop', $atts['layout'], array( 102 | 'q' => $q, 103 | 'layout_args' => array( 104 | 'items_per_row' => $atts['items_per_row'], 105 | 'masonry' => $atts['masonry'], 106 | 'pagination' => $atts['pagination'], 107 | ), 108 | 'entry_args' => array( 109 | 'meta' => explode( ',', $atts['meta'] ), 110 | 'image_link' => $atts['image_link'], 111 | 'image_size' => $atts['image_size'], 112 | 'aspect_ratio' => $atts['aspect_ratio'], 113 | 'stretch' => $atts['stretch'], 114 | ), 115 | ) ); 116 | 117 | $outer_html = "
%s
"; 118 | $inner_html = '%s'; 119 | $content = ob_get_clean(); 120 | if ( empty( $content ) ) { 121 | $content = sprintf( 122 | '

%s

', 123 | __( 'Please configure this element as there is currently nothing to display', 'tailor-woocommerce' ) 124 | ); 125 | } 126 | $html = sprintf( $outer_html, sprintf( $inner_html, $content ) ); 127 | 128 | /** 129 | * Filter the HTML for the element. 130 | * 131 | * @since 1.2.0 132 | * 133 | * @param string $html 134 | * @param string $outer_html 135 | * @param string $inner_html 136 | * @param string $html_atts 137 | * @param array $atts 138 | * @param string $content 139 | * @param string $tag 140 | */ 141 | $html = apply_filters( 'tailor_shortcode_html', $html, $outer_html, $inner_html, $html_atts, $atts, $content, $tag ); 142 | 143 | return $html; 144 | } 145 | 146 | add_shortcode( 'tailor_products', 'tailor_shortcode_products' ); 147 | } -------------------------------------------------------------------------------- /includes/elements/class-pricing.php: -------------------------------------------------------------------------------- 1 | add_section( 'general', array( 34 | 'title' => __( 'General', 'tailor-woocommerce' ), 35 | 'priority' => 10, 36 | ) ); 37 | 38 | $this->add_section( 'colors', array( 39 | 'title' => __( 'Colors', 'tailor-woocommerce'), 40 | 'priority' => 20, 41 | ) ); 42 | 43 | $this->add_section( 'attributes', array( 44 | 'title' => __( 'Attributes', 'tailor-woocommerce' ), 45 | 'priority' => 30, 46 | ) ); 47 | 48 | $priority = 0; 49 | 50 | $this->add_setting( 'title', array( 51 | 'sanitize_callback' => 'tailor_sanitize_text', 52 | 'default' => __( 'Standard plan', 'tailor-woocommerce' ), 53 | ) ); 54 | $this->add_control( 'title', array( 55 | 'label' => __( 'Title', 'tailor-woocommerce' ), 56 | 'type' => 'text', 57 | 'priority' => $priority += 10, 58 | 'section' => 'general', 59 | ) ); 60 | 61 | $this->add_setting( 'price', array( 62 | 'sanitize_callback' => 'tailor_sanitize_number', 63 | 'default' => '9', 64 | ) ); 65 | $this->add_control( 'price', array( 66 | 'label' => __( 'Price', 'tailor-woocommerce' ), 67 | 'type' => 'number', 68 | 'priority' => $priority += 10, 69 | 'section' => 'general', 70 | ) ); 71 | 72 | $this->add_setting( 'currency', array( 73 | 'sanitize_callback' => 'tailor_sanitize_text', 74 | 'default' => '$', 75 | ) ); 76 | $this->add_control( 'currency', array( 77 | 'label' => __( 'Currency', 'tailor-woocommerce' ), 78 | 'type' => 'text', 79 | 'priority' => $priority += 10, 80 | 'section' => 'general', 81 | 'dependencies' => array( 82 | 'price' => array( 83 | 'condition' => 'not', 84 | 'value' => '', 85 | ), 86 | ), 87 | ) ); 88 | 89 | $this->add_setting( 'period', array( 90 | 'sanitize_callback' => 'tailor_sanitize_text', 91 | 'default' => _x( 'month', 'pricing period', 'tailor-woocommerce' ), 92 | ) ); 93 | $this->add_control( 'period', array( 94 | 'label' => __( 'Period', 'tailor-woocommerce' ), 95 | 'type' => 'text', 96 | 'priority' => $priority += 10, 97 | 'section' => 'general', 98 | 'dependencies' => array( 99 | 'price' => array( 100 | 'condition' => 'not', 101 | 'value' => '', 102 | ), 103 | ), 104 | ) ); 105 | 106 | $this->add_setting( 'featured', array( 107 | 'sanitize_callback' => 'tailor_sanitize_number', 108 | ) ); 109 | $this->add_control( 'featured', array( 110 | 'label' => __( 'Featured', 'tailor-woocommerce' ), 111 | 'type' => 'checkbox', 112 | 'choices' => array( 113 | '1' => __( 'Display as featured?', 'tailor-woocommerce' ), 114 | ), 115 | 'priority' => $priority += 10, 116 | 'section' => 'general', 117 | ) ); 118 | 119 | $general_control_types = array( 120 | 'background_image', 121 | 'background_repeat', 122 | 'background_position', 123 | 'background_size', 124 | ); 125 | $general_control_arguments = array(); 126 | tailor_control_presets( $this, $general_control_types, $general_control_arguments, $priority ); 127 | 128 | $priority = 0; 129 | $color_control_types = array( 130 | 'color', 131 | 'link_color', 132 | 'heading_color', 133 | 'background_color', 134 | 'border_color', 135 | ); 136 | $color_control_arguments = array(); 137 | tailor_control_presets( $this, $color_control_types, $color_control_arguments, $priority ); 138 | 139 | $priority = 0; 140 | $attribute_control_types = array( 141 | 'class', 142 | 'padding', 143 | 'padding_tablet', 144 | 'padding_mobile', 145 | 'margin', 146 | 'margin_tablet', 147 | 'margin_mobile', 148 | 'border_style', 149 | 'border_width', 150 | 'border_width_tablet', 151 | 'border_width_mobile', 152 | 'border_radius', 153 | 'shadow', 154 | 'background_image', 155 | 'background_repeat', 156 | 'background_position', 157 | 'background_size', 158 | 'background_attachment', 159 | ); 160 | $attribute_control_arguments = array(); 161 | tailor_control_presets( $this, $attribute_control_types, $attribute_control_arguments, $priority ); 162 | } 163 | 164 | /** 165 | * Returns custom CSS rules for the element. 166 | * 167 | * @since 1.0.0 168 | * 169 | * @param array $atts 170 | * 171 | * @return array 172 | */ 173 | public function generate_css( $atts = array() ) { 174 | $css_rules = array(); 175 | $excluded_control_types = array(); 176 | $css_rules = tailor_css_presets( $css_rules, $atts, $excluded_control_types ); 177 | 178 | return $css_rules; 179 | } 180 | } 181 | } -------------------------------------------------------------------------------- /tailor-woocommerce.php: -------------------------------------------------------------------------------- 1 | version(), self::$required_tailor_version, '>=' ) // An unsupported version is being used ) { add_action( 'admin_notices', array( $this, 'display_version_notice' ) ); return; } load_plugin_textdomain( 'tailor-woocommerce', false, $this->plugin_dir() . 'languages/' ); $this->load_directory( 'shortcodes' ); $this->add_actions(); } /** * Displays an admin notice if an unsupported version of Tailor is being used. * * @since 1.2.0 */ public function display_version_notice() { printf( '
' . '

%s

' . '
', sprintf( __( 'Please ensure that Tailor %s (or newer) is active to use the WooCommerce extension.', 'tailor-woocommerce' ), self::$required_tailor_version ) ); } /** * Adds required action hooks. * * @since 1.0.0 * * @access protected */ protected function add_actions() { add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ) ); add_action( 'tailor_canvas_enqueue_scripts', array( $this, 'enqueue_scripts' ), 99 ); add_action( 'tailor_enqueue_sidebar_styles', array( $this, 'enqueue_sidebar_styles' ) ); add_action( 'tailor_register_elements', array( $this, 'register_elements' ) ); add_filter( 'tailor_plugin_partial_paths', array( $this, 'register_partial_path' ) ); add_filter( 'tailor_check_post', array( $this, 'prevent_woo_page_tailoring' ), 10, 2 ); } /** * Disabled Tailoring of dynamic WooCommerce pages. * * @since 1.0.1 * * @param $allowable * @param $post * * @return bool $allowable */ public function prevent_woo_page_tailoring( $allowable, $post ) { if ( function_exists( 'wc_get_page_id' ) && $allowable ) { $allowable = ! in_array( $post->ID, array( wc_get_page_id( 'shop' ), wc_get_page_id( 'checkout' ), wc_get_page_id( 'myaccount' ), wc_get_page_id( 'cart' ), ) ); } return $allowable; } /** * Enqueues frontend styles. * * @since 1.0.0 */ public function enqueue_styles() { if ( apply_filters( 'tailor_enqueue_stylesheets', true ) ) { $extension = SCRIPT_DEBUG ? '.css' : '.min.css'; wp_enqueue_style( 'tailor-woocommerce-frontend-styles', $this->plugin_url() . 'assets/css/frontend' . $extension, array(), $this->version() ); } } /** * Enqueues sidebar styles. * * @since 1.0.1 */ public function enqueue_sidebar_styles() { $extension = SCRIPT_DEBUG ? '.css' : '.min.css'; wp_enqueue_style( 'tailor-woocommerce-sidebar-styles', $this->plugin_url() . 'assets/css/sidebar' . $extension, array(), $this->version() ); } /** * Enqueues Canvas scripts. * * @since 1.0.0 */ public function enqueue_scripts() { $extension = SCRIPT_DEBUG ? '.js' : '.min.js'; wp_enqueue_script( 'tailor-woocommerce-canvas', tailor_woocommerce()->plugin_url() . 'assets/js/dist/canvas' . $extension, array( 'tailor-canvas' ), tailor_woocommerce()->version(), true ); } /** * Registers the partial directory for this extension plugin. * * @since 1.0.0 * * @param $paths * * @return array */ public function register_partial_path( $paths ) { $paths[] = $this->plugin_dir() . 'partials/'; return $paths; } /** * Loads and registers the new Tailor elements and shortcodes. * * @since 1.0.0 * * @param $element_manager Tailor_Elements */ public function register_elements( $element_manager ) { $this->load_directory( 'elements' ); $element_manager->add_element( 'tailor_products', array( 'label' => __( 'Products', 'tailor-woocommerce' ), 'description' => __( 'Your site\'s products.', 'tailor-woocommerce' ), 'badge' => __( 'WooCommerce', 'tailor-woocommerce' ), 'active_callback' => array( $this, 'is_woocommerce_active' ), 'dynamic' => true, ) ); $element_manager->add_element( 'tailor_pricing', array( 'label' => __( 'Pricing', 'tailor-woocommerce' ), 'description' => __( 'A pricing table column.', 'tailor-woocommerce' ), 'type' => 'wrapper', 'child_container' => '.pricing__content', 'badge' => __( 'WooCommerce', 'tailor-woocommerce' ), 'active_callback' => array( $this, 'is_woocommerce_active' ), 'dynamic' => true, ) ); $element_manager->add_element( 'tailor_testimonial', array( 'label' => __( 'Testimonial', 'tailor-woocommerce' ), 'description' => __( 'A testimonial block.', 'tailor-woocommerce' ), 'type' => 'wrapper', 'child_container' => '.testimonial__content', 'badge' => __( 'WooCommerce', 'tailor-woocommerce' ), 'active_callback' => array( $this, 'is_woocommerce_active' ), ) ); } /** * Returns the version number of the plugin. * * @since 1.0.0 * * @return string */ public function version() { return self::$version; } /** * Returns the plugin basename. * * @since 1.0.0 * * @return string */ public function plugin_basename() { return self::$plugin_basename; } /** * Returns the plugin name. * * @since 1.0.0 * * @return string */ public function plugin_name() { return self::$plugin_name; } /** * Returns the plugin directory. * * @since 1.0.0 * * @return string */ public function plugin_dir() { return self::$plugin_dir; } /** * Returns the plugin URL. * * @since 1.0.0 * * @return string */ public function plugin_url() { return self::$plugin_url; } /** * Returns true if the WooCommerce plugin is active. * * @since 1.0.0 * * @return bool */ public function is_woocommerce_active() { return class_exists( 'woocommerce' ) ? true : false; } /** * Loads all PHP files in a given directory. * * @since 1.0.0 */ public function load_directory( $directory_name ) { $path = trailingslashit( $this->plugin_dir() . 'includes/' . $directory_name ); $file_names = glob( $path . '*.php' ); foreach ( $file_names as $filename ) { if ( file_exists( $filename ) ) { require_once $filename; } } } } } if ( ! function_exists( 'tailor_woocommerce' ) ) { /** * Returns the Tailor WooCommerce instance. * * @since 1.0.0 * * @return Tailor_WooCommerce */ function tailor_woocommerce() { return Tailor_WooCommerce::instance(); } } tailor_woocommerce(); -------------------------------------------------------------------------------- /includes/elements/class-products.php: -------------------------------------------------------------------------------- 1 | add_section( 'general', array( 33 | 'title' => __( 'General', 'tailor-woocommerce' ), 34 | 'priority' => 10, 35 | ) ); 36 | 37 | $this->add_section( 'query', array( 38 | 'title' => __( 'Query', 'tailor-woocommerce' ), 39 | 'priority' => 20, 40 | ) ); 41 | 42 | $this->add_section( 'colors', array( 43 | 'title' => __( 'Colors', 'tailor-woocommerce' ), 44 | 'priority' => 30, 45 | ) ); 46 | 47 | $this->add_section( 'attributes', array( 48 | 'title' => __( 'Attributes', 'tailor-woocommerce' ), 49 | 'priority' => 40, 50 | ) ); 51 | 52 | $priority = 0; 53 | 54 | $general_control_types = array( 55 | 'style', 56 | 'layout', 57 | 'masonry', 58 | 'items_per_row', 59 | 'item_spacing', 60 | 'autoplay', 61 | 'arrows', 62 | 'dots', 63 | 'fade', 64 | 'meta', 65 | 'image_link', 66 | 'image_size', 67 | 'aspect_ratio', 68 | 'stretch', 69 | 'posts_per_page', 70 | 'pagination', 71 | ); 72 | $general_control_arguments = array( 73 | 'style' => array( 74 | 'setting' => array( 75 | 'default' => 'default', 76 | ), 77 | 'control' => array( 78 | 'choices' => array( 79 | 'default' => __( 'Default', 'tailor-woocommerce' ), 80 | 'boxed' => __( 'Boxed', 'tailor-woocommerce' ), 81 | ), 82 | ), 83 | ), 84 | 'layout' => array( 85 | 'setting' => array( 86 | 'default' => 'grid', 87 | ), 88 | 'control' => array( 89 | 'choices' => array( 90 | 'list' => __( 'List', 'tailor-woocommerce' ), 91 | 'grid' => __( 'Grid', 'tailor-woocommerce' ), 92 | 'carousel' => __( 'Carousel', 'tailor-woocommerce' ), 93 | ), 94 | ), 95 | ), 96 | 'masonry' => array( 97 | 'control' => array( 98 | 'dependencies' => array( 99 | 'layout' => array( 100 | 'condition' => 'equals', 101 | 'value' => 'grid', 102 | ), 103 | 'items_per_row' => array( 104 | 'condition' => 'greaterThan', 105 | 'value' => '1', 106 | ), 107 | ), 108 | ), 109 | ), 110 | 'items_per_row' => array( 111 | 'setting' => array( 112 | 'default' => '2', 113 | ), 114 | 'control' => array( 115 | 'dependencies' => array( 116 | 'layout' => array( 117 | 'condition' => 'contains', 118 | 'value' => array( 'grid', 'carousel' ), 119 | ), 120 | ), 121 | ), 122 | ), 123 | 'autoplay' => array( 124 | 'control' => array( 125 | 'dependencies' => array( 126 | 'layout' => array( 127 | 'condition' => 'contains', 128 | 'value' => array( 'carousel', 'slideshow' ), 129 | ), 130 | ), 131 | ), 132 | ), 133 | 'arrows' => array( 134 | 'control' => array( 135 | 'dependencies' => array( 136 | 'layout' => array( 137 | 'condition' => 'contains', 138 | 'value' => array( 'carousel', 'slideshow' ), 139 | ), 140 | ), 141 | ), 142 | ), 143 | 'dots' => array( 144 | 'control' => array( 145 | 'dependencies' => array( 146 | 'layout' => array( 147 | 'condition' => 'contains', 148 | 'value' => array( 'carousel', 'slideshow' ), 149 | ), 150 | ), 151 | ), 152 | ), 153 | 'fade' => array( 154 | 'control' => array( 155 | 'dependencies' => array( 156 | 'layout' => array( 157 | 'condition' => 'contains', 158 | 'value' => array( 'carousel', 'slideshow' ), 159 | ), 160 | 'items_per_row' => array( 161 | 'condition' => 'lessThan', 162 | 'value' => '2', 163 | ), 164 | ), 165 | ), 166 | ), 167 | 'meta' => array( 168 | 'setting' => array( 169 | 'default' => 'price,thumbnail', 170 | ), 171 | 'control' => array( 172 | 'choices' => array( 173 | 'price' => __( 'Price', 'tailor-woocommerce' ), 174 | 'thumbnail' => __( 'Product Image', 'tailor-woocommerce' ), 175 | ), 176 | ), 177 | ), 178 | 'image_link' => array( 179 | 'setting' => array( 180 | 'default' => 'none', 181 | ), 182 | ), 183 | 'image_size' => array( 184 | 'setting' => array( 185 | 'default' => 'large', 186 | ), 187 | 'control' => array( 188 | 'dependencies' => array( 189 | 'meta' => array( 190 | 'condition' => 'contains', 191 | 'value' => 'thumbnail', 192 | ), 193 | ), 194 | ), 195 | ), 196 | 'aspect_ratio' => array( 197 | 'control' => array( 198 | 'dependencies' => array( 199 | 'meta' => array( 200 | 'condition' => 'contains', 201 | 'value' => 'thumbnail', 202 | ), 203 | ), 204 | ), 205 | ), 206 | 'stretch' => array( 207 | 'control' => array( 208 | 'dependencies' => array( 209 | 'meta' => array( 210 | 'condition' => 'contains', 211 | 'value' => 'thumbnail', 212 | ), 213 | ), 214 | ), 215 | ), 216 | 'posts_per_page' => array( 217 | 'setting' => array( 218 | 'default' => '6', 219 | ), 220 | ), 221 | 'order_by' => array( 222 | 'setting' => array( 223 | 'default' => 'date', 224 | ), 225 | ), 226 | 'order' => array( 227 | 'setting' => array( 228 | 'default' => 'DESC', 229 | ), 230 | ), 231 | 'pagination' => array( 232 | 'control' => array( 233 | 'dependencies' => array( 234 | 'layout' => array( 235 | 'condition' => 'not', 236 | 'value' => 'carousel', 237 | ), 238 | ), 239 | ), 240 | ), 241 | ); 242 | tailor_control_presets( $this, $general_control_types, $general_control_arguments, $priority ); 243 | 244 | $priority = 0; 245 | 246 | $this->add_setting( 'product_cat', array( 247 | 'sanitize_callback' => 'tailor_sanitize_text', 248 | ) ); 249 | $this->add_control( 'product_cat', array( 250 | 'label' => __( 'Category', 'tailor-woocommerce' ), 251 | 'type' => 'select-multi', 252 | 'choices' => tailor_get_terms( 'product_cat' ), 253 | 'section' => 'query', 254 | 'priority' => $priority += 10, 255 | ) ); 256 | 257 | $this->add_setting( 'product_tag', array( 258 | 'sanitize_callback' => 'tailor_sanitize_text', 259 | ) ); 260 | $this->add_control( 'product_tag', array( 261 | 'label' => __( 'Tag', 'tailor-woocommerce' ), 262 | 'type' => 'select-multi', 263 | 'choices' => tailor_get_terms( 'product_tag' ), 264 | 'section' => 'query', 265 | 'priority' => $priority += 10, 266 | ) ); 267 | 268 | $query_control_types = array( 269 | 'order_by', 270 | 'order', 271 | 'offset', 272 | ); 273 | $query_control_arguments = array(); 274 | tailor_control_presets( $this, $query_control_types, $query_control_arguments, $priority ); 275 | 276 | $priority = 0; 277 | $color_control_types = array( 278 | 'color', 279 | 'link_color', 280 | 'heading_color', 281 | 'background_color', 282 | 'border_color', 283 | 'navigation_color', 284 | ); 285 | $color_control_arguments = array( 286 | 'navigation_color' => array( 287 | 'control' => array( 288 | 'dependencies' => array( 289 | 'layout' => array( 290 | 'condition' => 'equals', 291 | 'value' => 'carousel', 292 | ), 293 | ), 294 | ), 295 | ), 296 | ); 297 | tailor_control_presets( $this, $color_control_types, $color_control_arguments, $priority ); 298 | 299 | $priority = 0; 300 | $attribute_control_types = array( 301 | 'class', 302 | 'padding', 303 | 'padding_tablet', 304 | 'padding_mobile', 305 | 'margin', 306 | 'margin_tablet', 307 | 'margin_mobile', 308 | 'border_style', 309 | 'border_width', 310 | 'border_width_tablet', 311 | 'border_width_mobile', 312 | 'border_radius', 313 | 'shadow', 314 | 'background_image', 315 | 'background_repeat', 316 | 'background_position', 317 | 'background_size', 318 | 'background_attachment', 319 | ); 320 | $attribute_control_arguments = array(); 321 | tailor_control_presets( $this, $attribute_control_types, $attribute_control_arguments, $priority ); 322 | } 323 | 324 | /** 325 | * Returns custom CSS rules for the element. 326 | * 327 | * @since 1.0.0 328 | * 329 | * @param $atts 330 | * @return array 331 | */ 332 | public function generate_css( $atts ) { 333 | $css_rules = array(); 334 | $excluded_control_types = array(); 335 | $css_rules = tailor_css_presets( $css_rules, $atts, $excluded_control_types ); 336 | 337 | return $css_rules; 338 | } 339 | } 340 | } -------------------------------------------------------------------------------- /license.txt: -------------------------------------------------------------------------------- 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 | --------------------------------------------------------------------------------