Version Description
- Added: Toggle to our Forms Block to display Form title or not.
- Added: Support for displaying a form in Beaver Builder.
- Added: Support for displaying a form in Elementor.
- Fixed: PHP Notices about usage of deprecated functions.
- Updated: Touched up styles for the Constant Contact Forms Block.
Download this release
Release Info
Developer | constantcontact |
Plugin | Constant Contact Forms |
Version | 1.10.0 |
Comparing to | |
See all releases |
Code changes from version 1.9.1 to 1.10.0
- assets/css/admin-style.css +53 -3
- assets/js/ctct-plugin-gutenberg.js +2 -2
- assets/js/ctct-plugin-gutenberg.min.js +1 -1
- assets/js/ctct-plugin-gutenberg.min.js.map +1 -1
- assets/js/ctct-plugin-gutenberg/blocks/contact-form.js +3 -0
- assets/js/ctct-plugin-gutenberg/components/single-form-select.js +60 -54
- assets/sass/_admin-gutenberg.scss +51 -3
- assets/sass/_admin-pages.scss +306 -313
- constant-contact-forms.php +28 -2
- includes/cc-modules/form/includes/frontend.php +15 -0
- includes/class-beaver-builder.php +117 -0
- includes/class-builder-fields.php +10 -1
- includes/class-connect.php +1 -1
- includes/class-elementor.php +59 -0
- includes/class-gutenberg.php +9 -1
- includes/class-settings.php +3 -3
- includes/widgets/elementor-widget.php +139 -0
- languages/constant-contact-forms.pot +34 -30
- readme.txt +9 -2
- vendor/constantcontact/constantcontact/.gitignore +0 -25
- vendor/defuse/php-encryption/.gitignore +0 -11
- vendor/google/recaptcha/.gitignore +0 -7
- vendor/guzzlehttp/ringphp/.gitignore +0 -4
- vendor/guzzlehttp/streams/.gitignore +0 -6
- vendor/psr/log/.gitignore +0 -1
- vendor/react/promise/.gitignore +0 -5
assets/css/admin-style.css
CHANGED
@@ -1246,7 +1246,7 @@ a.ctct-notice-dismiss {
|
|
1246 |
width: 500px;
|
1247 |
}
|
1248 |
|
1249 |
-
.cmb2-options-page[class*=
|
1250 |
background: transparent;
|
1251 |
border: none;
|
1252 |
box-shadow: none;
|
@@ -1348,6 +1348,56 @@ a.ctct-notice-dismiss {
|
|
1348 |
}
|
1349 |
|
1350 |
.ctct-block-container {
|
1351 |
-
|
1352 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1353 |
}
|
1246 |
width: 500px;
|
1247 |
}
|
1248 |
|
1249 |
+
.cmb2-options-page[class*="option-ctct_options_settings_"] .cmb2-metabox > .cmb-row {
|
1250 |
background: transparent;
|
1251 |
border: none;
|
1252 |
box-shadow: none;
|
1348 |
}
|
1349 |
|
1350 |
.ctct-block-container {
|
1351 |
+
display: flex;
|
1352 |
+
flex-direction: column;
|
1353 |
+
text-align: center;
|
1354 |
+
align-items: center;
|
1355 |
+
border-radius: 5px;
|
1356 |
+
overflow: hidden;
|
1357 |
+
background-color: #1756ec;
|
1358 |
+
padding: 40px;
|
1359 |
+
color: #fff;
|
1360 |
+
}
|
1361 |
+
|
1362 |
+
.ctct-block-container--header, .ctct-block-container--selection {
|
1363 |
+
display: flex;
|
1364 |
+
flex-direction: column;
|
1365 |
+
align-items: center;
|
1366 |
+
width: 100%;
|
1367 |
+
}
|
1368 |
+
|
1369 |
+
.ctct-block-container--header {
|
1370 |
+
margin: 0 0 10px;
|
1371 |
+
}
|
1372 |
+
|
1373 |
+
.ctct-block-container--header img {
|
1374 |
+
max-width: 280px;
|
1375 |
+
display: block;
|
1376 |
+
}
|
1377 |
+
|
1378 |
+
.ctct-block-container--selection {
|
1379 |
+
padding: 20px;
|
1380 |
+
background-color: rgba(255, 255, 255, 0.1);
|
1381 |
+
border-radius: 4px;
|
1382 |
+
margin: 20px 0 0;
|
1383 |
+
}
|
1384 |
+
|
1385 |
+
.ctct-block-container--selection small {
|
1386 |
+
opacity: 0.8;
|
1387 |
+
font-size: 14px;
|
1388 |
+
font-weight: 600;
|
1389 |
+
margin: 0 0 10px;
|
1390 |
+
display: block;
|
1391 |
+
}
|
1392 |
+
|
1393 |
+
.ctct-block-container--component {
|
1394 |
+
max-width: 400px;
|
1395 |
+
width: 100%;
|
1396 |
+
}
|
1397 |
+
|
1398 |
+
.ctct-block-container .ctct-block-logo {
|
1399 |
+
max-width: 80%;
|
1400 |
+
margin: auto;
|
1401 |
+
margin-bottom: 20px;
|
1402 |
+
margin-top: 20px;
|
1403 |
}
|
assets/js/ctct-plugin-gutenberg.js
CHANGED
@@ -94,7 +94,7 @@
|
|
94 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
95 |
|
96 |
"use strict";
|
97 |
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _components_single_form_select__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../components/single-form-select */ \"./assets/js/ctct-plugin-gutenberg/components/single-form-select.js\");\nvar __ = wp.i18n.__;\nvar registerBlockType = wp.blocks.registerBlockType;\n\n/**\n * Register the block.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (registerBlockType('constant-contact/single-contact-form', {\n title: __('Constant Contact: Single Form', 'constant-contact'),\n icon: 'index-card',\n category: 'layout',\n attributes: {\n selectedForm: {\n type: 'string'\n }\n },\n edit: _components_single_form_select__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n save: function save() {\n return null;\n } // PHP will be used to render the block on the frontend.\n\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9hc3NldHMvanMvY3RjdC1wbHVnaW4tZ3V0ZW5iZXJnL2Jsb2Nrcy9jb250YWN0LWZvcm0uanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9hc3NldHMvanMvY3RjdC1wbHVnaW4tZ3V0ZW5iZXJnL2Jsb2Nrcy9jb250YWN0LWZvcm0uanM/
|
98 |
|
99 |
/***/ }),
|
100 |
|
@@ -106,7 +106,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _com
|
|
106 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
107 |
|
108 |
"use strict";
|
109 |
-
eval("__webpack_require__.r(__webpack_exports__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nvar _wp = wp,\n SelectControl = _wp.components.SelectControl,\n apiFetch = _wp.apiFetch,\n Component = _wp.element.Component,\n __ = _wp.i18n.__;\n\nvar SingleFormSelect =\n/*#__PURE__*/\nfunction (_Component) {\n _inherits(SingleFormSelect, _Component);\n\n /**\n * Constructor\n * @param props\n */\n function SingleFormSelect(props) {\n var _this;\n\n _classCallCheck(this, SingleFormSelect);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(SingleFormSelect).call(this, props)); // Set the initial state of the component.\n\n _this.state = {\n forms: [{\n label: __('Select a form', 'constant-contact'),\n value: 0\n }]\n };\n return _this;\n }\n /**\n * After the component mounts, retrieve the forms and add them to the local component state.\n */\n\n\n _createClass(SingleFormSelect, [{\n key: \"componentDidMount\",\n value: function () {\n var _componentDidMount = _asyncToGenerator(\n /*#__PURE__*/\n regeneratorRuntime.mark(function _callee() {\n var results, forms;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.prev = 0;\n _context.next = 3;\n return apiFetch({\n path: '/?rest_route=/wp/v2/ctct_forms'\n });\n\n case 3:\n results = _context.sent;\n forms = results.map(function (result) {\n return {\n label: result.title.rendered,\n value: result.id\n };\n });\n this.setState({\n forms: [].concat(_toConsumableArray(this.state.forms), _toConsumableArray(forms))\n });\n _context.next = 11;\n break;\n\n case 8:\n _context.prev = 8;\n _context.t0 = _context[\"catch\"](0);\n console.error('ERROR: ', _context.t0.message);\n\n case 11:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this, [[0, 8]]);\n }));\n\n function componentDidMount() {\n return _componentDidMount.apply(this, arguments);\n }\n\n return componentDidMount;\n }()\n /**\n * Render the Gutenberg block in the admin area.\n */\n\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n // Destructure the selectedFrom from props.\n var selectedForm = this.props.attributes.selectedForm;\n return (\n /*#__PURE__*/\n React.createElement(\"div\", {\n className: \"ctct-block-container\"\n },\n /*#__PURE__*/\n React.createElement(\"h4\", {\n className: \"ctct-block-title\"\n }, __('Constant Contact Forms', 'constant-contact')),\n /*#__PURE__*/\n React.createElement(\"small\", null, __('Choose the form to display with the dropdown below.', 'constant-contact')),\n /*#__PURE__*/\n React.createElement(SelectControl, {\n value: selectedForm,\n options: this.state.forms,\n onChange: function onChange(value) {\n return _this2.props.setAttributes({\n selectedForm: value\n });\n }\n }))\n );\n }\n }]);\n\n return SingleFormSelect;\n}(Component);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (SingleFormSelect);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9hc3NldHMvanMvY3RjdC1wbHVnaW4tZ3V0ZW5iZXJnL2NvbXBvbmVudHMvc2luZ2xlLWZ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|
96 |
"use strict";
|
97 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _components_single_form_select__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../components/single-form-select */ \"./assets/js/ctct-plugin-gutenberg/components/single-form-select.js\");\nvar __ = wp.i18n.__;\nvar registerBlockType = wp.blocks.registerBlockType;\n\n/**\n * Register the block.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (registerBlockType('constant-contact/single-contact-form', {\n title: __('Constant Contact: Single Form', 'constant-contact'),\n icon: 'index-card',\n category: 'layout',\n attributes: {\n selectedForm: {\n type: 'string'\n },\n displayTitle: {\n type: 'boolean'\n }\n },\n edit: _components_single_form_select__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n save: function save() {\n return null;\n } // PHP will be used to render the block on the frontend.\n\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9hc3NldHMvanMvY3RjdC1wbHVnaW4tZ3V0ZW5iZXJnL2Jsb2Nrcy9jb250YWN0LWZvcm0uanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9hc3NldHMvanMvY3RjdC1wbHVnaW4tZ3V0ZW5iZXJnL2Jsb2Nrcy9jb250YWN0LWZvcm0uanM/NGI1NCJdLCJzb3VyY2VzQ29udGVudCI6WyJjb25zdCB7IF9fIH0gPSB3cC5pMThuO1xuY29uc3Qge1xuXHRyZWdpc3RlckJsb2NrVHlwZSxcbn0gPSB3cC5ibG9ja3M7XG5cbmltcG9ydCBTaW5nbGVGb3JtU2VsZWN0IGZyb20gJy4uL2NvbXBvbmVudHMvc2luZ2xlLWZvcm0tc2VsZWN0JztcblxuLyoqXG4gKiBSZWdpc3RlciB0aGUgYmxvY2suXG4gKi9cbmV4cG9ydCBkZWZhdWx0IHJlZ2lzdGVyQmxvY2tUeXBlKCAnY29uc3RhbnQtY29udGFjdC9zaW5nbGUtY29udGFjdC1mb3JtJywge1xuXHR0aXRsZTogX18oICdDb25zdGFudCBDb250YWN0OiBTaW5nbGUgRm9ybScsICdjb25zdGFudC1jb250YWN0JyApLFxuXHRpY29uOiAnaW5kZXgtY2FyZCcsXG5cdGNhdGVnb3J5OiAnbGF5b3V0Jyxcblx0YXR0cmlidXRlczoge1xuXHRcdHNlbGVjdGVkRm9ybToge1xuXHRcdFx0dHlwZTogJ3N0cmluZycsXG5cdFx0fSxcblx0XHRkaXNwbGF5VGl0bGU6IHtcblx0XHRcdHR5cGU6ICdib29sZWFuJyxcblx0XHR9XG5cdH0sXG5cdGVkaXQ6IFNpbmdsZUZvcm1TZWxlY3QsXG5cdHNhdmU6ICgpID0+IG51bGwgLy8gUEhQIHdpbGwgYmUgdXNlZCB0byByZW5kZXIgdGhlIGJsb2NrIG9uIHRoZSBmcm9udGVuZC5cbn0pO1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFFQTtBQUdBO0FBRUE7Ozs7QUFHQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQURBO0FBR0E7QUFDQTtBQURBO0FBSkE7QUFRQTtBQUNBO0FBQUE7QUFBQTtBQUNBO0FBZEEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./assets/js/ctct-plugin-gutenberg/blocks/contact-form.js\n");
|
98 |
|
99 |
/***/ }),
|
100 |
|
106 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
107 |
|
108 |
"use strict";
|
109 |
+
eval("__webpack_require__.r(__webpack_exports__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nvar _wp = wp,\n SelectControl = _wp.components.SelectControl,\n apiFetch = _wp.apiFetch,\n Component = _wp.element.Component,\n __ = _wp.i18n.__;\n\nvar SingleFormSelect =\n/*#__PURE__*/\nfunction (_Component) {\n _inherits(SingleFormSelect, _Component);\n\n /**\n * Constructor\n * @param props\n */\n function SingleFormSelect(props) {\n var _this;\n\n _classCallCheck(this, SingleFormSelect);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(SingleFormSelect).call(this, props)); // Set the initial state of the component.\n\n _this.state = {\n forms: [{\n label: __(\"Select a form\", \"constant-contact\"),\n value: 0\n }],\n displayTitle: [{\n label: __(\"Display Title\", \"constant-contact\"),\n value: true\n }, {\n label: __(\"Hide Title\", \"constant-contact\"),\n value: false\n }]\n };\n return _this;\n }\n /**\n * After the component mounts, retrieve the forms and add them to the local component state.\n */\n\n\n _createClass(SingleFormSelect, [{\n key: \"componentDidMount\",\n value: function () {\n var _componentDidMount = _asyncToGenerator(\n /*#__PURE__*/\n regeneratorRuntime.mark(function _callee() {\n var results, forms;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.prev = 0;\n _context.next = 3;\n return apiFetch({\n path: \"/?rest_route=/wp/v2/ctct_forms\"\n });\n\n case 3:\n results = _context.sent;\n forms = results.map(function (result) {\n return {\n label: result.title.rendered,\n value: result.id\n };\n });\n this.setState({\n forms: [].concat(_toConsumableArray(this.state.forms), _toConsumableArray(forms))\n });\n _context.next = 11;\n break;\n\n case 8:\n _context.prev = 8;\n _context.t0 = _context[\"catch\"](0);\n console.error(\"ERROR: \", _context.t0.message);\n\n case 11:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this, [[0, 8]]);\n }));\n\n function componentDidMount() {\n return _componentDidMount.apply(this, arguments);\n }\n\n return componentDidMount;\n }()\n /**\n * Render the Gutenberg block in the admin area.\n */\n\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n // Destructure the selectedFrom from props.\n var _this$props$attribute = this.props.attributes,\n selectedForm = _this$props$attribute.selectedForm,\n displayTitle = _this$props$attribute.displayTitle;\n return (\n /*#__PURE__*/\n React.createElement(\"div\", {\n className: \"ctct-block-container\"\n },\n /*#__PURE__*/\n React.createElement(\"div\", {\n className: \"ctct-block-container--header\"\n },\n /*#__PURE__*/\n React.createElement(\"img\", {\n alt: \"Constant Contact Forms\",\n src: \"https://images.ctfassets.net/t21gix3kzulv/78gf1S3CjPrnl9rURf6Q8w/3c20fb510dd4d4653feddf86ece35e1a/ctct_ripple_logo_horizontal_white_orange.svg\"\n })),\n /*#__PURE__*/\n React.createElement(\"div\", {\n className: \"ctct-block-container--selection\"\n },\n /*#__PURE__*/\n React.createElement(\"small\", null, __(\"Display Form Title\", \"constant-contact\")),\n /*#__PURE__*/\n React.createElement(\"div\", {\n className: \"ctct-block-container--component\"\n },\n /*#__PURE__*/\n React.createElement(SelectControl, {\n value: displayTitle,\n options: this.state.displayTitle,\n onChange: function onChange(value) {\n return _this2.props.setAttributes({\n displayTitle: value\n });\n }\n }))),\n /*#__PURE__*/\n React.createElement(\"div\", {\n className: \"ctct-block-container--selection\"\n },\n /*#__PURE__*/\n React.createElement(\"small\", null, __(\"Choose the form to display with the dropdown below.\", \"constant-contact\")),\n /*#__PURE__*/\n React.createElement(\"div\", {\n className: \"ctct-block-container--component\"\n },\n /*#__PURE__*/\n React.createElement(SelectControl, {\n value: selectedForm,\n options: this.state.forms,\n onChange: function onChange(value) {\n return _this2.props.setAttributes({\n selectedForm: value\n });\n }\n }))))\n );\n }\n }]);\n\n return SingleFormSelect;\n}(Component);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (SingleFormSelect);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9hc3NldHMvanMvY3RjdC1wbHVnaW4tZ3V0ZW5iZXJnL2NvbXBvbmVudHMvc2luZ2xlLWZvcm0tc2VsZWN0LmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vYXNzZXRzL2pzL2N0Y3QtcGx1Z2luLWd1dGVuYmVyZy9jb21wb25lbnRzL3NpbmdsZS1mb3JtLXNlbGVjdC5qcz9hNzkzIl0sInNvdXJjZXNDb250ZW50IjpbImNvbnN0IHtcbiAgY29tcG9uZW50czogeyBTZWxlY3RDb250cm9sIH0sXG4gIGFwaUZldGNoLFxuICBlbGVtZW50OiB7IENvbXBvbmVudCB9LFxuICBpMThuOiB7IF9fIH0sXG59ID0gd3A7XG5cbmNsYXNzIFNpbmdsZUZvcm1TZWxlY3QgZXh0ZW5kcyBDb21wb25lbnQge1xuICAvKipcbiAgICogQ29uc3RydWN0b3JcbiAgICogQHBhcmFtIHByb3BzXG4gICAqL1xuICBjb25zdHJ1Y3Rvcihwcm9wcykge1xuICAgIHN1cGVyKHByb3BzKTtcblxuICAgIC8vIFNldCB0aGUgaW5pdGlhbCBzdGF0ZSBvZiB0aGUgY29tcG9uZW50LlxuICAgIHRoaXMuc3RhdGUgPSB7XG4gICAgICBmb3JtczogW3sgbGFiZWw6IF9fKFwiU2VsZWN0IGEgZm9ybVwiLCBcImNvbnN0YW50LWNvbnRhY3RcIiksIHZhbHVlOiAwIH1dLFxuICAgICAgZGlzcGxheVRpdGxlOiBbXG4gICAgICAgIHsgbGFiZWw6IF9fKFwiRGlzcGxheSBUaXRsZVwiLCBcImNvbnN0YW50LWNvbnRhY3RcIi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UFBO0FBREE7QUFBQTtBQUFBO0FBSUE7QUFBQTtBQUNBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFGQTtBQUZBO0FBT0E7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQURBO0FBRUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFWQTtBQWFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFEQTtBQUVBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBakJBO0FBc0JBOzs7O0FBNURBO0FBQ0E7QUE4REEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./assets/js/ctct-plugin-gutenberg/components/single-form-select.js\n");
|
110 |
|
111 |
/***/ }),
|
112 |
|
assets/js/ctct-plugin-gutenberg.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="https://testing.test/wp-content/plugins/constant-contact-forms/assets/js/",n(n.s=8)}({19:function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function c(t,e,n,r,o,c,a){try{var i=t[c](a),
|
2 |
//# sourceMappingURL=ctct-plugin-gutenberg.min.js.map
|
1 |
+
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="https://testing.test/wp-content/plugins/constant-contact-forms/assets/js/",n(n.s=8)}({19:function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function c(t,e,n,r,o,c,a){try{var i=t[c](a),l=i.value}catch(t){return void n(t)}i.done?e(l):Promise.resolve(l).then(r,o)}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}n.r(e);var u=wp,f=u.components.SelectControl,p=u.apiFetch,m=u.element.Component,y=u.i18n.__,b=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=i(this,l(e).call(this,t))).state={forms:[{label:y("Select a form","constant-contact"),value:0}],displayTitle:[{label:y("Display Title","constant-contact"),value:!0},{label:y("Hide Title","constant-contact"),value:!1}]},n}var n,r,u,m,b;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,t),n=e,(r=[{key:"componentDidMount",value:(m=regeneratorRuntime.mark((function t(){var e,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,p({path:"/?rest_route=/wp/v2/ctct_forms"});case 3:e=t.sent,n=e.map((function(t){return{label:t.title.rendered,value:t.id}})),this.setState({forms:[].concat(o(this.state.forms),o(n))}),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.error("ERROR: ",t.t0.message);case 11:case"end":return t.stop()}}),t,this,[[0,8]])})),b=function(){var t=this,e=arguments;return new Promise((function(n,r){var o=m.apply(t,e);function a(t){c(o,n,r,a,i,"next",t)}function i(t){c(o,n,r,a,i,"throw",t)}a(void 0)}))},function(){return b.apply(this,arguments)})},{key:"render",value:function(){var t=this,e=this.props.attributes,n=e.selectedForm,r=e.displayTitle;return React.createElement("div",{className:"ctct-block-container"},React.createElement("div",{className:"ctct-block-container--header"},React.createElement("img",{alt:"Constant Contact Forms",src:"https://images.ctfassets.net/t21gix3kzulv/78gf1S3CjPrnl9rURf6Q8w/3c20fb510dd4d4653feddf86ece35e1a/ctct_ripple_logo_horizontal_white_orange.svg"})),React.createElement("div",{className:"ctct-block-container--selection"},React.createElement("small",null,y("Choose the form to display with the dropdown below.","constant-contact")),React.createElement("div",{className:"ctct-block-container--component"},React.createElement(f,{value:n,options:this.state.forms,onChange:function(e){return t.props.setAttributes({selectedForm:e})}}))),React.createElement("div",{className:"ctct-block-container--selection"},React.createElement("small",null,y("Display Form Title","constant-contact")),React.createElement("div",{className:"ctct-block-container--component"},React.createElement(f,{value:r,options:this.state.displayTitle,onChange:function(e){return t.props.setAttributes({displayTitle:e})}}))))}}])&&a(n.prototype,r),u&&a(n,u),e}(m),d=wp.i18n.__;(0,wp.blocks.registerBlockType)("constant-contact/single-contact-form",{title:d("Constant Contact: Single Form","constant-contact"),icon:"index-card",category:"layout",attributes:{selectedForm:{type:"string"},displayTitle:{type:"boolean"}},edit:b,save:function(){return null}})},8:function(t,e,n){t.exports=n(19)}});
|
2 |
//# sourceMappingURL=ctct-plugin-gutenberg.min.js.map
|
assets/js/ctct-plugin-gutenberg.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/ctct-plugin-gutenberg/components/single-form-select.js","webpack:///./assets/js/ctct-plugin-gutenberg/blocks/contact-form.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","wp","SelectControl","components","apiFetch","Component","element","__","i18n","SingleFormSelect","props","state","forms","label","path","results","map","result","title","rendered","id","this","setState","console","error","message","
|
1 |
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/ctct-plugin-gutenberg/components/single-form-select.js","webpack:///./assets/js/ctct-plugin-gutenberg/blocks/contact-form.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","wp","SelectControl","components","apiFetch","Component","element","__","i18n","SingleFormSelect","props","state","forms","label","displayTitle","path","results","map","result","title","rendered","id","this","setState","console","error","message","attributes","selectedForm","className","alt","src","options","onChange","setAttributes","registerBlockType","blocks","icon","category","type","edit","save"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhE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function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"https://testing.test/wp-content/plugins/constant-contact-forms/assets/js/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 8);\n","const {\n components: { SelectControl },\n apiFetch,\n element: { Component },\n i18n: { __ },\n} = wp;\n\nclass SingleFormSelect extends Component {\n /**\n * Constructor\n * @param props\n */\n constructor(props) {\n super(props);\n\n // Set the initial state of the component.\n this.state = {\n forms: [{ label: __(\"Select a form\", \"constant-contact\"), value: 0 }],\n displayTitle: [\n { label: __(\"Display Title\", \"constant-contact\"), value: true },\n { label: __(\"Hide Title\", \"constant-contact\"), value: false },\n ],\n };\n }\n\n /**\n * After the component mounts, retrieve the forms and add them to the local component state.\n */\n async componentDidMount() {\n try {\n const results = await apiFetch({ path: \"/?rest_route=/wp/v2/ctct_forms\" });\n const forms = results.map((result) => ({ label: result.title.rendered, value: result.id }));\n this.setState({ forms: [...this.state.forms, ...forms] });\n } catch (e) {\n console.error(\"ERROR: \", e.message);\n }\n }\n\n /**\n * Render the Gutenberg block in the admin area.\n */\n render() {\n // Destructure the selectedFrom from props.\n let { selectedForm, displayTitle } = this.props.attributes;\n\n return (\n <div className=\"ctct-block-container\">\n <div className=\"ctct-block-container--header\">\n <img\n alt=\"Constant Contact Forms\"\n src=\"https://images.ctfassets.net/t21gix3kzulv/78gf1S3CjPrnl9rURf6Q8w/3c20fb510dd4d4653feddf86ece35e1a/ctct_ripple_logo_horizontal_white_orange.svg\"\n />\n </div>\n <div className=\"ctct-block-container--selection\">\n <small>{__(\"Choose the form to display with the dropdown below.\", \"constant-contact\")}</small>\n <div className=\"ctct-block-container--component\">\n <SelectControl value={selectedForm} options={this.state.forms} onChange={(value) => this.props.setAttributes({ selectedForm: value })} />\n </div>\n </div>\n <div className=\"ctct-block-container--selection\">\n <small>{__(\"Display Form Title\", \"constant-contact\")}</small>\n <div className=\"ctct-block-container--component\">\n <SelectControl value={displayTitle} options={this.state.displayTitle} onChange={(value) => this.props.setAttributes({ displayTitle: value })} />\n </div>\n </div>\n </div>\n );\n }\n}\n\nexport default SingleFormSelect;\n","const { __ } = wp.i18n;\nconst {\n\tregisterBlockType,\n} = wp.blocks;\n\nimport SingleFormSelect from '../components/single-form-select';\n\n/**\n * Register the block.\n */\nexport default registerBlockType( 'constant-contact/single-contact-form', {\n\ttitle: __( 'Constant Contact: Single Form', 'constant-contact' ),\n\ticon: 'index-card',\n\tcategory: 'layout',\n\tattributes: {\n\t\tselectedForm: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tdisplayTitle: {\n\t\t\ttype: 'boolean',\n\t\t}\n\t},\n\tedit: SingleFormSelect,\n\tsave: () => null // PHP will be used to render the block on the frontend.\n});\n"],"sourceRoot":""}
|
assets/js/ctct-plugin-gutenberg/blocks/contact-form.js
CHANGED
@@ -15,6 +15,9 @@ export default registerBlockType( 'constant-contact/single-contact-form', {
|
|
15 |
attributes: {
|
16 |
selectedForm: {
|
17 |
type: 'string',
|
|
|
|
|
|
|
18 |
}
|
19 |
},
|
20 |
edit: SingleFormSelect,
|
15 |
attributes: {
|
16 |
selectedForm: {
|
17 |
type: 'string',
|
18 |
+
},
|
19 |
+
displayTitle: {
|
20 |
+
type: 'boolean',
|
21 |
}
|
22 |
},
|
23 |
edit: SingleFormSelect,
|
assets/js/ctct-plugin-gutenberg/components/single-form-select.js
CHANGED
@@ -1,65 +1,71 @@
|
|
1 |
const {
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
element: {
|
7 |
-
Component,
|
8 |
-
},
|
9 |
-
i18n: {
|
10 |
-
__,
|
11 |
-
},
|
12 |
} = wp;
|
13 |
|
14 |
class SingleFormSelect extends Component {
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
|
|
|
|
29 |
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
}
|
42 |
-
}
|
43 |
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
|
|
|
|
|
|
|
|
63 |
}
|
64 |
|
65 |
export default SingleFormSelect;
|
1 |
const {
|
2 |
+
components: { SelectControl },
|
3 |
+
apiFetch,
|
4 |
+
element: { Component },
|
5 |
+
i18n: { __ },
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
} = wp;
|
7 |
|
8 |
class SingleFormSelect extends Component {
|
9 |
+
/**
|
10 |
+
* Constructor
|
11 |
+
* @param props
|
12 |
+
*/
|
13 |
+
constructor(props) {
|
14 |
+
super(props);
|
15 |
|
16 |
+
// Set the initial state of the component.
|
17 |
+
this.state = {
|
18 |
+
forms: [{ label: __("Select a form", "constant-contact"), value: 0 }],
|
19 |
+
displayTitle: [
|
20 |
+
{ label: __("Display Title", "constant-contact"), value: true },
|
21 |
+
{ label: __("Hide Title", "constant-contact"), value: false },
|
22 |
+
],
|
23 |
+
};
|
24 |
+
}
|
25 |
|
26 |
+
/**
|
27 |
+
* After the component mounts, retrieve the forms and add them to the local component state.
|
28 |
+
*/
|
29 |
+
async componentDidMount() {
|
30 |
+
try {
|
31 |
+
const results = await apiFetch({ path: "/?rest_route=/wp/v2/ctct_forms" });
|
32 |
+
const forms = results.map((result) => ({ label: result.title.rendered, value: result.id }));
|
33 |
+
this.setState({ forms: [...this.state.forms, ...forms] });
|
34 |
+
} catch (e) {
|
35 |
+
console.error("ERROR: ", e.message);
|
36 |
+
}
|
37 |
+
}
|
38 |
|
39 |
+
/**
|
40 |
+
* Render the Gutenberg block in the admin area.
|
41 |
+
*/
|
42 |
+
render() {
|
43 |
+
// Destructure the selectedFrom from props.
|
44 |
+
let { selectedForm, displayTitle } = this.props.attributes;
|
|
|
|
|
45 |
|
46 |
+
return (
|
47 |
+
<div className="ctct-block-container">
|
48 |
+
<div className="ctct-block-container--header">
|
49 |
+
<img
|
50 |
+
alt="Constant Contact Forms"
|
51 |
+
src="https://images.ctfassets.net/t21gix3kzulv/78gf1S3CjPrnl9rURf6Q8w/3c20fb510dd4d4653feddf86ece35e1a/ctct_ripple_logo_horizontal_white_orange.svg"
|
52 |
+
/>
|
53 |
+
</div>
|
54 |
+
<div className="ctct-block-container--selection">
|
55 |
+
<small>{__("Display Form Title", "constant-contact")}</small>
|
56 |
+
<div className="ctct-block-container--component">
|
57 |
+
<SelectControl value={displayTitle} options={this.state.displayTitle} onChange={(value) => this.props.setAttributes({ displayTitle: value })} />
|
58 |
+
</div>
|
59 |
+
</div>
|
60 |
+
<div className="ctct-block-container--selection">
|
61 |
+
<small>{__("Choose the form to display with the dropdown below.", "constant-contact")}</small>
|
62 |
+
<div className="ctct-block-container--component">
|
63 |
+
<SelectControl value={selectedForm} options={this.state.forms} onChange={(value) => this.props.setAttributes({ selectedForm: value })} />
|
64 |
+
</div>
|
65 |
+
</div>
|
66 |
+
</div>
|
67 |
+
);
|
68 |
+
}
|
69 |
}
|
70 |
|
71 |
export default SingleFormSelect;
|
assets/sass/_admin-gutenberg.scss
CHANGED
@@ -3,10 +3,58 @@
|
|
3 |
// Gutenberg Admin
|
4 |
//--------------------------------------------------------------
|
5 |
.ctct-block-title {
|
6 |
-
|
7 |
}
|
8 |
|
9 |
.ctct-block-container {
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
}
|
3 |
// Gutenberg Admin
|
4 |
//--------------------------------------------------------------
|
5 |
.ctct-block-title {
|
6 |
+
margin: 0;
|
7 |
}
|
8 |
|
9 |
.ctct-block-container {
|
10 |
+
display: flex;
|
11 |
+
flex-direction: column;
|
12 |
+
text-align: center;
|
13 |
+
align-items: center;
|
14 |
+
border-radius: 5px;
|
15 |
+
overflow: hidden;
|
16 |
+
background-color: #1756ec;
|
17 |
+
padding: 40px;
|
18 |
+
color: #fff;
|
19 |
+
|
20 |
+
&--header,
|
21 |
+
&--selection {
|
22 |
+
display: flex;
|
23 |
+
flex-direction: column;
|
24 |
+
align-items: center;
|
25 |
+
width: 100%;
|
26 |
+
}
|
27 |
+
|
28 |
+
&--header {
|
29 |
+
margin: 0 0 10px;
|
30 |
+
img {
|
31 |
+
max-width: 280px;
|
32 |
+
display: block;
|
33 |
+
}
|
34 |
+
}
|
35 |
+
|
36 |
+
&--selection {
|
37 |
+
padding: 20px;
|
38 |
+
background-color: rgba(255, 255, 255, 0.1);
|
39 |
+
border-radius: 4px;
|
40 |
+
margin: 20px 0 0;
|
41 |
+
small {
|
42 |
+
opacity: 0.8;
|
43 |
+
font-size: 14px;
|
44 |
+
font-weight: 600;
|
45 |
+
margin: 0 0 10px;
|
46 |
+
display: block;
|
47 |
+
}
|
48 |
+
}
|
49 |
+
&--component {
|
50 |
+
max-width: 400px;
|
51 |
+
width: 100%;
|
52 |
+
}
|
53 |
+
|
54 |
+
.ctct-block-logo {
|
55 |
+
max-width: 80%;
|
56 |
+
margin: auto;
|
57 |
+
margin-bottom: 20px;
|
58 |
+
margin-top: 20px;
|
59 |
+
}
|
60 |
}
|
assets/sass/_admin-pages.scss
CHANGED
@@ -3,337 +3,330 @@
|
|
3 |
// About Page
|
4 |
//--------------------------------------------------------------
|
5 |
.constant-contact-about {
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
}
|
207 |
-
|
208 |
.cc-a-block {
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
}
|
275 |
|
276 |
.ctct-bonus-points {
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
}
|
283 |
|
284 |
.section-try-us {
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
}
|
303 |
}
|
304 |
|
305 |
.section-marketing-tips {
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
}
|
311 |
}
|
312 |
|
313 |
#cmb2-metabox-ctct_option_metabox_settings {
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
}
|
318 |
}
|
319 |
|
320 |
.cmb2-options-page {
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
}
|
329 |
-
}
|
330 |
}
|
331 |
|
332 |
.ctct-body {
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
}
|
339 |
}
|
3 |
// About Page
|
4 |
//--------------------------------------------------------------
|
5 |
.constant-contact-about {
|
6 |
+
padding: 15px;
|
7 |
+
|
8 |
+
@media screen and (max-width: 782px) {
|
9 |
+
padding: 0;
|
10 |
+
}
|
11 |
+
|
12 |
+
.ctct-section {
|
13 |
+
margin-bottom: 50px;
|
14 |
+
}
|
15 |
+
|
16 |
+
h1.about-header {
|
17 |
+
color: $color-cc-blue;
|
18 |
+
font-size: 26px;
|
19 |
+
margin: 0 0 15px 0;
|
20 |
+
}
|
21 |
+
|
22 |
+
h3 {
|
23 |
+
padding: 20px 0;
|
24 |
+
}
|
25 |
+
|
26 |
+
p {
|
27 |
+
color: $color-modal-header;
|
28 |
+
font-size: 16px;
|
29 |
+
font-weight: 300;
|
30 |
+
}
|
31 |
+
|
32 |
+
.clear {
|
33 |
+
clear: both;
|
34 |
+
height: 0;
|
35 |
+
width: 100%;
|
36 |
+
}
|
37 |
+
|
38 |
+
.button {
|
39 |
+
border-radius: 4px;
|
40 |
+
color: $color-white;
|
41 |
+
font-size: 16px;
|
42 |
+
font-weight: 600;
|
43 |
+
height: auto;
|
44 |
+
line-height: 1;
|
45 |
+
margin-bottom: 10px;
|
46 |
+
min-width: 180px;
|
47 |
+
padding: 14px 30px;
|
48 |
+
text-align: center;
|
49 |
+
|
50 |
+
&.button-orange {
|
51 |
+
background-color: $color-chrome-yellow;
|
52 |
+
border: 1px solid darken($color-chrome-yellow, 10%);
|
53 |
+
|
54 |
+
&:hover,
|
55 |
+
&:focus {
|
56 |
+
background-color: darken($color-chrome-yellow, 10%);
|
57 |
+
}
|
58 |
+
}
|
59 |
+
|
60 |
+
&.button-blue {
|
61 |
+
background-color: $color-prussian-blue;
|
62 |
+
border: 1px solid darken($color-prussian-blue, 10%);
|
63 |
+
|
64 |
+
&:hover,
|
65 |
+
&:focus {
|
66 |
+
background-color: darken($color-prussian-blue, 10%);
|
67 |
+
}
|
68 |
+
}
|
69 |
+
}
|
70 |
+
|
71 |
+
.about-text {
|
72 |
+
margin: 0 50px 0 0;
|
73 |
+
|
74 |
+
@media screen and (max-width: 482px) {
|
75 |
+
margin: 0;
|
76 |
+
}
|
77 |
+
}
|
78 |
+
|
79 |
+
.feature-section.two-col > div {
|
80 |
+
float: left;
|
81 |
+
width: 49%;
|
82 |
+
}
|
83 |
+
|
84 |
+
.headline-feature {
|
85 |
+
max-width: 90%;
|
86 |
+
|
87 |
+
@media screen and (max-width: 782px) {
|
88 |
+
max-width: 100%;
|
89 |
+
}
|
90 |
+
|
91 |
+
p {
|
92 |
+
margin-bottom: 0;
|
93 |
+
}
|
94 |
+
|
95 |
+
h5 {
|
96 |
+
color: $color-light-silver;
|
97 |
+
font-style: italic;
|
98 |
+
font-weight: 300;
|
99 |
+
}
|
100 |
+
}
|
101 |
+
|
102 |
+
.headline-title,
|
103 |
+
.c-text {
|
104 |
+
text-align: center;
|
105 |
+
}
|
106 |
+
|
107 |
+
.featured-image {
|
108 |
+
min-height: 150px;
|
109 |
+
position: relative;
|
110 |
+
}
|
111 |
+
|
112 |
+
.fff-img {
|
113 |
+
height: 315px;
|
114 |
+
margin: 20px;
|
115 |
+
max-width: 720px;
|
116 |
+
overflow: hidden;
|
117 |
+
}
|
118 |
+
|
119 |
+
.introduction {
|
120 |
+
padding: 20px 0;
|
121 |
+
}
|
122 |
+
|
123 |
+
.featured-title {
|
124 |
+
color: $color-white;
|
125 |
+
font-size: 2rem;
|
126 |
+
font-weight: bold;
|
127 |
+
margin: 0 auto;
|
128 |
+
position: absolute;
|
129 |
+
text-align: center;
|
130 |
+
text-shadow: 0 0 15px $color-black;
|
131 |
+
top: 80px;
|
132 |
+
width: 100%;
|
133 |
+
|
134 |
+
@media screen and (max-width: 482px) {
|
135 |
+
color: $color-cc-blue;
|
136 |
+
font-size: 26px;
|
137 |
+
line-height: 28px;
|
138 |
+
margin-top: 15px;
|
139 |
+
position: relative;
|
140 |
+
text-shadow: none;
|
141 |
+
top: 0;
|
142 |
+
}
|
143 |
+
}
|
144 |
+
|
145 |
+
.featured-introduction {
|
146 |
+
color: $color-white;
|
147 |
+
font-size: 1.2rem;
|
148 |
+
margin: 0 auto;
|
149 |
+
position: absolute;
|
150 |
+
text-align: center;
|
151 |
+
text-shadow: 0 0 15px $color-black;
|
152 |
+
top: 120px;
|
153 |
+
width: 100%;
|
154 |
+
|
155 |
+
@media screen and (max-width: 482px) {
|
156 |
+
color: $color-cc-blue;
|
157 |
+
line-height: 1;
|
158 |
+
margin-top: 15px;
|
159 |
+
position: relative;
|
160 |
+
text-shadow: none;
|
161 |
+
top: 0;
|
162 |
+
}
|
163 |
+
}
|
164 |
+
|
165 |
+
.hide-overflow {
|
166 |
+
overflow: hidden;
|
167 |
+
position: relative;
|
168 |
+
|
169 |
+
hr {
|
170 |
+
margin-top: 30px;
|
171 |
+
}
|
172 |
+
|
173 |
+
h2 {
|
174 |
+
color: $color-cc-blue;
|
175 |
+
font-size: 16px;
|
176 |
+
font-weight: 400;
|
177 |
+
margin-top: 30px;
|
178 |
+
text-align: left;
|
179 |
+
}
|
180 |
+
}
|
181 |
+
|
182 |
+
.left-side {
|
183 |
+
box-sizing: border-box;
|
184 |
+
float: left;
|
185 |
+
padding-right: 160px;
|
186 |
+
|
187 |
+
@media screen and (max-width: 482px) {
|
188 |
+
padding-right: 0;
|
189 |
+
}
|
190 |
+
}
|
191 |
+
|
192 |
+
.plugin-badge {
|
193 |
+
float: right;
|
194 |
+
margin-left: 40px;
|
195 |
+
max-height: 180px;
|
196 |
+
max-width: 160px;
|
197 |
+
|
198 |
+
@media screen and (max-width: 482px) {
|
199 |
+
display: none;
|
200 |
+
}
|
201 |
+
}
|
202 |
+
|
203 |
+
.feature-image {
|
204 |
+
text-align: center;
|
205 |
+
}
|
206 |
}
|
|
|
207 |
.cc-a-block {
|
208 |
+
@include clearfix;
|
209 |
+
|
210 |
+
margin: 0 auto;
|
211 |
+
max-width: 90%;
|
212 |
+
padding: 50px 0;
|
213 |
+
text-align: center;
|
214 |
+
|
215 |
+
@media screen and (max-width: 482px) {
|
216 |
+
padding: 25px 0;
|
217 |
+
}
|
218 |
+
|
219 |
+
h3 {
|
220 |
+
color: $color-cc-blue;
|
221 |
+
font-size: 21px;
|
222 |
+
font-weight: 300;
|
223 |
+
height: 63px;
|
224 |
+
margin: 0 auto;
|
225 |
+
max-width: 70%;
|
226 |
+
|
227 |
+
@media screen and (max-width: 782px) {
|
228 |
+
height: auto;
|
229 |
+
max-width: 100%;
|
230 |
+
}
|
231 |
+
}
|
232 |
+
|
233 |
+
.left,
|
234 |
+
.right {
|
235 |
+
@include clearfix;
|
236 |
+
|
237 |
+
float: left;
|
238 |
+
width: 50%;
|
239 |
+
|
240 |
+
@media screen and (max-width: 482px) {
|
241 |
+
float: none;
|
242 |
+
width: 100%;
|
243 |
+
}
|
244 |
+
|
245 |
+
.ad-1,
|
246 |
+
.ad-2 {
|
247 |
+
width: 90%;
|
248 |
+
|
249 |
+
@media screen and (max-width: 482px) {
|
250 |
+
float: none;
|
251 |
+
width: 100%;
|
252 |
+
}
|
253 |
+
|
254 |
+
img {
|
255 |
+
height: auto;
|
256 |
+
width: 100%;
|
257 |
+
}
|
258 |
+
}
|
259 |
+
|
260 |
+
.ad-1 {
|
261 |
+
float: left;
|
262 |
+
|
263 |
+
h3 {
|
264 |
+
height: 47px;
|
265 |
+
padding-top: 35px;
|
266 |
+
}
|
267 |
+
}
|
268 |
+
|
269 |
+
.ad-2 {
|
270 |
+
float: right;
|
271 |
+
}
|
272 |
+
}
|
273 |
}
|
274 |
|
275 |
.ctct-bonus-points {
|
276 |
+
color: #2b5e8c;
|
277 |
+
font-size: 16px;
|
278 |
+
font-weight: 300;
|
279 |
+
list-style: circle;
|
280 |
+
padding-left: 50px;
|
281 |
}
|
282 |
|
283 |
.section-try-us {
|
284 |
+
.ctct-bonus-points {
|
285 |
+
margin-bottom: 50px;
|
286 |
+
}
|
287 |
+
|
288 |
+
a {
|
289 |
+
&.button {
|
290 |
+
margin-right: 40px;
|
291 |
+
}
|
292 |
+
|
293 |
+
&.ctct-connect {
|
294 |
+
font-weight: bold;
|
295 |
+
}
|
296 |
+
|
297 |
+
&:focus {
|
298 |
+
outline: 1px dotted $color-black;
|
299 |
+
}
|
300 |
+
}
|
|
|
301 |
}
|
302 |
|
303 |
.section-marketing-tips {
|
304 |
+
#subbox {
|
305 |
+
height: 40px;
|
306 |
+
width: 50%;
|
307 |
+
}
|
|
|
308 |
}
|
309 |
|
310 |
#cmb2-metabox-ctct_option_metabox_settings {
|
311 |
+
.regular-text {
|
312 |
+
width: 500px;
|
313 |
+
}
|
|
|
314 |
}
|
315 |
|
316 |
.cmb2-options-page {
|
317 |
+
&[class*="option-ctct_options_settings_"] {
|
318 |
+
.cmb2-metabox > .cmb-row {
|
319 |
+
background: transparent;
|
320 |
+
border: none;
|
321 |
+
box-shadow: none;
|
322 |
+
}
|
323 |
+
}
|
|
|
|
|
324 |
}
|
325 |
|
326 |
.ctct-body {
|
327 |
+
#ctct_error_logs {
|
328 |
+
height: 400px;
|
329 |
+
resize: vertical;
|
330 |
+
width: 100%;
|
331 |
+
}
|
|
|
332 |
}
|
constant-contact-forms.php
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
* Plugin Name: Constant Contact Forms for WordPress
|
13 |
* Plugin URI: https://www.constantcontact.com
|
14 |
* Description: Be a better marketer. All it takes is Constant Contact email marketing.
|
15 |
-
* Version: 1.
|
16 |
* Author: Constant Contact
|
17 |
* Author URI: https://www.constantcontact.com/index?pn=miwordpress
|
18 |
* License: GPLv3
|
@@ -72,7 +72,7 @@ class Constant_Contact {
|
|
72 |
* @since 1.0.0
|
73 |
* @var string
|
74 |
*/
|
75 |
-
const VERSION = '1.
|
76 |
|
77 |
/**
|
78 |
* URL of plugin directory.
|
@@ -330,6 +330,22 @@ class Constant_Contact {
|
|
330 |
*/
|
331 |
private $gutenberg;
|
332 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
333 |
/**
|
334 |
* Option name for where we store the timestamp of when the plugin was activated.
|
335 |
*
|
@@ -417,6 +433,10 @@ class Constant_Contact {
|
|
417 |
*/
|
418 |
public function plugin_classes() {
|
419 |
$this->api = new ConstantContact_API( $this );
|
|
|
|
|
|
|
|
|
420 |
$this->builder = new ConstantContact_Builder( $this );
|
421 |
$this->builder_fields = new ConstantContact_Builder_Fields( $this );
|
422 |
$this->check = new ConstantContact_Check( $this );
|
@@ -437,6 +457,10 @@ class Constant_Contact {
|
|
437 |
$this->optin = new ConstantContact_Optin( $this );
|
438 |
$this->logging = new ConstantContact_Logging( $this );
|
439 |
$this->customizations = new ConstantContact_User_Customizations( $this );
|
|
|
|
|
|
|
|
|
440 |
}
|
441 |
|
442 |
/**
|
@@ -611,6 +635,7 @@ class Constant_Contact {
|
|
611 |
case 'auth_redirect':
|
612 |
case 'api':
|
613 |
case 'basename':
|
|
|
614 |
case 'builder':
|
615 |
case 'builder_fields':
|
616 |
case 'connect':
|
@@ -619,6 +644,7 @@ class Constant_Contact {
|
|
619 |
case 'customizations':
|
620 |
case 'display':
|
621 |
case 'display_shortcode':
|
|
|
622 |
case 'gutenberg':
|
623 |
case 'lists':
|
624 |
case 'logging':
|
12 |
* Plugin Name: Constant Contact Forms for WordPress
|
13 |
* Plugin URI: https://www.constantcontact.com
|
14 |
* Description: Be a better marketer. All it takes is Constant Contact email marketing.
|
15 |
+
* Version: 1.10.0
|
16 |
* Author: Constant Contact
|
17 |
* Author URI: https://www.constantcontact.com/index?pn=miwordpress
|
18 |
* License: GPLv3
|
72 |
* @since 1.0.0
|
73 |
* @var string
|
74 |
*/
|
75 |
+
const VERSION = '1.10.0';
|
76 |
|
77 |
/**
|
78 |
* URL of plugin directory.
|
330 |
*/
|
331 |
private $gutenberg;
|
332 |
|
333 |
+
/**
|
334 |
+
* An instance of the ConstantContact_BeaverBuilder class.
|
335 |
+
*
|
336 |
+
* @since 1.5.0
|
337 |
+
* @var ConstantContact_BeaverBuilder
|
338 |
+
*/
|
339 |
+
private $beaver_builder;
|
340 |
+
|
341 |
+
/*
|
342 |
+
* An instance of the ConstantContact_Elementor class.
|
343 |
+
*
|
344 |
+
* @since 1.5.0
|
345 |
+
* @var ConstantContact_Elementor
|
346 |
+
*/
|
347 |
+
private $elementor;
|
348 |
+
|
349 |
/**
|
350 |
* Option name for where we store the timestamp of when the plugin was activated.
|
351 |
*
|
433 |
*/
|
434 |
public function plugin_classes() {
|
435 |
$this->api = new ConstantContact_API( $this );
|
436 |
+
if ( class_exists( 'FLBuilder' ) ) {
|
437 |
+
// Load if Beaver Builder is active.
|
438 |
+
$this->beaver_builder = new ConstantContact_Beaver_Builder( $this );
|
439 |
+
}
|
440 |
$this->builder = new ConstantContact_Builder( $this );
|
441 |
$this->builder_fields = new ConstantContact_Builder_Fields( $this );
|
442 |
$this->check = new ConstantContact_Check( $this );
|
457 |
$this->optin = new ConstantContact_Optin( $this );
|
458 |
$this->logging = new ConstantContact_Logging( $this );
|
459 |
$this->customizations = new ConstantContact_User_Customizations( $this );
|
460 |
+
if ( in_array( 'elementor/elementor.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
|
461 |
+
// Load if Elementor is active.
|
462 |
+
$this->elementor = new ConstantContact_Elementor( $this );
|
463 |
+
}
|
464 |
}
|
465 |
|
466 |
/**
|
635 |
case 'auth_redirect':
|
636 |
case 'api':
|
637 |
case 'basename':
|
638 |
+
case 'beaver_builder':
|
639 |
case 'builder':
|
640 |
case 'builder_fields':
|
641 |
case 'connect':
|
644 |
case 'customizations':
|
645 |
case 'display':
|
646 |
case 'display_shortcode':
|
647 |
+
case 'elementor':
|
648 |
case 'gutenberg':
|
649 |
case 'lists':
|
650 |
case 'logging':
|
includes/cc-modules/form/includes/frontend.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Beaver Builder Module to Display Form
|
4 |
+
*
|
5 |
+
* @since NEXT
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( empty( $settings->cc_form ) ) {
|
9 |
+
echo __( 'Please select a form.', 'constant-contact-forms' );
|
10 |
+
return;
|
11 |
+
}
|
12 |
+
|
13 |
+
echo do_shortcode( "[ctct form='{$settings->cc_form}' show_title='{$settings->cc_display_title}']" );
|
14 |
+
|
15 |
+
?>
|
includes/class-beaver-builder.php
ADDED
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Beaver Builder Support
|
4 |
+
*
|
5 |
+
* @package ConstantContact
|
6 |
+
* @subpackage Beaver Builder
|
7 |
+
* @author Constant Contact
|
8 |
+
* @since NEXT
|
9 |
+
*
|
10 |
+
* phpcs:disable WebDevStudios.All.RequireAuthor -- Don't require author tag in docblocks.
|
11 |
+
*/
|
12 |
+
|
13 |
+
/**
|
14 |
+
* This class get's everything up an running for Beaver Builder support.
|
15 |
+
*
|
16 |
+
* @since NEXT
|
17 |
+
*/
|
18 |
+
class ConstantContact_Beaver_Builder {
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Parent plugin class.
|
22 |
+
*
|
23 |
+
* @since NEXT
|
24 |
+
* @var object
|
25 |
+
*/
|
26 |
+
protected $plugin;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Constructor.
|
30 |
+
*
|
31 |
+
* @since NEXT
|
32 |
+
*
|
33 |
+
* @param object $plugin Parent plugin.
|
34 |
+
*/
|
35 |
+
public function __construct( $plugin ) {
|
36 |
+
$this->plugin = $plugin;
|
37 |
+
if ( class_exists( 'FLBuilder' ) ) {
|
38 |
+
add_action( 'init', [ $this, 'register_bb_modules'] );
|
39 |
+
}
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Registers Beaver Builder Modules
|
44 |
+
*
|
45 |
+
* @since NEXT
|
46 |
+
*/
|
47 |
+
public function register_bb_modules() {
|
48 |
+
FLBuilder::register_module( 'CCForm', array(
|
49 |
+
'ccm-tab-1' => array(
|
50 |
+
'title' => __( 'Settings', 'constant-contact-forms' ),
|
51 |
+
'sections' => array(
|
52 |
+
'ccm-section-1' => array(
|
53 |
+
'title' => __( 'Settings', 'constant-contact-forms' ),
|
54 |
+
'fields' => array(
|
55 |
+
'cc_display_title' => array(
|
56 |
+
'type' => 'select',
|
57 |
+
'label' => __('Title', 'constant-contact-forms'),
|
58 |
+
'default' => 'true',
|
59 |
+
'options' => array(
|
60 |
+
'true' => __('Display', 'constant-contact-forms'),
|
61 |
+
'false' => __('Hide', 'constant-contact-forms')
|
62 |
+
),
|
63 |
+
),
|
64 |
+
'cc_form' => array(
|
65 |
+
'type' => 'select',
|
66 |
+
'label' => __('Form', 'constant-contact-forms'),
|
67 |
+
'options' => $this->get_form_options(),
|
68 |
+
),
|
69 |
+
)
|
70 |
+
)
|
71 |
+
)
|
72 |
+
)
|
73 |
+
) );
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Provides all Constant Contact Forms current Published.
|
78 |
+
*
|
79 |
+
* @since NEXT
|
80 |
+
*/
|
81 |
+
private function get_form_options () {
|
82 |
+
|
83 |
+
$options = [
|
84 |
+
|
85 |
+
];
|
86 |
+
|
87 |
+
$forms = get_posts( [
|
88 |
+
'post_type' => 'ctct_forms',
|
89 |
+
'post_status' => 'publish',
|
90 |
+
'numberposts' => -1
|
91 |
+
] );
|
92 |
+
|
93 |
+
foreach ( $forms as $form ) {
|
94 |
+
$options[ $form->ID ] = $form->post_title;
|
95 |
+
}
|
96 |
+
|
97 |
+
if ( empty( $options ) ) {
|
98 |
+
$options[ '' ] = __( 'No forms currently published.', 'constant-contact-forms' );
|
99 |
+
}
|
100 |
+
|
101 |
+
return $options;
|
102 |
+
}
|
103 |
+
|
104 |
+
}
|
105 |
+
|
106 |
+
class CCForm extends FLBuilderModule {
|
107 |
+
public function __construct()
|
108 |
+
{
|
109 |
+
parent::__construct( array(
|
110 |
+
'name' => __( 'Constant Contact Form', 'constant-contact-forms' ),
|
111 |
+
'description' => __( 'Display a Constant Contact Form', 'constant-contact-forms' ),
|
112 |
+
'category' => __( 'Constant Contact', 'constant-contact-forms' ),
|
113 |
+
'dir' => __DIR__ . '/cc-modules/form/',
|
114 |
+
'url' => __DIR__ . '/cc-modules/form/',
|
115 |
+
) );
|
116 |
+
}
|
117 |
+
}
|
includes/class-builder-fields.php
CHANGED
@@ -216,10 +216,19 @@ class ConstantContact_Builder_Fields {
|
|
216 |
] );
|
217 |
|
218 |
$lists = $this->plugin->builder->get_lists();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
219 |
|
220 |
if ( $lists ) {
|
221 |
$list_metabox->add_field( [
|
222 |
-
'name' => esc_html__( 'Allow subscribers to select from lists', 'constant-contact-forms' ),
|
223 |
'id' => $this->prefix . 'list',
|
224 |
'type' => 'multicheck',
|
225 |
'options' => $lists,
|
216 |
] );
|
217 |
|
218 |
$lists = $this->plugin->builder->get_lists();
|
219 |
+
|
220 |
+
if ( empty( $lists ) ) {
|
221 |
+
$list_metabox->add_field( array(
|
222 |
+
'name' => esc_html__( 'No Lists Found', 'constant-contact-forms' ),
|
223 |
+
'desc' => '<a href="/wp-admin/edit.php?post_type=ctct_lists">' .esc_html__( 'Create a List', 'constant-contact-forms' ) . '</a>',
|
224 |
+
'type' => 'title',
|
225 |
+
'id' => $this->prefix . 'tip',
|
226 |
+
) );
|
227 |
+
}
|
228 |
|
229 |
if ( $lists ) {
|
230 |
$list_metabox->add_field( [
|
231 |
+
'name' => esc_html__( 'Allow subscribers to select from lists. ( Select at least one )', 'constant-contact-forms' ),
|
232 |
'id' => $this->prefix . 'list',
|
233 |
'type' => 'multicheck',
|
234 |
'options' => $lists,
|
includes/class-connect.php
CHANGED
@@ -198,7 +198,7 @@ class ConstantContact_Connect {
|
|
198 |
</form>
|
199 |
</div>
|
200 |
|
201 |
-
<?php if ( !
|
202 |
|
203 |
<?php // phpcs:disable WordPress.WP.EnqueuedResources -- Ok use of inline scripts. ?>
|
204 |
<div class="ctct-connected-next-step">
|
198 |
</form>
|
199 |
</div>
|
200 |
|
201 |
+
<?php if ( ! constant_contact_has_forms()() ) : ?>
|
202 |
|
203 |
<?php // phpcs:disable WordPress.WP.EnqueuedResources -- Ok use of inline scripts. ?>
|
204 |
<div class="ctct-connected-next-step">
|
includes/class-elementor.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Elementor Support
|
4 |
+
*
|
5 |
+
* @package ConstantContact
|
6 |
+
* @subpackage Elementor
|
7 |
+
* @author Constant Contact
|
8 |
+
* @since NEXT
|
9 |
+
*
|
10 |
+
* phpcs:disable WebDevStudios.All.RequireAuthor -- Don't require author tag in docblocks.
|
11 |
+
*/
|
12 |
+
|
13 |
+
/**
|
14 |
+
* This class get's everything up an running for Elementor support.
|
15 |
+
*
|
16 |
+
* @since NEXT
|
17 |
+
*/
|
18 |
+
class ConstantContact_Elementor {
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Parent plugin class.
|
22 |
+
*
|
23 |
+
* @since NEXT
|
24 |
+
* @var object
|
25 |
+
*/
|
26 |
+
protected $plugin;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Constructor.
|
30 |
+
*
|
31 |
+
* @since NEXT
|
32 |
+
*
|
33 |
+
* @param object $plugin Parent plugin.
|
34 |
+
*/
|
35 |
+
public function __construct( $plugin ) {
|
36 |
+
$this->plugin = $plugin;
|
37 |
+
$this->hooks();
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Register Hooks
|
42 |
+
*
|
43 |
+
* @since NEXT
|
44 |
+
*/
|
45 |
+
private function hooks() {
|
46 |
+
add_action( 'elementor/widgets/widgets_registered', [ $this, 'register_widget' ] );
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Registers all Elementor Widgets
|
51 |
+
*
|
52 |
+
* @since NEXT
|
53 |
+
*/
|
54 |
+
public function register_widget() {
|
55 |
+
require_once( __DIR__ . '/widgets/elementor-widget.php' );
|
56 |
+
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new ConstantContact_Elementor_Widget() );
|
57 |
+
}
|
58 |
+
|
59 |
+
}
|
includes/class-gutenberg.php
CHANGED
@@ -65,6 +65,9 @@ class ConstantContact_Gutenberg {
|
|
65 |
'selectedForm' => [
|
66 |
'type' => 'number',
|
67 |
],
|
|
|
|
|
|
|
68 |
],
|
69 |
'render_callback' => [ $this, 'display_single_contact_form' ],
|
70 |
] );
|
@@ -84,8 +87,13 @@ class ConstantContact_Gutenberg {
|
|
84 |
return '';
|
85 |
}
|
86 |
|
|
|
|
|
|
|
|
|
|
|
87 |
ob_start();
|
88 |
-
echo constant_contact_get_form( absint( $attributes['selectedForm'] ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- XSS OK.
|
89 |
return ob_get_clean();
|
90 |
}
|
91 |
}
|
65 |
'selectedForm' => [
|
66 |
'type' => 'number',
|
67 |
],
|
68 |
+
'displayTitle' => [
|
69 |
+
'type' => 'boolean',
|
70 |
+
],
|
71 |
],
|
72 |
'render_callback' => [ $this, 'display_single_contact_form' ],
|
73 |
] );
|
87 |
return '';
|
88 |
}
|
89 |
|
90 |
+
$display_title = true;
|
91 |
+
if ( empty( $attributes['displayTitle'] ) || 'false' === $attributes['displayTitle'] ) {
|
92 |
+
$display_title = false;
|
93 |
+
}
|
94 |
+
|
95 |
ob_start();
|
96 |
+
echo constant_contact_get_form( absint( $attributes['selectedForm'] ), $display_title ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- XSS OK.
|
97 |
return ob_get_clean();
|
98 |
}
|
99 |
}
|
includes/class-settings.php
CHANGED
@@ -611,7 +611,7 @@ class ConstantContact_Settings {
|
|
611 |
*/
|
612 |
public function check_if_optin_should_show( $type ) {
|
613 |
|
614 |
-
$available_areas =
|
615 |
|
616 |
if ( ! is_array( $available_areas ) ) {
|
617 |
return false;
|
@@ -668,8 +668,8 @@ class ConstantContact_Settings {
|
|
668 |
return;
|
669 |
}
|
670 |
|
671 |
-
$saved_label =
|
672 |
-
$list =
|
673 |
$label = $saved_label ?: esc_html__( 'Sign up to our newsletter.', 'constant-contact-forms' );
|
674 |
?>
|
675 |
<p class="ctct-optin-wrapper" style="padding: 0 0 1em 0;">
|
611 |
*/
|
612 |
public function check_if_optin_should_show( $type ) {
|
613 |
|
614 |
+
$available_areas = constant_contact_get_option( '_ctct_optin_forms', [] );
|
615 |
|
616 |
if ( ! is_array( $available_areas ) ) {
|
617 |
return false;
|
668 |
return;
|
669 |
}
|
670 |
|
671 |
+
$saved_label = constant_contact_get_option( '_ctct_optin_label', '' );
|
672 |
+
$list = constant_contact_get_option( '_ctct_optin_list', '' );
|
673 |
$label = $saved_label ?: esc_html__( 'Sign up to our newsletter.', 'constant-contact-forms' );
|
674 |
?>
|
675 |
<p class="ctct-optin-wrapper" style="padding: 0 0 1em 0;">
|
includes/widgets/elementor-widget.php
ADDED
@@ -0,0 +1,139 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Elementor Widget
|
4 |
+
*
|
5 |
+
* @package ConstantContact
|
6 |
+
* @subpackage Elementor
|
7 |
+
* @author Constant Contact
|
8 |
+
* @since NEXT
|
9 |
+
*
|
10 |
+
* phpcs:disable WebDevStudios.All.RequireAuthor -- Don't require author tag in docblocks.
|
11 |
+
*/
|
12 |
+
|
13 |
+
/**
|
14 |
+
* This class get's everything up an running for Elementor Widget.
|
15 |
+
*
|
16 |
+
* @since NEXT
|
17 |
+
*/
|
18 |
+
class ConstantContact_Elementor_Widget extends \Elementor\Widget_Base {
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Widgets Name
|
22 |
+
*
|
23 |
+
* @since NEXT
|
24 |
+
*/
|
25 |
+
public function get_name() {
|
26 |
+
return 'constant-contact';
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Widgets Title
|
31 |
+
*
|
32 |
+
* @since NEXT
|
33 |
+
*/
|
34 |
+
public function get_title() {
|
35 |
+
return 'Constant Contact Form';
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Widgets Icon
|
40 |
+
*
|
41 |
+
* @since NEXT
|
42 |
+
*/
|
43 |
+
public function get_icon() {
|
44 |
+
return 'eicon-form-horizontal';
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Widgets Category
|
49 |
+
*
|
50 |
+
* @since NEXT
|
51 |
+
*/
|
52 |
+
public function get_categories() {
|
53 |
+
return [ 'basic' ];
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Displays Widget Controls.
|
58 |
+
*
|
59 |
+
* @since NEXT
|
60 |
+
*/
|
61 |
+
protected function _register_controls() {
|
62 |
+
|
63 |
+
$this->start_controls_section(
|
64 |
+
'section_title',
|
65 |
+
[
|
66 |
+
'label' => __( 'Constant Contact Form Settings', 'constant-contact-forms' ),
|
67 |
+
]
|
68 |
+
);
|
69 |
+
|
70 |
+
$this->add_control(
|
71 |
+
'show_title',
|
72 |
+
[
|
73 |
+
'label' => __( 'Show Title', 'constant-contact-forms' ),
|
74 |
+
'type' => \Elementor\Controls_Manager::SWITCHER,
|
75 |
+
'label_on' => __( 'Show', 'constant-contact-forms' ),
|
76 |
+
'label_off' => __( 'Hide', 'constant-contact-forms' ),
|
77 |
+
'return_value' => true,
|
78 |
+
'default' => true,
|
79 |
+
]
|
80 |
+
);
|
81 |
+
|
82 |
+
$this->add_control(
|
83 |
+
'form_id',
|
84 |
+
[
|
85 |
+
'label' => __( 'Form', 'constant-contact-forms' ),
|
86 |
+
'type' => \Elementor\Controls_Manager::SELECT,
|
87 |
+
'options' => $this->get_form_options(),
|
88 |
+
]
|
89 |
+
);
|
90 |
+
|
91 |
+
$this->end_controls_section();
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* Provides all Constant Contact Forms current Published.
|
96 |
+
*
|
97 |
+
* @since NEXT
|
98 |
+
*/
|
99 |
+
private function get_form_options () {
|
100 |
+
|
101 |
+
$options = [
|
102 |
+
|
103 |
+
];
|
104 |
+
|
105 |
+
$forms = get_posts([
|
106 |
+
'post_type' => 'ctct_forms',
|
107 |
+
'post_status' => 'publish',
|
108 |
+
'numberposts' => -1
|
109 |
+
]);
|
110 |
+
|
111 |
+
foreach ( $forms as $form ) {
|
112 |
+
$options[ $form->ID ] = $form->post_title;
|
113 |
+
}
|
114 |
+
|
115 |
+
if ( empty( $options ) ) {
|
116 |
+
$options[ '' ] = __( 'No forms currently published.', 'constant-contact-forms' );
|
117 |
+
}
|
118 |
+
|
119 |
+
return $options;
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Displays Widget
|
124 |
+
*
|
125 |
+
* @since NEXT
|
126 |
+
*/
|
127 |
+
protected function render() {
|
128 |
+
$settings = $this->get_settings_for_display();
|
129 |
+
|
130 |
+
if ( empty( $settings['form_id'] ) ) {
|
131 |
+
echo __( 'Please select a form.', 'constant-contact-forms' );
|
132 |
+
return;
|
133 |
+
}
|
134 |
+
|
135 |
+
$show_title = $settings['show_title'] ? 'true' : 'false';
|
136 |
+
echo do_shortcode( "[ctct form='{$settings['form_id']}' show_title='{$show_title}']" );
|
137 |
+
}
|
138 |
+
|
139 |
+
}
|
languages/constant-contact-forms.pot
CHANGED
@@ -773,7 +773,7 @@ msgstr ""
|
|
773 |
msgid "Cron spawn ok"
|
774 |
msgstr ""
|
775 |
|
776 |
-
#: includes/class-connect.php:132, includes/class-connect.php:
|
777 |
msgid "Disconnect"
|
778 |
msgstr ""
|
779 |
|
@@ -798,28 +798,32 @@ msgstr ""
|
|
798 |
msgid "Plugin connected to Constant Contact."
|
799 |
msgstr ""
|
800 |
|
801 |
-
#: includes/class-connect.php:
|
|
|
|
|
|
|
|
|
802 |
msgid "Your account is connected! Now, add a new form."
|
803 |
msgstr ""
|
804 |
|
805 |
-
#: includes/class-connect.php:
|
806 |
msgid "Please help to improve this plugin."
|
807 |
msgstr ""
|
808 |
|
809 |
#. translators: Placeholder will hold link to Constant Contact privacy statement.
|
810 |
-
#: includes/class-connect.php:
|
811 |
msgid "Allow Constant Contact to use Google Analytics™ to track your usage across the Constant Contact Forms plugin. You can opt-out within the Settings page. See our %1$s."
|
812 |
msgstr ""
|
813 |
|
814 |
-
#: includes/class-connect.php:
|
815 |
msgid "Privacy Statement"
|
816 |
msgstr ""
|
817 |
|
818 |
-
#: includes/class-connect.php:
|
819 |
msgid "Allow"
|
820 |
msgstr ""
|
821 |
|
822 |
-
#: includes/class-connect.php:
|
823 |
msgid "Dismiss"
|
824 |
msgstr ""
|
825 |
|
@@ -1079,96 +1083,96 @@ msgstr ""
|
|
1079 |
msgid "Constant Contact Use."
|
1080 |
msgstr ""
|
1081 |
|
1082 |
-
#: includes/class-display.php:699, includes/class-display.php:
|
1083 |
msgid "Error: Please correct your entry."
|
1084 |
msgstr ""
|
1085 |
|
1086 |
-
#: includes/class-display.php:
|
1087 |
msgid "Street Address"
|
1088 |
msgstr ""
|
1089 |
|
1090 |
-
#: includes/class-display.php:
|
1091 |
msgid "Address Line 2"
|
1092 |
msgstr ""
|
1093 |
|
1094 |
-
#: includes/class-display.php:
|
1095 |
msgid "City"
|
1096 |
msgstr ""
|
1097 |
|
1098 |
-
#: includes/class-display.php:
|
1099 |
msgid "State"
|
1100 |
msgstr ""
|
1101 |
|
1102 |
-
#: includes/class-display.php:
|
1103 |
msgid "ZIP Code"
|
1104 |
msgstr ""
|
1105 |
|
1106 |
-
#: includes/class-display.php:
|
1107 |
msgid "Month"
|
1108 |
msgstr ""
|
1109 |
|
1110 |
-
#: includes/class-display.php:
|
1111 |
msgid "Day"
|
1112 |
msgstr ""
|
1113 |
|
1114 |
-
#: includes/class-display.php:
|
1115 |
msgid "Year"
|
1116 |
msgstr ""
|
1117 |
|
1118 |
-
#: includes/class-display.php:
|
1119 |
msgid "January"
|
1120 |
msgstr ""
|
1121 |
|
1122 |
-
#: includes/class-display.php:
|
1123 |
msgid "February"
|
1124 |
msgstr ""
|
1125 |
|
1126 |
-
#: includes/class-display.php:
|
1127 |
msgid "March"
|
1128 |
msgstr ""
|
1129 |
|
1130 |
-
#: includes/class-display.php:
|
1131 |
msgid "April"
|
1132 |
msgstr ""
|
1133 |
|
1134 |
-
#: includes/class-display.php:
|
1135 |
msgid "May"
|
1136 |
msgstr ""
|
1137 |
|
1138 |
-
#: includes/class-display.php:
|
1139 |
msgid "June"
|
1140 |
msgstr ""
|
1141 |
|
1142 |
-
#: includes/class-display.php:
|
1143 |
msgid "July "
|
1144 |
msgstr ""
|
1145 |
|
1146 |
-
#: includes/class-display.php:
|
1147 |
msgid "August"
|
1148 |
msgstr ""
|
1149 |
|
1150 |
-
#: includes/class-display.php:
|
1151 |
msgid "September"
|
1152 |
msgstr ""
|
1153 |
|
1154 |
-
#: includes/class-display.php:
|
1155 |
msgid "October"
|
1156 |
msgstr ""
|
1157 |
|
1158 |
-
#: includes/class-display.php:
|
1159 |
msgid "November"
|
1160 |
msgstr ""
|
1161 |
|
1162 |
-
#: includes/class-display.php:
|
1163 |
msgid "December"
|
1164 |
msgstr ""
|
1165 |
|
1166 |
#. translators: placeholder will hold company info for site owner.
|
1167 |
-
#: includes/class-display.php:
|
1168 |
msgid "By submitting this form, you are consenting to receive marketing emails from: %1$s. You can revoke your consent to receive emails at any time by using the SafeUnsubscribe® link, found at the bottom of every email. %2$s"
|
1169 |
msgstr ""
|
1170 |
|
1171 |
-
#: includes/class-display.php:
|
1172 |
msgid "Emails are serviced by Constant Contact"
|
1173 |
msgstr ""
|
1174 |
|
773 |
msgid "Cron spawn ok"
|
774 |
msgstr ""
|
775 |
|
776 |
+
#: includes/class-connect.php:132, includes/class-connect.php:197
|
777 |
msgid "Disconnect"
|
778 |
msgstr ""
|
779 |
|
798 |
msgid "Plugin connected to Constant Contact."
|
799 |
msgstr ""
|
800 |
|
801 |
+
#: includes/class-connect.php:189
|
802 |
+
msgid "There was an issue with retrieving connected account information. Please try again."
|
803 |
+
msgstr ""
|
804 |
+
|
805 |
+
#: includes/class-connect.php:205
|
806 |
msgid "Your account is connected! Now, add a new form."
|
807 |
msgstr ""
|
808 |
|
809 |
+
#: includes/class-connect.php:215
|
810 |
msgid "Please help to improve this plugin."
|
811 |
msgstr ""
|
812 |
|
813 |
#. translators: Placeholder will hold link to Constant Contact privacy statement.
|
814 |
+
#: includes/class-connect.php:220
|
815 |
msgid "Allow Constant Contact to use Google Analytics™ to track your usage across the Constant Contact Forms plugin. You can opt-out within the Settings page. See our %1$s."
|
816 |
msgstr ""
|
817 |
|
818 |
+
#: includes/class-connect.php:223
|
819 |
msgid "Privacy Statement"
|
820 |
msgstr ""
|
821 |
|
822 |
+
#: includes/class-connect.php:230
|
823 |
msgid "Allow"
|
824 |
msgstr ""
|
825 |
|
826 |
+
#: includes/class-connect.php:231, includes/class-notification-content.php:164
|
827 |
msgid "Dismiss"
|
828 |
msgstr ""
|
829 |
|
1083 |
msgid "Constant Contact Use."
|
1084 |
msgstr ""
|
1085 |
|
1086 |
+
#: includes/class-display.php:699, includes/class-display.php:1800
|
1087 |
msgid "Error: Please correct your entry."
|
1088 |
msgstr ""
|
1089 |
|
1090 |
+
#: includes/class-display.php:1373
|
1091 |
msgid "Street Address"
|
1092 |
msgstr ""
|
1093 |
|
1094 |
+
#: includes/class-display.php:1374
|
1095 |
msgid "Address Line 2"
|
1096 |
msgstr ""
|
1097 |
|
1098 |
+
#: includes/class-display.php:1375
|
1099 |
msgid "City"
|
1100 |
msgstr ""
|
1101 |
|
1102 |
+
#: includes/class-display.php:1376
|
1103 |
msgid "State"
|
1104 |
msgstr ""
|
1105 |
|
1106 |
+
#: includes/class-display.php:1377
|
1107 |
msgid "ZIP Code"
|
1108 |
msgstr ""
|
1109 |
|
1110 |
+
#: includes/class-display.php:1567
|
1111 |
msgid "Month"
|
1112 |
msgstr ""
|
1113 |
|
1114 |
+
#: includes/class-display.php:1568
|
1115 |
msgid "Day"
|
1116 |
msgstr ""
|
1117 |
|
1118 |
+
#: includes/class-display.php:1569
|
1119 |
msgid "Year"
|
1120 |
msgstr ""
|
1121 |
|
1122 |
+
#: includes/class-display.php:1685
|
1123 |
msgid "January"
|
1124 |
msgstr ""
|
1125 |
|
1126 |
+
#: includes/class-display.php:1686
|
1127 |
msgid "February"
|
1128 |
msgstr ""
|
1129 |
|
1130 |
+
#: includes/class-display.php:1687
|
1131 |
msgid "March"
|
1132 |
msgstr ""
|
1133 |
|
1134 |
+
#: includes/class-display.php:1688
|
1135 |
msgid "April"
|
1136 |
msgstr ""
|
1137 |
|
1138 |
+
#: includes/class-display.php:1689
|
1139 |
msgid "May"
|
1140 |
msgstr ""
|
1141 |
|
1142 |
+
#: includes/class-display.php:1690
|
1143 |
msgid "June"
|
1144 |
msgstr ""
|
1145 |
|
1146 |
+
#: includes/class-display.php:1691
|
1147 |
msgid "July "
|
1148 |
msgstr ""
|
1149 |
|
1150 |
+
#: includes/class-display.php:1692
|
1151 |
msgid "August"
|
1152 |
msgstr ""
|
1153 |
|
1154 |
+
#: includes/class-display.php:1693
|
1155 |
msgid "September"
|
1156 |
msgstr ""
|
1157 |
|
1158 |
+
#: includes/class-display.php:1694
|
1159 |
msgid "October"
|
1160 |
msgstr ""
|
1161 |
|
1162 |
+
#: includes/class-display.php:1695
|
1163 |
msgid "November"
|
1164 |
msgstr ""
|
1165 |
|
1166 |
+
#: includes/class-display.php:1696
|
1167 |
msgid "December"
|
1168 |
msgstr ""
|
1169 |
|
1170 |
#. translators: placeholder will hold company info for site owner.
|
1171 |
+
#: includes/class-display.php:1871
|
1172 |
msgid "By submitting this form, you are consenting to receive marketing emails from: %1$s. You can revoke your consent to receive emails at any time by using the SafeUnsubscribe® link, found at the bottom of every email. %2$s"
|
1173 |
msgstr ""
|
1174 |
|
1175 |
+
#: includes/class-display.php:1878
|
1176 |
msgid "Emails are serviced by Constant Contact"
|
1177 |
msgstr ""
|
1178 |
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: constantcontact, webdevstudios, tw2113, znowebdev, ggwicz, ravedev
|
3 |
Tags: capture, contacts, constant contact, constant contact form, constant contact newsletter, constant contact official, contact forms, email, form, forms, marketing, mobile, newsletter, opt-in, plugin, signup, subscribe, subscription, widget
|
4 |
Requires at least: 5.2.0
|
5 |
-
Tested up to: 5.
|
6 |
-
Stable tag: 1.
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
Requires PHP: 5.6
|
@@ -35,6 +35,13 @@ BONUS: If you have a Constant Contact account, all new email addresses that you
|
|
35 |
|
36 |
== Changelog ==
|
37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
= 1.9.1 =
|
39 |
* Fixed: Removing duplicate IDs on form submit button.
|
40 |
* Fixed: Preventing `Bad Request` request errors from rendering an admin notice.
|
2 |
Contributors: constantcontact, webdevstudios, tw2113, znowebdev, ggwicz, ravedev
|
3 |
Tags: capture, contacts, constant contact, constant contact form, constant contact newsletter, constant contact official, contact forms, email, form, forms, marketing, mobile, newsletter, opt-in, plugin, signup, subscribe, subscription, widget
|
4 |
Requires at least: 5.2.0
|
5 |
+
Tested up to: 5.6.0
|
6 |
+
Stable tag: 1.10.0
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
Requires PHP: 5.6
|
35 |
|
36 |
== Changelog ==
|
37 |
|
38 |
+
= 1.10.0 =
|
39 |
+
* Added: Toggle to our Forms Block to display Form title or not.
|
40 |
+
* Added: Support for displaying a form in Beaver Builder.
|
41 |
+
* Added: Support for displaying a form in Elementor.
|
42 |
+
* Fixed: PHP Notices about usage of deprecated functions.
|
43 |
+
* Updated: Touched up styles for the Constant Contact Forms Block.
|
44 |
+
|
45 |
= 1.9.1 =
|
46 |
* Fixed: Removing duplicate IDs on form submit button.
|
47 |
* Fixed: Preventing `Bad Request` request errors from rendering an admin notice.
|
vendor/constantcontact/constantcontact/.gitignore
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
# Created by .gitignore support plugin (hsz.mobi)
|
2 |
-
|
3 |
-
## Directory-based project format
|
4 |
-
.idea/
|
5 |
-
/*.iml
|
6 |
-
|
7 |
-
## File-based project format
|
8 |
-
*.ipr
|
9 |
-
*.iws
|
10 |
-
|
11 |
-
## Additional for IntelliJ
|
12 |
-
out/
|
13 |
-
|
14 |
-
# generated by mpeltonen/sbt-idea plugin
|
15 |
-
.idea_modules/
|
16 |
-
|
17 |
-
# generated by JIRA plugin
|
18 |
-
atlassian-ide-plugin.xml
|
19 |
-
|
20 |
-
### Composer template
|
21 |
-
composer.lock
|
22 |
-
composer.phar
|
23 |
-
vendor/
|
24 |
-
|
25 |
-
devFile.php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/defuse/php-encryption/.gitignore
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
*~
|
2 |
-
/test/unit/File/big-generated-file
|
3 |
-
/composer.lock
|
4 |
-
/vendor
|
5 |
-
defuse-crypto.phar
|
6 |
-
defuse-crypto.phar.sig
|
7 |
-
composer.phar
|
8 |
-
box.phar
|
9 |
-
phpunit.phar
|
10 |
-
phpunit.phar.asc
|
11 |
-
test/unit/File/tmp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/google/recaptcha/.gitignore
DELETED
@@ -1,7 +0,0 @@
|
|
1 |
-
/.php_cs.cache
|
2 |
-
/.phpunit.result.cache
|
3 |
-
/build
|
4 |
-
/composer.lock
|
5 |
-
/examples/config.php
|
6 |
-
/nbproject/private/
|
7 |
-
/vendor/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/guzzlehttp/ringphp/.gitignore
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
vendor
|
2 |
-
build/artifacts/
|
3 |
-
composer.lock
|
4 |
-
docs/_build/
|
|
|
|
|
|
|
|
vendor/guzzlehttp/streams/.gitignore
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
.idea
|
2 |
-
.DS_STORE
|
3 |
-
coverage
|
4 |
-
phpunit.xml
|
5 |
-
composer.lock
|
6 |
-
vendor/
|
|
|
|
|
|
|
|
|
|
|
|
vendor/psr/log/.gitignore
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
vendor
|
|
vendor/react/promise/.gitignore
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
composer.lock
|
2 |
-
composer.phar
|
3 |
-
phpunit.xml
|
4 |
-
build/
|
5 |
-
vendor/
|
|
|
|
|
|
|
|
|
|