Changeset 3035013
- Timestamp:
- 02/13/2024 10:07:50 AM (22 months ago)
- Location:
- wp-dxp/trunk
- Files:
-
- 1 added
- 1 deleted
- 11 edited
-
README.txt (modified) (2 diffs)
-
admin/class-wp-dxp-admin-categories-page.php (modified) (1 diff)
-
admin/class-wp-dxp-admin-rules-page.php (modified) (1 diff)
-
admin/class-wp-dxp-admin-settings-page.php (modified) (1 diff)
-
admin/class-wp-dxp-admin.php (modified) (1 diff)
-
admin/css/wp-dxp-admin.css (modified) (2 diffs)
-
admin/img/personalizewp-logo.svg (deleted)
-
admin/img/wp-dxp-logo.svg (added)
-
admin/partials/_other/header.php (modified) (1 diff)
-
build/index.asset.php (modified) (1 diff)
-
build/index.js (modified) (1 diff)
-
includes/class-wp-dxp-db-manager.php (modified) (1 diff)
-
wp-dxp.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-dxp/trunk/README.txt
r2984992 r3035013 1 === PersonalizeWP (Previous)===1 === WP-DXP === 2 2 Contributors: filterdigital, paulfhalfpenny, tommc1985filter, elechtric, markmanders20, davecpage 3 3 Tags: personalization, personalisation, gutenberg, digital experience platform, show content, hide content, segmentation, conditions, rules, location … … 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 10 11 PersonalizeWP is a plugin designed to add personalization features to the WordPress platform using conditional rules and the Gutenberg Block editor. 11 WP-DXP is a plugin to allow you to personalize the content on your WordPress site. 12 12 13 13 == Description == 14 14 15 = Personalization for WordPress = 15 WP-DXP is a plugin to allow you to modify the content on your WordPress site. 16 16 17 PersonalizeWP allows you to start using WordPress as a digital experience platform, adding personalization and conditional rules to the content that your users see and can interact with. Compete with commercial enterprise platforms and add your own rules to match user behaviour on, then show or hide blocks based on if your conditions are met. 17 The plugin has been rebranded and redeveloped as [PersonalizeWP](https://wordpress.org/plugins/personalizewp/) and can be found at https://wordpress.org/plugins/personalizewp/ 18 18 19 = Default Rules = 19 PersonalizeWP is still available as a free plugin but also has a paid option for those that require more functionality. It is being actively developed and has a full roadmap that will deliver improved and updated features and integrations with other plugins and services. 20 20 21 Available rules out of the box include the ability to show or hide blocks if: 21 If you are interested in personalisation, we strongly recommend using [PersonalizeWP](https://wordpress.org/plugins/personalizewp/) instead of WP-DXP. 22 22 23 * If a user is logged in or not 24 * The user is, or is not, from a specific country 25 * When a certain amount of time has passed 26 * The user is new to the site or is returning 27 * Users are using a mobile, tablet or desktop device 28 * A user is visiting at a specific time or period of the day 29 * The user has been referred from a specific site (i.e. Facebook, Google) 30 * It is before or after, or between, specific dates (i.e. Christmas holidays) 31 * A cookie is set to a particular value or empty 32 * There is a specific query string or parameter in the URL 33 * The user has a specific WordPress role type 23 = Support = 34 24 35 And the ability to use multiple rules on a single block. 36 25 This plugin is no longer being actively developed or supported. 37 26 38 27 == Frequently Asked Questions == 39 28 40 = What is PersonalizeWP? =29 = What is WP-DXP? = 41 30 42 PersonalizeWP is a WordPress plugin designed to add personalization features to WordPress. It follows similar principles to Enterprise platforms such as Episerver, Optimizely and Sitecore and works in conjunction with the Block editor to provide a simple and clear pathway to this functionality for content authors and admins. 43 44 = What can I use it for? = 45 46 You can use PersonalizeWP to personalize content to your users, based on actions that they have taken, or criteria such as which countries they are accessing your site from. We have included basic rules into the plugin to provide a starting point and you can add your own rules, based on a set of conditions, and then apply those to any blocks you wish. 47 48 = How do I use PersonalizeWP? = 49 50 Once you have the plugin installed and activated, a PersonalizeWP option will appear in the Block Settings sidebar in the editor when you are editing a block. Within this, you will be given the choice to choose a rule and determine an action if that rule is met. For instance, you may wish to add a content block with a message that is only shown to the user if they come from a particular country, or if they have purchased a product from your store. Feel free to play around and let us know if you think. 51 52 = Are there any limitations? = 53 54 The actions that you can take when a rule is met, are currently limited to Show or Hide a block. We will be adding new actions in a future release. The plugin does not work with the Classic Block - which is due to be deprecated. You can use the Convert to Blocks feature to transform the Classic Block into independent blocks, which can then take advantage of PersonalizeWP. 31 It is a plugin that allows you to customise the content you show to visitors on your website. 55 32 56 33 = Will the plugin always be free to use? = 57 34 58 We will always have a free version of the plugin, but in the future, it is likely that we will add a Pro version which will offer additional features.35 This version is no longer actively developed or supported but will remain free to use. 59 36 60 = = Screenshots ==37 = Do you have a roadmap? = 61 38 62 1. Rules personalization screen - Add a new rule to use in the Block Editor 63 2. Rule categories screen - Manage the categories that your rules are sorted into 64 3. PersonaliseWP Dashboard Screen 65 4. Settings screen - signup for our newsletter 39 This plugin is no longer being actively developed. 66 40 67 41 68 42 == Changelog == 69 43 70 = 1.6.6 44 = 1.6.7 = 45 * Updated readme.txt and reverted plugin name 46 * Marked in plugin description that it is no longer supported 47 * Partial reversion of plugin branding, to clear confusion 48 * Updated plugin assets 49 50 = 1.6.6 = 71 51 * Updated readme.txt and plugin name 72 52 -
wp-dxp/trunk/admin/class-wp-dxp-admin-categories-page.php
r2984903 r3035013 66 66 '<h2>%1$s</h2><p>%2$s</p>', 67 67 esc_html__( 'First time configuration', 'wp-dxp' ), 68 esc_html__( ' PersonalizeWP provides a number of pre-built rules and categories that are ready to use on your site, which you can see below. If you want to add your own, just click on the Create Rule or Create Category button.', 'wp-dxp' ),68 esc_html__( 'WP-DXP provides a number of pre-built rules and categories that are ready to use on your site, which you can see below. If you want to add your own, just click on the Create Rule or Create Category button.', 'wp-dxp' ), 69 69 ), 70 70 'info', -
wp-dxp/trunk/admin/class-wp-dxp-admin-rules-page.php
r2984903 r3035013 67 67 '<h2>%1$s</h2><p>%2$s</p>', 68 68 esc_html__( 'First time configuration', 'wp-dxp' ), 69 esc_html__( ' PersonalizeWP provides a number of pre-built rules and categories that are ready to use on your site, which you can see below. If you want to add your own, just click on the Create Rule or Create Category button.', 'wp-dxp' ),69 esc_html__( 'WP-DXP provides a number of pre-built rules and categories that are ready to use on your site, which you can see below. If you want to add your own, just click on the Create Rule or Create Category button.', 'wp-dxp' ), 70 70 ), 71 71 'info', -
wp-dxp/trunk/admin/class-wp-dxp-admin-settings-page.php
r2983034 r3035013 24 24 '<h2>%1$s</h2><p>%2$s</p>', 25 25 esc_html__( 'First time configuration', 'wp-dxp' ), 26 esc_html__( 'Thanks for installing and activating PersonalizeWP so that you can start to use WordPress as a digital experience platform. We recommend that if it is your first time with the plugin, that you sign up for our email list, where we plan to share tips and tricks of things you can do with PersonalizeWP, as well as inform you when new versions and features are added to the plugin.', 'wp-dxp' ),26 esc_html__( 'Thanks for installing and activating WP-DXP so that you can start to use WordPress as a digital experience platform. We recommend that if it is your first time with the plugin, that you sign up for our email list. Please note that this plugin is no longer being actively developed or supported. We recommend using PersonalizeWP https://wordpress.org/plugins/personalizewp/ instead of WP-DXP.', 'wp-dxp' ), 27 27 ), 28 28 'info', -
wp-dxp/trunk/admin/class-wp-dxp-admin.php
r2984903 r3035013 243 243 public function createAdminMenu() { 244 244 add_menu_page( 245 esc_html__(' Personalize', 'wp-dxp'),246 esc_html__(' Personalize', 'wp-dxp'),245 esc_html__('WP-DXP', 'wp-dxp'), 246 esc_html__('WP-DXP', 'wp-dxp'), 247 247 'manage_options', 248 248 WP_DXP_ADMIN_SLUG, -
wp-dxp/trunk/admin/css/wp-dxp-admin.css
r2984903 r3035013 5321 5321 width: 100%; 5322 5322 margin-right: -100%; 5323 -webkit-backface-visibility: hidden;5324 5323 backface-visibility: hidden; 5325 5324 transition: transform 0.6s ease-in-out; … … 8881 8880 @media only screen and (min-width: 600px) { 8882 8881 #wp-dxp .dash-actions.rules-dash .dataTables_wrapper .dataTables_filter, #wp-dxp .dash-actions.categories-dash .add-button-holder .btn { 8883 -webkit-margin-start: auto;8884 8882 margin-inline-start: auto; 8885 8883 } -
wp-dxp/trunk/admin/partials/_other/header.php
r2975253 r3035013 30 30 <div class="wp-dxp-breadcrumbs"> 31 31 <h1 class="wp-dxp-breadcrumbs__title"> 32 <img src="<?php echo plugins_url('../../img/ personalizewp-logo.svg', __FILE__); ?>" alt="<?php echo esc_html( 'Personalize WP', 'personalizewp' ); ?>" />32 <img src="<?php echo plugins_url('../../img/wp-dxp-logo.svg', __FILE__); ?>" alt="<?php echo esc_html( 'WP-DXP', 'wp-dxp' ); ?>" /> 33 33 </h1> 34 34 <span class="wp-dxp-breadcrumbs__separator">/</span> -
wp-dxp/trunk/build/index.asset.php
r2975253 r3035013 1 <?php return array('dependencies' => array('wp-api-fetch', 'wp-element', 'wp-polyfill'), 'version' => ' 25bd35f34ac1dd0a3618cdd674fb0789');1 <?php return array('dependencies' => array('wp-api-fetch', 'wp-element', 'wp-polyfill'), 'version' => '8e0b403a6e669d05c8da435fb054ba56'); -
wp-dxp/trunk/build/index.js
r2975253 r3035013 1 !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=8)}([function(e,t){e.exports=window.wp.element},function(e,t){function r(t){return e.exports=r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,r(t)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(2);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(9);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(11),o=r(12), l=r(3),u=r(13);e.exports=function(e){return n(e)||o(e)||l(e)||u()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(14),o=r(15),l=r(3),u=r(16);e.exports=function(e,t){return n(e)||o(e,t)||l(e,t)||u()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=window.wp.apiFetch},function(e,t,r){"use strict";r.r(t),r.d(t,"addWpDxpBlockControls",(function(){return E})),r.d(t,"addAttributes",(function(){return M})),r.d(t,"addExtraProps",(function(){return P}));var n=r(4),o=r.n(n),l=r(5),u=r.n(l),p=r(6),i=r.n(p),a=r(0),c=r(7),s=r.n(c);function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var x=wp.i18n.__,b=wp.element,m=b.Fragment,y=b.useEffect,w=b.useState,v=wp.hooks.addFilter,g=wp.components,h=g.PanelBody,j=g.SelectControl,O=wp.compose.createHigherOrderComponent,_=wp.blockEditor.InspectorControls,S=[];S.push({value:0,label:x("-- No rule selected --","wp-dxp")}),s()({path:"/wp-dxp/v1/rules"}).then((function(e){e.data.forEach((function(e){S.push({value:e.id,label:e.name,disabled:!e.is_usable})}))})).catch((function(e){console.log(e)}));var D=[];D.push({value:"show",label:x("Show Block","wp-dxp"),disabled:!1}),D.push({value:"hide",label:x("Hide Block","wp-dxp")});var E=O((function(e){return function(t){var r=t.attributes,n=t.setAttributes,o=r.wpDxpRule,l=r.wpDxpAction,p=r.wpDxpId,c=w(t.clientId),s=i()(c,2),f=s[0];s[1];if(y((function(){t.name,t.isSelected&&o&&n({wpDxpId:Date.now().toString()})}),[f]),"core/freeform"==t.name)return Object(a.createElement)(e,t);if(t.name,t.isSelected){var d=[0];return o&&(d=(d=o.replace(/^,+|,+(?=,)/g,"")).split(","),d=u()(new Set(d))),0===d.length&&(d=[0]),Object(a.createElement)(m,null,Object(a.createElement)(e,t),Object(a.createElement)(_,null,Object(a.createElement)(h,{title:x("Personalize","wp-dxp")},d.length>0&&Object(a.createElement)("div",{className:"dxp-rules"},d.map((function(e,t){return Object(a.createElement)("div",{className:"dxp-rules__rule",key:"wp-dxp-rule-"+t},Object(a.createElement)(j,{label:0==t?x("When these rules are met:","wp-dxp"):"",value:e,onChange:function(e){d[t]=e,d.slice(),n({wpDxpRule:d.join(),wpDxpId:t===d.length-1?Date.now().toString():p})},options:S}),d.length>1&&Object(a.createElement)("span",{className:"bi bi-dash-circle",onClick:function(){d.splice(t,1),n({wpDxpRule:d.join(),wpDxpId:Date.now().toString()})}}),0!=e&&t==d.length-1&&Object(a.createElement)("span",{className:"bi bi-plus-circle",onClick:function(){d.splice(t+1,0,0),n({wpDxpRule:d.join(),wpDxpId:Date.now().toString()})}}))}))),Object(a.createElement)(j,{label:x("Then take the following action:","wp-dxp"),name:"wpDxpAction",value:l,onChange:function(e){return n({wpDxpAction:e})},options:D}))))}return Object(a.createElement)(e,t)}}),"addWpDxpBlockControls");function M(e){return e.name,d(d({},e),{},{attributes:d(d({},e.attributes),{},{wpDxpRule:{type:"string",default:""},wpDxpAction:{type:"string",default:""},wpDxpId:{type:"string",default:""}})})}function P(e,t,r){return t.name,d(d({},e),{},{wpDxpRule:r.wpDxpRule,wpDxpAction:r.wpDxpAction,wpDxpId:r.wpDxpId})}v("editor.BlockEdit","wp-dxp/controls",E),v("blocks.registerBlockType","wp-dxp/add-attr",M)},function(e,t,r){var n=r(1).default,o=r(10);e.exports=function(e){var t=o(e,"string");return"symbol"===n(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(1).default;e.exports=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(2);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,l,u,p=[],i=!0,a=!1;try{if(l=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;i=!1}else for(;!(i=(n=l.call(r)).done)&&(p.push(n.value),p.length!==t);i=!0);}catch(e){a=!0,o=e}finally{try{if(!i&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(a)throw o}}return p}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports}]);1 !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=8)}([function(e,t){e.exports=window.wp.element},function(e,t){function r(t){return e.exports=r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,r(t)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(2);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(9);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(11),o=r(12),u=r(3),l=r(13);e.exports=function(e){return n(e)||o(e)||u(e)||l()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(14),o=r(15),u=r(3),l=r(16);e.exports=function(e,t){return n(e)||o(e,t)||u(e,t)||l()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=window.wp.apiFetch},function(e,t,r){"use strict";r.r(t),r.d(t,"addWpDxpBlockControls",(function(){return E})),r.d(t,"addAttributes",(function(){return M})),r.d(t,"addExtraProps",(function(){return P}));var n=r(4),o=r.n(n),u=r(5),l=r.n(u),p=r(6),i=r.n(p),a=r(0),c=r(7),s=r.n(c);function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var x=wp.i18n.__,b=wp.element,m=b.Fragment,y=b.useEffect,w=b.useState,v=wp.hooks.addFilter,g=wp.components,h=g.PanelBody,j=g.SelectControl,O=wp.compose.createHigherOrderComponent,_=wp.blockEditor.InspectorControls,S=[];S.push({value:0,label:x("-- No rule selected --","wp-dxp")}),s()({path:"/wp-dxp/v1/rules"}).then((function(e){e.data.forEach((function(e){S.push({value:e.id,label:e.name,disabled:!e.is_usable})}))})).catch((function(e){console.log(e)}));var D=[];D.push({value:"show",label:x("Show Block","wp-dxp"),disabled:!1}),D.push({value:"hide",label:x("Hide Block","wp-dxp")});var E=O((function(e){return function(t){var r=t.attributes,n=t.setAttributes,o=r.wpDxpRule,u=r.wpDxpAction,p=r.wpDxpId,c=w(t.clientId),s=i()(c,2),f=s[0];s[1];if(y((function(){t.name,t.isSelected&&o&&n({wpDxpId:Date.now().toString()})}),[f]),"core/freeform"==t.name)return Object(a.createElement)(e,t);if(t.name,t.isSelected){var d=[0];return o&&(d=(d=o.replace(/^,+|,+(?=,)/g,"")).split(","),d=l()(new Set(d))),0===d.length&&(d=[0]),Object(a.createElement)(m,null,Object(a.createElement)(e,t),Object(a.createElement)(_,null,Object(a.createElement)(h,{title:x("Personalize","wp-dxp")},d.length>0&&Object(a.createElement)("div",{className:"dxp-rules"},d.map((function(e,t){return Object(a.createElement)("div",{className:"dxp-rules__rule",key:"wp-dxp-rule-"+t},Object(a.createElement)(j,{label:0==t?x("When these rules are met:","wp-dxp"):"",value:e,onChange:function(e){d[t]=e,d.slice(),n({wpDxpRule:d.join(),wpDxpId:t===d.length-1?Date.now().toString():p})},options:S}),d.length>1&&Object(a.createElement)("span",{className:"bi bi-dash-circle",onClick:function(){d.splice(t,1),n({wpDxpRule:d.join(),wpDxpId:Date.now().toString()})}}),0!=e&&t==d.length-1&&Object(a.createElement)("span",{className:"bi bi-plus-circle",onClick:function(){d.splice(t+1,0,0),n({wpDxpRule:d.join(),wpDxpId:Date.now().toString()})}}))}))),Object(a.createElement)(j,{label:x("Then take the following action:","wp-dxp"),name:"wpDxpAction",value:u,onChange:function(e){return n({wpDxpAction:e})},options:D}))))}return Object(a.createElement)(e,t)}}),"addWpDxpBlockControls");function M(e){return e.name,d(d({},e),{},{attributes:d(d({},e.attributes),{},{wpDxpRule:{type:"string",default:""},wpDxpAction:{type:"string",default:""},wpDxpId:{type:"string",default:""}})})}function P(e,t,r){return t.name,d(d({},e),{},{wpDxpRule:r.wpDxpRule,wpDxpAction:r.wpDxpAction,wpDxpId:r.wpDxpId})}v("editor.BlockEdit","wp-dxp/controls",E),v("blocks.registerBlockType","wp-dxp/add-attr",M)},function(e,t,r){var n=r(1).default,o=r(10);e.exports=function(e){var t=o(e,"string");return"symbol"==n(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(1).default;e.exports=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(2);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,u,l,p=[],i=!0,a=!1;try{if(u=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;i=!1}else for(;!(i=(n=u.call(r)).done)&&(p.push(n.value),p.length!==t);i=!0);}catch(e){a=!0,o=e}finally{try{if(!i&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(a)throw o}}return p}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports}]); -
wp-dxp/trunk/includes/class-wp-dxp-db-manager.php
r2984903 r3035013 98 98 foreach ( $blocks as $block ) { 99 99 // Ensure the block is using a rule, and it's not 0. 100 if ( ! empty( $block['attrs']['wpDxp Rule']) ) {100 if ( ! empty( $block['attrs']['wpDxpId'] ) && ! empty( $block['attrs']['wpDxpRule']) ) { 101 101 $active_block = new Wp_Dxp_Block( [ 102 102 'id' => $block['attrs']['wpDxpId'], -
wp-dxp/trunk/wp-dxp.php
r2984992 r3035013 2 2 3 3 /** 4 * Plugin Name: PersonalizeWP (Previous)5 * Plugin URI: https://filter.agency/about/ personalizewp/6 * Description: Use WordPress as a digital experience platform, adding personali zation and conditional rules to the content that your users see and can interact with. Compete with commercial enterprise platforms and add your own rules to match user behavior on, then show or hide blocks based on if your conditions are met.7 * Version: 1.6. 64 * Plugin Name: WP-DXP 5 * Plugin URI: https://filter.agency/about/wp-dxp/ 6 * Description: Use WordPress as a digital experience platform, adding personalisation and conditional rules to the content that your users see and can interact with. This version is being replaced by PersonalizeWP. 7 * Version: 1.6.7 8 8 * Author: Filter 9 9 * Author URI: https://filter.agency … … 27 27 * Rename this for your plugin and update it as you release new versions. 28 28 */ 29 define( 'WP_DXP_VERSION', '1.6. 6' );29 define( 'WP_DXP_VERSION', '1.6.7' ); 30 30 31 31 /**
Note: See TracChangeset
for help on using the changeset viewer.