Changeset 2942440
- Timestamp:
- 07/24/2023 10:01:46 AM (13 months ago)
- Location:
- wp-dxp/trunk
- Files:
-
- 3 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
wp-dxp/trunk/README.txt
r2922761 r2942440 3 3 Tags: personalisation, gutenberg, digital experience platform, show content, hide content, segmentation, conditions, rules, location 4 4 Requires at least: 6.0.0 5 Tested up to: 6. 2.26 Stable tag: 1.6. 15 Tested up to: 6. 6 Stable tag: 1.6. 7 7 Requires PHP: 7.3 8 8 License: GPLv2 or later … … 102 102 == Changelog == 103 103 104 105 106 107 104 108 = 1.6.1 = 105 109 * Fix: Ensured embeded elements such as videos rendered correctly -
wp-dxp/trunk/admin/partials/personalisation/index.php
r2881249 r2942440 17 17 18 18 <div class="wrap"> 19 <h1><?php echo esc_html( WP_DXP_TITLE ); ?></h1>19 <h1><?php echo ; ?></h1> 20 20 21 <h2><?php esc_html_e( 'Personalization', 'wp-dxp'); ?></h2>21 <h2><?php ); ?></h2> 22 22 23 23 </div> -
wp-dxp/trunk/build/index.asset.php
r2916348 r2942440 1 <?php return array('dependencies' => array('wp-api-fetch', 'wp-element', 'wp-polyfill'), 'version' => ' 044ff1694df013a55430b1dc7a8ef320');1 <?php return array('dependencies' => array('wp-api-fetch', 'wp-element', 'wp-polyfill'), 'version' => ''); -
wp-dxp/trunk/build/index.js
r2916348 r2942440 1 !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(1);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(7),o=n(8),l=n(2),u=n(9);e.exports=function(e){return r(e)||o(e)||l(e)||u()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(10),o=n(11),l=n(2),u=n(12);e.exports=function(e,t){return r(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,n){"use strict";n.r(t),n.d(t,"addWpDxpBlockControls",(function(){return D})),n.d(t,"addAttribute",(function(){return O})),n.d(t,"addSaveProps",(function(){return S}));var r=n(3),o=n.n(r),l=n(4),u=n.n(l),p=n(0),a=n(5),i=n.n(a),c=lodash.assign,s=wp.i18n.__,d=wp.element,f=d.Fragment,x=d.useEffect,b=d.useState,w=wp.hooks.addFilter,m=wp.components,y=m.PanelBody,h=m.SelectControl,v=wp.compose.createHigherOrderComponent,g=wp.blockEditor.InspectorControls,_=[];_.push({value:0,label:s("-- No rule selected --","wp-dxp")}),i()({path:"/wp-dxp/v1/rules"}).then((function(e){e.data.forEach((function(e){_.push({value:e.id,label:e.name,disabled:!e.is_usable})}))})).catch((function(e){console.log(e)}));var j=[];j.push({value:"show",label:s("Show Block","wp-dxp"),disabled:!1}),j.push({value:"hide",label:s("Hide Block","wp-dxp")});var D=v((function(e){return function(t){var n=t.attributes,r=t.setAttributes,l=n.wpDxpRule,a=n.wpDxpAction,i=n.wpDxpId,c=b(t.clientId),d=u()(c,2),w=d[0];d[1];if(x((function(){t.name,t.isSelected&&l&&r({wpDxpId:Date.now().toString()})}),[w]),"core/freeform"==t.name)return Object(p.createElement)(e,t);if(t.name,t.isSelected){var m=[0];return l&&(m=(m=l.replace(/^,+|,+(?=,)/g,"")).split(","),m=o()(new Set(m))),0===m.length&&(m=[0]),Object(p.createElement)(f,null,Object(p.createElement)(e,t),Object(p.createElement)(g,null,Object(p.createElement)(y,{title:s("WP-DXP","wp-dxp")},m.length>0&&Object(p.createElement)("div",{className:"dxp-rules"},m.map((function(e,t){return Object(p.createElement)("div",{className:"dxp-rules__rule",key:"wp-dxp-rule-"+t},Object(p.createElement)(h,{label:0==t?s("When these rules are met:","wp-dxp"):"",value:e,onChange:function(e){m[t]=e,m.slice(),r({wpDxpRule:m.join(),wpDxpId:t===m.length-1?Date.now().toString():i})},options:_}),m.length>1&&Object(p.createElement)("span",{className:"bi bi-dash-circle",onClick:function(){m.splice(t,1),r({wpDxpRule:m.join(),wpDxpId:Date.now().toString()})}}),0!=e&&t==m.length-1&&Object(p.createElement)("span",{className:"bi bi-plus-circle",onClick:function(){m.splice(t+1,0,0),r({wpDxpRule:m.join(),wpDxpId:Date.now().toString()})}}))}))),Object(p.createElement)(h,{label:s("Then take the following action:","wp-dxp"),name:"wpDxpAction",value:a,onChange:function(e){return r({wpDxpAction:e})},options:j}))))}return Object(p.createElement)(e,t)}}),"addWpDxpBlockControls");function O(e){return e.name,e.attributes=c(e.attributes,{wpDxpRule:{type:"string",default:""},wpDxpAction:{type:"string",default:""},wpDxpId:{type:"string",default:""}}),e}function S(e,t,n){return t.name,e.wpDxpRule=n.wpDxpRule,e.wpDxpAction=n.wpDxpAction,e.wpDxpId=n.wpDxpId,e}w("editor.BlockEdit","wp-dxp/controls",D),w("blocks.registerBlockType","wp-dxp/add-attr",O)},function(e,t,n){var r=n(1);e.exports=function(e){if(Array.isArray(e))return r(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 n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,l,u,p=[],a=!0,i=!1;try{if(l=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=l.call(n)).done)&&(p.push(r.value),p.length!==t);a=!0);}catch(e){i=!0,o=e}finally{try{if(!a&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(i)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 )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.php
r2916348 r2942440 245 245 $this->loader->add_filter('wp_trim_words', 'Wp_Dxp_Block_Renderer', 'trim_words', 10, 4); 246 246 247 248 247 249 $this->loader->add_action( 'rest_api_init', $plugin_public, 'registerApiRoutes'); 248 249 250 } 251 252 /** 253 * Filters the arguments for registering a block type, adding the DXP args. 254 * 255 * @since 1.6.2 256 * 257 * @param array $args Array of arguments for registering a block type. 258 * @param string $block_type Block type name including namespace. 259 */ 260 function add_dxp_block_args( $args, $block_type ) { 261 262 if ( ! isset( $args['attributes'] ) || ! is_array( $args['attributes'] ) ) { 263 $args['attributes'] = []; 264 } 265 266 /** This is necessary for `/wp-json/wp/v2/block-renderer` REST endpoint to not throw `rest_additional_properties_forbidden`. */ 267 $args['attributes']['wpDxpRule'] = [ 268 'type' => 'string', 269 'default' => '', 270 ]; 271 $args['attributes']['wpDxpAction'] = [ 272 'type' => 'string', 273 'default' => '', 274 ]; 275 $args['attributes']['wpDxpId'] = [ 276 'type' => 'string', 277 'default' => '', 278 ]; 279 280 return $args; 250 281 } 251 282 -
wp-dxp/trunk/public/class-wp-dxp-public.php
r2922761 r2942440 122 122 public function create_visitor_cookie() 123 123 { 124 125 126 127 128 129 130 131 132 133 134 124 135 if(isset($_COOKIE[WP_DXP_VISITOR_COOKIE_NAME])){ 125 136 setcookie( 126 137 WP_DXP_VISITOR_COOKIE_NAME, 127 138 $_COOKIE[WP_DXP_VISITOR_COOKIE_NAME] + 1, 128 time() + WP_DXP_VISITOR_COOKIE_EXPIRY 139 time() + WP_DXP_VISITOR_COOKIE_EXPIRY, 140 '/' 129 141 ); 130 142 } else { … … 132 144 WP_DXP_VISITOR_COOKIE_NAME, 133 145 1, 134 time() + WP_DXP_VISITOR_COOKIE_EXPIRY 146 time() + WP_DXP_VISITOR_COOKIE_EXPIRY, 147 '/' 135 148 ); 136 149 } -
wp-dxp/trunk/wp-dxp.php
r2922761 r2942440 17 17 * Plugin URI: https://filter.agency/about/wp-dxp/ 18 18 * Description: Use 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 behavior on, then show or hide blocks based on if your conditions are met. 19 * Version: 1.6. 119 * Version: 1.6. 20 20 * Author: Filter 21 21 * Author URI: https://filter.agency … … 39 39 * Rename this for your plugin and update it as you release new versions. 40 40 */ 41 define( 'WP_DXP_VERSION', '1.6. 1' );41 define( 'WP_DXP_VERSION', '1.6.' ); 42 42 43 43 /**
Note: See TracChangeset
for help on using the changeset viewer.