Changeset 2804890
- Timestamp:
- 10/26/2022 12:59:54 PM (3 years ago)
- Location:
- wpglobus-featured-images/trunk
- Files:
-
- 6 edited
-
README.md (modified) (2 diffs)
-
includes/js/wpglobus-builder-featured-images.js (modified) (2 diffs)
-
includes/js/wpglobus-builder-featured-images.min.js (modified) (1 diff)
-
languages/wpglobus-featured-images.pot (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
wpglobus-featured-images.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wpglobus-featured-images/trunk/README.md
r2569744 r2804890 4 4 **Tags:** WPGlobus, featured image, bilingual, globalization, i18n, international, l10n, localization, multilanguage, multilingual, translate, translation 5 5 **Requires at least:** 5.5 6 **Tested up to:** 5.86 **Tested up to:** 6.0 7 7 **Stable tag:** trunk 8 8 **License:** GPLv2 … … 52 52 53 53 ## Changelog ## 54 55 ### 2.5.0 ### 56 * COMPATIBILITY: 57 * WordPress 6 58 * ADDED: 59 * JS scripts improvements. 54 60 55 61 ### 2.4.0 ### -
wpglobus-featured-images/trunk/includes/js/wpglobus-builder-featured-images.js
r2569744 r2804890 38 38 39 39 if ( 'gutenberg' === WPGlobusFeaturedImages.builderID ) { 40 var _c = ''; 41 _c += '<div style="margin:5px 0 10px 40px;">'; 42 _c += '<span>'+WPGlobusFeaturedImages.i18n['image_for']+': '+WPGlobusFeaturedImages.current_language_name+'</span>'; 43 _c += '<span style="cursor:pointer;">'; 44 _c += '<i class="hint-icon dashicons dashicons-editor-help" style="font-size:large;display:contents;"></i>'; 45 _c += '</span>'; 46 _c += '</div>'; 47 _c += '<div class="hint-content hidden" style="margin: 10px 10px;background-color:rgb(240, 240, 241);padding: 1px 10px;">'; 48 // _c += '<p>'+WPGlobusFeaturedImages.i18n['help_content1']+'</p>'; 49 _c += '<p>'+WPGlobusFeaturedImages.i18n['help_content2']+'</p>'; 50 _c += '</div>'; 51 52 var hint = { 53 started: false, 54 panelSelector: '.components-panel__body', 55 prependSelector: '.editor-post-featured-image', 56 iconSelector: '.wpglobus-featured-images-hint .hint-icon', 57 contentClassName: 'wpglobus-featured-images-hint', 58 contentToggleSelector: '.wpglobus-featured-images-hint .hint-content', 59 content: _c, 60 hasContent: function(){ 61 if ( $('.'+hint.contentClassName).length === 1 ) { 62 return true; 63 } 64 return false; 65 }, 66 insertContent: function(){ 67 if ( ! hint.hasContent() ) { 68 $('<div class="'+hint.contentClassName+'" style="width:100%;font-weight:500;margin-top:1em;">'+hint.content+'</div>').prependTo(hint.prependSelector); 69 } 70 }, 71 init: function(){ 72 var intervalID; 73 var i = 1; 74 intervalID = setInterval( function(){ 75 if ( $(hint.prependSelector).length === 1 ) { 76 clearInterval(intervalID); 77 hint.insertContent(); 78 } else { 79 if (i>=10) { 80 clearInterval(intervalID); 81 } 82 } 83 i++; 84 }, 1000); 85 }, 86 start: function(){ 87 if ( ! hint.started ) { 88 hint.init(); 89 $(document).on('click',hint.panelSelector,function(event){ 90 if ( $(hint.prependSelector).length === 1 ) { 91 hint.insertContent(); 92 } 93 }); 94 $(document).on('click', hint.iconSelector, function( event ) { 95 event.stopPropagation(); 96 $(hint.contentToggleSelector).toggleClass('hidden'); 97 }); 98 hint.started = true; 99 } 100 } 101 } 40 102 41 setTimeout( function(){ 42 if ( $('.editor-post-featured-image').length == 1 ) { 43 var hint = '<span style="margin-left:40px;">'+WPGlobusFeaturedImages.i18n['image_for']+': '+WPGlobusFeaturedImages.current_language_name+'</span>'; 44 hint += '<span style="cursor:pointer;">'; 45 hint += '<i class="hint-icon dashicons dashicons-editor-help" style="font-size:large;"></i>'; 46 hint += '</span>'; 47 hint += '<div class="hint-content hidden" style="margin: 0 10px;">'; 48 hint += '<p>'+WPGlobusFeaturedImages.i18n['help_content1'];WPGlobusFeaturedImages.i18n['help_content2']+'</p>'; 49 hint += ' '+WPGlobusFeaturedImages.i18n['help_content2']+'</p>'; 50 hint += '</div>'; 51 $('<div class="wpglobus-featured-images-hint" style="width:100%;font-weight:500;margin-top:1em;">'+hint+'</div>').prependTo('.editor-post-featured-image'); 52 $(document).on('click', '.wpglobus-featured-images-hint .hint-icon', function( event ) { 53 $('.wpglobus-featured-images-hint .hint-content').toggleClass('hidden'); 54 }); 55 } 56 }, 1000); 103 hint.start(); 57 104 } else { 58 105 … … 60 107 var hint = '<span style="margin-left:40px;">'+WPGlobusFeaturedImages.i18n['image_for']+': '+WPGlobusFeaturedImages.current_language_name+'</span>'; 61 108 hint += '<span style="cursor:pointer;">'; 62 hint += '<i class="hint-icon dashicons dashicons-editor-help" style="font-size:large; "></i>';109 hint += '<i class="hint-icon dashicons dashicons-editor-help" style="font-size:large;display:contents;"></i>'; 63 110 hint += '</span>'; 64 hint += '<div class="hint-content hidden" style="margin: 010px;">';65 hint += '<p>'+WPGlobusFeaturedImages.i18n['help_content1'] ;WPGlobusFeaturedImages.i18n['help_content2']+'</p>';66 hint += ' '+WPGlobusFeaturedImages.i18n['help_content2']+'</p>';111 hint += '<div class="hint-content hidden" style="margin: 10px 10px;background-color:rgb(240, 240, 241);padding: 1px 10px;">'; 112 hint += '<p>'+WPGlobusFeaturedImages.i18n['help_content1']+'</p>'; 113 hint += '<p>'+WPGlobusFeaturedImages.i18n['help_content2']+'</p>'; 67 114 hint += '</div>'; 68 115 $('<div class="wpglobus-featured-images-hint" style="width:100%;font-weight:500;margin-top:1em;">'+hint+'</div>').insertAfter('#postimagediv .postbox-header'); -
wpglobus-featured-images/trunk/includes/js/wpglobus-builder-featured-images.min.js
r2569744 r2804890 1 jQuery(document).ready(function( t){"use strict";var e={started:!0,start:function(){e.addImageHint(),e.setTitle()},getCurrentLanguage:function(e){void 0===e&&(e="name");var t="";return"code"==e?t=WPGlobusFeaturedImages.current_language:"name"==e&&(t=WPGlobusFeaturedImages.current_language_name),t},setTitle:function(){},addImageHint:function(){var e;"gutenberg"===WPGlobusFeaturedImages.builderID?setTimeout(function(){var e;1==t(".editor-post-featured-image").length&&(e='<span style="margin-left:40px;">'+WPGlobusFeaturedImages.i18n.image_for+": "+WPGlobusFeaturedImages.current_language_name+"</span>",e+='<span style="cursor:pointer;">',e+='<i class="hint-icon dashicons dashicons-editor-help" style="font-size:large;"></i>',e+="</span>",e+='<div class="hint-content hidden" style="margin: 0 10px;">',e+="<p>"+WPGlobusFeaturedImages.i18n.help_content1,WPGlobusFeaturedImages.i18n.help_content2,e+=" "+WPGlobusFeaturedImages.i18n.help_content2+"</p>",t('<div class="wpglobus-featured-images-hint" style="width:100%;font-weight:500;margin-top:1em;">'+(e+="</div>")+"</div>").prependTo(".editor-post-featured-image"),t(document).on("click",".wpglobus-featured-images-hint .hint-icon",function(e){t(".wpglobus-featured-images-hint .hint-content").toggleClass("hidden")}))},1e3):1==t("#postimagediv .postbox-header").length&&(e='<span style="margin-left:40px;">'+WPGlobusFeaturedImages.i18n.image_for+": "+WPGlobusFeaturedImages.current_language_name+"</span>",e+='<span style="cursor:pointer;">',e+='<i class="hint-icon dashicons dashicons-editor-help" style="font-size:large;"></i>',e+="</span>",e+='<div class="hint-content hidden" style="margin: 0 10px;">',e+="<p>"+WPGlobusFeaturedImages.i18n.help_content1,WPGlobusFeaturedImages.i18n.help_content2,e+=" "+WPGlobusFeaturedImages.i18n.help_content2+"</p>",t('<div class="wpglobus-featured-images-hint" style="width:100%;font-weight:500;margin-top:1em;">'+(e+="</div>")+"</div>").insertAfter("#postimagediv .postbox-header"),t(document).on("click",".wpglobus-featured-images-hint .hint-icon",function(e){t(".wpglobus-featured-images-hint .hint-content").toggleClass("hidden")}))}};WPGlobusFeaturedImages=t.extend({},WPGlobusFeaturedImages,e),WPGlobusFeaturedImages.start()});1 jQuery(document).ready(function(a){"use strict";var e={started:!0,start:function(){e.addImageHint(),e.setTitle()},getCurrentLanguage:function(e){void 0===e&&(e="name");var t="";return"code"==e?t=WPGlobusFeaturedImages.current_language:"name"==e&&(t=WPGlobusFeaturedImages.current_language_name),t},setTitle:function(){},addImageHint:function(){var e,n;"gutenberg"===WPGlobusFeaturedImages.builderID?(e="",e+='<div style="margin:5px 0 10px 40px;">',e+="<span>"+WPGlobusFeaturedImages.i18n.image_for+": "+WPGlobusFeaturedImages.current_language_name+"</span>",e+='<span style="cursor:pointer;">',e+='<i class="hint-icon dashicons dashicons-editor-help" style="font-size:large;display:contents;"></i>',e+="</span>",e+="</div>",e+='<div class="hint-content hidden" style="margin: 10px 10px;background-color:rgb(240, 240, 241);padding: 1px 10px;">',e+="<p>"+WPGlobusFeaturedImages.i18n.help_content2+"</p>",(n={started:!1,panelSelector:".components-panel__body",prependSelector:".editor-post-featured-image",iconSelector:".wpglobus-featured-images-hint .hint-icon",contentClassName:"wpglobus-featured-images-hint",contentToggleSelector:".wpglobus-featured-images-hint .hint-content",content:e+="</div>",hasContent:function(){return 1===a("."+n.contentClassName).length},insertContent:function(){n.hasContent()||a('<div class="'+n.contentClassName+'" style="width:100%;font-weight:500;margin-top:1em;">'+n.content+"</div>").prependTo(n.prependSelector)},init:function(){var e=1,t=setInterval(function(){1===a(n.prependSelector).length?(clearInterval(t),n.insertContent()):10<=e&&clearInterval(t),e++},1e3)},start:function(){n.started||(n.init(),a(document).on("click",n.panelSelector,function(e){1===a(n.prependSelector).length&&n.insertContent()}),a(document).on("click",n.iconSelector,function(e){e.stopPropagation(),a(n.contentToggleSelector).toggleClass("hidden")}),n.started=!0)}}).start()):1==a("#postimagediv .postbox-header").length&&(n='<span style="margin-left:40px;">'+WPGlobusFeaturedImages.i18n.image_for+": "+WPGlobusFeaturedImages.current_language_name+"</span>",n+='<span style="cursor:pointer;">',n+='<i class="hint-icon dashicons dashicons-editor-help" style="font-size:large;display:contents;"></i>',n+="</span>",n+='<div class="hint-content hidden" style="margin: 10px 10px;background-color:rgb(240, 240, 241);padding: 1px 10px;">',n+="<p>"+WPGlobusFeaturedImages.i18n.help_content1+"</p>",n+="<p>"+WPGlobusFeaturedImages.i18n.help_content2+"</p>",a('<div class="wpglobus-featured-images-hint" style="width:100%;font-weight:500;margin-top:1em;">'+(n+="</div>")+"</div>").insertAfter("#postimagediv .postbox-header"),a(document).on("click",".wpglobus-featured-images-hint .hint-icon",function(e){a(".wpglobus-featured-images-hint .hint-content").toggleClass("hidden")}))}};WPGlobusFeaturedImages=a.extend({},WPGlobusFeaturedImages,e),WPGlobusFeaturedImages.start()}); -
wpglobus-featured-images/trunk/languages/wpglobus-featured-images.pot
r2569744 r2804890 1 # Copyright (C) 202 1WPGlobus1 # Copyright (C) 2022 WPGlobus 2 2 # This file is distributed under the GPL2. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: WPGlobus Featured Images 2. 4.0\n"5 "Project-Id-Version: WPGlobus Featured Images 2.5.0\n" 6 6 "Report-Msgid-Bugs-To: https://wpglobus.com/pg/contact-us/\n" 7 "POT-Creation-Date: 202 1-07-22 05:58:39+00:00\n"7 "POT-Creation-Date: 2022-10-26 12:43:19+00:00\n" 8 8 "MIME-Version: 1.0\n" 9 9 "Content-Type: text/plain; charset=utf-8\n" 10 10 "Content-Transfer-Encoding: 8bit\n" 11 "PO-Revision-Date: 202 1-MO-DA HO:MI+ZONE\n"11 "PO-Revision-Date: 2022-MO-DA HO:MI+ZONE\n" 12 12 "Last-Translator: The WPGlobus Team <support@wpglobus.com>\n" 13 13 "Language-Team: The WPGlobus Team <support@wpglobus.com>\n" -
wpglobus-featured-images/trunk/readme.txt
r2569744 r2804890 4 4 Tags: WPGlobus, featured image, bilingual, globalization, i18n, international, l10n, localization, multilanguage, multilingual, translate, translation 5 5 Requires at least: 5.5 6 Tested up to: 5.86 Tested up to: 6.0 7 7 Stable tag: trunk 8 8 License: GPLv2 … … 50 50 51 51 == Changelog == 52 53 = 2.5.0 = 54 * COMPATIBILITY: 55 * WordPress 6 56 * ADDED: 57 * JS scripts improvements. 52 58 53 59 = 2.4.0 = -
wpglobus-featured-images/trunk/wpglobus-featured-images.php
r2569744 r2804890 6 6 * Text Domain: wpglobus-featured-images 7 7 * Domain Path: /languages/ 8 * Version: 2. 4.08 * Version: 2.5.0 9 9 * Author: WPGlobus 10 10 * Author URI: https://wpglobus.com/ … … 12 12 * License: GPL2 13 13 * Credits: Alex Gor (alexgff) and Gregory Karpinsky (tivnet) 14 * Copyright 2015-202 1WPGlobus14 * Copyright 2015-2022 WPGlobus 15 15 * This program is free software; you can redistribute it and/or modify 16 16 * it under the terms of the GNU General Public License, version 2, as … … 30 30 } 31 31 32 define( 'WPGLOBUS_FEATURED_IMAGES_VERSION', '2. 4.0' );32 define( 'WPGLOBUS_FEATURED_IMAGES_VERSION', '2.5.0' ); 33 33 34 34 add_action( 'plugins_loaded', 'wpglobus_featured_images_load', 11 );
Note: See TracChangeset
for help on using the changeset viewer.