Plugin Directory

Changeset 3386685


Ignore:
Timestamp:
10/29/2025 09:23:37 PM (5 months ago)
Author:
trainingbusinesspros
Message:

Update to version 4.2.6.1 from GitHub

Location:
groundhogg
Files:
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • groundhogg/tags/4.2.6.1/README.txt

    r3386122 r3386685  
    77Tested up to: 6.8
    88Requires PHP: 7.1
    9 Stable tag: 4.2.6
     9Stable tag: 4.2.6.1
    1010License: GPLv3
    1111License URI: https://www.gnu.org/licenses/gpl.md
     
    379379== Changelog ==
    380380
    381 = 4.2.6 (2025-10-21) =
     381= 4.2.6.1 (2025-10-29) =
     382* FIXED Recaptcha field missing in rendered form if the recaptcha version is v3
     383* FIXED Font style not parsed correctly from text blocks if no `<p>` tag is present.
     384* FIXED Escaped HTML visible on the licenses page.
     385
     386= 4.2.6 (2025-10-28) =
    382387* ADDED Frequency limits for triggers.
    383388* ADDED Batch scheduling for adding contacts to flows.
  • groundhogg/tags/4.2.6.1/assets/js/admin/emails/email-block-editor.js

    r3386122 r3386685  
    74247424  registerBlock('text', 'Text', {
    74257425    attributes: {
    7426       p: el  => parseFontStyleFromTag(el, 'p'),
     7426      p: el  => parseFontStyleFromTag(el, 'p,li'),
    74277427      a: el  => parseFontStyleFromTag(el, 'a'),
    74287428      h1: el => parseFontStyleFromTag(el, 'h1'),
  • groundhogg/tags/4.2.6.1/assets/js/admin/emails/email-block-editor.min.js

    r3386122 r3386685  
    131131            ${fontStyle(h3)}
    132132        }
    133     `};const fontDefaults=style=>({lineHeight:"1.4",fontFamily:"system-ui, sans-serif",fontWeight:"normal",fontSize:13,fontStyle:"normal",textTransform:"none",...style});const fontStyle=style=>{return objectToStyle(fillFontStyle(style))};const fillFontStyle=({use="custom",color="",fontFamily="",fontSize=16,...style})=>{if(GlobalFonts.has(use)){let font=GlobalFonts.get(use).style;if(font){return fillFontStyle({...font,color:color})}}return{...fontDefaults(style),color:color,fontSize:`${fontSize}px`,fontFamily:normalizeFont(fontFamily)}};const FontControls=(style={},onChange=style=>{},supports={})=>{supports={fontSize:true,fontFamily:true,fontWeight:true,lineHeight:true,fontStyle:true,textTransform:true,...supports};let{fontSize="14",fontFamily="",fontWeight="normal",fontStyle="normal",textTransform="none",lineHeight="1.4"}=fontDefaults(style);const fontDisplay=font=>Span({style:{fontFamily:font}},fontFamilies[font]);fontFamily=normalizeFont(fontFamily);return Div({className:"font-controls display-flex column gap-10"},[!supports.fontFamily?null:Control({label:__("Font Family","groundhogg"),stacked:true},ItemPicker({id:`font-family`,multiple:false,selected:{id:fontFamily,text:fontDisplay(fontFamily)},fetchOptions:search=>Promise.resolve(Object.keys(fontFamilies).filter(font=>fontFamilies[font].toLowerCase().includes(search.toLowerCase())).map(font=>({id:font,text:fontDisplay(font)}))),onChange:item=>{onChange({fontFamily:item.id})}})),!supports.fontSize?null:Control({label:__("Font Size","groundhogg")},NumberControl({id:`font-size`,name:`font_size`,className:"font-control control-input",unit:"px",min:0,value:fontSize,onInput:e=>onChange({fontSize:e.target.value})})),!supports.lineHeight?null:Control({label:__("Line Height","groundhogg")},NumberControl({id:`line-height`,name:`line_height`,className:"font-control control-input",value:lineHeight,step:.1,max:10,min:0,onInput:e=>onChange({lineHeight:e.target.value})})),!supports.fontWeight?null:Control({label:__("Font Weight","groundhogg")},Select({id:`font-weight`,name:`font_weight`,className:"font-control control-input",selected:fontWeight,options:fontWeights.map(i=>({value:i,text:i})),onChange:e=>onChange({fontWeight:e.target.value})})),!supports.fontStyle?null:Control({label:__("Font Style","groundhogg")},Select({id:`font-style`,name:`font_style`,className:"font-control control-input",selected:fontStyle,options:{normal:"Normal",italic:"Italic",oblique:"Oblique"},onChange:e=>onChange({fontStyle:e.target.value})})),!supports.textTransform?null:Control({label:__("Transform","groundhogg")},Select({id:`text-transform`,name:`text_transform`,className:"font-control control-input",selected:textTransform,options:{none:"None",capitalize:"Capitalize",uppercase:"Uppercase",lowercase:"Lowercase"},onChange:e=>onChange({textTransform:e.target.value})}))])};const TagFontControlGroup=(name,tag="",style={},updateBlock=()=>{},supports={})=>{let{use="global",color=""}=style;const updateStyle=newStyle=>{style={...getActiveBlock()[tag],...newStyle};updateBlock({[tag]:style})};const DisplayFont=(font,selected,close)=>{return Div({className:`select-font ${selected?"selected":""}`,id:font.id,onClick:e=>{use=font.id;updateStyle({use:use,...font.style});morphControls();close()}},Span({style:{...fillFontStyle(font.style)}},font.name))};return ControlGroup({name:name,id:tag},[Control({label:"Font"},Div({className:"gh-input-group"},[Button({id:`${tag}-use-global`,className:`gh-button small ${GlobalFonts.has(use)?"primary":"secondary"}`,onClick:e=>{MiniModal({selector:`#${tag}-use-global`,dialogClasses:"no-padding"},({close})=>Div({className:"display-flex column global-font-select"},[...GlobalFonts.fonts.map(font=>DisplayFont(font,use===font.id,close))]))}},Dashicon("admin-site")),Button({id:`${tag}-use-custom`,className:`gh-button small ${!GlobalFonts.has(use)?"primary":"secondary"}`,onClick:e=>{updateStyle({use:"custom"});morphControls();MiniModal({dialogClasses:"no-padding",selector:`#${tag}-use-custom`},Div({className:"display-flex column gap-10"},[FontControls(style,style=>{updateStyle(style)},supports)]))}},Dashicon("edit"))])),Control({label:__("Color","groundhogg")},ColorPicker({id:`${tag}-font-color`,value:color,onChange:color=>updateStyle({color:color})}))])};const inlineStyle=(doc,selector,style={},inherit=true)=>{if(inherit){style=fillFontStyle(style)}doc.querySelectorAll(selector).forEach(el=>{for(let attr in style){el.style[attr]=style[attr]}})};const textContent=({content,p,h1,h2,h3,a})=>{if(!content){return""}const parser=new DOMParser;const doc=parser.parseFromString(content,"text/html");inlineStyle(doc,"p",{...p,margin:"1em 0"});inlineStyle(doc,"li",p);inlineStyle(doc,"h1",h1);inlineStyle(doc,"h2",h2);inlineStyle(doc,"h3",h3);inlineStyle(doc,"a",a,false);inlineStyle(doc,"b,strong",{fontWeight:"bold"},false);inlineStyle(doc,"ul",{listStyle:"disc",paddingLeft:"30px"},false);inlineStyle(doc,"ol",{paddingLeft:"30px"},false);if(doc.body.firstElementChild){doc.body.firstElementChild.style.marginTop=0}if(doc.body.lastElementChild){doc.body.lastElementChild.style.marginBottom=0}return Div([],doc.body.childNodes).innerHTML};const LinkPicker=props=>Autocomplete({...props,fetchResults:async search=>{let pages=await ajax({action:"wp-link-ajax",_ajax_linking_nonce:groundhogg_nonces._ajax_linking_nonce,term:search});return pages.map(({title,permalink})=>({id:permalink,text:title}))}});const parseFontStyleFromTag=(el,tag)=>{let styledEl=el.querySelector(tag);if(!styledEl){return BlockRegistry.defaults({type:"text"})[tag]}return parseFontStyle(styledEl.style)};registerBlock("text","Text",{attributes:{p:el=>parseFontStyleFromTag(el,"p"),a:el=>parseFontStyleFromTag(el,"a"),h1:el=>parseFontStyleFromTag(el,"h1"),h2:el=>parseFontStyleFromTag(el,"h2"),h3:el=>parseFontStyleFromTag(el,"h3"),content:el=>{let divWrap=el.querySelector(".text-content-wrap");return divWrap?divWrap.innerHTML:el.innerHTML}},svg:`
     133    `};const fontDefaults=style=>({lineHeight:"1.4",fontFamily:"system-ui, sans-serif",fontWeight:"normal",fontSize:13,fontStyle:"normal",textTransform:"none",...style});const fontStyle=style=>{return objectToStyle(fillFontStyle(style))};const fillFontStyle=({use="custom",color="",fontFamily="",fontSize=16,...style})=>{if(GlobalFonts.has(use)){let font=GlobalFonts.get(use).style;if(font){return fillFontStyle({...font,color:color})}}return{...fontDefaults(style),color:color,fontSize:`${fontSize}px`,fontFamily:normalizeFont(fontFamily)}};const FontControls=(style={},onChange=style=>{},supports={})=>{supports={fontSize:true,fontFamily:true,fontWeight:true,lineHeight:true,fontStyle:true,textTransform:true,...supports};let{fontSize="14",fontFamily="",fontWeight="normal",fontStyle="normal",textTransform="none",lineHeight="1.4"}=fontDefaults(style);const fontDisplay=font=>Span({style:{fontFamily:font}},fontFamilies[font]);fontFamily=normalizeFont(fontFamily);return Div({className:"font-controls display-flex column gap-10"},[!supports.fontFamily?null:Control({label:__("Font Family","groundhogg"),stacked:true},ItemPicker({id:`font-family`,multiple:false,selected:{id:fontFamily,text:fontDisplay(fontFamily)},fetchOptions:search=>Promise.resolve(Object.keys(fontFamilies).filter(font=>fontFamilies[font].toLowerCase().includes(search.toLowerCase())).map(font=>({id:font,text:fontDisplay(font)}))),onChange:item=>{onChange({fontFamily:item.id})}})),!supports.fontSize?null:Control({label:__("Font Size","groundhogg")},NumberControl({id:`font-size`,name:`font_size`,className:"font-control control-input",unit:"px",min:0,value:fontSize,onInput:e=>onChange({fontSize:e.target.value})})),!supports.lineHeight?null:Control({label:__("Line Height","groundhogg")},NumberControl({id:`line-height`,name:`line_height`,className:"font-control control-input",value:lineHeight,step:.1,max:10,min:0,onInput:e=>onChange({lineHeight:e.target.value})})),!supports.fontWeight?null:Control({label:__("Font Weight","groundhogg")},Select({id:`font-weight`,name:`font_weight`,className:"font-control control-input",selected:fontWeight,options:fontWeights.map(i=>({value:i,text:i})),onChange:e=>onChange({fontWeight:e.target.value})})),!supports.fontStyle?null:Control({label:__("Font Style","groundhogg")},Select({id:`font-style`,name:`font_style`,className:"font-control control-input",selected:fontStyle,options:{normal:"Normal",italic:"Italic",oblique:"Oblique"},onChange:e=>onChange({fontStyle:e.target.value})})),!supports.textTransform?null:Control({label:__("Transform","groundhogg")},Select({id:`text-transform`,name:`text_transform`,className:"font-control control-input",selected:textTransform,options:{none:"None",capitalize:"Capitalize",uppercase:"Uppercase",lowercase:"Lowercase"},onChange:e=>onChange({textTransform:e.target.value})}))])};const TagFontControlGroup=(name,tag="",style={},updateBlock=()=>{},supports={})=>{let{use="global",color=""}=style;const updateStyle=newStyle=>{style={...getActiveBlock()[tag],...newStyle};updateBlock({[tag]:style})};const DisplayFont=(font,selected,close)=>{return Div({className:`select-font ${selected?"selected":""}`,id:font.id,onClick:e=>{use=font.id;updateStyle({use:use,...font.style});morphControls();close()}},Span({style:{...fillFontStyle(font.style)}},font.name))};return ControlGroup({name:name,id:tag},[Control({label:"Font"},Div({className:"gh-input-group"},[Button({id:`${tag}-use-global`,className:`gh-button small ${GlobalFonts.has(use)?"primary":"secondary"}`,onClick:e=>{MiniModal({selector:`#${tag}-use-global`,dialogClasses:"no-padding"},({close})=>Div({className:"display-flex column global-font-select"},[...GlobalFonts.fonts.map(font=>DisplayFont(font,use===font.id,close))]))}},Dashicon("admin-site")),Button({id:`${tag}-use-custom`,className:`gh-button small ${!GlobalFonts.has(use)?"primary":"secondary"}`,onClick:e=>{updateStyle({use:"custom"});morphControls();MiniModal({dialogClasses:"no-padding",selector:`#${tag}-use-custom`},Div({className:"display-flex column gap-10"},[FontControls(style,style=>{updateStyle(style)},supports)]))}},Dashicon("edit"))])),Control({label:__("Color","groundhogg")},ColorPicker({id:`${tag}-font-color`,value:color,onChange:color=>updateStyle({color:color})}))])};const inlineStyle=(doc,selector,style={},inherit=true)=>{if(inherit){style=fillFontStyle(style)}doc.querySelectorAll(selector).forEach(el=>{for(let attr in style){el.style[attr]=style[attr]}})};const textContent=({content,p,h1,h2,h3,a})=>{if(!content){return""}const parser=new DOMParser;const doc=parser.parseFromString(content,"text/html");inlineStyle(doc,"p",{...p,margin:"1em 0"});inlineStyle(doc,"li",p);inlineStyle(doc,"h1",h1);inlineStyle(doc,"h2",h2);inlineStyle(doc,"h3",h3);inlineStyle(doc,"a",a,false);inlineStyle(doc,"b,strong",{fontWeight:"bold"},false);inlineStyle(doc,"ul",{listStyle:"disc",paddingLeft:"30px"},false);inlineStyle(doc,"ol",{paddingLeft:"30px"},false);if(doc.body.firstElementChild){doc.body.firstElementChild.style.marginTop=0}if(doc.body.lastElementChild){doc.body.lastElementChild.style.marginBottom=0}return Div([],doc.body.childNodes).innerHTML};const LinkPicker=props=>Autocomplete({...props,fetchResults:async search=>{let pages=await ajax({action:"wp-link-ajax",_ajax_linking_nonce:groundhogg_nonces._ajax_linking_nonce,term:search});return pages.map(({title,permalink})=>({id:permalink,text:title}))}});const parseFontStyleFromTag=(el,tag)=>{let styledEl=el.querySelector(tag);if(!styledEl){return BlockRegistry.defaults({type:"text"})[tag]}return parseFontStyle(styledEl.style)};registerBlock("text","Text",{attributes:{p:el=>parseFontStyleFromTag(el,"p,li"),a:el=>parseFontStyleFromTag(el,"a"),h1:el=>parseFontStyleFromTag(el,"h1"),h2:el=>parseFontStyleFromTag(el,"h2"),h3:el=>parseFontStyleFromTag(el,"h3"),content:el=>{let divWrap=el.querySelector(".text-content-wrap");return divWrap?divWrap.innerHTML:el.innerHTML}},svg:`
    134134        <svg xmlns="http://www.w3.org/2000/svg" style="enable-background:new 0 0 977.7 977.7" xml:space="preserve"
    135135             viewBox="0 0 977.7 977.7">
  • groundhogg/tags/4.2.6.1/groundhogg.php

    r3386122 r3386685  
    44 * Plugin URI: https://www.groundhogg.io/?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash
    55 * Description: CRM and marketing automation for WordPress
    6  * Version: 4.2.6
     6 * Version: 4.2.6.1
    77 * Author: Groundhogg Inc.
    88 * Author URI: https://www.groundhogg.io/?utm_source=wp-plugins&utm_campaign=author-uri&utm_medium=wp-dash
     
    2525if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
    2626
    27 define( 'GROUNDHOGG_VERSION', '4.2.6' );
     27define( 'GROUNDHOGG_VERSION', '4.2.6.1' );
    2828define( 'GROUNDHOGG_PREVIOUS_STABLE_VERSION', '4.2.5.3' );
    2929
  • groundhogg/tags/4.2.6.1/includes/extension.php

    r3344140 r3386685  
    622622
    623623        /* translators: 1: license status (valid/invalid), 2: expiry string */
    624         return sprintf( esc_html__( 'Your license is %1$s and %2$s.', 'groundhogg' ), bold_it( $status ), esc_html( $expires ) );
     624        return sprintf( esc_html__( 'Your license is %1$s and %2$s.', 'groundhogg' ), bold_it( $status ), $expires );
    625625    }
    626626
  • groundhogg/tags/4.2.6.1/includes/form/form-v2.php

    r3386122 r3386685  
    19121912        $button    = get_array_var( $config, 'button', [] );
    19131913
    1914         if ( isset_not_empty( $recaptcha, 'enabled' ) && is_recaptcha_enabled() && get_option( 'gh_recaptcha_version' ) === 'v2' ) {
     1914        if ( isset_not_empty( $recaptcha, 'enabled' ) && is_recaptcha_enabled() ) {
    19151915            $html .= $this->render_field( $recaptcha );
    19161916        }
  • groundhogg/trunk/README.txt

    r3386122 r3386685  
    77Tested up to: 6.8
    88Requires PHP: 7.1
    9 Stable tag: 4.2.6
     9Stable tag: 4.2.6.1
    1010License: GPLv3
    1111License URI: https://www.gnu.org/licenses/gpl.md
     
    379379== Changelog ==
    380380
    381 = 4.2.6 (2025-10-21) =
     381= 4.2.6.1 (2025-10-29) =
     382* FIXED Recaptcha field missing in rendered form if the recaptcha version is v3
     383* FIXED Font style not parsed correctly from text blocks if no `<p>` tag is present.
     384* FIXED Escaped HTML visible on the licenses page.
     385
     386= 4.2.6 (2025-10-28) =
    382387* ADDED Frequency limits for triggers.
    383388* ADDED Batch scheduling for adding contacts to flows.
  • groundhogg/trunk/assets/js/admin/emails/email-block-editor.js

    r3386122 r3386685  
    74247424  registerBlock('text', 'Text', {
    74257425    attributes: {
    7426       p: el  => parseFontStyleFromTag(el, 'p'),
     7426      p: el  => parseFontStyleFromTag(el, 'p,li'),
    74277427      a: el  => parseFontStyleFromTag(el, 'a'),
    74287428      h1: el => parseFontStyleFromTag(el, 'h1'),
  • groundhogg/trunk/assets/js/admin/emails/email-block-editor.min.js

    r3386122 r3386685  
    131131            ${fontStyle(h3)}
    132132        }
    133     `};const fontDefaults=style=>({lineHeight:"1.4",fontFamily:"system-ui, sans-serif",fontWeight:"normal",fontSize:13,fontStyle:"normal",textTransform:"none",...style});const fontStyle=style=>{return objectToStyle(fillFontStyle(style))};const fillFontStyle=({use="custom",color="",fontFamily="",fontSize=16,...style})=>{if(GlobalFonts.has(use)){let font=GlobalFonts.get(use).style;if(font){return fillFontStyle({...font,color:color})}}return{...fontDefaults(style),color:color,fontSize:`${fontSize}px`,fontFamily:normalizeFont(fontFamily)}};const FontControls=(style={},onChange=style=>{},supports={})=>{supports={fontSize:true,fontFamily:true,fontWeight:true,lineHeight:true,fontStyle:true,textTransform:true,...supports};let{fontSize="14",fontFamily="",fontWeight="normal",fontStyle="normal",textTransform="none",lineHeight="1.4"}=fontDefaults(style);const fontDisplay=font=>Span({style:{fontFamily:font}},fontFamilies[font]);fontFamily=normalizeFont(fontFamily);return Div({className:"font-controls display-flex column gap-10"},[!supports.fontFamily?null:Control({label:__("Font Family","groundhogg"),stacked:true},ItemPicker({id:`font-family`,multiple:false,selected:{id:fontFamily,text:fontDisplay(fontFamily)},fetchOptions:search=>Promise.resolve(Object.keys(fontFamilies).filter(font=>fontFamilies[font].toLowerCase().includes(search.toLowerCase())).map(font=>({id:font,text:fontDisplay(font)}))),onChange:item=>{onChange({fontFamily:item.id})}})),!supports.fontSize?null:Control({label:__("Font Size","groundhogg")},NumberControl({id:`font-size`,name:`font_size`,className:"font-control control-input",unit:"px",min:0,value:fontSize,onInput:e=>onChange({fontSize:e.target.value})})),!supports.lineHeight?null:Control({label:__("Line Height","groundhogg")},NumberControl({id:`line-height`,name:`line_height`,className:"font-control control-input",value:lineHeight,step:.1,max:10,min:0,onInput:e=>onChange({lineHeight:e.target.value})})),!supports.fontWeight?null:Control({label:__("Font Weight","groundhogg")},Select({id:`font-weight`,name:`font_weight`,className:"font-control control-input",selected:fontWeight,options:fontWeights.map(i=>({value:i,text:i})),onChange:e=>onChange({fontWeight:e.target.value})})),!supports.fontStyle?null:Control({label:__("Font Style","groundhogg")},Select({id:`font-style`,name:`font_style`,className:"font-control control-input",selected:fontStyle,options:{normal:"Normal",italic:"Italic",oblique:"Oblique"},onChange:e=>onChange({fontStyle:e.target.value})})),!supports.textTransform?null:Control({label:__("Transform","groundhogg")},Select({id:`text-transform`,name:`text_transform`,className:"font-control control-input",selected:textTransform,options:{none:"None",capitalize:"Capitalize",uppercase:"Uppercase",lowercase:"Lowercase"},onChange:e=>onChange({textTransform:e.target.value})}))])};const TagFontControlGroup=(name,tag="",style={},updateBlock=()=>{},supports={})=>{let{use="global",color=""}=style;const updateStyle=newStyle=>{style={...getActiveBlock()[tag],...newStyle};updateBlock({[tag]:style})};const DisplayFont=(font,selected,close)=>{return Div({className:`select-font ${selected?"selected":""}`,id:font.id,onClick:e=>{use=font.id;updateStyle({use:use,...font.style});morphControls();close()}},Span({style:{...fillFontStyle(font.style)}},font.name))};return ControlGroup({name:name,id:tag},[Control({label:"Font"},Div({className:"gh-input-group"},[Button({id:`${tag}-use-global`,className:`gh-button small ${GlobalFonts.has(use)?"primary":"secondary"}`,onClick:e=>{MiniModal({selector:`#${tag}-use-global`,dialogClasses:"no-padding"},({close})=>Div({className:"display-flex column global-font-select"},[...GlobalFonts.fonts.map(font=>DisplayFont(font,use===font.id,close))]))}},Dashicon("admin-site")),Button({id:`${tag}-use-custom`,className:`gh-button small ${!GlobalFonts.has(use)?"primary":"secondary"}`,onClick:e=>{updateStyle({use:"custom"});morphControls();MiniModal({dialogClasses:"no-padding",selector:`#${tag}-use-custom`},Div({className:"display-flex column gap-10"},[FontControls(style,style=>{updateStyle(style)},supports)]))}},Dashicon("edit"))])),Control({label:__("Color","groundhogg")},ColorPicker({id:`${tag}-font-color`,value:color,onChange:color=>updateStyle({color:color})}))])};const inlineStyle=(doc,selector,style={},inherit=true)=>{if(inherit){style=fillFontStyle(style)}doc.querySelectorAll(selector).forEach(el=>{for(let attr in style){el.style[attr]=style[attr]}})};const textContent=({content,p,h1,h2,h3,a})=>{if(!content){return""}const parser=new DOMParser;const doc=parser.parseFromString(content,"text/html");inlineStyle(doc,"p",{...p,margin:"1em 0"});inlineStyle(doc,"li",p);inlineStyle(doc,"h1",h1);inlineStyle(doc,"h2",h2);inlineStyle(doc,"h3",h3);inlineStyle(doc,"a",a,false);inlineStyle(doc,"b,strong",{fontWeight:"bold"},false);inlineStyle(doc,"ul",{listStyle:"disc",paddingLeft:"30px"},false);inlineStyle(doc,"ol",{paddingLeft:"30px"},false);if(doc.body.firstElementChild){doc.body.firstElementChild.style.marginTop=0}if(doc.body.lastElementChild){doc.body.lastElementChild.style.marginBottom=0}return Div([],doc.body.childNodes).innerHTML};const LinkPicker=props=>Autocomplete({...props,fetchResults:async search=>{let pages=await ajax({action:"wp-link-ajax",_ajax_linking_nonce:groundhogg_nonces._ajax_linking_nonce,term:search});return pages.map(({title,permalink})=>({id:permalink,text:title}))}});const parseFontStyleFromTag=(el,tag)=>{let styledEl=el.querySelector(tag);if(!styledEl){return BlockRegistry.defaults({type:"text"})[tag]}return parseFontStyle(styledEl.style)};registerBlock("text","Text",{attributes:{p:el=>parseFontStyleFromTag(el,"p"),a:el=>parseFontStyleFromTag(el,"a"),h1:el=>parseFontStyleFromTag(el,"h1"),h2:el=>parseFontStyleFromTag(el,"h2"),h3:el=>parseFontStyleFromTag(el,"h3"),content:el=>{let divWrap=el.querySelector(".text-content-wrap");return divWrap?divWrap.innerHTML:el.innerHTML}},svg:`
     133    `};const fontDefaults=style=>({lineHeight:"1.4",fontFamily:"system-ui, sans-serif",fontWeight:"normal",fontSize:13,fontStyle:"normal",textTransform:"none",...style});const fontStyle=style=>{return objectToStyle(fillFontStyle(style))};const fillFontStyle=({use="custom",color="",fontFamily="",fontSize=16,...style})=>{if(GlobalFonts.has(use)){let font=GlobalFonts.get(use).style;if(font){return fillFontStyle({...font,color:color})}}return{...fontDefaults(style),color:color,fontSize:`${fontSize}px`,fontFamily:normalizeFont(fontFamily)}};const FontControls=(style={},onChange=style=>{},supports={})=>{supports={fontSize:true,fontFamily:true,fontWeight:true,lineHeight:true,fontStyle:true,textTransform:true,...supports};let{fontSize="14",fontFamily="",fontWeight="normal",fontStyle="normal",textTransform="none",lineHeight="1.4"}=fontDefaults(style);const fontDisplay=font=>Span({style:{fontFamily:font}},fontFamilies[font]);fontFamily=normalizeFont(fontFamily);return Div({className:"font-controls display-flex column gap-10"},[!supports.fontFamily?null:Control({label:__("Font Family","groundhogg"),stacked:true},ItemPicker({id:`font-family`,multiple:false,selected:{id:fontFamily,text:fontDisplay(fontFamily)},fetchOptions:search=>Promise.resolve(Object.keys(fontFamilies).filter(font=>fontFamilies[font].toLowerCase().includes(search.toLowerCase())).map(font=>({id:font,text:fontDisplay(font)}))),onChange:item=>{onChange({fontFamily:item.id})}})),!supports.fontSize?null:Control({label:__("Font Size","groundhogg")},NumberControl({id:`font-size`,name:`font_size`,className:"font-control control-input",unit:"px",min:0,value:fontSize,onInput:e=>onChange({fontSize:e.target.value})})),!supports.lineHeight?null:Control({label:__("Line Height","groundhogg")},NumberControl({id:`line-height`,name:`line_height`,className:"font-control control-input",value:lineHeight,step:.1,max:10,min:0,onInput:e=>onChange({lineHeight:e.target.value})})),!supports.fontWeight?null:Control({label:__("Font Weight","groundhogg")},Select({id:`font-weight`,name:`font_weight`,className:"font-control control-input",selected:fontWeight,options:fontWeights.map(i=>({value:i,text:i})),onChange:e=>onChange({fontWeight:e.target.value})})),!supports.fontStyle?null:Control({label:__("Font Style","groundhogg")},Select({id:`font-style`,name:`font_style`,className:"font-control control-input",selected:fontStyle,options:{normal:"Normal",italic:"Italic",oblique:"Oblique"},onChange:e=>onChange({fontStyle:e.target.value})})),!supports.textTransform?null:Control({label:__("Transform","groundhogg")},Select({id:`text-transform`,name:`text_transform`,className:"font-control control-input",selected:textTransform,options:{none:"None",capitalize:"Capitalize",uppercase:"Uppercase",lowercase:"Lowercase"},onChange:e=>onChange({textTransform:e.target.value})}))])};const TagFontControlGroup=(name,tag="",style={},updateBlock=()=>{},supports={})=>{let{use="global",color=""}=style;const updateStyle=newStyle=>{style={...getActiveBlock()[tag],...newStyle};updateBlock({[tag]:style})};const DisplayFont=(font,selected,close)=>{return Div({className:`select-font ${selected?"selected":""}`,id:font.id,onClick:e=>{use=font.id;updateStyle({use:use,...font.style});morphControls();close()}},Span({style:{...fillFontStyle(font.style)}},font.name))};return ControlGroup({name:name,id:tag},[Control({label:"Font"},Div({className:"gh-input-group"},[Button({id:`${tag}-use-global`,className:`gh-button small ${GlobalFonts.has(use)?"primary":"secondary"}`,onClick:e=>{MiniModal({selector:`#${tag}-use-global`,dialogClasses:"no-padding"},({close})=>Div({className:"display-flex column global-font-select"},[...GlobalFonts.fonts.map(font=>DisplayFont(font,use===font.id,close))]))}},Dashicon("admin-site")),Button({id:`${tag}-use-custom`,className:`gh-button small ${!GlobalFonts.has(use)?"primary":"secondary"}`,onClick:e=>{updateStyle({use:"custom"});morphControls();MiniModal({dialogClasses:"no-padding",selector:`#${tag}-use-custom`},Div({className:"display-flex column gap-10"},[FontControls(style,style=>{updateStyle(style)},supports)]))}},Dashicon("edit"))])),Control({label:__("Color","groundhogg")},ColorPicker({id:`${tag}-font-color`,value:color,onChange:color=>updateStyle({color:color})}))])};const inlineStyle=(doc,selector,style={},inherit=true)=>{if(inherit){style=fillFontStyle(style)}doc.querySelectorAll(selector).forEach(el=>{for(let attr in style){el.style[attr]=style[attr]}})};const textContent=({content,p,h1,h2,h3,a})=>{if(!content){return""}const parser=new DOMParser;const doc=parser.parseFromString(content,"text/html");inlineStyle(doc,"p",{...p,margin:"1em 0"});inlineStyle(doc,"li",p);inlineStyle(doc,"h1",h1);inlineStyle(doc,"h2",h2);inlineStyle(doc,"h3",h3);inlineStyle(doc,"a",a,false);inlineStyle(doc,"b,strong",{fontWeight:"bold"},false);inlineStyle(doc,"ul",{listStyle:"disc",paddingLeft:"30px"},false);inlineStyle(doc,"ol",{paddingLeft:"30px"},false);if(doc.body.firstElementChild){doc.body.firstElementChild.style.marginTop=0}if(doc.body.lastElementChild){doc.body.lastElementChild.style.marginBottom=0}return Div([],doc.body.childNodes).innerHTML};const LinkPicker=props=>Autocomplete({...props,fetchResults:async search=>{let pages=await ajax({action:"wp-link-ajax",_ajax_linking_nonce:groundhogg_nonces._ajax_linking_nonce,term:search});return pages.map(({title,permalink})=>({id:permalink,text:title}))}});const parseFontStyleFromTag=(el,tag)=>{let styledEl=el.querySelector(tag);if(!styledEl){return BlockRegistry.defaults({type:"text"})[tag]}return parseFontStyle(styledEl.style)};registerBlock("text","Text",{attributes:{p:el=>parseFontStyleFromTag(el,"p,li"),a:el=>parseFontStyleFromTag(el,"a"),h1:el=>parseFontStyleFromTag(el,"h1"),h2:el=>parseFontStyleFromTag(el,"h2"),h3:el=>parseFontStyleFromTag(el,"h3"),content:el=>{let divWrap=el.querySelector(".text-content-wrap");return divWrap?divWrap.innerHTML:el.innerHTML}},svg:`
    134134        <svg xmlns="http://www.w3.org/2000/svg" style="enable-background:new 0 0 977.7 977.7" xml:space="preserve"
    135135             viewBox="0 0 977.7 977.7">
  • groundhogg/trunk/groundhogg.php

    r3386122 r3386685  
    44 * Plugin URI: https://www.groundhogg.io/?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash
    55 * Description: CRM and marketing automation for WordPress
    6  * Version: 4.2.6
     6 * Version: 4.2.6.1
    77 * Author: Groundhogg Inc.
    88 * Author URI: https://www.groundhogg.io/?utm_source=wp-plugins&utm_campaign=author-uri&utm_medium=wp-dash
     
    2525if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
    2626
    27 define( 'GROUNDHOGG_VERSION', '4.2.6' );
     27define( 'GROUNDHOGG_VERSION', '4.2.6.1' );
    2828define( 'GROUNDHOGG_PREVIOUS_STABLE_VERSION', '4.2.5.3' );
    2929
  • groundhogg/trunk/includes/extension.php

    r3344140 r3386685  
    622622
    623623        /* translators: 1: license status (valid/invalid), 2: expiry string */
    624         return sprintf( esc_html__( 'Your license is %1$s and %2$s.', 'groundhogg' ), bold_it( $status ), esc_html( $expires ) );
     624        return sprintf( esc_html__( 'Your license is %1$s and %2$s.', 'groundhogg' ), bold_it( $status ), $expires );
    625625    }
    626626
  • groundhogg/trunk/includes/form/form-v2.php

    r3386122 r3386685  
    19121912        $button    = get_array_var( $config, 'button', [] );
    19131913
    1914         if ( isset_not_empty( $recaptcha, 'enabled' ) && is_recaptcha_enabled() && get_option( 'gh_recaptcha_version' ) === 'v2' ) {
     1914        if ( isset_not_empty( $recaptcha, 'enabled' ) && is_recaptcha_enabled() ) {
    19151915            $html .= $this->render_field( $recaptcha );
    19161916        }
Note: See TracChangeset for help on using the changeset viewer.