Plugin Directory

Changeset 3223314


Ignore:
Timestamp:
01/16/2025 03:27:30 AM (13 months ago)
Author:
RyanNovotny
Message:

v 4.0.2

Location:
easy-pricing-tables/trunk
Files:
5 added
11 edited

Legend:

Unmodified
Added
Removed
  • easy-pricing-tables/trunk/includes/v4/blocks.php

    r3188461 r3223314  
    4242    wp_register_script( 'fca-ept4-column-js', PTP_PLUGIN_URL . '/includes/v4/blocks/column/column.min.js', [], PTP_PLUGIN_VER, true );
    4343    wp_register_script( 'fca-ept4-list-js', PTP_PLUGIN_URL . '/includes/v4/blocks/list/list.min.js', [], PTP_PLUGIN_VER, true );
     44    wp_register_script( 'fca-ept4-shortcode-js', PTP_PLUGIN_URL . '/includes/v4/blocks/shortcode/shortcode.min.js', [], PTP_PLUGIN_VER, true );
    4445    wp_register_script( 'fca-ept4-button-js', PTP_PLUGIN_URL . '/includes/v4/blocks/button/button.min.js', [], PTP_PLUGIN_VER, true );
    4546    wp_register_script( 'fca-ept4-field-js', PTP_PLUGIN_URL . '/includes/v4/blocks/field/field.min.js', [], PTP_PLUGIN_VER, true );
     
    5354    register_block_type( PTP_PLUGIN_PATH . '/includes/v4/blocks/list/' );
    5455    register_block_type( PTP_PLUGIN_PATH . '/includes/v4/blocks/list-item/' );
     56    register_block_type( PTP_PLUGIN_PATH . '/includes/v4/blocks/shortcode/', array( 'render_callback' => 'fca_ept_shortcode_render' ) );
    5557    register_block_type( PTP_PLUGIN_PATH . '/includes/v4/blocks/button/' );
    5658    register_block_type( PTP_PLUGIN_PATH . '/includes/v4/blocks/field/' );
     
    6668}
    6769add_action( 'init', 'fca_ept4_gutenblock_register' );
     70
     71function fca_ept_shortcode_render( $attributes ) {
     72    return do_shortcode( $attributes['content'] );
     73}
    6874
    6975function fca_ept4_block_enqueue() {
  • easy-pricing-tables/trunk/includes/v4/blocks/button/button.js

    r3188461 r3223314  
    55    var useInnerBlocksProps = wp.blockEditor.useInnerBlocksProps
    66    var selectedBlock = {}
    7 
    87   
    98    blocks.registerBlockType( 'easy-pricing-tables/button', {   
    109        icon: 'button',
     10       
    1111        edit: function( props ) {
    12        
     12           
    1313            var innerBlocksProps = useInnerBlocksProps( {}, {
    14                 template: [ [ 'core/shortcode', { text: props.attributes.shortcode } ] ]                   
     14                template: [ [ 'easy-pricing-tables/shortcode', { content: props.attributes.shortcode } ] ]                 
    1515            })
    1616           
     
    2929                className: 'easy-pricing-tables-button-' + props.attributes.buttonID,
    3030                placeholder: 'Add to Cart',
     31                allowedFormats: [
     32                    'core/bold',
     33                    'core/italic',
     34                    'core/image',
     35                    'core/strikethrough',
     36                    'core/text-color'
     37                ],
    3138                value: props.attributes.content,
    3239                onChange: function( newValue ){
     
    5057            }
    5158                       
    52             if( props.attributes.shortcode ) {
    53            
     59            if( props.attributes.shortcode ) {         
    5460                return el( 'div', {},
    5561                    //controls( props ),
  • easy-pricing-tables/trunk/includes/v4/blocks/button/button.min.js

    r3188461 r3223314  
    1 !function(t,e,o){function r(t){return a(wp.blockEditor.InspectorAdvancedControls,{},a(wp.components.TextControl,{label:"Shortcode (overrides default button)",value:t.attributes.shortcode,onChange:function(e){t.setAttributes({shortcode:e})}}))}function n(t,e){var o={maxWidth:t.attributes.width+"%"};return t.attributes.textColor&&(o.color=t.attributes.textColor),t.attributes.borderColor&&(o.border="1px solid "+t.attributes.borderColor),t.attributes.backgroundColor&&(o.backgroundColor=t.attributes.backgroundColor),t.attributes.borderColor&&(o.borderColor=t.attributes.borderColor),e.style=o,e}var a=React.createElement,l=wp.blockEditor.useBlockProps,u=wp.blockEditor.useInnerBlocksProps;t.registerBlockType("easy-pricing-tables/button",{icon:"button",edit:function(t){var e=u({},{template:[["core/shortcode",{text:t.attributes.shortcode}]]});React.useEffect(function(){""==t.attributes.buttonID&&t.setAttributes({buttonID:Math.random().toString(16).slice(2)})},[]);var o={href:t.attributes.url,tagName:"a",rel:"noopener",className:"easy-pricing-tables-button-"+t.attributes.buttonID,placeholder:"Add to Cart",value:t.attributes.content,onChange:function(e){t.setAttributes({content:e})}},i=l(n(t,o)),s=t.attributes.backgroundHoverColor,b=t.attributes.textHoverColor,c="background-color:"+s+" !important;";return""===s&&(c="filter: grayscale(0.65);"),b&&(c+="color:"+b+" !important;"),t.attributes.shortcode?a("div",{},r(t),a("div",e)):a("div",{style:{textAlign:"center"}},function(t){var e=[{label:"Background",value:t.attributes.backgroundColor,onChange:function(e){t.setAttributes({backgroundColor:e})}},{label:"Text",value:t.attributes.textColor,onChange:function(e){t.setAttributes({textColor:e})}},{label:"Hover Color",value:t.attributes.backgroundHoverColor,onChange:function(e){t.setAttributes({backgroundHoverColor:e})}},{label:"Text Hover Color",value:t.attributes.textHoverColor,onChange:function(e){t.setAttributes({textHoverColor:e})}}];return t.attributes.borderColor&&(e=[{label:"Background",value:t.attributes.backgroundColor,onChange:function(e){t.setAttributes({backgroundColor:e})}},{label:"Text",value:t.attributes.textColor,onChange:function(e){t.setAttributes({textColor:e})}},{label:"Border Color",value:t.attributes.borderColor,onChange:function(e){t.setAttributes({borderColor:e})}},{label:"Hover Color",value:t.attributes.backgroundHoverColor,onChange:function(e){t.setAttributes({backgroundHoverColor:e})}},{label:"Text Hover Color",value:t.attributes.textHoverColor,onChange:function(e){t.setAttributes({textHoverColor:e})}}]),a(wp.blockEditor.InspectorControls,{key:"ept4-button-controls"},a(wp.blockEditor.PanelColorSettings,{title:"Button Colors",colorSettings:e}),a("div",{className:"ept4-button-sidebar",style:{margin:"16px"}},a(wp.components.RangeControl,{label:"Button Width",max:100,min:0,value:t.attributes.width,onChange:function(e){t.setAttributes({width:e})}}),a(wp.components.TextControl,{label:"Link URL",value:t.attributes.url,onChange:function(e){t.setAttributes({url:e})}}),a(wp.components.ToggleControl,{label:"Open in new tab",checked:t.attributes.urlTargetBlank,onChange:function(){t.setAttributes({urlTargetBlank:!t.attributes.urlTargetBlank})}})))}(t),r(t),a(wp.blockEditor.RichText,i),a("style",{},".wp-block-easy-pricing-tables-column .wp-block-easy-pricing-tables-button.easy-pricing-tables-button-"+t.attributes.buttonID+":hover { "+c+" }"))},save:function(t){var e={href:t.attributes.url,tagName:"a",rel:"noopener",value:t.attributes.content,className:"easy-pricing-tables-button-"+t.attributes.buttonID,target:t.attributes.urlTargetBlank?"_blank":"_self"},o=l.save(n(t,e)),r=t.attributes.backgroundHoverColor,i=t.attributes.textHoverColor,s="background-color:"+r+" !important;";""===r&&(s="filter: grayscale(0.65);"),i&&(s+="color:"+i+" !important;");var b=u.save();return t.attributes.shortcode?a("div",{},b.children):a("div",{style:{textAlign:"center"}},a(wp.blockEditor.RichText.Content,o),a("style",{},".wp-block-easy-pricing-tables-column .wp-block-easy-pricing-tables-button.easy-pricing-tables-button-"+t.attributes.buttonID+":hover { "+s+" }"))}})}(window.wp.blocks,window.wp.editor,window.wp.element);
     1!function(t,e,o){function r(t){return a(wp.blockEditor.InspectorAdvancedControls,{},a(wp.components.TextControl,{label:"Shortcode (overrides default button)",value:t.attributes.shortcode,onChange:function(e){t.setAttributes({shortcode:e})}}))}function n(t,e){var o={maxWidth:t.attributes.width+"%"};return t.attributes.textColor&&(o.color=t.attributes.textColor),t.attributes.borderColor&&(o.border="1px solid "+t.attributes.borderColor),t.attributes.backgroundColor&&(o.backgroundColor=t.attributes.backgroundColor),t.attributes.borderColor&&(o.borderColor=t.attributes.borderColor),e.style=o,e}var a=React.createElement,l=wp.blockEditor.useBlockProps,i=wp.blockEditor.useInnerBlocksProps;t.registerBlockType("easy-pricing-tables/button",{icon:"button",edit:function(t){var e=i({},{template:[["easy-pricing-tables/shortcode",{content:t.attributes.shortcode}]]});React.useEffect(function(){""==t.attributes.buttonID&&t.setAttributes({buttonID:Math.random().toString(16).slice(2)})},[]);var o={href:t.attributes.url,tagName:"a",rel:"noopener",className:"easy-pricing-tables-button-"+t.attributes.buttonID,placeholder:"Add to Cart",allowedFormats:["core/bold","core/italic","core/image","core/strikethrough","core/text-color"],value:t.attributes.content,onChange:function(e){t.setAttributes({content:e})}},u=l(n(t,o)),s=t.attributes.backgroundHoverColor,b=t.attributes.textHoverColor,c="background-color:"+s+" !important;";return""===s&&(c="filter: grayscale(0.65);"),b&&(c+="color:"+b+" !important;"),t.attributes.shortcode?a("div",{},r(t),a("div",e)):a("div",{style:{textAlign:"center"}},function(t){var e=[{label:"Background",value:t.attributes.backgroundColor,onChange:function(e){t.setAttributes({backgroundColor:e})}},{label:"Text",value:t.attributes.textColor,onChange:function(e){t.setAttributes({textColor:e})}},{label:"Hover Color",value:t.attributes.backgroundHoverColor,onChange:function(e){t.setAttributes({backgroundHoverColor:e})}},{label:"Text Hover Color",value:t.attributes.textHoverColor,onChange:function(e){t.setAttributes({textHoverColor:e})}}];return t.attributes.borderColor&&(e=[{label:"Background",value:t.attributes.backgroundColor,onChange:function(e){t.setAttributes({backgroundColor:e})}},{label:"Text",value:t.attributes.textColor,onChange:function(e){t.setAttributes({textColor:e})}},{label:"Border Color",value:t.attributes.borderColor,onChange:function(e){t.setAttributes({borderColor:e})}},{label:"Hover Color",value:t.attributes.backgroundHoverColor,onChange:function(e){t.setAttributes({backgroundHoverColor:e})}},{label:"Text Hover Color",value:t.attributes.textHoverColor,onChange:function(e){t.setAttributes({textHoverColor:e})}}]),a(wp.blockEditor.InspectorControls,{key:"ept4-button-controls"},a(wp.blockEditor.PanelColorSettings,{title:"Button Colors",colorSettings:e}),a("div",{className:"ept4-button-sidebar",style:{margin:"16px"}},a(wp.components.RangeControl,{label:"Button Width",max:100,min:0,value:t.attributes.width,onChange:function(e){t.setAttributes({width:e})}}),a(wp.components.TextControl,{label:"Link URL",value:t.attributes.url,onChange:function(e){t.setAttributes({url:e})}}),a(wp.components.ToggleControl,{label:"Open in new tab",checked:t.attributes.urlTargetBlank,onChange:function(){t.setAttributes({urlTargetBlank:!t.attributes.urlTargetBlank})}})))}(t),r(t),a(wp.blockEditor.RichText,u),a("style",{},".wp-block-easy-pricing-tables-column .wp-block-easy-pricing-tables-button.easy-pricing-tables-button-"+t.attributes.buttonID+":hover { "+c+" }"))},save:function(t){var e={href:t.attributes.url,tagName:"a",rel:"noopener",value:t.attributes.content,className:"easy-pricing-tables-button-"+t.attributes.buttonID,target:t.attributes.urlTargetBlank?"_blank":"_self"},o=l.save(n(t,e)),r=t.attributes.backgroundHoverColor,u=t.attributes.textHoverColor,s="background-color:"+r+" !important;";""===r&&(s="filter: grayscale(0.65);"),u&&(s+="color:"+u+" !important;");var b=i.save();return t.attributes.shortcode?a("div",{},b.children):a("div",{style:{textAlign:"center"}},a(wp.blockEditor.RichText.Content,o),a("style",{},".wp-block-easy-pricing-tables-column .wp-block-easy-pricing-tables-button.easy-pricing-tables-button-"+t.attributes.buttonID+":hover { "+s+" }"))}})}(window.wp.blocks,window.wp.editor,window.wp.element);
  • easy-pricing-tables/trunk/includes/v4/blocks/table/table-frontend.js

    r3188461 r3223314  
    2323    function comparisonTables() {
    2424        var comparisonTables = document.querySelectorAll( '.wp-block-easy-pricing-tables-table.layout-8, .wp-block-easy-pricing-tables-table.layout-9' )
    25 
     25       
     26        //FOR AVADA COMPATIBILITY, DISABLE IN BUILDER
     27        var avada_fusion_editor = document.querySelectorAll( '.fusion-live-editable' )
     28        if( avada_fusion_editor.length > 0 ) {
     29            return
     30        }
     31       
    2632        for( var i = 0; i < comparisonTables.length; i++ ) {
    2733            var comparisonList = comparisonTables[i].querySelectorAll( '.comparisonText li' )
    2834           
    2935            for( var j = 0; j < comparisonList.length; j++ ) {
    30                 var featuresTextRows = comparisonTables[i].querySelectorAll( '.featuresText:not(.comparisonText) li:nth-child('+ (j+1) +')' )
     36                var featuresTextRows = comparisonTables[i].querySelectorAll( '.featuresText:not(.comparisonText) li:nth-of-type('+ (j+1) +')' )
    3137                featuresTextRows.forEach( function( selector ) {
    3238                    selector.innerHTML = "<p class='comparison-mobile-text'>"+ comparisonList[j].innerHTML +":</p>" + selector.innerHTML
     
    3541           
    3642        }
     43       
    3744    }
    3845   
  • easy-pricing-tables/trunk/includes/v4/blocks/table/table-frontend.min.js

    r3188461 r3223314  
    1 !function(){function e(){document.querySelectorAll(".fca-ept-period-toggle").forEach(function(e){var t=e.closest(".wp-block-easy-pricing-tables-toggle-table").querySelectorAll(".wp-block-easy-pricing-tables-table");t.length<2||(e.checked?(t[0].style.display="none",t[1].style.display=""):(t[0].style.display="",t[1].style.display="none"))}),t()}function t(){for(var e=document.querySelectorAll(".wp-block-easy-pricing-tables-table.matchRowHeight"),t=0;t<e.length;t++){e[t].style.visibility="hidden";var l=e[t].querySelectorAll(".ept4Template-9").length>0;if([".planText",".planSubText",".priceText",".pricePeriod",".periodText",".billingText"].forEach(function(l){for(var n=e[t].querySelectorAll(l),i=0,o=0;o<n.length;o++)n[o].style.minHeight=0,n[o].offsetHeight>i&&(i=n[o].offsetHeight);for(o=0;o<n.length;o++)n[o].style.minHeight=i+"px"}),!l){for(var n=e[t].querySelectorAll(".planImage img"),i=99999,o=0;o<n.length;o++)n[o].style.maxHeight="none",n[o].offsetHeight&&n[o].offsetHeight<i&&(i=n[o].offsetHeight);for(o=0;o<n.length;o++)n[o].style.maxHeight=i+"px"}if(l){var r=e[t].querySelector(".comparisonSpacer");r.style.minHeight=0;var a=e[t].querySelectorAll(".ept4Template-9")[1],c=0;[".planText",".planImage",".priceText",".periodText"].forEach(function(e){a.querySelector(e)&&(c+=a.querySelector(e).offsetHeight)}),r.style.minHeight=c-1+"px"}e[t].querySelectorAll(".featuresText li").forEach(function(e){e.style.minHeight=0});var s=e[t].querySelectorAll(".featuresText"),f=[];s.forEach(function(e){e.style.minHeight=0;var t=e.querySelectorAll("li");t.length>f&&(f=t)});for(var h=1;h<=f.length;h++){var d=0,y=e[t].querySelectorAll(".featuresText li:nth-child("+h+")");y.forEach(function(e){e.offsetHeight>d&&(d=e.offsetHeight)});for(var g=0;g<y.length;g++)y[g].style.minHeight=d+"px"}var u=0;s.forEach(function(e){e.offsetHeight>u&&(u=e.offsetHeight)}),s.forEach(function(e){e.style.minHeight=u+"px"}),e[t].style.visibility="visible"}}document.addEventListener("click",t),document.addEventListener("keyup",t),document.addEventListener("DOMContentLoaded",t),document.addEventListener("click",e),document.addEventListener("DOMContentLoaded",e),window.addEventListener("load",t),window.addEventListener("load",function(){for(var e=document.querySelectorAll(".wp-block-easy-pricing-tables-table.layout-8, .wp-block-easy-pricing-tables-table.layout-9"),t=0;t<e.length;t++)for(var l=e[t].querySelectorAll(".comparisonText li"),n=0;n<l.length;n++)e[t].querySelectorAll(".featuresText:not(.comparisonText) li:nth-child("+(n+1)+")").forEach(function(e){e.innerHTML="<p class='comparison-mobile-text'>"+l[n].innerHTML+":</p>"+e.innerHTML})}),window.addEventListener("load",e)}();
     1!function(){function e(){document.querySelectorAll(".fca-ept-period-toggle").forEach(function(e){var t=e.closest(".wp-block-easy-pricing-tables-toggle-table").querySelectorAll(".wp-block-easy-pricing-tables-table");t.length<2||(e.checked?(t[0].style.display="none",t[1].style.display=""):(t[0].style.display="",t[1].style.display="none"))}),t()}function t(){for(var e=document.querySelectorAll(".wp-block-easy-pricing-tables-table.matchRowHeight"),t=0;t<e.length;t++){e[t].style.visibility="hidden";var l=e[t].querySelectorAll(".ept4Template-9").length>0;if([".planText",".planSubText",".priceText",".pricePeriod",".periodText",".billingText"].forEach(function(l){for(var n=e[t].querySelectorAll(l),i=0,o=0;o<n.length;o++)n[o].style.minHeight=0,n[o].offsetHeight>i&&(i=n[o].offsetHeight);for(o=0;o<n.length;o++)n[o].style.minHeight=i+"px"}),!l){for(var n=e[t].querySelectorAll(".planImage img"),i=99999,o=0;o<n.length;o++)n[o].style.maxHeight="none",n[o].offsetHeight&&n[o].offsetHeight<i&&(i=n[o].offsetHeight);for(o=0;o<n.length;o++)n[o].style.maxHeight=i+"px"}if(l){var r=e[t].querySelector(".comparisonSpacer");r.style.minHeight=0;var a=e[t].querySelectorAll(".ept4Template-9")[1],c=0;[".planText",".planImage",".priceText",".periodText"].forEach(function(e){a.querySelector(e)&&(c+=a.querySelector(e).offsetHeight)}),r.style.minHeight=c-1+"px"}e[t].querySelectorAll(".featuresText li").forEach(function(e){e.style.minHeight=0});var s=e[t].querySelectorAll(".featuresText"),f=[];s.forEach(function(e){e.style.minHeight=0;var t=e.querySelectorAll("li");t.length>f&&(f=t)});for(var h=1;h<=f.length;h++){var u=0,y=e[t].querySelectorAll(".featuresText li:nth-child("+h+")");y.forEach(function(e){e.offsetHeight>u&&(u=e.offsetHeight)});for(var d=0;d<y.length;d++)y[d].style.minHeight=u+"px"}var g=0;s.forEach(function(e){e.offsetHeight>g&&(g=e.offsetHeight)}),s.forEach(function(e){e.style.minHeight=g+"px"}),e[t].style.visibility="visible"}}document.addEventListener("click",t),document.addEventListener("keyup",t),document.addEventListener("DOMContentLoaded",t),document.addEventListener("click",e),document.addEventListener("DOMContentLoaded",e),window.addEventListener("load",t),window.addEventListener("load",function(){var e=document.querySelectorAll(".wp-block-easy-pricing-tables-table.layout-8, .wp-block-easy-pricing-tables-table.layout-9");if(!(document.querySelectorAll(".fusion-live-editable").length>0))for(var t=0;t<e.length;t++)for(var l=e[t].querySelectorAll(".comparisonText li"),n=0;n<l.length;n++)e[t].querySelectorAll(".featuresText:not(.comparisonText) li:nth-of-type("+(n+1)+")").forEach(function(e){e.innerHTML="<p class='comparison-mobile-text'>"+l[n].innerHTML+":</p>"+e.innerHTML})}),window.addEventListener("load",e)}();
  • easy-pricing-tables/trunk/pricing-table-plugin.php

    r3189931 r3223314  
    99    Domain Path: /languages
    1010    Author: Fatcat Apps
    11     Version: 4.0.1
     11    Version: 4.0.2
    1212    Author URI: https://fatcatapps.com
    1313*/
     
    2828        define( 'PTP_PLUGIN_VER', '4.0.' . time() );
    2929    } else {
    30         define( 'PTP_PLUGIN_VER', '4.0.1' );
     30        define( 'PTP_PLUGIN_VER', '4.0.2' );
    3131    }
    3232
  • easy-pricing-tables/trunk/readme.txt

    r3189931 r3223314  
    77Requires at least: 6.2
    88Tested up to: 6.7
    9 Stable tag: 4.0.1
     9Stable tag: 4.0.2
    1010License: GPLv2 or later
    1111License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • easy-pricing-tables/trunk/readmes/agency.txt

    r3189931 r3223314  
    55Requires at least: 6.2
    66Tested up to: 6.7
    7 Stable tag: 4.0.1
     7Stable tag: 4.0.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • easy-pricing-tables/trunk/readmes/business.txt

    r3189931 r3223314  
    55Requires at least: 6.2
    66Tested up to: 6.7
    7 Stable tag: 4.0.1
     7Stable tag: 4.0.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • easy-pricing-tables/trunk/readmes/free.txt

    r3189931 r3223314  
    77Requires at least: 6.2
    88Tested up to: 6.7
    9 Stable tag: 4.0.1
     9Stable tag: 4.0.2
    1010License: GPLv2 or later
    1111License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • easy-pricing-tables/trunk/readmes/personal.txt

    r3189931 r3223314  
    55Requires at least: 6.2
    66Tested up to: 6.7
    7 Stable tag: 4.0.1
     7Stable tag: 4.0.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.