Commit a9060217 authored by Simon's avatar Simon

release 1.29.0

parent c1d33b6b
...@@ -20,9 +20,9 @@ ...@@ -20,9 +20,9 @@
## Production ## Production
- build CSS & JS assets - `C:\web\dev.biuro\ npm run build` - build CSS & JS assets - `C:\web\dev.biuro\ npm run build`
- build new image `docker build -t biuro/web:1.28.0 .` (update version number) - build new image `docker build -t biuro/web:1.29.0 .` (update version number)
- login to biuro docker account `docker login --username=biuro --password=9Ndtjd2vKsLvGuFOeFq1KdJs` - login to biuro docker account `docker login --username=biuro --password=9Ndtjd2vKsLvGuFOeFq1KdJs`
- push image to docker repository - `docker push biuro/web:1.28.0` - push image to docker repository - `docker push biuro/web:1.29.0`
## Production ## Production
- update biuro/web image version in .env file (staging or www) - update biuro/web image version in .env file (staging or www)
......
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Loco Translate 2.5.3\n" "Project-Id-Version: Loco Translate 2.5.4\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/loco-translate/\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/loco-translate/\n"
"POT-Creation-Date: 2021-06-22 10:49+0000\n" "POT-Creation-Date: 2021-09-28 09:33+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: \n" "Language-Team: \n"
...@@ -13,7 +13,7 @@ msgstr "" ...@@ -13,7 +13,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Generator: Loco https://localise.biz/\n" "X-Generator: Loco https://localise.biz/\n"
"X-Loco-Version: 2.5.3; wp-5.7.2\n" "X-Loco-Version: 2.5.4; wp-5.8.1\n"
"X-Domain: loco-translate" "X-Domain: loco-translate"
#: src/fs/FileWriter.php:214 #: src/fs/FileWriter.php:214
...@@ -566,6 +566,10 @@ msgstr "" ...@@ -566,6 +566,10 @@ msgstr ""
msgid "Edit config" msgid "Edit config"
msgstr "" msgstr ""
#: tpl/admin/file/head.php:10
msgid "Edit file headers"
msgstr ""
#: src/admin/bundle/ViewController.php:123 #: src/admin/bundle/ViewController.php:123
msgid "Edit template" msgid "Edit template"
msgstr "" msgstr ""
...@@ -1207,7 +1211,7 @@ msgstr "" ...@@ -1207,7 +1211,7 @@ msgstr ""
msgid "Modification of installed files is disallowed by the plugin settings" msgid "Modification of installed files is disallowed by the plugin settings"
msgstr "" msgstr ""
#: src/fs/FileWriter.php:315 #: src/fs/FileWriter.php:316
msgid "" msgid ""
"Modification of POT (template) files is disallowed by the plugin settings" "Modification of POT (template) files is disallowed by the plugin settings"
msgstr "" msgstr ""
...@@ -1501,6 +1505,10 @@ msgstr "" ...@@ -1501,6 +1505,10 @@ msgstr ""
msgid "Relative path from bundle root to the official POT file" msgid "Relative path from bundle root to the official POT file"
msgstr "" msgstr ""
#: tpl/admin/file/conf.php:23
msgid "Relative path to template file"
msgstr ""
#: src/admin/file/BaseController.php:107 #: src/admin/file/BaseController.php:107
msgid "Relocate" msgid "Relocate"
msgstr "" msgstr ""
...@@ -1708,7 +1716,7 @@ msgstr "" ...@@ -1708,7 +1716,7 @@ msgstr ""
msgid "Template file already exists" msgid "Template file already exists"
msgstr "" msgstr ""
#: src/ajax/XgettextController.php:62 #: src/ajax/XgettextController.php:67
msgid "Template file created" msgid "Template file created"
msgstr "" msgstr ""
......
...@@ -4,9 +4,9 @@ Plugin Name: Loco Translate ...@@ -4,9 +4,9 @@ Plugin Name: Loco Translate
Plugin URI: https://wordpress.org/plugins/loco-translate/ Plugin URI: https://wordpress.org/plugins/loco-translate/
Description: Translate themes and plugins directly in WordPress Description: Translate themes and plugins directly in WordPress
Author: Tim Whitlock Author: Tim Whitlock
Version: 2.5.3 Version: 2.5.4
Requires at least: 4.1 Requires at least: 4.1
Tested up to: 5.7 Tested up to: 5.8.1
Requires PHP: 5.2.4 Requires PHP: 5.2.4
Author URI: https://localise.biz/wordpress/plugin Author URI: https://localise.biz/wordpress/plugin
Text Domain: loco-translate Text Domain: loco-translate
...@@ -33,7 +33,7 @@ function loco_plugin_file(){ ...@@ -33,7 +33,7 @@ function loco_plugin_file(){
* @return string * @return string
*/ */
function loco_plugin_version(){ function loco_plugin_version(){
return '2.5.3'; return '2.5.4';
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
#loco-admin.wrap .revisions-diff{padding:10px;min-height:20px}#loco-admin.wrap table.diff{border-collapse:collapse}#loco-admin.wrap table.diff td{white-space:nowrap;overflow:hidden;font:normal 12px/17px "Monaco","Menlo","Ubuntu Mono","Consolas","source-code-pro",monospace;padding:2px}#loco-admin.wrap table.diff td>span{color:#aaa}#loco-admin.wrap table.diff td>span:after{content:". "}#loco-admin.wrap table.diff tbody{border-top:1px dashed #ccc}#loco-admin.wrap table.diff tbody:first-child{border-top:none}#loco-admin.wrap .revisions.loading .diff-meta{color:#eee}#loco-admin.wrap .revisions.loading .loading-indicator span.spinner{visibility:visible;background:#fff url(../img/spin-modal.gif?v=2.5.3) center center no-repeat}#loco-admin.wrap .revisions-meta{clear:both;padding:10px 12px;margin:0;position:relative;top:10px}#loco-admin.wrap .revisions-meta .diff-meta{clear:none;float:left;width:50%;padding:0;min-height:auto}#loco-admin.wrap .revisions-meta .diff-meta button{margin-top:5px}#loco-admin.wrap .revisions-meta .diff-meta-current{float:right;text-align:right}#loco-admin.wrap .revisions-meta time{color:#72777c}#loco-admin.wrap .revisions-control-frame{margin:10px 0}#loco-admin.wrap .revisions-diff-frame{margin-top:20px} #loco-admin.wrap .revisions-diff{padding:10px;min-height:20px}#loco-admin.wrap table.diff{border-collapse:collapse}#loco-admin.wrap table.diff td{white-space:nowrap;overflow:hidden;font:normal 12px/17px "Monaco","Menlo","Ubuntu Mono","Consolas","source-code-pro",monospace;padding:2px}#loco-admin.wrap table.diff td>span{color:#aaa}#loco-admin.wrap table.diff td>span:after{content:". "}#loco-admin.wrap table.diff tbody{border-top:1px dashed #ccc}#loco-admin.wrap table.diff tbody:first-child{border-top:none}#loco-admin.wrap .revisions.loading .diff-meta{color:#eee}#loco-admin.wrap .revisions.loading .loading-indicator span.spinner{visibility:visible;background:#fff url(../img/spin-modal.gif?v=2.5.4) center center no-repeat}#loco-admin.wrap .revisions-meta{clear:both;padding:10px 12px;margin:0;position:relative;top:10px}#loco-admin.wrap .revisions-meta .diff-meta{clear:none;float:left;width:50%;padding:0;min-height:auto}#loco-admin.wrap .revisions-meta .diff-meta button{margin-top:5px}#loco-admin.wrap .revisions-meta .diff-meta-current{float:right;text-align:right}#loco-admin.wrap .revisions-meta time{color:#72777c}#loco-admin.wrap .revisions-control-frame{margin:10px 0}#loco-admin.wrap .revisions-diff-frame{margin-top:20px}
\ No newline at end of file \ No newline at end of file
.js #loco-admin.wrap .loco-loading{min-height:100px;background:#fff url(../img/spin-modal.gif?v=2.5.3) center center no-repeat}.js #loco-admin.wrap .loco-loading ol.msgcat{display:none}#loco-admin.wrap #loco-po{padding-right:0;overflow:auto}#loco-admin.wrap ol.msgcat{margin-left:3em;padding-top:1em;border-top:1px dashed #ccc}#loco-admin.wrap ol.msgcat:first-child{padding-top:0;border-top:none}#loco-admin.wrap ol.msgcat li{color:#aaa;margin:0;padding:0 0 0 1em;font:normal 12px/17px "Monaco","Menlo","Ubuntu Mono","Consolas","source-code-pro",monospace;border-left:1px solid #eee}#loco-admin.wrap ol.msgcat li>*{color:#333;white-space:pre}#loco-admin.wrap ol.msgcat li>.po-comment{color:#3cc200}#loco-admin.wrap ol.msgcat li>.po-refs{color:#0073aa}#loco-admin.wrap ol.msgcat li>.po-refs a{color:inherit;text-decoration:none}#loco-admin.wrap ol.msgcat li>.po-refs a:hover{text-decoration:underline}#loco-admin.wrap ol.msgcat li>.po-flags{color:#77904a}#loco-admin.wrap ol.msgcat li>.po-flags em{font-style:normal}#loco-admin.wrap ol.msgcat li>.po-word{color:#000}#loco-admin.wrap ol.msgcat li>.po-junk{font-style:italic;color:#ccc}#loco-admin.wrap ol.msgcat li>.po-string>span{color:#c931c7}#loco-admin.wrap form.loco-filter{top:0;right:0;position:absolute}#loco-admin.wrap .loco-invalid form.loco-filter input[type=text]:focus{border-color:#c00;-webkit-box-shadow:0 0 2px rgba(153,0,0,.5);-moz-box-shadow:0 0 2px rgba(153,0,0,.5);box-shadow:0 0 2px rgba(153,0,0,.5)}#loco-admin.wrap .loco-invalid ol.msgcat{list-style-type:none}#loco-admin.wrap .loco-invalid ol.msgcat li{color:#000} .js #loco-admin.wrap .loco-loading{min-height:100px;background:#fff url(../img/spin-modal.gif?v=2.5.4) center center no-repeat}.js #loco-admin.wrap .loco-loading ol.msgcat{display:none}#loco-admin.wrap #loco-po{padding-right:0;overflow:auto}#loco-admin.wrap ol.msgcat{margin-left:3em;padding-top:1em;border-top:1px dashed #ccc}#loco-admin.wrap ol.msgcat:first-child{padding-top:0;border-top:none}#loco-admin.wrap ol.msgcat li{color:#aaa;margin:0;padding:0 0 0 1em;font:normal 12px/17px "Monaco","Menlo","Ubuntu Mono","Consolas","source-code-pro",monospace;border-left:1px solid #eee}#loco-admin.wrap ol.msgcat li>*{color:#333;white-space:pre}#loco-admin.wrap ol.msgcat li>.po-comment{color:#3cc200}#loco-admin.wrap ol.msgcat li>.po-refs{color:#0073aa}#loco-admin.wrap ol.msgcat li>.po-refs a{color:inherit;text-decoration:none}#loco-admin.wrap ol.msgcat li>.po-refs a:hover{text-decoration:underline}#loco-admin.wrap ol.msgcat li>.po-flags{color:#77904a}#loco-admin.wrap ol.msgcat li>.po-flags em{font-style:normal}#loco-admin.wrap ol.msgcat li>.po-word{color:#000}#loco-admin.wrap ol.msgcat li>.po-junk{font-style:italic;color:#ccc}#loco-admin.wrap ol.msgcat li>.po-string>span{color:#c931c7}#loco-admin.wrap form.loco-filter{top:0;right:0;position:absolute}#loco-admin.wrap .loco-invalid form.loco-filter input[type=text]:focus{border-color:#c00;-webkit-box-shadow:0 0 2px rgba(153,0,0,.5);-moz-box-shadow:0 0 2px rgba(153,0,0,.5);box-shadow:0 0 2px rgba(153,0,0,.5)}#loco-admin.wrap .loco-invalid ol.msgcat{list-style-type:none}#loco-admin.wrap .loco-invalid ol.msgcat li{color:#000}
\ No newline at end of file \ No newline at end of file
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(9,100,132,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#096484;foo:#096484}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#d1cdc7 !important;background:#db9925 !important;border-color:#db9925 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/blue/spin-primary-button.gif?v=2.5.3) 0 0 no-repeat !important} .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(9,100,132,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#096484;foo:#096484}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#d1cdc7 !important;background:#db9925 !important;border-color:#db9925 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/blue/spin-primary-button.gif?v=2.5.4) 0 0 no-repeat !important}
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(199,165,137,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#c7a589;foo:#c7a589}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#d1ccc7 !important;background:#ba906d !important;border-color:#ba906d !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/coffee/spin-primary-button.gif?v=2.5.3) 0 0 no-repeat !important} .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(199,165,137,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#c7a589;foo:#c7a589}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#d1ccc7 !important;background:#ba906d !important;border-color:#ba906d !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/coffee/spin-primary-button.gif?v=2.5.4) 0 0 no-repeat !important}
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(163,183,69,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#a3b745;foo:#a3b745}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#cfd1c7 !important;background:#89993a !important;border-color:#89993a !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/ectoplasm/spin-primary-button.gif?v=2.5.3) 0 0 no-repeat !important} .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(163,183,69,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#a3b745;foo:#a3b745}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#cfd1c7 !important;background:#89993a !important;border-color:#89993a !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/ectoplasm/spin-primary-button.gif?v=2.5.4) 0 0 no-repeat !important}
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(136,136,136,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#888;foo:#04a4cc}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#c7cfd1 !important;background:#0384a4 !important;border-color:#0384a4 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/light/spin-primary-button.gif?v=2.5.3) 0 0 no-repeat !important} .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(136,136,136,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#888;foo:#04a4cc}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#c7cfd1 !important;background:#0384a4 !important;border-color:#0384a4 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/light/spin-primary-button.gif?v=2.5.4) 0 0 no-repeat !important}
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(225,77,67,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#e14d43;foo:#e14d43}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#d1c8c7 !important;background:#d92e23 !important;border-color:#d92e23 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/midnight/spin-primary-button.gif?v=2.5.3) 0 0 no-repeat !important} .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(225,77,67,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#e14d43;foo:#e14d43}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#d1c8c7 !important;background:#d92e23 !important;border-color:#d92e23 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/midnight/spin-primary-button.gif?v=2.5.4) 0 0 no-repeat !important}
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(56,88,233,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#3858e9;foo:#3858e9}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#c7c9d1 !important;background:#193ddf !important;border-color:#193ddf !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/modern/spin-primary-button.gif?v=2.5.3) 0 0 no-repeat !important} .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(56,88,233,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#3858e9;foo:#3858e9}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#c7c9d1 !important;background:#193ddf !important;border-color:#193ddf !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/modern/spin-primary-button.gif?v=2.5.4) 0 0 no-repeat !important}
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(158,186,160,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#9ebaa0;foo:#9ebaa0}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#c7d1c8 !important;background:#86a989 !important;border-color:#86a989 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/ocean/spin-primary-button.gif?v=2.5.3) 0 0 no-repeat !important} .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(158,186,160,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#9ebaa0;foo:#9ebaa0}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#c7d1c8 !important;background:#86a989 !important;border-color:#86a989 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/ocean/spin-primary-button.gif?v=2.5.4) 0 0 no-repeat !important}
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(221,130,59,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#dd823b;foo:#dd823b}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#d1cbc7 !important;background:#cc6d23 !important;border-color:#cc6d23 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/sunrise/spin-primary-button.gif?v=2.5.3) 0 0 no-repeat !important} .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(221,130,59,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#dd823b;foo:#dd823b}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#d1cbc7 !important;background:#cc6d23 !important;border-color:#cc6d23 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/sunrise/spin-primary-button.gif?v=2.5.4) 0 0 no-repeat !important}
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -3,8 +3,8 @@ Contributors: timwhitlock ...@@ -3,8 +3,8 @@ Contributors: timwhitlock
Tags: translation, translators, localization, localisation, l10n, i18n, Gettext, PO, MO, productivity, multilingual, internationalization Tags: translation, translators, localization, localisation, l10n, i18n, Gettext, PO, MO, productivity, multilingual, internationalization
Requires at least: 4.1 Requires at least: 4.1
Requires PHP: 5.2.4 Requires PHP: 5.2.4
Tested up to: 5.7.1 Tested up to: 5.8.1
Stable tag: 2.5.3 Stable tag: 2.5.4
License: GPLv2 or later License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html License URI: http://www.gnu.org/licenses/gpl-2.0.html
...@@ -100,6 +100,11 @@ We don't collect your data or snoop on you. See the [plugin privacy notice](http ...@@ -100,6 +100,11 @@ We don't collect your data or snoop on you. See the [plugin privacy notice](http
== Changelog == == Changelog ==
= 2.5.4 =
* Enforcing safe file extensions for new templates
* Added filters loco_po_headers and loco_pot_headers
* Bumped WordPress version to 5.8.1
= 2.5.3 = = 2.5.3 =
* Adds option to merge JSON translations when syncing from PO * Adds option to merge JSON translations when syncing from PO
* Adds screen for editing file headers and sync options * Adds screen for editing file headers and sync options
...@@ -422,8 +427,8 @@ We don't collect your data or snoop on you. See the [plugin privacy notice](http ...@@ -422,8 +427,8 @@ We don't collect your data or snoop on you. See the [plugin privacy notice](http
== Upgrade Notice == == Upgrade Notice ==
= 2.5.3 = = 2.5.4 =
* Various improvements and bugfixes * Various improvements and bug fixes
......
...@@ -28,7 +28,7 @@ class Loco_ajax_SaveController extends Loco_ajax_common_BundleController { ...@@ -28,7 +28,7 @@ class Loco_ajax_SaveController extends Loco_ajax_common_BundleController {
// ensure we only deal with PO/POT source files. // ensure we only deal with PO/POT source files.
// posting of MO file paths is permitted when PO is missing, but we're about to fix that // posting of MO file paths is permitted when PO is missing, but we're about to fix that
$ext = $pofile->extension(); $ext = strtolower( $pofile->extension() );
if( 'mo' === $ext ){ if( 'mo' === $ext ){
$pofile = $pofile->cloneExtension('po'); $pofile = $pofile->cloneExtension('po');
} }
...@@ -36,7 +36,7 @@ class Loco_ajax_SaveController extends Loco_ajax_common_BundleController { ...@@ -36,7 +36,7 @@ class Loco_ajax_SaveController extends Loco_ajax_common_BundleController {
$locale = ''; $locale = '';
} }
else if( 'po' !== $ext ){ else if( 'po' !== $ext ){
throw new Loco_error_Exception('Invalid file path'); throw new Loco_error_Exception('Disallowed file extension');
} }
// Prepare compiler for all save operations. PO/MO/JSON, or just POT // Prepare compiler for all save operations. PO/MO/JSON, or just POT
......
...@@ -28,8 +28,13 @@ class Loco_ajax_XgettextController extends Loco_ajax_common_BundleController { ...@@ -28,8 +28,13 @@ class Loco_ajax_XgettextController extends Loco_ajax_common_BundleController {
throw new Loco_error_Exception('Front end did not post $name'); throw new Loco_error_Exception('Front end did not post $name');
} }
// POT file shouldn't exist currently // POT file should be .pot but we'll allow .po
$potfile = new Loco_fs_File( $target.'/'.$name ); $potfile = new Loco_fs_File( $target.'/'.$name );
$ext = strtolower( $potfile->extension() );
if( 'pot' !== $ext && 'po' !== $ext ){
throw new Loco_error_Exception('Disallowed file extension');
}
// File shouldn't exist currently
$api = new Loco_api_WordPressFileSystem; $api = new Loco_api_WordPressFileSystem;
$api->authorizeCreate($potfile); $api->authorizeCreate($potfile);
// Do extraction and grab only given domain's strings // Do extraction and grab only given domain's strings
......
...@@ -311,9 +311,14 @@ class Loco_fs_FileWriter { ...@@ -311,9 +311,14 @@ class Loco_fs_FileWriter {
} }
// deny POT modification (pot_protect = 2) // deny POT modification (pot_protect = 2)
// this assumes that templates all have .pot extension, which isn't guaranteed. UI should prevent saving of wrongly files like "default.po" // this assumes that templates all have .pot extension, which isn't guaranteed. UI should prevent saving of wrongly files like "default.po"
if( 'pot' === $this->file->extension() && 1 < $opts->pot_protect ){ $ext = strtolower( $this->file->extension() );
if( 'pot' === $ext && 1 < $opts->pot_protect ){
throw new Loco_error_WriteException( __('Modification of POT (template) files is disallowed by the plugin settings','loco-translate') ); throw new Loco_error_WriteException( __('Modification of POT (template) files is disallowed by the plugin settings','loco-translate') );
} }
// Deny list of sensitive file extensions, noting that specific actions may limit this further
else if( 'php' === $ext ){
throw new Loco_error_WriteException('Disallowed file extension in '.$this->file->basename() );
}
return $this; return $this;
} }
......
...@@ -268,7 +268,11 @@ class Loco_gettext_Data extends LocoPoIterator implements JsonSerializable { ...@@ -268,7 +268,11 @@ class Loco_gettext_Data extends LocoPoIterator implements JsonSerializable {
if( 'PACKAGE VERSION' === $headers['Project-Id-Version'] ){ if( 'PACKAGE VERSION' === $headers['Project-Id-Version'] ){
$headers['Project-Id-Version'] = ''; $headers['Project-Id-Version'] = '';
} }
// header message must be un-fuzzied if it was formerly a POT file // finally allow headers to be modified via filter
$replaced = apply_filters( 'loco_po_headers', $headers );
if( $replaced instanceof LocoPoHeaders && $replaced !== $headers ){
$this->setHeaders($replaced);
}
return $this->initPo(); return $this->initPo();
} }
...@@ -297,7 +301,12 @@ class Loco_gettext_Data extends LocoPoIterator implements JsonSerializable { ...@@ -297,7 +301,12 @@ class Loco_gettext_Data extends LocoPoIterator implements JsonSerializable {
'X-Loco-Version' => sprintf('%s; wp-%s', loco_plugin_version(), $GLOBALS['wp_version'] ), 'X-Loco-Version' => sprintf('%s; wp-%s', loco_plugin_version(), $GLOBALS['wp_version'] ),
'X-Domain' => $domain, 'X-Domain' => $domain,
); );
$this->applyHeaders($required,$defaults); $headers = $this->applyHeaders($required,$defaults);
// finally allow headers to be modified via filter
$replaced = apply_filters( 'loco_pot_headers', $headers );
if( $replaced instanceof LocoPoHeaders && $replaced !== $headers ){
$this->setHeaders($replaced);
}
return $this->initPot(); return $this->initPot();
} }
......
...@@ -20,7 +20,7 @@ $this->extend('../layout'); ...@@ -20,7 +20,7 @@ $this->extend('../layout');
<tbody> <tbody>
<tr valign="top" class="compact"> <tr valign="top" class="compact">
<td> <td>
<label for="loco-conf-template">Relative path to template file:</label><br /> <label for="loco-conf-template"><?php esc_html_e('Relative path to template file','loco-translate');?>:</label><br />
<input type="text" name="conf[template]" value="<?php self::e( (string) $conf->getTemplate() )?>" size="100" id="loco-conf-template" /> <input type="text" name="conf[template]" value="<?php self::e( (string) $conf->getTemplate() )?>" size="100" id="loco-conf-template" />
</td> </td>
</tr> </tr>
......
...@@ -7,7 +7,7 @@ $this->extend('../layout'); ...@@ -7,7 +7,7 @@ $this->extend('../layout');
<div class="panel"> <div class="panel">
<h3> <h3>
Edit file headers: <?php esc_html_e('Edit file headers','loco-translate');?>
</h3> </h3>
<form action="" method="post" enctype="application/x-www-form-urlencoded" id="loco-main"><?php <form action="" method="post" enctype="application/x-www-form-urlencoded" id="loco-main"><?php
......
...@@ -1219,8 +1219,8 @@ class PodsData { ...@@ -1219,8 +1219,8 @@ class PodsData {
$fieldfield = '`t`.`' . $params->index . '`'; $fieldfield = '`t`.`' . $params->index . '`';
if ( isset( $params->fields[ $params->index ] ) ) { if ( isset( $params->fields[ $params->index ] ) ) {
if ( $params->meta_fields ) { if ( $params->meta_fields && ! isset( $params->object_fields[ $params->index ] ) ) {
$fieldfield = '`' . $params->index . '`.`' . $params->pod_table_prefix . '`'; $fieldfield = '`' . $params->index . '`.`meta_value`';
} else { } else {
$fieldfield = '`' . $params->pod_table_prefix . '`.`' . $params->index . '`'; $fieldfield = '`' . $params->pod_table_prefix . '`.`' . $params->index . '`';
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
Plugin Name: Pods - Custom Content Types and Fields Plugin Name: Pods - Custom Content Types and Fields
Plugin URI: https://pods.io/ Plugin URI: https://pods.io/
Description: Pods is a framework for creating, managing, and deploying customized content types and fields Description: Pods is a framework for creating, managing, and deploying customized content types and fields
Version: 2.7.30 Version: 2.7.31
Author: Pods Framework Team Author: Pods Framework Team
Author URI: https://pods.io/about/ Author URI: https://pods.io/about/
Text Domain: pods Text Domain: pods
...@@ -37,7 +37,7 @@ if ( defined( 'PODS_VERSION' ) || defined( 'PODS_DIR' ) ) { ...@@ -37,7 +37,7 @@ if ( defined( 'PODS_VERSION' ) || defined( 'PODS_DIR' ) ) {
add_action( 'init', 'pods_deactivate_pods_ui' ); add_action( 'init', 'pods_deactivate_pods_ui' );
} else { } else {
// Current version // Current version
define( 'PODS_VERSION', '2.7.30' ); define( 'PODS_VERSION', '2.7.31' );
// Version tracking between DB updates themselves // Version tracking between DB updates themselves
define( 'PODS_DB_VERSION', '2.3.5' ); define( 'PODS_DB_VERSION', '2.3.5' );
......
...@@ -5,7 +5,7 @@ Tags: pods, custom post types, custom taxonomies, content types, custom fields, ...@@ -5,7 +5,7 @@ Tags: pods, custom post types, custom taxonomies, content types, custom fields,
Requires at least: 4.5 Requires at least: 4.5
Tested up to: 5.8 Tested up to: 5.8
Requires PHP: 5.3 Requires PHP: 5.3
Stable tag: 2.7.30 Stable tag: 2.7.31
License: GPLv2 or later License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html License URI: http://www.gnu.org/licenses/gpl-2.0.html
...@@ -190,6 +190,11 @@ We are also available through our [Live Slack Chat](https://pods.io/chat/) to he ...@@ -190,6 +190,11 @@ We are also available through our [Live Slack Chat](https://pods.io/chat/) to he
== Changelog == == Changelog ==
= 2.7.31 - September 23rd, 2021 =
* Pods 2.8 is coming on October 11th! Check out the [Pods 2.8 Field Guide](https://pods.io/2021/02/11/pods-2-8-beta-1-released-and-the-field-guide-to-pods-2-8/) for more information.
* Fixed: Resolve issues where searching a Pod would cause queries like `post_title.t` or `display_name.t` unexpectedly. #6050 (@sc0ttkclark, @unknownnf)
= 2.7.30 - August 12th, 2021 = = 2.7.30 - August 12th, 2021 =
* Fixed: Prevented a few PHP notices from showing on the new WordPress 5.8+ widgets screen. * Fixed: Prevented a few PHP notices from showing on the new WordPress 5.8+ widgets screen.
......
This source diff could not be displayed because it is too large. You can view the blob instead.
<?php <?php
use GeminiLabs\SiteReviews\Controllers\BlocksController;
defined('ABSPATH') || die; defined('ABSPATH') || die;
/** /**
...@@ -241,3 +243,13 @@ add_filter('tcb_post_types', function ($blacklist) { ...@@ -241,3 +243,13 @@ add_filter('tcb_post_types', function ($blacklist) {
$blacklist[] = glsr()->post_type; $blacklist[] = glsr()->post_type;
return $blacklist; return $blacklist;
}); });
/**
* WordPress <5.8 compatibility
*/
if (!is_wp_version_compatible('5.8')) {
add_action('init', function () {
add_filter('allowed_block_types', [glsr(BlocksController::class), 'filterAllowedBlockTypes'], 10, 2);
add_filter('block_categories', [glsr(BlocksController::class), 'filterBlockCategories']);
});
}
...@@ -301,7 +301,9 @@ return [ ...@@ -301,7 +301,9 @@ return [
'settings.schema.type.default' => 'custom', 'settings.schema.type.default' => 'custom',
], ],
'label' => _x('Custom Schema Type', 'admin-text', 'site-reviews'), 'label' => _x('Custom Schema Type', 'admin-text', 'site-reviews'),
'tooltip' => '<a href="https://schema.org/docs/schemas.html">'._x('View more information on schema types here', 'admin-text', 'site-reviews').'</a>', 'tooltip' => sprintf(_x('Google limits the schema types that can potentially trigger review rich results in search. To learn which schema types can be used, please %s.', 'read this (admin-text)', 'site-reviews'),
'<a href="https://developers.google.com/search/blog/2019/09/making-review-rich-results-more-helpful">'._x('read this', 'admin-text', 'site-reviews').'</a>'
),
'type' => 'text', 'type' => 'text',
], ],
'settings.schema.name.default' => [ 'settings.schema.name.default' => [
......
...@@ -66,7 +66,7 @@ abstract class Controller extends BaseController ...@@ -66,7 +66,7 @@ abstract class Controller extends BaseController
{ {
if (glsr()->hasPermission('settings')) { if (glsr()->hasPermission('settings')) {
$links['settings'] = glsr(Builder::class)->a([ $links['settings'] = glsr(Builder::class)->a([
'href' => admin_url('edit.php?post_type='.glsr()->post_type.'&page=settings#tab-addons|'.$this->addon->slug), 'href' => admin_url('edit.php?post_type='.glsr()->post_type.'&page=settings#tab-addons_'.$this->addon->slug),
'text' => _x('Settings', 'admin-text', 'site-reviews'), 'text' => _x('Settings', 'admin-text', 'site-reviews'),
]); ]);
} }
...@@ -216,12 +216,7 @@ abstract class Controller extends BaseController ...@@ -216,12 +216,7 @@ abstract class Controller extends BaseController
*/ */
public function filterSystemInfo(array $details) public function filterSystemInfo(array $details)
{ {
$version = $this->addon->version; $details[$this->addon->name] = sprintf('%s', $this->addon->version);
$previousVersion = glsr(OptionManager::class)->get('addons.'.$this->addon->id.'.version_upgraded_from');
if (empty($previousVersion)) {
$previousVersion = $version;
}
$details[$this->addon->name] = sprintf('%s (%s)', $this->addon->version, $previousVersion);
return $details; return $details;
} }
......
...@@ -36,7 +36,6 @@ class EnqueueAdminAssets implements Contract ...@@ -36,7 +36,6 @@ class EnqueueAdminAssets implements Contract
public function handle() public function handle()
{ {
$this->enqueueAssets(); $this->enqueueAssets();
$this->localizeAssets();
} }
/** /**
...@@ -64,12 +63,14 @@ class EnqueueAdminAssets implements Contract ...@@ -64,12 +63,14 @@ class EnqueueAdminAssets implements Contract
wp_enqueue_style('wp-pointer'); wp_enqueue_style('wp-pointer');
wp_enqueue_script('wp-pointer'); wp_enqueue_script('wp-pointer');
} }
wp_add_inline_script(glsr()->id.'/admin', $this->inlineScript(), 'before');
wp_add_inline_script(glsr()->id.'/admin', glsr()->filterString('enqueue/admin/inline-script/after', ''));
} }
/** /**
* @return void * @return string
*/ */
public function localizeAssets() public function inlineScript()
{ {
$licenses = array_filter(Arr::consolidate(glsr_get_option('licenses'))); $licenses = array_filter(Arr::consolidate(glsr_get_option('licenses')));
$variables = [ $variables = [
...@@ -109,7 +110,21 @@ class EnqueueAdminAssets implements Contract ...@@ -109,7 +110,21 @@ class EnqueueAdminAssets implements Contract
$variables['shortcodes'] = $this->localizeShortcodes(); $variables['shortcodes'] = $this->localizeShortcodes();
} }
$variables = glsr()->filterArray('enqueue/admin/localize', $variables); $variables = glsr()->filterArray('enqueue/admin/localize', $variables);
wp_localize_script(glsr()->id.'/admin', 'GLSR', $variables); return $this->buildInlineScript($variables);
}
/**
* @return string
*/
protected function buildInlineScript(array $variables)
{
$script = 'window.hasOwnProperty("GLSR")||(window.GLSR={});';
foreach ($variables as $key => $value) {
$script .= sprintf('GLSR.%s=%s;', $key, json_encode($value, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
}
$pattern = '/\"([a-zA-Z]+)\"(:[{\[\"])/'; // remove unnecessary quotes surrounding object keys
$optimizedScript = preg_replace($pattern, '$1$2', $script);
return glsr()->filterString('enqueue/admin/inline-script', $optimizedScript, $script, $variables);
} }
/** /**
......
...@@ -48,9 +48,9 @@ class EnqueuePublicAssets implements Contract ...@@ -48,9 +48,9 @@ class EnqueuePublicAssets implements Contract
return; return;
} }
wp_enqueue_script(glsr()->id.'/polyfill', add_query_arg([ wp_enqueue_script(glsr()->id.'/polyfill', add_query_arg([
'features' => 'Array.prototype.find,CustomEvent,Element.prototype.closest,Element.prototype.dataset,Event,XMLHttpRequest,MutationObserver', 'features' => 'Array.prototype.find,Object.assign,CustomEvent,Element.prototype.closest,Element.prototype.dataset,Event,XMLHttpRequest,MutationObserver',
'flags' => 'gated', 'flags' => 'gated',
], 'https://polyfill.io/v3/polyfill.min.js?version=3.52.1')); ], 'https://polyfill.io/v3/polyfill.min.js?version=3.101.0'));
} }
/** /**
...@@ -127,7 +127,7 @@ class EnqueuePublicAssets implements Contract ...@@ -127,7 +127,7 @@ class EnqueuePublicAssets implements Contract
foreach ($variables as $key => $value) { foreach ($variables as $key => $value) {
$script .= sprintf('GLSR.%s=%s;', $key, json_encode($value, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE)); $script .= sprintf('GLSR.%s=%s;', $key, json_encode($value, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
} }
$pattern = '/\"([^ \-\"]+)\"(:[{\[\"])/'; // removes unnecessary quotes surrounding object keys $pattern = '/\"([a-zA-Z]+)\"(:[{\[\"])/'; // remove unnecessary quotes surrounding object keys
$optimizedScript = preg_replace($pattern, '$1$2', $script); $optimizedScript = preg_replace($pattern, '$1$2', $script);
return glsr()->filterString('enqueue/public/inline-script', $optimizedScript, $script, $variables); return glsr()->filterString('enqueue/public/inline-script', $optimizedScript, $script, $variables);
} }
......
...@@ -20,7 +20,7 @@ class RegisterShortcodes implements Contract ...@@ -20,7 +20,7 @@ class RegisterShortcodes implements Contract
public function handle() public function handle()
{ {
foreach ($this->shortcodes as $shortcode) { foreach ($this->shortcodes as $shortcode) {
$shortcodeClass = Helper::buildClassName($shortcode.'-shortcode', 'Shortcodes'); $shortcodeClass = Helper::buildClassName([$shortcode, 'shortcode'], 'Shortcodes');
if (!class_exists($shortcodeClass)) { if (!class_exists($shortcodeClass)) {
glsr_log()->error(sprintf('Shortcode class missing (%s)', $shortcodeClass)); glsr_log()->error(sprintf('Shortcode class missing (%s)', $shortcodeClass));
continue; continue;
......
...@@ -20,7 +20,7 @@ class RegisterTinymcePopups implements Contract ...@@ -20,7 +20,7 @@ class RegisterTinymcePopups implements Contract
public function handle() public function handle()
{ {
foreach ($this->popups as $slug => $label) { foreach ($this->popups as $slug => $label) {
$buttonClass = Helper::buildClassName($slug.'Tinymce', 'Tinymce'); $buttonClass = Helper::buildClassName([$slug, 'tinymce'], 'Tinymce');
if (!class_exists($buttonClass)) { if (!class_exists($buttonClass)) {
glsr_log()->error(sprintf('Tinymce Popup class missing (%s)', $buttonClass)); glsr_log()->error(sprintf('Tinymce Popup class missing (%s)', $buttonClass));
continue; continue;
......
...@@ -175,7 +175,7 @@ class AdminController extends Controller ...@@ -175,7 +175,7 @@ class AdminController extends Controller
*/ */
public function printInlineStyle() public function printInlineStyle()
{ {
echo '<style type="text/css">a[href="edit.php?post_type=site-review&page=addons"]:not(.current):not(:hover) { color:#F6E05E!important; }</style>'; echo '<style type="text/css">a[href="edit.php?post_type=site-review&page=addons"]:not(.current),a[href="edit.php?post_type=site-review&page=addons"]:focus,a[href="edit.php?post_type=site-review&page=addons"]:hover{color:#F6E05E!important;}</style>';
} }
/** /**
......
...@@ -358,7 +358,8 @@ class RestReviewController extends \WP_REST_Controller ...@@ -358,7 +358,8 @@ class RestReviewController extends \WP_REST_Controller
*/ */
protected function check_assign_terms_permission($request) protected function check_assign_terms_permission($request)
{ {
foreach ($request['assigned_terms'] as $termId) { $terms = Arr::consolidate($request['assigned_terms']);
foreach ($terms as $termId) {
if (!get_term($termId, glsr()->taxonomy)) { if (!get_term($termId, glsr()->taxonomy)) {
continue; // Invalid terms will be rejected later continue; // Invalid terms will be rejected later
} }
......
...@@ -171,7 +171,7 @@ class MenuController extends Controller ...@@ -171,7 +171,7 @@ class MenuController extends Controller
'data' => [ 'data' => [
'context' => [ 'context' => [
'base_url' => admin_url('edit.php?post_type='.glsr()->post_type), 'base_url' => admin_url('edit.php?post_type='.glsr()->post_type),
'console' => glsr(Console::class)->get(), 'console' => glsr(Console::class)->getRaw(),
'id' => glsr()->id, 'id' => glsr()->id,
'system' => glsr(SystemInfo::class)->get(), 'system' => glsr(SystemInfo::class)->get(),
], ],
......
...@@ -210,7 +210,11 @@ class ReviewController extends Controller ...@@ -210,7 +210,11 @@ class ReviewController extends Controller
$data['review_id'] = $postId; $data['review_id'] = $postId;
$data['is_approved'] = 'publish' === get_post_status($postId); $data['is_approved'] = 'publish' === get_post_status($postId);
if (false === glsr(Database::class)->insert('ratings', $data)) { if (false === glsr(Database::class)->insert('ratings', $data)) {
glsr_log()->error('To fix your reviews, please try running the "Migrate Plugin" and "Reset Assigned Meta Values" tools.'); glsr_log()->error(sprintf('A review could not be created. Here are some things to try which may fix the problem: %s %s %s',
PHP_EOL.'1. First, run the "Repair Review Relations" tool.',
PHP_EOL.'2. Next, hold down the ALT key and run the Migrate Plugin tool.',
PHP_EOL.'3. If the problem persists, please use the "Contact Support" section on the Help page.'
))->debug($data);
wp_delete_post($postId, true); // remove post as review was not created wp_delete_post($postId, true); // remove post as review was not created
return; return;
} }
......
...@@ -158,7 +158,7 @@ class ToolsController extends Controller ...@@ -158,7 +158,7 @@ class ToolsController extends Controller
{ {
$this->fetchConsole(); $this->fetchConsole();
wp_send_json_success([ wp_send_json_success([
'console' => glsr(Console::class)->get(), 'console' => glsr(Console::class)->getRaw(),
'notices' => glsr(Notice::class)->get(), 'notices' => glsr(Notice::class)->get(),
]); ]);
} }
......
...@@ -44,6 +44,7 @@ class CustomFieldsDefaults extends Defaults ...@@ -44,6 +44,7 @@ class CustomFieldsDefaults extends Defaults
'response', 'response',
'review_id', 'review_id',
'terms', 'terms',
'terms_exist',
'title', 'title',
'type', 'type',
'url', 'url',
......
This diff is collapsed.
...@@ -66,7 +66,7 @@ class ElementorFormWidget extends ElementorWidget ...@@ -66,7 +66,7 @@ class ElementorFormWidget extends ElementorWidget
$options['hide-'.$key] = [ $options['hide-'.$key] = [
'label' => $label, 'label' => $label,
'separator' => $separator, 'separator' => $separator,
'return_value' => 1, 'return_value' => '1',
'type' => \Elementor\Controls_Manager::SWITCHER, 'type' => \Elementor\Controls_Manager::SWITCHER,
]; ];
} }
......
...@@ -78,7 +78,8 @@ class Avatar ...@@ -78,7 +78,8 @@ class Avatar
*/ */
protected function size($size = null) protected function size($size = null)
{ {
if ($size = Cast::toInt($size)) { $size = Cast::toInt($size);
if ($size > 0) { // @todo change this to 16? What is the minimum size in settings?
return $size; return $size;
} }
$size = glsr_get_option('reviews.avatars_size', static::FALLBACK_SIZE, 'int'); $size = glsr_get_option('reviews.avatars_size', static::FALLBACK_SIZE, 'int');
......
...@@ -10,7 +10,8 @@ class ReviewRatingTag extends ReviewTag ...@@ -10,7 +10,8 @@ class ReviewRatingTag extends ReviewTag
protected function handle($value = null) protected function handle($value = null)
{ {
if (!$this->isHidden()) { if (!$this->isHidden()) {
return $this->wrap(glsr_star_rating($value, 0, $this->args->toArray())); $stars = glsr_star_rating($value, 0, $this->args->toArray());
return $this->wrap($stars);
} }
} }
} }
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment