diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ee0b59a58..6916b5a6f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.20.2](https://github.com/Parsely/wp-parsely/compare/3.20.1...3.20.2) - 2025-06-24 + +### Changed + +- Change feature name from "Traffic Boost" to "Engagement Boost" ([#3482](https://github.com/Parsely/wp-parsely/pull/3482)) + + ## [3.20.1](https://github.com/Parsely/wp-parsely/compare/3.20.0...3.20.1) - 2025-06-19 ### Fixed diff --git a/README.md b/README.md index d1568b01df..23579b6828 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # Parse.ly -Stable tag: 3.20.1 -Requires at least: 6.0 -Tested up to: 6.8 -Requires PHP: 7.4 -License: GPLv2 or later -License URI: https://www.gnu.org/licenses/gpl-2.0.html -Tags: analytics, statistics, stats, content marketing, parsely, parsley, parse.ly +Stable tag: 3.20.1 +Requires at least: 6.0 +Tested up to: 6.8 +Requires PHP: 7.4 +License: GPLv2 or later +License URI: https://www.gnu.org/licenses/gpl-2.0.html +Tags: analytics, statistics, stats, content marketing, parsely, parsley, parse.ly Contributors: parsely, hbbtstar, jblz, mikeyarce, GaryJ, parsely_mike, acicovic, mehmoodak, vaurdan The Parse.ly plugin facilitates real-time and historical analytics to your content through a platform designed and built for digital publishing. @@ -39,7 +39,7 @@ The plugin automatically inserts the Parse.ly metadata and JavaScript in all pub The [Content Helper](https://docs.parse.ly/plugin-content-helper/) is a set of content insight tools including: - The [Parse.ly Dashboard Widget](https://docs.parse.ly/plugin-content-helper/#h-dashboard) - Displays the site's top posts in the WordPress Dashboard. - The [Parse.ly Stats Column](https://docs.parse.ly/plugin-content-helper/#h-posts) - Displays published post performance for the last 7 days in Post Lists. -- The [Traffic Boost](https://docs.wpvip.com/parse-ly/wp-parsely-features/traffic-boost/) feature - Helps you increase page views and engagement by strategically placing links to key content within high-performing articles on your site. +- The [Engagement Boost](https://docs.wpvip.com/parse-ly/wp-parsely-features/traffic-boost/) feature - Helps you increase page views and engagement by strategically placing links to key content within high-performing articles on your site. - The [Parse.ly Editor Sidebar](https://docs.parse.ly/plugin-content-helper/#h-editor) - This sidebar is integrated into the WordPress Editor and offers insights about the content currently being edited such as: - [Title Suggestions](https://docs.wpvip.com/parse-ly/wp-parsely-features/title-suggestions/) - Generates title suggestions for the post/page currently being edited. - [Excerpt Suggestions](https://docs.wpvip.com/parse-ly/wp-parsely-features/excerpt-suggestions/) - Generates an excerpt suggestion for the post/page currently being edited. @@ -49,7 +49,7 @@ The [Content Helper](https://docs.parse.ly/plugin-content-helper/) is a set of c #### The Parse.ly Recommendations Block -The plugin includes a [Recommendations Block](https://docs.parse.ly/recommendations-block/) that displays a list of posts related to the currently viewed post/page. The Block is useful for showcasing related content to visitors, and it can also be used in Site Editing mode or as a [Block-based Widget](https://wordpress.org/documentation/article/block-based-widgets-editor/). +The plugin includes a [Recommendations Block](https://docs.parse.ly/recommendations-block/) that displays a list of posts related to the currently viewed post/page. The Block is useful for showcasing related content to visitors, and it can also be used in Site Editing mode or as a [Block-based Widget](https://wordpress.org/documentation/article/block-based-widgets-editor/). #### Advanced integrations support @@ -101,7 +101,7 @@ To run the plugin locally or to contribute to it, please check the instructions The plugin requires an active Parse.ly account. [Sign up for a free demo of Parse.ly](https://www.parsely.com/getdemo?utm_medium=referral&utm_source=wordpress.org&utm_content=wp-parsely). -For more information, please visit the [installation instructions](https://docs.parse.ly/wordpress-plugin-setup/) in the official documentation. +For more information, please visit the [installation instructions](https://docs.parse.ly/wordpress-plugin-setup/) in the official documentation. ## Frequently Asked Questions @@ -113,23 +113,23 @@ Please visit the [changelog](https://github.com/parsely/wp-parsely/blob/trunk/CH ## Screenshots -1. The Parse.ly Dashboard Widget, showing the website's top posts. +1. The Parse.ly Dashboard Widget, showing the website's top posts.  -2. The Parse.ly Stats Column (on the right), showing information about content that is being tracked as Posts. +2. The Parse.ly Stats Column (on the right), showing information about content that is being tracked as Posts.  -3. The Parse.ly Traffic Boost feature. -  -4. The Parse.ly Editor Sidebar, featuring the Title Suggestions panel. +3. The Parse.ly Engagement Boost feature. +  +4. The Parse.ly Editor Sidebar, featuring the Title Suggestions panel.  -5. The Parse.ly Editor Sidebar, featuring the Smart Linking panel. +5. The Parse.ly Editor Sidebar, featuring the Smart Linking panel.  -6. The Parse.ly Editor Sidebar, featuring the Related Posts panel. +6. The Parse.ly Editor Sidebar, featuring the Related Posts panel.  -7. The Parse.ly Editor Sidebar, featuring the Performance Stats panel. +7. The Parse.ly Editor Sidebar, featuring the Performance Stats panel.  -8. The Parse.ly Excerpt Suggestions in the Post Editor's settings. Also available in the Parse.ly Editor Sidebar. +8. The Parse.ly Excerpt Suggestions in the Post Editor's settings. Also available in the Parse.ly Editor Sidebar.  -9. The Recommendations Block, showcasing links to related content on your site. +9. The Recommendations Block, showcasing links to related content on your site.  -10. A view of the Parse.ly Dashboard Overview. Parse.ly offers analytics that empower you to better understand how your content is performing. +10. A view of the Parse.ly Dashboard Overview. Parse.ly offers analytics that empower you to better understand how your content is performing.  diff --git a/build/admin-settings.asset.php b/build/admin-settings.asset.php index 4ee8433554..d143454f37 100644 --- a/build/admin-settings.asset.php +++ b/build/admin-settings.asset.php @@ -1 +1 @@ - array('react', 'wp-api-fetch', 'wp-data', 'wp-escape-html', 'wp-i18n', 'wp-url'), 'version' => '094ef7b234cad83c0a56'); + array('react', 'wp-api-fetch', 'wp-data', 'wp-escape-html', 'wp-i18n', 'wp-url'), 'version' => '76950c4b335890ef5876'); diff --git a/build/admin-settings.js b/build/admin-settings.js index 5cda900cca..093bfa668f 100644 --- a/build/admin-settings.js +++ b/build/admin-settings.js @@ -1 +1 @@ -!function(){"use strict";var e={20:function(e,t,n){var r=n(609),o=Symbol.for("react.element"),a=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,n){var r,l={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!i.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===l[r]&&(l[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:l,_owner:s.current}}},848:function(e,t,n){e.exports=n(20)},609:function(e){e.exports=window.React}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e,t,r=window.wp.escapeHtml,o=window.wp.i18n,a=n(848),s=window.wp.data,i=function(e){void 0===e&&(e=null);var t="";(null==e?void 0:e.children)&&(t=e.children);var n="content-helper-error-message";return(null==e?void 0:e.className)&&(n+=" "+e.className),(0,a.jsx)("div",{className:n,"data-testid":null==e?void 0:e.testId,dangerouslySetInnerHTML:{__html:t}})},l=(e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function __(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(__.prototype=n.prototype,new __)});!function(e){e.AccessToFeatureDisabled="ch_access_to_feature_disabled",e.CannotFormulateApiQuery="ch_cannot_formulate_api_query",e.FetchError="fetch_error",e.HttpRequestFailed="http_request_failed",e.ParselyAborted="ch_parsely_aborted",e[e.ParselyApiForbidden=403]="ParselyApiForbidden",e.ParselyApiResponseContainsError="ch_response_contains_error",e.ParselyApiReturnedNoData="ch_parsely_api_returned_no_data",e.ParselyApiReturnedTooManyResults="ch_parsely_api_returned_too_many_results",e.PluginCredentialsNotSetMessageDetected="parsely_credentials_not_set_message_detected",e.PluginSettingsApiSecretNotSet="parsely_api_secret_not_set",e.PluginSettingsSiteIdNotSet="parsely_site_id_not_set",e.PostIsNotPublished="ch_post_not_published",e.UnknownError="ch_unknown_error",e.ParselySuggestionsApiAuthUnavailable="AUTH_UNAVAILABLE",e.ParselySuggestionsApiNoAuthentication="NO_AUTHENTICATION",e.ParselySuggestionsApiNoAuthorization="NO_AUTHORIZATION",e.ParselySuggestionsApiNoData="NO_DATA",e.ParselySuggestionsApiOpenAiError="OPENAI_ERROR",e.ParselySuggestionsApiOpenAiSchema="OPENAI_SCHEMA",e.ParselySuggestionsApiOpenAiUnavailable="OPENAI_UNAVAILABLE",e.ParselySuggestionsApiSchemaError="SCHEMA_ERROR",e.TrafficBoostInboundLinkNotFound="tb_inbound_link_not_found"}(t||(t={}));var c=function(e){function n(r,a,s){void 0===s&&(s=(0,o.__)("Error:","wp-parsely"));var i=this;r.startsWith(s)&&(s=""),(i=e.call(this,s.length>0?"".concat(s," ").concat(r):r)||this).hint=null,i.name=i.constructor.name,i.code=a;var l=[t.AccessToFeatureDisabled,t.ParselyApiForbidden,t.ParselyApiResponseContainsError,t.ParselyApiReturnedNoData,t.ParselyApiReturnedTooManyResults,t.PluginCredentialsNotSetMessageDetected,t.PluginSettingsApiSecretNotSet,t.PluginSettingsSiteIdNotSet,t.PostIsNotPublished,t.UnknownError,t.ParselySuggestionsApiAuthUnavailable,t.ParselySuggestionsApiNoAuthentication,t.ParselySuggestionsApiNoAuthorization,t.ParselySuggestionsApiNoData,t.ParselySuggestionsApiSchemaError];return i.retryFetch=!l.includes(i.code),Object.setPrototypeOf(i,n.prototype),i.code===t.AccessToFeatureDisabled?i.message=(0,o.__)("Access to this feature is disabled by the site's administration.","wp-parsely"):i.code===t.ParselySuggestionsApiNoAuthorization?i.message=(0,o.__)('This AI-powered feature is opt-in. To gain access, please submit a request here.',"wp-parsely"):i.code===t.ParselySuggestionsApiOpenAiError||i.code===t.ParselySuggestionsApiOpenAiUnavailable?i.message=(0,o.__)("The Parse.ly API returned an internal server error. Please retry with a different input, or try again later.","wp-parsely"):i.code===t.HttpRequestFailed&&i.message.includes("cURL error 28")?i.message=(0,o.__)("The Parse.ly API did not respond in a timely manner. Please try again later.","wp-parsely"):i.code===t.ParselySuggestionsApiSchemaError?i.message=(0,o.__)("The Parse.ly API returned a validation error. Please try again with different parameters.","wp-parsely"):i.code===t.ParselySuggestionsApiNoData?i.message=(0,o.__)("The Parse.ly API couldn't find any relevant data to fulfill the request. Please retry with a different input.","wp-parsely"):i.code===t.ParselySuggestionsApiOpenAiSchema?i.message=(0,o.__)("The Parse.ly API returned an incorrect response. Please try again later.","wp-parsely"):i.code===t.ParselySuggestionsApiAuthUnavailable&&(i.message=(0,o.__)("The Parse.ly API is currently unavailable. Please try again later.","wp-parsely")),i}return l(n,e),n.prototype.Message=function(e){return void 0===e&&(e=null),[t.PluginCredentialsNotSetMessageDetected,t.PluginSettingsSiteIdNotSet,t.PluginSettingsApiSecretNotSet].includes(this.code)?function(e){var t;return void 0===e&&(e=null),(0,a.jsx)(i,{className:null==e?void 0:e.className,testId:"empty-credentials-message",children:null!==(t=window.wpParselyEmptyCredentialsMessage)&&void 0!==t?t:(0,o.__)("Please ensure that the Site ID and API Secret given in the plugin's settings are correct.","wp-parsely")})}(e):(this.code===t.FetchError&&(this.hint=this.Hint((0,o.__)("This error can sometimes be caused by ad-blockers or browser tracking protections. Please add this site to any applicable allow lists and try again.","wp-parsely"))),this.code!==t.ParselyApiForbidden&&this.code!==t.ParselySuggestionsApiNoAuthentication||(this.hint=this.Hint((0,o.__)("Please ensure that the Site ID and API Secret given in the plugin's settings are correct.","wp-parsely"))),this.code===t.HttpRequestFailed&&(this.hint=this.Hint((0,o.__)("The Parse.ly API cannot be reached. Please verify that you are online.","wp-parsely"))),(0,a.jsx)(i,{className:null==e?void 0:e.className,testId:"error",children:"
".concat(this.message,"
").concat(this.hint?this.hint:"")}))},n.prototype.Hint=function(e){return''.concat((0,o.__)("Hint:","wp-parsely")," ").concat(e,"
")},n.prototype.createErrorSnackbar=function(){/%s
",d)):200===n.api.code&&200!==n.traffic_boost.code&&(p=(0,o.sprintf)('%2$s',"mailto:support@parsely.com","support@parsely.com"),d=(0,o.sprintf)((0,r.escapeHTML)((0,o.__)("Traffic Boost functionality is disabled for this website. To enable it, contact %s.","wp-parsely")),p),e=(0,o.sprintf)("%s
",d))),e&&((f=document.createElement("div")).className="content-helper-message notice notice-error",f.innerHTML=e,(h=document.querySelector(".content-helper-section"))&&h.insertBefore(f,h.firstChild)),[7];case 5:return[2]}}))},new((a=void 0)||(a=Promise))((function(t,r){function o(e){try{l(s.next(e))}catch(e){r(e)}}function i(e){try{l(s.throw(e))}catch(e){r(e)}}function l(e){var n;e.done?t(e.value):(n=e.value,n instanceof a?n:new a((function(e){e(n)}))).then(o,i)}l((s=s.apply(e,n||[])).next())}))}(),function(){var e=document.querySelector("input#content_helper_ai_features_enabled"),t=document.querySelectorAll("input#content_helper_smart_linking_enabled, input#content_helper_title_suggestions_enabled, input#content_helper_excerpt_suggestions_enabled, input#content_helper_traffic_boost_enabled"),n=document.querySelectorAll("div.content-helper-section fieldset");function r(){e&&(e.checked?n.forEach((function(e){s(e,!1),t.forEach((function(e){o(e)}))})):(n.forEach((function(t){t.querySelector("#".concat(e.id))||s(t)})),document.querySelectorAll("label.prevent-disable").forEach((function(e){a(e,!1)}))))}function o(e){var t,n,r=null===(n=null===(t=e.closest("fieldset"))||void 0===t?void 0:t.nextSibling)||void 0===n?void 0:n.nextSibling;e.checked?s([e,r],!1):(s(r),a(e.parentElement))}function a(e,t){void 0===t&&(t=!0),t?e.classList.add("prevent-disable"):e.classList.remove("prevent-disable")}function s(e,t){void 0===t&&(t=!0),Array.isArray(e)||(e=[e]),e.forEach((function(e){t?e.setAttribute("disabled","disabled"):e.removeAttribute("disabled")}))}(function(){var e;null===(e=document.querySelector('.wp-admin form[name="parsely"]'))||void 0===e||e.addEventListener("submit",(function(){var e=".wp-admin .content-helper-section fieldset";document.querySelectorAll("".concat(e,"[disabled]")).forEach((function(t){var n,r;null===(r=null===(n=t.parentElement)||void 0===n?void 0:n.parentElement)||void 0===r||r.classList.add("disabled-before-posting"),t.querySelectorAll("".concat(e,' label input[type="checkbox"]')).forEach((function(e){e.classList.add("disabled")})),t.removeAttribute("disabled")}))}))})(),r(),null==e||e.addEventListener("change",(function(){r()})),t.forEach((function(e){e.addEventListener("change",(function(){o(e)}))}))}(),g(),window.addEventListener("hashchange",g),null===(e=document.querySelector(".media-single-image button.browse"))||void 0===e||e.addEventListener("click",_)}))}()}(); \ No newline at end of file +!function(){"use strict";var e={20:function(e,t,n){var r=n(609),o=Symbol.for("react.element"),a=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,n){var r,l={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!i.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===l[r]&&(l[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:l,_owner:s.current}}},848:function(e,t,n){e.exports=n(20)},609:function(e){e.exports=window.React}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e,t,r=window.wp.escapeHtml,o=window.wp.i18n,a=n(848),s=window.wp.data,i=function(e){void 0===e&&(e=null);var t="";(null==e?void 0:e.children)&&(t=e.children);var n="content-helper-error-message";return(null==e?void 0:e.className)&&(n+=" "+e.className),(0,a.jsx)("div",{className:n,"data-testid":null==e?void 0:e.testId,dangerouslySetInnerHTML:{__html:t}})},l=(e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function __(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(__.prototype=n.prototype,new __)});!function(e){e.AccessToFeatureDisabled="ch_access_to_feature_disabled",e.CannotFormulateApiQuery="ch_cannot_formulate_api_query",e.FetchError="fetch_error",e.HttpRequestFailed="http_request_failed",e.ParselyAborted="ch_parsely_aborted",e[e.ParselyApiForbidden=403]="ParselyApiForbidden",e.ParselyApiResponseContainsError="ch_response_contains_error",e.ParselyApiReturnedNoData="ch_parsely_api_returned_no_data",e.ParselyApiReturnedTooManyResults="ch_parsely_api_returned_too_many_results",e.PluginCredentialsNotSetMessageDetected="parsely_credentials_not_set_message_detected",e.PluginSettingsApiSecretNotSet="parsely_api_secret_not_set",e.PluginSettingsSiteIdNotSet="parsely_site_id_not_set",e.PostIsNotPublished="ch_post_not_published",e.UnknownError="ch_unknown_error",e.ParselySuggestionsApiAuthUnavailable="AUTH_UNAVAILABLE",e.ParselySuggestionsApiNoAuthentication="NO_AUTHENTICATION",e.ParselySuggestionsApiNoAuthorization="NO_AUTHORIZATION",e.ParselySuggestionsApiNoData="NO_DATA",e.ParselySuggestionsApiOpenAiError="OPENAI_ERROR",e.ParselySuggestionsApiOpenAiSchema="OPENAI_SCHEMA",e.ParselySuggestionsApiOpenAiUnavailable="OPENAI_UNAVAILABLE",e.ParselySuggestionsApiSchemaError="SCHEMA_ERROR",e.TrafficBoostInboundLinkNotFound="tb_inbound_link_not_found"}(t||(t={}));var c=function(e){function n(r,a,s){void 0===s&&(s=(0,o.__)("Error:","wp-parsely"));var i=this;r.startsWith(s)&&(s=""),(i=e.call(this,s.length>0?"".concat(s," ").concat(r):r)||this).hint=null,i.name=i.constructor.name,i.code=a;var l=[t.AccessToFeatureDisabled,t.ParselyApiForbidden,t.ParselyApiResponseContainsError,t.ParselyApiReturnedNoData,t.ParselyApiReturnedTooManyResults,t.PluginCredentialsNotSetMessageDetected,t.PluginSettingsApiSecretNotSet,t.PluginSettingsSiteIdNotSet,t.PostIsNotPublished,t.UnknownError,t.ParselySuggestionsApiAuthUnavailable,t.ParselySuggestionsApiNoAuthentication,t.ParselySuggestionsApiNoAuthorization,t.ParselySuggestionsApiNoData,t.ParselySuggestionsApiSchemaError];return i.retryFetch=!l.includes(i.code),Object.setPrototypeOf(i,n.prototype),i.code===t.AccessToFeatureDisabled?i.message=(0,o.__)("Access to this feature is disabled by the site's administration.","wp-parsely"):i.code===t.ParselySuggestionsApiNoAuthorization?i.message=(0,o.__)('This AI-powered feature is opt-in. To gain access, please submit a request here.',"wp-parsely"):i.code===t.ParselySuggestionsApiOpenAiError||i.code===t.ParselySuggestionsApiOpenAiUnavailable?i.message=(0,o.__)("The Parse.ly API returned an internal server error. Please retry with a different input, or try again later.","wp-parsely"):i.code===t.HttpRequestFailed&&i.message.includes("cURL error 28")?i.message=(0,o.__)("The Parse.ly API did not respond in a timely manner. Please try again later.","wp-parsely"):i.code===t.ParselySuggestionsApiSchemaError?i.message=(0,o.__)("The Parse.ly API returned a validation error. Please try again with different parameters.","wp-parsely"):i.code===t.ParselySuggestionsApiNoData?i.message=(0,o.__)("The Parse.ly API couldn't find any relevant data to fulfill the request. Please retry with a different input.","wp-parsely"):i.code===t.ParselySuggestionsApiOpenAiSchema?i.message=(0,o.__)("The Parse.ly API returned an incorrect response. Please try again later.","wp-parsely"):i.code===t.ParselySuggestionsApiAuthUnavailable&&(i.message=(0,o.__)("The Parse.ly API is currently unavailable. Please try again later.","wp-parsely")),i}return l(n,e),n.prototype.Message=function(e){return void 0===e&&(e=null),[t.PluginCredentialsNotSetMessageDetected,t.PluginSettingsSiteIdNotSet,t.PluginSettingsApiSecretNotSet].includes(this.code)?function(e){var t;return void 0===e&&(e=null),(0,a.jsx)(i,{className:null==e?void 0:e.className,testId:"empty-credentials-message",children:null!==(t=window.wpParselyEmptyCredentialsMessage)&&void 0!==t?t:(0,o.__)("Please ensure that the Site ID and API Secret given in the plugin's settings are correct.","wp-parsely")})}(e):(this.code===t.FetchError&&(this.hint=this.Hint((0,o.__)("This error can sometimes be caused by ad-blockers or browser tracking protections. Please add this site to any applicable allow lists and try again.","wp-parsely"))),this.code!==t.ParselyApiForbidden&&this.code!==t.ParselySuggestionsApiNoAuthentication||(this.hint=this.Hint((0,o.__)("Please ensure that the Site ID and API Secret given in the plugin's settings are correct.","wp-parsely"))),this.code===t.HttpRequestFailed&&(this.hint=this.Hint((0,o.__)("The Parse.ly API cannot be reached. Please verify that you are online.","wp-parsely"))),(0,a.jsx)(i,{className:null==e?void 0:e.className,testId:"error",children:"".concat(this.message,"
").concat(this.hint?this.hint:"")}))},n.prototype.Hint=function(e){return''.concat((0,o.__)("Hint:","wp-parsely")," ").concat(e,"
")},n.prototype.createErrorSnackbar=function(){/%s
",d)):200===n.api.code&&200!==n.traffic_boost.code&&(p=(0,o.sprintf)('%2$s',"mailto:support@parsely.com","support@parsely.com"),d=(0,o.sprintf)((0,r.escapeHTML)((0,o.__)("Engagement Boost functionality is disabled for this website. To enable it, contact %s.","wp-parsely")),p),e=(0,o.sprintf)("%s
",d))),e&&((f=document.createElement("div")).className="content-helper-message notice notice-error",f.innerHTML=e,(h=document.querySelector(".content-helper-section"))&&h.insertBefore(f,h.firstChild)),[7];case 5:return[2]}}))},new((a=void 0)||(a=Promise))((function(t,r){function o(e){try{l(s.next(e))}catch(e){r(e)}}function i(e){try{l(s.throw(e))}catch(e){r(e)}}function l(e){var n;e.done?t(e.value):(n=e.value,n instanceof a?n:new a((function(e){e(n)}))).then(o,i)}l((s=s.apply(e,n||[])).next())}))}(),function(){var e=document.querySelector("input#content_helper_ai_features_enabled"),t=document.querySelectorAll("input#content_helper_smart_linking_enabled, input#content_helper_title_suggestions_enabled, input#content_helper_excerpt_suggestions_enabled, input#content_helper_traffic_boost_enabled"),n=document.querySelectorAll("div.content-helper-section fieldset");function r(){e&&(e.checked?n.forEach((function(e){s(e,!1),t.forEach((function(e){o(e)}))})):(n.forEach((function(t){t.querySelector("#".concat(e.id))||s(t)})),document.querySelectorAll("label.prevent-disable").forEach((function(e){a(e,!1)}))))}function o(e){var t,n,r=null===(n=null===(t=e.closest("fieldset"))||void 0===t?void 0:t.nextSibling)||void 0===n?void 0:n.nextSibling;e.checked?s([e,r],!1):(s(r),a(e.parentElement))}function a(e,t){void 0===t&&(t=!0),t?e.classList.add("prevent-disable"):e.classList.remove("prevent-disable")}function s(e,t){void 0===t&&(t=!0),Array.isArray(e)||(e=[e]),e.forEach((function(e){t?e.setAttribute("disabled","disabled"):e.removeAttribute("disabled")}))}(function(){var e;null===(e=document.querySelector('.wp-admin form[name="parsely"]'))||void 0===e||e.addEventListener("submit",(function(){var e=".wp-admin .content-helper-section fieldset";document.querySelectorAll("".concat(e,"[disabled]")).forEach((function(t){var n,r;null===(r=null===(n=t.parentElement)||void 0===n?void 0:n.parentElement)||void 0===r||r.classList.add("disabled-before-posting"),t.querySelectorAll("".concat(e,' label input[type="checkbox"]')).forEach((function(e){e.classList.add("disabled")})),t.removeAttribute("disabled")}))}))})(),r(),null==e||e.addEventListener("change",(function(){r()})),t.forEach((function(e){e.addEventListener("change",(function(){o(e)}))}))}(),g(),window.addEventListener("hashchange",g),null===(e=document.querySelector(".media-single-image button.browse"))||void 0===e||e.addEventListener("click",_)}))}()}(); \ No newline at end of file diff --git a/build/content-helper/dashboard-page.asset.php b/build/content-helper/dashboard-page.asset.php index 46c8a6329b..8143b136be 100644 --- a/build/content-helper/dashboard-page.asset.php +++ b/build/content-helper/dashboard-page.asset.php @@ -1 +1 @@ - array('react', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-url'), 'version' => '1584528d4b5b04a117a7'); + array('react', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-url'), 'version' => '4846471ec564061c83ae'); diff --git a/build/content-helper/dashboard-page.js b/build/content-helper/dashboard-page.js index fc5385364d..a13fd32206 100644 --- a/build/content-helper/dashboard-page.js +++ b/build/content-helper/dashboard-page.js @@ -1,9 +1,9 @@ -!function(){"use strict";var e={69:function(e,t){Object.prototype.toString},20:function(e,t,n){var r=n(609),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:i,_owner:s.current}}t.Fragment=i,t.jsx=c,t.jsxs=c},848:function(e,t,n){e.exports=n(20)},609:function(e){e.exports=window.React}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e=n(848),t=n(609),r=(n(69),"popstate");function o(e={}){return function(e,t,n,o={}){let{window:a=document.defaultView,v5Compat:u=!1}=o,d=a.history,p="POP",f=null,h=g();function g(){return(d.state||{idx:null}).idx}function v(){p="POP";let e=g(),t=null==e?null:e-h;h=e,f&&f({action:p,location:y.location,delta:t})}function m(e){return function(e,t=!1){let n="http://localhost";"undefined"!=typeof window&&(n="null"!==window.location.origin?window.location.origin:window.location.href),i(n,"No window.location.(origin|href) available to create URL");let r="string"==typeof e?e:c(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}(e)}null==h&&(h=0,d.replaceState({...d.state,idx:h},""));let y={get action(){return p},get location(){return e(a,d)},listen(e){if(f)throw new Error("A history only accepts one active listener");return a.addEventListener(r,v),f=e,()=>{a.removeEventListener(r,v),f=null}},createHref(e){return t(a,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){p="PUSH";let r=l(y.location,e,t);n&&n(r,e),h=g()+1;let o=s(r,h),i=y.createHref(r);try{d.pushState(o,"",i)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;a.location.assign(i)}u&&f&&f({action:p,location:y.location,delta:1})},replace:function(e,t){p="REPLACE";let r=l(y.location,e,t);n&&n(r,e),h=g();let o=s(r,h),i=y.createHref(r);d.replaceState(o,"",i),u&&f&&f({action:p,location:y.location,delta:0})},go(e){return d.go(e)}};return y}((function(e,t){let{pathname:n="/",search:r="",hash:o=""}=u(e.location.hash.substring(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),l("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:c(t))}),(function(e,t){a("/"===e.pathname.charAt(0),`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)}),e)}function i(e,t){if(!1===e||null==e)throw new Error(t)}function a(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function s(e,t){return{usr:e.state,key:e.key,idx:t}}function l(e,t,n=null,r){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?u(t):t,state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10)}}function c({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function u(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function d(e,t,n="/"){return function(e,t,n,r){let o=E(("string"==typeof t?u(t):t).pathname||"/",n);if(null==o)return null;let i=p(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]))?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let a=null;for(let e=0;null==a&&e