Plugin Directory

Changeset 3166084


Ignore:
Timestamp:
10/09/2024 06:03:45 PM (16 months ago)
Author:
ovakarelov
Message:

Version 1.2.0 added

Location:
ia-magic-galleries
Files:
93 added
23 edited

Legend:

Unmodified
Added
Removed
  • ia-magic-galleries/trunk/IAMagic-galleries.php

    r3123394 r3166084  
    99Plugin URI: https://iaesth.ca/wp/
    1010Description: The plugin facilitates the integration of the IA Magic Galleries system into the WordPress environment.
    11 Version: 1.1.5
     11Version: 1.2.0
    1212Author: Information Aesthetics
    1313Author URI: https://iaesth.ca
     
    4747
    4848
    49     define("IAMG_VERSION", '1.1.5');
     49    define("IAMG_VERSION", '1.2.0');
    5050    define("IAMG_API_URL", "https://iaesth.ca/apps/IAMG/com");
    5151    define("IAMG_API_URL_BACKUP", "https://infoaesthetics.ca/apps/IAMG/com");
  • ia-magic-galleries/trunk/README.txt

    r3122253 r3166084  
    44Requires at least: 5.8
    55Tested up to: 6.6
    6 Stable tag: 1.1.5
     6Stable tag: 1.2.0
    77License: GPLv2 or later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    7474
    7575== Changelog ==
     76= 1.2.0 =
     77- New Features:
     78    - Adding titles to images in the gallery
     79    - Adding url links to images in the gallery
     80- Bug Fixes:
     81    - Fixed uses with plugin update, which caused the IA Presenter app not to update automatically, and required a manual reactivation to update the app.
     82    - other minor bug fixes
    7683= 1.1.5 =
    7784- Bug Fixes:
  • ia-magic-galleries/trunk/css/ia_designer_general.css

    r3098209 r3166084  
    4848
    4949.IA_Designer_Container, .IA_Presenter_Container {
     50    position: relative;
    5051    background-color: #f8f8f8;
    5152    /*background-color: #ffffff;*/
     
    5657    top: 0;
    5758    z-index: 100;
     59}
     60
     61.IA_Designer_Preamble{
     62    z-index: 99;
     63}
     64
     65.IA_Designer_Postamble{
     66    z-index: 101;
    5867}
    5968
     
    441450    cursor: default;
    442451}
     452
     453.IA_Designer_Inactive_Button{
     454    cursor: auto !important;
     455}
  • ia-magic-galleries/trunk/css/ia_presenter_admin.css

    r3122253 r3166084  
    2626    margin-bottom: -40px !important;
    2727}
     28
     29.IAMG_link_title{
     30    font-weight: bold;
     31}
     32
     33.IAMG_Admin_Font{
     34    font-family: 'Jaldi', sans-serif;
     35}
     36
    2837/* devanagari */
    2938@font-face {
  • ia-magic-galleries/trunk/css/ia_presenter_admin.min.css

    r3122253 r3166084  
    1 .IA_Designer_Panel_Background{fill-opacity:0}[data-disable-border]:focus::after{box-shadow:none!important}.IAMG_Layout_FullWidth{width:100%}.IAMG_Layout_HalfWidth{width:50%}.IAMG_Layout_ButtHeight{min-height:36px!important}.IAMG_Layout_FlexRow{display:flex;flex-direction:row;margin-bottom:-40px!important}@font-face{font-family:Jaldi;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/jaldi/v12/or3sQ67z0_CI33NSbJHPBw.woff2) format('woff2');unicode-range:U+0900-097F,U+1CD0-1CF6,U+1CF8-1CF9,U+200C-200D,U+20A8,U+20B9,U+25CC,U+A830-A839,U+A8E0-A8FB}@font-face{font-family:Jaldi;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/jaldi/v12/or3sQ67z0_CI33NdbJHPBw.woff2) format('woff2');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Jaldi;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/jaldi/v12/or3sQ67z0_CI33NTbJE.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Jaldi-Regular;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/jaldi/v12/or3sQ67z0_CI33NSbJHPBw.woff2) format('woff2');unicode-range:U+0900-097F,U+1CD0-1CF6,U+1CF8-1CF9,U+200C-200D,U+20A8,U+20B9,U+25CC,U+A830-A839,U+A8E0-A8FB}@font-face{font-family:Jaldi-Regular;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/jaldi/v12/or3sQ67z0_CI33NdbJHPBw.woff2) format('woff2');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Jaldi-Regular;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/jaldi/v12/or3sQ67z0_CI33NTbJE.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
     1.IA_Designer_Panel_Background{fill-opacity:0}[data-disable-border]:focus::after{box-shadow:none!important}.IAMG_Layout_FullWidth{width:100%}.IAMG_Layout_HalfWidth{width:50%}.IAMG_Layout_ButtHeight{min-height:36px!important}.IAMG_Layout_FlexRow{display:flex;flex-direction:row;margin-bottom:-40px!important}.IAMG_link_title{font-weight:700}.IAMG_Admin_Font{font-family:Jaldi,sans-serif}@font-face{font-family:Jaldi;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/jaldi/v12/or3sQ67z0_CI33NSbJHPBw.woff2) format('woff2');unicode-range:U+0900-097F,U+1CD0-1CF6,U+1CF8-1CF9,U+200C-200D,U+20A8,U+20B9,U+25CC,U+A830-A839,U+A8E0-A8FB}@font-face{font-family:Jaldi;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/jaldi/v12/or3sQ67z0_CI33NdbJHPBw.woff2) format('woff2');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Jaldi;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/jaldi/v12/or3sQ67z0_CI33NTbJE.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Jaldi-Regular;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/jaldi/v12/or3sQ67z0_CI33NSbJHPBw.woff2) format('woff2');unicode-range:U+0900-097F,U+1CD0-1CF6,U+1CF8-1CF9,U+200C-200D,U+20A8,U+20B9,U+25CC,U+A830-A839,U+A8E0-A8FB}@font-face{font-family:Jaldi-Regular;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/jaldi/v12/or3sQ67z0_CI33NdbJHPBw.woff2) format('woff2');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Jaldi-Regular;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/jaldi/v12/or3sQ67z0_CI33NTbJE.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
  • ia-magic-galleries/trunk/includes/IAMG_Activation.php

    r3123394 r3166084  
    160160//                IAMG_AdminNotice::display_notice(json_encode($result));
    161161
     162                $redirect = true;
     163
    162164                if (!$result["success"]) {
    163165//                    IAMG_AdminNotice::display_notice("A notice here using display notice5");
    164                     $this->end_activation(
     166                   $redirect = $this->end_activation(
    165167                        $result["error"]
    166168                    );
     
    172174                        'ia-magic-galleries');
    173175                    IAMG_AdminNotice::display_notice($message, IAMG_AdminNotice::WARNING);
    174                 }
    175             } else{
     176                    $redirect = true;
     177                }
     178
     179                if ($redirect) {
     180                    $this->redirect_to_overview_page();
     181                }
     182
     183            } else {
    176184                //check for updates
    177185                new IAMG_GalleryUpdate();
     
    180188            //for future use
    181189            if ($first_after_activation) {
    182 //                AdminNotice::display_notice("A notice here using display notice4");
     190//                IAMG_AdminNotice::display_notice("A notice here using display notice4");
    183191                delete_option('_iamg_activated_plugin');
    184 
    185 //                $result = $this->first_register();
    186 //                add_option('_iamg_activation_plugin_start_fist_activation', $result);
    187 //                if (!$result["success"]) {
    188 //                    $message = "The plugin could not register with the Information Aesthetics servers. Please contact the [email protected] for assistance.";
    189 //                    $this->end_activation($message);
    190 //                }
    191192            }
    192193        } else {
     
    194195            new IAMG_GalleryUpdate();
    195196        }
     197    }
     198
     199    // Add the following function
     200    public function redirect_to_overview_page()
     201    {
     202        $redirect_url = admin_url('edit.php?post_type=iamg&page=iamg-overview-page');
     203        wp_redirect($redirect_url);
     204        exit;
    196205    }
    197206
  • ia-magic-galleries/trunk/includes/IAMG_App_Loader.php

    r3122253 r3166084  
    173173            IAMG_VERSION, 'in_footer');
    174174
     175        wp_register_script('save-monitor', IAMG_URL . $this->script_selector('js/save_monitor'), array(),
     176            IAMG_VERSION, 'in_footer');
     177
    175178        //A very small script that boots IAPresenter_loader with the localized settings.
    176179        wp_enqueue_script(
    177180            'IAPresenter_boot',
    178181            IAMG_URL . $this->script_selector('js/boot_iamg_post_admin'),
    179             array('jquery', 'lz-string', 'IAPresenter_loader'),
     182            array('jquery', 'lz-string', 'save-monitor', 'IAPresenter_loader'),
    180183            IAMG_VERSION, 'in_footer'
    181184        );
     
    453456            );
    454457            wp_enqueue_style(
    455                 'iamg-def-styles',
     458                'iamg-def-styles_pres',
    456459                IAMG_URL . 'css/ia_presenter_general.css',
    457460                [], IAMG_VERSION
  • ia-magic-galleries/trunk/includes/IAMG_ComDispatcher.php

    r3122253 r3166084  
    423423        }
    424424
    425         $links = $this->_get_param("links");
    426 
    427         if ($links && !is_array($links)) {
    428             return ['error' => 'Invalid Links'];
    429         }
    430 
    431425        $imageHandler = new IAMG_ImageHandler("all");
    432426
    433         $image_info = $imageHandler->get_for_gallery($images, $links);
     427        $image_info = $imageHandler->get_for_gallery($images);
    434428
    435429        $settings["type"] = $type;
     
    441435
    442436        $gallery = (new IAMG_Client())->get_gallery($settings);
    443 
    444437
    445438        $result = [];
  • ia-magic-galleries/trunk/includes/block/IAMG_Block.php

    r3098209 r3166084  
    4040            wp_register_script("IAPresenter_loader", IAMG_URL . $this->script_selector('js/iaPresenter_loader'),
    4141                array(), IAMG_VERSION, 'in_footer');
     42            wp_register_script('save-monitor', IAMG_URL . $this->script_selector('js/save_monitor'), array(),
     43                IAMG_VERSION, 'in_footer');
    4244            wp_enqueue_script(
    4345                'iamg-block-script',
    4446                IAMG_URL . $this->script_selector('js/iamg-block'),
    45                 array('wp-blocks', 'wp-i18n', 'wp-editor', 'jquery', 'lz-string', 'IAPresenter_loader'),
     47                array('wp-blocks', 'wp-i18n', 'wp-editor', 'jquery', 'lz-string', 'IAPresenter_loader', 'save-monitor'),
    4648                IAMG_VERSION, 'in_footer'
    4749            );
     
    102104        }
    103105
    104         private function script_selector($name)
     106        private function script_selector($name, $force_full = false)
    105107        {
    106             if (self::USE_MINIFIED) {
     108            if (self::USE_MINIFIED && !$force_full) {
    107109                return $name . ".min.js";
    108110            } else {
  • ia-magic-galleries/trunk/js/boot_iamg.min.js

    r3123394 r3166084  
    1 /*! ia-designer 22-07-2024
    2 Copyright © 2023 Information Aesthetics. All rights reserved.
     1/*! ia-designer 09-10-2024
     2Copyright © 2024 Information Aesthetics. All rights reserved.
    33This work is licensed under the GPL2, V2/ license.*/
    44
  • ia-magic-galleries/trunk/js/boot_iamg_cache.min.js

    r3123394 r3166084  
    1 /*! ia-designer 22-07-2024
    2 Copyright © 2023 Information Aesthetics. All rights reserved.
     1/*! ia-designer 09-10-2024
     2Copyright © 2024 Information Aesthetics. All rights reserved.
    33This work is licensed under the GPL2, V2/ license.*/
    44
  • ia-magic-galleries/trunk/js/boot_iamg_post_admin.js

    r3098209 r3166084  
    1616        const __ = wp.i18n.__;
    1717
    18         // console.log("In Boot Script", iamg_settings)
     18        console.log("In Boot Script", iamg_settings)
    1919
    2020        let current_location = window.location.href;
     
    8989                                id: title + "_" + originalRequestedImage.id,
    9090                                url: best_url(image_info[i]),
    91                                 title: title
     91                                title: title,
     92                                data: originalRequestedImage.data
    9293                            });
    9394                            break;
  • ia-magic-galleries/trunk/js/boot_iamg_post_admin.min.js

    r3123394 r3166084  
    1 /*! ia-designer 22-07-2024
    2 Copyright © 2023 Information Aesthetics. All rights reserved.
     1/*! ia-designer 09-10-2024
     2Copyright © 2024 Information Aesthetics. All rights reserved.
    33This work is licensed under the GPL2, V2/ license.*/
    44
    5 window.addEventListener("load",function(){let e;const t=wp.i18n.__;let i=window.location.href,l=i.includes("post-new.php"),s=document.getElementById("save-post"),n=document.getElementsByName("publish")[0];l&&(n&&(n.disabled=!0),s&&(s.disabled=!0));const o=()=>{function o(e){if(e.thumbnail&&e.thumbnail.url)return e.thumbnail.url;let t=e.sizes,i="",l=0;for(let e,s=0;s<t.length;s++)e=t[s],(0===l||e[1][0]<l)&&(l=e[1][0],i=e[0]);return i||(e.download?e.download:"")}eve_ia.on(["ia","gui","created"],function(t){let i=document.getElementsByClassName("iamg-loading-gif")[0];i&&i.remove(),this.eve.once(["presenter","loaded"],function(t){let i=iamg_settings.gallery_properties;if(e=iamg_settings.id,!i.type)return;const l=i.type;let s=i.images||[];const n=i.requested_images||[],r=i.resource;let a,d;for(let e in i)i.hasOwnProperty(e)&&e.startsWith(l)&&((a=a||{})[e]=i[e]);d=function(e,t){const i=[];let l=t.length;for(let s,n=0;n<e.length;n++){s=e[n].title;for(let r=0;r<l;r++){let a=t[(n+r)%l];if(s===a.title){i.push({id:s+"_"+a.id,url:o(e[n]),title:s});break}}}return i}(s,n),t.eve(["iamg","load_gallery_setup"],void 0,l,d,a,r)}.bind(void 0,this))(100)}),eve_ia.on(["global","iamg","gallery","save"],function(e){const o=this;let r=document.getElementsByName("post_title")[0].value;if(!r)return void o.eve("gui.alert",t("Please, enter gallery title")+".",[200,100],[t("OK")]);const a={command:"save",locator:e,title:r,post_id:iamg_settings.post_id,is_gallery_post:!0};o.comManager.wpCommand(a,function(e){let r={margin:{top:10,bottom:5,left:10,right:5}};if(e.error)return o.eve("gui.alert",t("Gallery was not saved successfully")+".",[220,70],[t("OK")],[],r),o.eve("gui.error",e.error),n&&(n.disabled=!1),void(s&&(s.disabled=!1));o.eve("gui.alert",t("Gallery is saved successfully")+".",[200,70],[t("OK")],[function(){l&&(i=i.replace(/post-new\.php.*/,"post.php?post="+iamg_settings.post_id+"&action=edit"),s&&(s.disabled=!1),s.click())}],r),n&&(n.disabled=!1)},function(e){o.eve("gui.error",t("Server Error Occurred"))})})};window.IA_Presenter_loader&&IA_Presenter_loader(iamg_settings.settings,void 0,iamg_settings.resources,{after_callback:o,post_scripts:["media_upload.min.js"]})});
     5window.addEventListener("load",function(){let e;const t=wp.i18n.__;let i=window.location.href,l=i.includes("post-new.php"),s=document.getElementById("save-post"),n=document.getElementsByName("publish")[0];l&&(n&&(n.disabled=!0),s&&(s.disabled=!0));const o=()=>{function o(e){if(e.thumbnail&&e.thumbnail.url)return e.thumbnail.url;let t=e.sizes,i="",l=0;for(let e,s=0;s<t.length;s++)e=t[s],(0===l||e[1][0]<l)&&(l=e[1][0],i=e[0]);return i||(e.download?e.download:"")}eve_ia.on(["ia","gui","created"],function(t){let i=document.getElementsByClassName("iamg-loading-gif")[0];i&&i.remove(),this.eve.once(["presenter","loaded"],function(t){let i=iamg_settings.gallery_properties;if(e=iamg_settings.id,!i.type)return;const l=i.type;let s=i.images||[];const n=i.requested_images||[],r=i.resource;let a,d;for(let e in i)i.hasOwnProperty(e)&&e.startsWith(l)&&((a=a||{})[e]=i[e]);d=function(e,t){const i=[];let l=t.length;for(let s,n=0;n<e.length;n++){s=e[n].title;for(let r=0;r<l;r++){let a=t[(n+r)%l];if(s===a.title){i.push({id:s+"_"+a.id,url:o(e[n]),title:s,data:a.data});break}}}return i}(s,n),t.eve(["iamg","load_gallery_setup"],void 0,l,d,a,r)}.bind(void 0,this))(100)}),eve_ia.on(["global","iamg","gallery","save"],function(e){const o=this;let r=document.getElementsByName("post_title")[0].value;if(!r)return void o.eve("gui.alert",t("Please, enter gallery title")+".",[200,100],[t("OK")]);const a={command:"save",locator:e,title:r,post_id:iamg_settings.post_id,is_gallery_post:!0};o.comManager.wpCommand(a,function(e){let r={margin:{top:10,bottom:5,left:10,right:5}};if(e.error)return o.eve("gui.alert",t("Gallery was not saved successfully")+".",[220,70],[t("OK")],[],r),o.eve("gui.error",e.error),n&&(n.disabled=!1),void(s&&(s.disabled=!1));o.eve("gui.alert",t("Gallery is saved successfully")+".",[200,70],[t("OK")],[function(){l&&(i=i.replace(/post-new\.php.*/,"post.php?post="+iamg_settings.post_id+"&action=edit"),s&&(s.disabled=!1),s.click())}],r),n&&(n.disabled=!1)},function(e){o.eve("gui.error",t("Server Error Occurred"))})})};window.IA_Presenter_loader&&IA_Presenter_loader(iamg_settings.settings,void 0,iamg_settings.resources,{after_callback:o,post_scripts:["media_upload.min.js"]})});
  • ia-magic-galleries/trunk/js/iaPresenter_loader.js

    r3122253 r3166084  
    432432    }
    433433
    434     let $pk = /**PK*/"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAugykYVXRecEa245A+LIfKCn/kumGQhZCPh0+Fe6WHt++rN6o1nojyxuKBG3wSJgB06lNOrSG3+Jv2jwtqK2QqhIVknIRz0HEFW9fYUunb/DW8tdpLTnqz70Bxq45t49D6/dFMhtiiJPpL52KKFjAgL8i3hJU6nlWFiSEjUVFyJ1/9EIE6NAhhR1E76L2mVvhVHIxx/GDhiPSOCgY5RMoIOj4QDEQdLLgOKzi/MMFhSKbhWkw29Kq1aXHRVeRJx+HbCS/3H5v6yNZSR3l3dnZ6+KrJiRIM4NIc/QfMO0TI364C77yAc2Q/YR7UTrvEzmn3jY2P8F0b5O4FkRRaqQUcQIDAQAB"/**PK*/;
     434    let $pk = /**PK*/"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxV0qIc22UYqKRRO7jAOyWHeh7EdfLnI8iwzbwlYkKM53qyFUhjrCW+C6F6t2Bh5GAWEMcBXVdug40SpntaCsyOrtw00qO/iguykIWCpnZFXmTI6rvHQRsewcVpuM+2tecyakyoQaKutXvzb1cJuf45QmFoxI8ixnScZOz39jymMtC0ezlnD/uUcY7A+MWFIvN1AMkYMYRVxNyNE62JxSZDDqLdkj49+vFTh/cH44pK2y5k1wYqwts4JXYYlVYTBcyMO4XG4Gu3bX/3pRyz9vvfTQ8Ei+YYfrCCzfQR2/fAm0BbMVvmKovfLeVjovv+735Na2MwIdJpub/65hd4oYuQIDAQAB"/**PK*/;
    435435
    436436    async function load_secure_scripts(scripts, defer) {
  • ia-magic-galleries/trunk/js/iaPresenter_loader.min.js

    r3123394 r3166084  
    1 /*! ia-designer 22-07-2024
    2 Copyright © 2023 Information Aesthetics. All rights reserved.
     1/*! ia-designer 09-10-2024
     2Copyright © 2024 Information Aesthetics. All rights reserved.
    33This work is licensed under the GPL2, V2/ license.*/
    44
    5 var IA_Presenter_loader=function(t){var e=[["dist/mousetrap.min.js",function(){return window.hasOwnProperty("Mousetrap")}],["dist/simple-statistics.min.js",function(){return window.hasOwnProperty("ss")&&ss.hasOwnProperty("linearRegression")}],["dist/math.min.js",function(){return window.hasOwnProperty("math")&&math.hasOwnProperty("eval")}],["dist/minify.json.min.js",function(){return JSON.hasOwnProperty("minify")}]],r=[],i=!1,n={},o={},s=0;function a(t,e,r,n){if("object"==typeof r&&(n=r,r=""),r=r||"",n=n||{},e=e||"js",!n.load_condition||"function"!=typeof n.load_condition||n.load_condition())if(i)i.push([t,e,r,n]);else{if(i=[],t.pre_scripts&&(n.pre_scripts=t.pre_scripts,delete t.pre_scripts),t.post_scripts&&(n.post_scripts=t.post_scripts,delete t.post_scripts),n.load_only)return p(n,r,f.bind(void 0,n,r));p(n,r,function(){if("function"==typeof t)t(),f(n,r);else if("string"==typeof t)switch(e){case"js":jQuery.getScript(t).done(function(){f(n,r)}).fail(y);break;case"json":jQuery.get(t,function(){},"text").done(t=>{a(t),f(n,r)}).fail(y)}else"object"==typeof t&&t.panel_setting&&(a(t),f(n,r))})}function a(t){if((t="object"==typeof t?t:JSON.parse(JSON.minify(t))).html_tab_id)o[t.html_tab_id]||(e(t.html_tab_id,t),o[t.html_tab_id]=!0);else{let r=document.querySelector('iframe[name="editor-canvas"]'),i=r?r.contentDocument||r.contentWindow.document:null,n=jQuery(".IA_Designer_Container, .IA_Presenter_Container").toArray();if(i){let t=jQuery(i).find(".IA_Presenter_Container").toArray();n=n.concat(t),Snap_ia.setWindow(r.contentWindow)}if(!n.length)return;let a=0;n.forEach(function(r){let n;if(i&&i.contains(r)&&(n=i),r=Snap_ia(r),t.container_filter&&"function"==typeof t.container_filter&&!t.container_filter(r))return;t.pre_process_container&&"function"==typeof t.pre_process_container&&t.pre_process_container(r);let c=r.attr("id");if(c||(c="IA_Designer_Container_gui"+s++,r.attr("id",c)),!o[c]){const i=r.select("svg");let s;if(i){const e=i.node.outerHTML;t.initial_graphics={svg:e},e.remove()}else if(s=r.attr("presentation"))if(s.startsWith("base64:")){let e=LZString.decompressFromBase64(s.slice(7));e||(e=atob(s.slice(7))),t.initial_graphics={svg:e},r.attr("presentation","")}else s.startsWith("http")&&(t.initial_graphics=s);t.html_tab_id=c,setTimeout(e.bind(void 0,c,Object.assign({},t),n),a),a+=200,o[c]=!0}})}function e(t,e,r){let i;(i=e.initial_graphics)&&delete e.initial_graphics;var n=IA_Designer.createInterface(t,e,r);const o=(r=r||window.document).defaultView.getComputedStyle(r.body,null).getPropertyValue("background-color");n.div_container.setStyle({background:o}),i?"string"==typeof i?n.openGraphics(i,c):"object"==typeof i&&i.hasOwnProperty("svg")&&(n.loadGraphicsFromString(i.svg),c(n)):c(n)}}}var c=function(t){};function p(t,r,i){if(t.after_callback){let e=i;i=function(){e&&e(),t.after_callback()}}if(window.IA_Designer||!window.jQuery)return i&&i();var n=e;t.pre_scripts&&(Array.isArray(t.pre_scripts)||(t.pre_scripts=[t.pre_scripts]),n=[...t.pre_scripts,...n]);var o=function(t,e,r){const i=jQuery.Deferred();if(r){let r=!1;if(e&&"string"==typeof e){let n=localStorage.getItem(e);n&&(n=JSON.parse(n)).url===t&&n.data&&(u(n.data,i),r=!0)}!r&&jQuery.getJSON(t,function(r){e&&localStorage.setItem(e,JSON.stringify({url:t,data:r})),u(r,i)})}else jQuery.getScript(t).done(function(t,e){i.resolve()});return i.promise()},s=[];jQuery.ajaxSetup({cache:!0}),n.forEach(function(t){let e=!1;if(Array.isArray(t)){if("function"==typeof t[1]&&t[1]())return;t=t[0]}"string"==typeof t&&(t=t.startsWith("http")?t:r+t,s.push(o(t))),"object"==typeof t&&t.encrypted&&(e=t.cache||!1,t=(t=t.url).startsWith("http")?t:r+t,s.push(o(t,e,!0)))});var a=jQuery.when.apply($,s);i&&a.done(i)}function f(t,e){if("string"==typeof t&&(e=t,t={}),t.post_scripts&&("string"==typeof t.post_scripts&&(t.post_scripts=t.post_scripts.split(",")),r=r.concat(t.post_scripts)),t.crypto&&r.push("dist/ia_md5.min.js"),r.forEach(function(t){if("object"==typeof t&&(t.ES6||t.ES6)&&(t=supportsES6?t.ES6||"":t.ES5||""),t){if(Array.isArray(t)){if("function"==typeof t[1]&&t[1]())return;if("string"==typeof t[1]&&window.hasOwnProperty(t[1]))return;t=t[0]}t=e+t.trim(),n[t]||(n[t]=!0,jQuery.getScript(t,function(){}))}}),jQuery.ajaxSetup({cache:!1}),i.length){i.forEach(t=>{a.apply(void 0,t)})}i=void 0}let l="MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAugykYVXRecEa245A+LIfKCn/kumGQhZCPh0+Fe6WHt++rN6o1nojyxuKBG3wSJgB06lNOrSG3+Jv2jwtqK2QqhIVknIRz0HEFW9fYUunb/DW8tdpLTnqz70Bxq45t49D6/dFMhtiiJPpL52KKFjAgL8i3hJU6nlWFiSEjUVFyJ1/9EIE6NAhhR1E76L2mVvhVHIxx/GDhiPSOCgY5RMoIOj4QDEQdLLgOKzi/MMFhSKbhWkw29Kq1aXHRVeRJx+HbCS/3H5v6yNZSR3l3dnZ6+KrJiRIM4NIc/QfMO0TI364C77yAc2Q/YR7UTrvEzmn3jY2P8F0b5O4FkRRaqQUcQIDAQAB";async function u(t,e){if(!Array.isArray(t))return void e.reject();function r(t){const e=new ArrayBuffer(t.length),r=new Uint8Array(e);for(let e=0,i=t.length;e<i;e++)r[e]=t.charCodeAt(e);return e}const i=r(atob(l)),n=await crypto.subtle.importKey("spki",i,{name:"RSASSA-PKCS1-v1_5",hash:"SHA-256"},!1,["verify"]);let o=await Promise.all(t.map(async(t,i)=>{let o=t.data,s=t.sign;if(!o||!s)return;if(await crypto.subtle.verify({name:"RSASSA-PKCS1-v1_5"},n,r(atob(s)),r(o))){let t=LZString.decompressFromBase64(o);if(t||(t=atob(o)),t)return t}return e.reject(),Promise.reject()}));o&&(o=o.filter(Boolean)).length===t.length&&(o.forEach(t=>{Function('"use strict"; '+t)()}),e.resolve())}function y(t,e){}return a.loadLibrariesOnly=function(t){p({},t=t||"",function(){f(t)})},a}(window);
     5var IA_Presenter_loader=function(t){var e=[["dist/mousetrap.min.js",function(){return window.hasOwnProperty("Mousetrap")}],["dist/simple-statistics.min.js",function(){return window.hasOwnProperty("ss")&&ss.hasOwnProperty("linearRegression")}],["dist/math.min.js",function(){return window.hasOwnProperty("math")&&math.hasOwnProperty("eval")}],["dist/minify.json.min.js",function(){return JSON.hasOwnProperty("minify")}]],r=[],i=!1,n={},o={},s=0;function a(t,e,r,n){if("object"==typeof r&&(n=r,r=""),r=r||"",n=n||{},e=e||"js",!n.load_condition||"function"!=typeof n.load_condition||n.load_condition())if(i)i.push([t,e,r,n]);else{if(i=[],t.pre_scripts&&(n.pre_scripts=t.pre_scripts,delete t.pre_scripts),t.post_scripts&&(n.post_scripts=t.post_scripts,delete t.post_scripts),n.load_only)return p(n,r,f.bind(void 0,n,r));p(n,r,function(){if("function"==typeof t)t(),f(n,r);else if("string"==typeof t)switch(e){case"js":jQuery.getScript(t).done(function(){f(n,r)}).fail(y);break;case"json":jQuery.get(t,function(){},"text").done(t=>{a(t),f(n,r)}).fail(y)}else"object"==typeof t&&t.panel_setting&&(a(t),f(n,r))})}function a(t){if((t="object"==typeof t?t:JSON.parse(JSON.minify(t))).html_tab_id)o[t.html_tab_id]||(e(t.html_tab_id,t),o[t.html_tab_id]=!0);else{let r=document.querySelector('iframe[name="editor-canvas"]'),i=r?r.contentDocument||r.contentWindow.document:null,n=jQuery(".IA_Designer_Container, .IA_Presenter_Container").toArray();if(i){let t=jQuery(i).find(".IA_Presenter_Container").toArray();n=n.concat(t),Snap_ia.setWindow(r.contentWindow)}if(!n.length)return;let a=0;n.forEach(function(r){let n;if(i&&i.contains(r)&&(n=i),r=Snap_ia(r),t.container_filter&&"function"==typeof t.container_filter&&!t.container_filter(r))return;t.pre_process_container&&"function"==typeof t.pre_process_container&&t.pre_process_container(r);let c=r.attr("id");if(c||(c="IA_Designer_Container_gui"+s++,r.attr("id",c)),!o[c]){const i=r.select("svg");let s;if(i){const e=i.node.outerHTML;t.initial_graphics={svg:e},e.remove()}else if(s=r.attr("presentation"))if(s.startsWith("base64:")){let e=LZString.decompressFromBase64(s.slice(7));e||(e=atob(s.slice(7))),t.initial_graphics={svg:e},r.attr("presentation","")}else s.startsWith("http")&&(t.initial_graphics=s);t.html_tab_id=c,setTimeout(e.bind(void 0,c,Object.assign({},t),n),a),a+=200,o[c]=!0}})}function e(t,e,r){let i;(i=e.initial_graphics)&&delete e.initial_graphics;var n=IA_Designer.createInterface(t,e,r);const o=(r=r||window.document).defaultView.getComputedStyle(r.body,null).getPropertyValue("background-color");n.div_container.setStyle({background:o}),i?"string"==typeof i?n.openGraphics(i,c):"object"==typeof i&&i.hasOwnProperty("svg")&&(n.loadGraphicsFromString(i.svg),c(n)):c(n)}}}var c=function(t){};function p(t,r,i){if(t.after_callback){let e=i;i=function(){e&&e(),t.after_callback()}}if(window.IA_Designer||!window.jQuery)return i&&i();var n=e;t.pre_scripts&&(Array.isArray(t.pre_scripts)||(t.pre_scripts=[t.pre_scripts]),n=[...t.pre_scripts,...n]);var o=function(t,e,r){const i=jQuery.Deferred();if(r){let r=!1;if(e&&"string"==typeof e){let n=localStorage.getItem(e);n&&(n=JSON.parse(n)).url===t&&n.data&&(l(n.data,i),r=!0)}!r&&jQuery.getJSON(t,function(r){e&&localStorage.setItem(e,JSON.stringify({url:t,data:r})),l(r,i)})}else jQuery.getScript(t).done(function(t,e){i.resolve()});return i.promise()},s=[];jQuery.ajaxSetup({cache:!0}),n.forEach(function(t){let e=!1;if(Array.isArray(t)){if("function"==typeof t[1]&&t[1]())return;t=t[0]}"string"==typeof t&&(t=t.startsWith("http")?t:r+t,s.push(o(t))),"object"==typeof t&&t.encrypted&&(e=t.cache||!1,t=(t=t.url).startsWith("http")?t:r+t,s.push(o(t,e,!0)))});var a=jQuery.when.apply($,s);i&&a.done(i)}function f(t,e){if("string"==typeof t&&(e=t,t={}),t.post_scripts&&("string"==typeof t.post_scripts&&(t.post_scripts=t.post_scripts.split(",")),r=r.concat(t.post_scripts)),t.crypto&&r.push("dist/ia_md5.min.js"),r.forEach(function(t){if("object"==typeof t&&(t.ES6||t.ES6)&&(t=supportsES6?t.ES6||"":t.ES5||""),t){if(Array.isArray(t)){if("function"==typeof t[1]&&t[1]())return;if("string"==typeof t[1]&&window.hasOwnProperty(t[1]))return;t=t[0]}t=e+t.trim(),n[t]||(n[t]=!0,jQuery.getScript(t,function(){}))}}),jQuery.ajaxSetup({cache:!1}),i.length){i.forEach(t=>{a.apply(void 0,t)})}i=void 0}let u="MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxV0qIc22UYqKRRO7jAOyWHeh7EdfLnI8iwzbwlYkKM53qyFUhjrCW+C6F6t2Bh5GAWEMcBXVdug40SpntaCsyOrtw00qO/iguykIWCpnZFXmTI6rvHQRsewcVpuM+2tecyakyoQaKutXvzb1cJuf45QmFoxI8ixnScZOz39jymMtC0ezlnD/uUcY7A+MWFIvN1AMkYMYRVxNyNE62JxSZDDqLdkj49+vFTh/cH44pK2y5k1wYqwts4JXYYlVYTBcyMO4XG4Gu3bX/3pRyz9vvfTQ8Ei+YYfrCCzfQR2/fAm0BbMVvmKovfLeVjovv+735Na2MwIdJpub/65hd4oYuQIDAQAB";async function l(t,e){if(!Array.isArray(t))return void e.reject();function r(t){const e=new ArrayBuffer(t.length),r=new Uint8Array(e);for(let e=0,i=t.length;e<i;e++)r[e]=t.charCodeAt(e);return e}const i=r(atob(u)),n=await crypto.subtle.importKey("spki",i,{name:"RSASSA-PKCS1-v1_5",hash:"SHA-256"},!1,["verify"]);let o=await Promise.all(t.map(async(t,i)=>{let o=t.data,s=t.sign;if(!o||!s)return;if(await crypto.subtle.verify({name:"RSASSA-PKCS1-v1_5"},n,r(atob(s)),r(o))){let t=LZString.decompressFromBase64(o);if(t||(t=atob(o)),t)return t}return e.reject(),Promise.reject()}));o&&(o=o.filter(Boolean)).length===t.length&&(o.forEach(t=>{Function('"use strict"; '+t)()}),e.resolve())}function y(t,e){}return a.loadLibrariesOnly=function(t){p({},t=t||"",function(){f(t)})},a}(window);
  • ia-magic-galleries/trunk/js/iamg-block.min.js

    r3123394 r3166084  
    1 /*! ia-designer 22-07-2024
    2 Copyright © 2023 Information Aesthetics. All rights reserved.
     1/*! ia-designer 09-10-2024
     2Copyright © 2024 Information Aesthetics. All rights reserved.
    33This work is licensed under the GPL2, V2/ license.*/
    44
  • ia-magic-galleries/trunk/js/iamg_helper.min.js

    r3123394 r3166084  
    1 /*! ia-designer 22-07-2024
    2 Copyright © 2023 Information Aesthetics. All rights reserved.
     1/*! ia-designer 09-10-2024
     2Copyright © 2024 Information Aesthetics. All rights reserved.
    33This work is licensed under the GPL2, V2/ license.*/
    44
  • ia-magic-galleries/trunk/js/media_upload.min.js

    r3123394 r3166084  
    1 /*! ia-designer 22-07-2024
    2 Copyright © 2023 Information Aesthetics. All rights reserved.
     1/*! ia-designer 09-10-2024
     2Copyright © 2024 Information Aesthetics. All rights reserved.
    33This work is licensed under the GPL2, V2/ license.*/
    44
  • ia-magic-galleries/trunk/js/parent_style_setter.min.js

    r3123394 r3166084  
    1 /*! ia-designer 22-07-2024
    2 Copyright © 2023 Information Aesthetics. All rights reserved.
     1/*! ia-designer 09-10-2024
     2Copyright © 2024 Information Aesthetics. All rights reserved.
    33This work is licensed under the GPL2, V2/ license.*/
    44
  • ia-magic-galleries/trunk/js/presentation_expander.min.js

    r3123394 r3166084  
    1 /*! ia-designer 22-07-2024
    2 Copyright © 2023 Information Aesthetics. All rights reserved.
     1/*! ia-designer 09-10-2024
     2Copyright © 2024 Information Aesthetics. All rights reserved.
    33This work is licensed under the GPL2, V2/ license.*/
    44
  • ia-magic-galleries/trunk/js/presentation_full.min.js

    r3123394 r3166084  
    1 /*! ia-designer 22-07-2024
    2 Copyright © 2023 Information Aesthetics. All rights reserved.
     1/*! ia-designer 09-10-2024
     2Copyright © 2024 Information Aesthetics. All rights reserved.
    33This work is licensed under the GPL2, V2/ license.*/
    44
  • ia-magic-galleries/trunk/src/IAMG/IAMG_AppSettingsBuilder.php

    r3098209 r3166084  
    77namespace IAMG;
    88
    9 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed
     9if (!defined('ABSPATH')) exit; // Exit if accessed
    1010
    1111class IAMG_AppSettingsBuilder
     
    4747        $width = 680,
    4848        $height = 600
    49     ) {
     49    )
     50    {
    5051        if (is_string($resources)) {
    5152            $sizeBehaviour = $resources;
     
    6263        $tools = $resources['tools'];
    6364
    64         $ajax_url = admin_url('admin-ajax.php') ."?"
    65             ."action=iamg_com";
     65        $ajax_url = admin_url('admin-ajax.php') . "?"
     66            . "action=iamg_com";
    6667//        $resoruces_path = IAMG_URL . "resources/process.php?target="; //this is the old way
    6768        $resoruces_path = IAMG_URL . "resources/";
     
    8384                "processDelayedImages" => true,
    8485                "mouseNavigation" => false,
    85                 "skip_splash_screen" => true,
     86                "skipSplashScreen" => true,
     87                "preventExternalLinks" => ($editor) ? "External Links are disabled in the Setup Environment" : false,
    8688            ],
    8789//            "width" => 600,
  • ia-magic-galleries/trunk/src/IAMG/IAMG_ImageHandler.php

    r3122253 r3166084  
    5151     * ];
    5252     */
    53     public function get_for_gallery($ids = null, $links = null)
     53    public function get_for_gallery($ids = null)
    5454    {
    5555        $map = [];
     
    6767        $result = [];
    6868        foreach ($ids as $id) {
     69            $data = null;
    6970            if (is_array($id)) {
     71                $data = ($id["data"]) ?? "";
    7072                $id = $id["id"];
    7173            }
    7274            if (isset($map[$id])) {
    7375                $img_info = $this->convert_image_info_for_gallery($map[$id]);
    74                 if ($links && isset($links[$id])) {
    75                     $link = wp_http_validate_url($links[$id]);
    76                     if ($link){
    77                         $img_info["link"] = $links[$id];
    78                     }
     76                if ($data) {
     77                    $img_info["data"] = $data;
    7978                }
    8079                $result[] = $img_info;
     
    393392//        $sizes = ['medium', 'large', 'thumbnail']
    394393        $sizes = null
    395     ) {
     394    )
     395    {
    396396        $images = [];
    397397        $expl = explode('/', $meta["file"]);
Note: See TracChangeset for help on using the changeset viewer.