Plugin Directory

Changeset 2804890


Ignore:
Timestamp:
10/26/2022 12:59:54 PM (3 years ago)
Author:
alexgff
Message:

Version 2.5.0

Location:
wpglobus-featured-images/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • wpglobus-featured-images/trunk/README.md

    r2569744 r2804890  
    44**Tags:** WPGlobus, featured image, bilingual, globalization, i18n, international, l10n, localization, multilanguage, multilingual, translate, translation 
    55**Requires at least:** 5.5 
    6 **Tested up to:** 5.8
     6**Tested up to:** 6.0
    77**Stable tag:** trunk 
    88**License:** GPLv2 
     
    5252
    5353## Changelog ##
     54
     55### 2.5.0 ###
     56* COMPATIBILITY:
     57    * WordPress 6
     58* ADDED:
     59    * JS scripts improvements.
    5460
    5561### 2.4.0 ###
  • wpglobus-featured-images/trunk/includes/js/wpglobus-builder-featured-images.js

    r2569744 r2804890  
    3838       
    3939            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                }
    40102               
    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 +=     '&nbsp;'+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();
    57104            } else {
    58105           
     
    60107                    var hint = '<span style="margin-left:40px;">'+WPGlobusFeaturedImages.i18n['image_for']+': '+WPGlobusFeaturedImages.current_language_name+'</span>';
    61108                    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>';
    63110                    hint += '</span>';
    64                     hint += '<div class="hint-content hidden" style="margin: 0 10px;">';
    65                     hint +=     '<p>'+WPGlobusFeaturedImages.i18n['help_content1'];WPGlobusFeaturedImages.i18n['help_content2']+'</p>';
    66                     hint +=     '&nbsp;'+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>';
    67114                    hint += '</div>';
    68115                    $('<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+="&nbsp;"+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+="&nbsp;"+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()});
     1jQuery(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) 2021 WPGlobus
     1# Copyright (C) 2022 WPGlobus
    22# This file is distributed under the GPL2.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: WPGlobus Featured Images 2.4.0\n"
     5"Project-Id-Version: WPGlobus Featured Images 2.5.0\n"
    66"Report-Msgid-Bugs-To: https://wpglobus.com/pg/contact-us/\n"
    7 "POT-Creation-Date: 2021-07-22 05:58:39+00:00\n"
     7"POT-Creation-Date: 2022-10-26 12:43:19+00:00\n"
    88"MIME-Version: 1.0\n"
    99"Content-Type: text/plain; charset=utf-8\n"
    1010"Content-Transfer-Encoding: 8bit\n"
    11 "PO-Revision-Date: 2021-MO-DA HO:MI+ZONE\n"
     11"PO-Revision-Date: 2022-MO-DA HO:MI+ZONE\n"
    1212"Last-Translator: The WPGlobus Team <support@wpglobus.com>\n"
    1313"Language-Team: The WPGlobus Team <support@wpglobus.com>\n"
  • wpglobus-featured-images/trunk/readme.txt

    r2569744 r2804890  
    44Tags: WPGlobus, featured image, bilingual, globalization, i18n, international, l10n, localization, multilanguage, multilingual, translate, translation
    55Requires at least: 5.5
    6 Tested up to: 5.8
     6Tested up to: 6.0
    77Stable tag: trunk
    88License: GPLv2
     
    5050
    5151== Changelog ==
     52
     53= 2.5.0 =
     54* COMPATIBILITY:
     55    * WordPress 6
     56* ADDED:
     57    * JS scripts improvements.
    5258
    5359= 2.4.0 =
  • wpglobus-featured-images/trunk/wpglobus-featured-images.php

    r2569744 r2804890  
    66 * Text Domain: wpglobus-featured-images
    77 * Domain Path: /languages/
    8  * Version: 2.4.0
     8 * Version: 2.5.0
    99 * Author: WPGlobus
    1010 * Author URI: https://wpglobus.com/
     
    1212 * License: GPL2
    1313 * Credits: Alex Gor (alexgff) and Gregory Karpinsky (tivnet)
    14  * Copyright 2015-2021 WPGlobus
     14 * Copyright 2015-2022 WPGlobus
    1515 * This program is free software; you can redistribute it and/or modify
    1616 * it under the terms of the GNU General Public License, version 2, as
     
    3030}
    3131
    32 define( 'WPGLOBUS_FEATURED_IMAGES_VERSION', '2.4.0' );
     32define( 'WPGLOBUS_FEATURED_IMAGES_VERSION', '2.5.0' );
    3333
    3434add_action( 'plugins_loaded', 'wpglobus_featured_images_load', 11 );
Note: See TracChangeset for help on using the changeset viewer.