Skip to content

Commit

Permalink
Merge pull request #62 from pengchensfdc/add_block_editor_support
Browse files Browse the repository at this point in the history
Add block editor support
  • Loading branch information
pengchensfdc authored Feb 28, 2023
2 parents 1d95f5b + c975aa2 commit 6a6dfee
Show file tree
Hide file tree
Showing 22 changed files with 23,834 additions and 31 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Say hello to marketing automation simplicity! With a single login, your self-hos

1. Upload `pardot-for-wordpress/trunk` to your `/wp-content/plugins/` directory or go to Plugins > Add New in your WordPress Admin area and search for Pardot.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Go to Settings > Pardot Settings and authenticate with either Pardot or Salesforce SSO.
3. Go to Settings > Pardot Settings and authenticate with Salesforce SSO.
4. Select your campaign (for tracking code usage).

### Authenticating with Salesforce SSO
Expand Down Expand Up @@ -155,14 +155,18 @@ Filter the regular expression used to find URLs to be converted to https://go.pa

```php
function pardot_custom_filter_https_regex() {
return "/(http|https|ftp|ftps)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,63}(\/\S*)?/";
return "/(http|https|ftp|ftps)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,63}(\/\S[^'\"]*)?/";
}

add_filter( 'pardot_https_regex', 'pardot_custom_filter_https_regex' );
```

## Changelog

### 2.0.0
* Improvement - Added support for the WordPress Block Editor
* Fix - When "Always Use HTTPS" is enabled in the plugin settings, non-HTTPS content will be properly converted to HTTPS

### 1.5.8
* Fix - Handled an issue that authentication failure ([Pardot API Error Code 184](https://developer.salesforce.com/docs/marketing/pardot/guide/error-codes.html#numerical-list-of-error-codes)) causes the settings page to be stuck in a loading state

Expand Down
Binary file added trunk.zip
Binary file not shown.
22 changes: 18 additions & 4 deletions trunk/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Contributors: Pardot
Donate link: https://salesforce.com
Tags: pardot, salesforce, marketing automation, forms, dynamic content, tracking, web tracking, account engagement, marketing cloud
Requires at least: 5.5
Tested up to: 5.7
Stable tag: 1.5.8
Tested up to: 6.1
Stable tag: 2.0.0
Requires PHP: 7.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand All @@ -19,7 +19,7 @@ Say hello to marketing automation simplicity! With a single login, your self-hos

1. Upload `pardot-for-wordpress/trunk` to your `/wp-content/plugins/` directory or go to Plugins > Add New in your WordPress Admin area and search for Pardot.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Go to Settings > Pardot Settings and authenticate with either Pardot or Salesforce SSO.
3. Go to Settings > Pardot Settings and authenticate with Salesforce SSO.
4. Select your campaign (for tracking code usage).

== Frequently Asked Questions ==
Expand Down Expand Up @@ -141,7 +141,7 @@ You can apply any conditional logic you want. For instance, this will append the
Filter the regular expression used to find URLs to be converted to https://go.pardot.com. This is only used when "Use HTTPS?" is checked in the settings. You may want to filter this regex if you find it's not properly capturing and converting your URLs.

function pardot_custom_filter_https_regex() {
return "/(http|https|ftp|ftps)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,63}(\/\S*)?/";
return "/(http|https|ftp|ftps)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,63}(\/\S[^'\"]*)?/";
}

add_filter( 'pardot_https_regex', 'pardot_custom_filter_https_regex' );
Expand All @@ -155,9 +155,18 @@ Filter the regular expression used to find URLs to be converted to https://go.pa
1. Use dynamic content in a widget
1. A form widget on a page
1. A page can have two forms! Here, one is in the body and one in a widget.
1. Pardot block being added in the Block Editor.
1. Form block being edited in the Block Editor
1. Dynamic content block being edited in the Block Editor
1. Remove Form block in the Block Editor

== Changelog ==

= 2.0.0 =

* Feature - Added support for the WordPress Block Editor
* Fix - When "Always Use HTTPS" is enabled in the plugin settings, non-HTTPS content will be properly converted to HTTPS

= 1.5.8 =

* Fix - Handled an issue that authentication failure (Pardot API Error Code 184: https://developer.salesforce.com/docs/marketing/pardot/guide/error-codes.html#numerical-list-of-error-codes) causes the settings page to be stuck in a loading state
Expand Down Expand Up @@ -384,6 +393,11 @@ Filter the regular expression used to find URLs to be converted to https://go.pa

== Upgrade Notice ==

= 2.0.0 =

* Feature - Added support for the WordPress Block Editor
* Fix - When "Always Use HTTPS" is enabled in the plugin settings, non-HTTPS content will be properly converted to HTTPS

= 1.5.8 =

* Fix - Handled an issue that authentication failure (Pardot API Error Code 184: https://developer.salesforce.com/docs/marketing/pardot/guide/error-codes.html#numerical-list-of-error-codes) causes the settings page to be stuck in a loading state
Expand Down
1 change: 1 addition & 0 deletions trunk/build/index.asset.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-server-side-render'), 'version' => '277b9fcde6de89f0bd8a22f108313fda');
2 changes: 2 additions & 0 deletions trunk/build/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.wp-block-pardot-form{border:1px dotted #f00}.sidebar{padding:0 10px 10px 10px}.sidebar h2{margin-bottom:5px}.sidebar input{width:200px}.overlay{position:absolute;top:0;left:0;right:0;bottom:0;opacity:0}

1 change: 1 addition & 0 deletions trunk/build/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions trunk/build/style-index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.wp-block-create-pardot-list{background-color:var(--wp-admin-theme-color);color:#fff;padding:2px}.block{background:rgba(139,139,150,0.1);padding:1em}

Loading

0 comments on commit 6a6dfee

Please sign in to comment.