Changeset 2859885
- Timestamp:
- 02/03/2023 10:05:46 PM (3 years ago)
- Location:
- wpglobus/trunk
- Files:
-
- 6 edited
-
includes/admin/recommendations/class-wpglobus-admin-recommendations.php (modified) (1 diff)
-
includes/js/wpglobus-edit-post-sidebar.js (modified) (3 diffs)
-
includes/js/wpglobus-edit-post-sidebar.min.js (modified) (1 diff)
-
includes/vendor/yoast-seo/class-wpglobus-yoastseo140.php (modified) (1 diff)
-
readme.txt (modified) (3 diffs)
-
wpglobus.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wpglobus/trunk/includes/admin/recommendations/class-wpglobus-admin-recommendations.php
r2852540 r2859885 141 141 $content = ''; 142 142 } else { 143 $content[$current_key]['linkContent'] = $link_content; 144 $content[$current_key]['linkUrl'] = $link_url; 143 /** 144 * Add external link to options page. 145 */ 146 $content['linkToOptions']['linkContent'] = $link_content; 147 $content['linkToOptions']['linkUrl'] = $link_url; 145 148 } 146 149 } -
wpglobus/trunk/includes/js/wpglobus-edit-post-sidebar.js
r2852540 r2859885 79 79 return false; 80 80 } 81 var isLink = function(item) { 82 if ( typeof item.linkUrl === 'string' && typeof item.linkContent === 'string' ) { 83 return true; 84 } 85 return false; 86 } 81 87 var registerPlugin = wp.plugins.registerPlugin; 82 88 var Link = wp.components.ExternalLink; … … 88 94 var _key = 0; 89 95 Object.entries(api.getContent()).forEach(([itemKey, item]) => { 90 var linkEl = null; 91 if ( typeof item.linkUrl === 'string' && typeof item.linkContent === 'string' ) { 92 linkEl = el( 96 var message = typeof item.message === 'undefined' ? null : item.message; 97 var children = null; 98 if ( isLink(item) ) { 99 children = el( 93 100 Link, 94 101 {href:item.linkUrl,children:item.linkContent} 95 ) ;102 ); 96 103 } 97 104 _content.push( … … 100 107 { 101 108 tagName: 'p', 102 className: 'wpglobus- plus-slug-recommendation',109 className: 'wpglobus-recommendation', 103 110 style: {fontWeight:'600'}, 104 111 key: _key, 105 112 }, 106 item.message, 107 el(Br,{}), 108 linkEl 113 message, 114 children 109 115 ) 110 116 ) -
wpglobus/trunk/includes/js/wpglobus-edit-post-sidebar.min.js
r2852540 r2859885 1 jQuery(document).ready(function(t){"use strict";if(void 0!==wp.editPost&&void 0!==wp.element&&void 0!==wp.plugins&&"undefined"!=typeof WPGlobusEditPostSidebar){const r=function(){return wp.element.createElement("br",{})},a=function(t){var{tagName:e="div",className:n="",style:i="",children:t}=t;let s="components-text";return""!==n&&(s+=" "+n),wp.element.createElement(e,{className:s,style:i},t)};var l={parseBool:function(t){return!/^(false|0)$/i.test(t)&&!!t},hasContent:function(){return""!==WPGlobusEditPostSidebar.content},getContent:function(){return""!==WPGlobusEditPostSidebar.content&&WPGlobusEditPostSidebar.content},start:function(){l.WPGlobusEditPostPlugin(),l.parseBool(WPGlobusEditPostSidebar.hideStandardMetabox)&&t("#wpglobus").addClass("hidden")},WPGlobusEditPostPlugin:function(){if(!l.hasContent())return!1;var t=wp.plugins.registerPlugin,s=wp.components.ExternalLink,o=wp.element.createElement,e=wp.editPost.PluginDocumentSettingPanel;return t("wpglobus-edit-post-sidebar",{icon:"",render:function(){return o(e,{name:"wpglobus-sidebar-panel",initialOpen:!1,icon:"dashicons dashicons-admin-site",title:"WPGlobus",className:"wpglobus-sidebar-panel"},(n=[],i=0,Object.entries(l.getContent()).forEach(([,t])=>{var e=null;"string"==typeof t.linkUrl&&"string"==typeof t.linkContent&&(e=o(s,{href:t.linkUrl,children:t.linkContent})),n.push(o(a,{tagName:"p",className:"wpglobus-plus-slug-recommendation",style:{fontWeight:"600"},key:i},t.message,o(r,{}),e)),i++}),n));var n,i}}),!0}};WPGlobusEditPostSidebar=t.extend({},WPGlobusEditPostSidebar,l),WPGlobusEditPostSidebar.start()}});1 jQuery(document).ready(function(t){"use strict";if(void 0!==wp.editPost&&void 0!==wp.element&&void 0!==wp.plugins&&"undefined"!=typeof WPGlobusEditPostSidebar){const a=function(t){var{tagName:e="div",className:n="",style:s="",children:t}=t;let i="components-text";return""!==n&&(i+=" "+n),wp.element.createElement(e,{className:i,style:s},t)};var s={parseBool:function(t){return!/^(false|0)$/i.test(t)&&!!t},hasContent:function(){return""!==WPGlobusEditPostSidebar.content},getContent:function(){return""!==WPGlobusEditPostSidebar.content&&WPGlobusEditPostSidebar.content},start:function(){s.WPGlobusEditPostPlugin(),s.parseBool(WPGlobusEditPostSidebar.hideStandardMetabox)&&t("#wpglobus").addClass("hidden")},WPGlobusEditPostPlugin:function(){if(!s.hasContent())return!1;var t=wp.plugins.registerPlugin,l=wp.components.ExternalLink,r=wp.element.createElement,e=wp.editPost.PluginDocumentSettingPanel;const n=()=>{var i=[],o=0;return Object.entries(s.getContent()).forEach(([,t])=>{var e,n=void 0===t.message?null:t.message,s=null;"string"==typeof(e=t).linkUrl&&"string"==typeof e.linkContent&&(s=r(l,{href:t.linkUrl,children:t.linkContent})),i.push(r(a,{tagName:"p",className:"wpglobus-recommendation",style:{fontWeight:"600"},key:o},n,s)),o++}),i};return t("wpglobus-edit-post-sidebar",{icon:"",render:function(){return r(e,{name:"wpglobus-sidebar-panel",initialOpen:!1,icon:"dashicons dashicons-admin-site",title:"WPGlobus",className:"wpglobus-sidebar-panel"},n())}}),!0}};WPGlobusEditPostSidebar=t.extend({},WPGlobusEditPostSidebar,s),WPGlobusEditPostSidebar.start()}}); -
wpglobus/trunk/includes/vendor/yoast-seo/class-wpglobus-yoastseo140.php
r2756347 r2859885 287 287 } 288 288 289 $image_keys = array( 'caption' ); 290 foreach( $image_keys as $_key ) { 291 if ( WPGlobus_Core::has_translations( $graph_piece['image'][$_key] ) ) { 292 $graph_piece['image'][$_key] = WPGlobus_Core::extract_text( $graph_piece['image'][$_key], WPGlobus::Config()->language ); 293 } 294 } 289 /** 290 * Fix `Warning: Undefined array key "image"`. 291 * 292 * @since 2.10.9 293 */ 294 if ( ! empty( $graph_piece['image'] ) && is_array( $graph_piece['image'] ) ) { 295 $image_keys = array( 'caption' ); 296 foreach( $image_keys as $_key ) { 297 if ( ! empty( $graph_piece['image'][$_key] ) && WPGlobus_Core::has_translations( $graph_piece['image'][$_key] ) ) { 298 $graph_piece['image'][$_key] = WPGlobus_Core::extract_text( $graph_piece['image'][$_key], WPGlobus::Config()->language ); 299 } 300 } 301 } 302 295 303 return $graph_piece; 296 304 } -
wpglobus/trunk/readme.txt
r2852540 r2859885 192 192 = From the WPGlobus.com FAQ Archives: = 193 193 194 * [Do you support PHP 5.x? PHP 7.x?](https://wpglobus.com/faq/support-php-5-2/)194 * [Do you support PHP 5.x? PHP 8.x?](https://wpglobus.com/faq/support-php-5-2/) 195 195 * [Do you support MSIE / Opera / Safari / Chrome / Firefox - Version x.x?](https://wpglobus.com/faq/support-msie-opera-safari-chrome-firefox/) 196 196 * [Do you plan to support subdomains and URL query parameters?](https://wpglobus.com/faq/subdomains-and-url-query-parameters/) … … 219 219 == Changelog == 220 220 221 = 2.10.9 = 222 * (Vendor/Yoast) Fix `Warning: Undefined array key image`. 223 * (Core/Recommendations) Visual improvements. 224 221 225 = 2.10.8 = 222 226 * Added: (Core) `WPGlobusEditPost` Sidebar plugin v.2. … … 237 241 * Tweak: (Core) When we do not have a specific country translation, try using what we have (WIP). 238 242 239 = 2.10.4 =240 * (Core/Widgets) Update for the widgets block editor v.2.0.241 242 = 2.10.3 =243 * (Core/Filters) Code cleanup: `filter__get_locale()` in `class-wpglobus-filters.php`.244 * (Options/Languages table) Added the `vi.alt.png` flag.245 * (Internal) `package.json` - patches for the new `npm`.246 247 243 == Demo Sites == 248 244 -
wpglobus/trunk/wpglobus.php
r2852540 r2859885 5 5 * @package WPGlobus 6 6 * @author TIV.NET INC, Alex Gor (alexgff) and Gregory Karpinsky (tivnet) 7 * @copyright 2015-202 2TIV.NET INC. / WPGlobus7 * @copyright 2015-2023 TIV.NET INC. / WPGlobus 8 8 * @license http://www.gnu.org/licenses/gpl.txt GNU General Public License, version 3 9 9 */ … … 16 16 * Text Domain: wpglobus 17 17 * Domain Path: /languages/ 18 * Version: 2.10. 818 * Version: 2.10.9 19 19 * Author: WPGlobus 20 20 * Author URI: https://wpglobus.com/ … … 45 45 } 46 46 47 define( 'WPGLOBUS_VERSION', '2.10. 8' );47 define( 'WPGLOBUS_VERSION', '2.10.9' ); 48 48 define( 'WPGLOBUS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); 49 49 define( 'WPGLOBUS_AJAX', 'wpglobus-ajax' );
Note: See TracChangeset
for help on using the changeset viewer.