Plugin Directory

Changeset 3111694


Ignore:
Timestamp:
07/03/2024 12:38:14 PM (20 months ago)
Author:
visodywp
Message:

release 1.0.4

Location:
visody-3d-product-viewer
Files:
271 added
10 edited

Legend:

Unmodified
Added
Removed
  • visody-3d-product-viewer/trunk/README.txt

    r3098022 r3111694  
    55Requires at least: 5.1
    66Tested up to: 6.5
    7 Stable tag: 1.0.3
     7Stable tag: 1.0.4
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2222
    2323👉 **Need help getting started?** Read our [Documentation](https://visody.com/docs/)
     24
     25== 📱 BUILT-IN AR SUPPORT 📱 ==
     26
     27The Visody 3D product viewer supports AR-capabilies on the last two major versions of all evergreen desktop and mobile browsers, plus the last two versions of Safari (on MacOS and iOS).
    2428
    2529== ✅ SUPPORTED 3D FILE TYPES ✅ ==
     
    6670* Customize camera view limits
    6771* Apply camera zoom limit
    68 
    69 == BUILT-IN AR SUPPORT ==
    70 
    71 The Visody 3D product viewer supports AR-capabilies on the last two major versions of all evergreen desktop and mobile browsers, plus the last two versions of Safari (on MacOS and iOS).
    7272
    7373== ⭐️ PRO FEATURES ⭐️ ==
     
    120120No, the Visody 3D viewer only works with GLB or glTF 3d models. But you can simply convert any 3D model to the GLB/glTF format using a 3D model editor.
    121121
     122= Q. Why is my 3D viewer not displayed in the product gallery? =
     123
     124If you are using a custom gallery plugin or custom theme, chances are your site is using different class names. Please update class names accordingly in the [advanced settings tab](https://visody.com/docs/advanced-settings/).
     125
    122126= Q. Do you offer support? =
    123127
     
    143147== Changelog ==
    144148
     149= 1.0.4 =
     150* Add support to show viewer anywhere on product page using shortcode instead of display in product gallery
     151* Load in '0' values if configured in template settings
     152* Add support to show viewer in custom plugin or theme loop image blocks (pro)
     153* Update libraries
     154
    145155= 1.0.3 =
    146156* Add support to block AR zoom
  • visody-3d-product-viewer/trunk/admin/class-visody-admin.php

    r3055366 r3111694  
    6363        add_filter('plugin_row_meta', array($this, 'plugin_listing_links'), 10, 4);
    6464        add_action('after_setup_theme', array($this, 'register_visody_image_size'));
     65
     66        add_filter( 'admin_footer_text', array( $this, 'edit_admin_footer_text' ) , 11 );
     67        add_filter( 'update_footer', array( $this, 'edit_admin_footer_version' ) , 11 );
    6568    }
    6669
     
    178181    {
    179182        global $typenow;
    180 
    181183        if ('visody_viewer' !== $typenow && 'visody_template' !== $typenow && 'visody_viewer_note' !== $typenow) {
    182184            return;
     
    185187        include esc_url( VISODY_BASE . 'admin/partials/admin-header.php' );
    186188    }
     189
     190    /**
     191     * Customize the footer copy for the admin area.
     192     *
     193     * @since    1.0.0
     194     */
     195    public function edit_admin_footer_text( $content ) {
     196        global $typenow;
     197        if ('visody_viewer' !== $typenow && 'visody_template' !== $typenow && 'visody_viewer_note' !== $typenow) {
     198            return;
     199        }
     200
     201        if ( $content ) {
     202            return sprintf(
     203                __( 'Thank you for creating with %s. Please rate %s to help spread the word!', 'visody'),
     204                '<a href="https://visody.com" target="_blank">Visody</a>',
     205                '<a href="https://wordpress.org/plugins/visody-3d-product-viewer/" target="_blank">★★★★★</a>'
     206            );
     207        }
     208    }
     209
     210    /**
     211     * Short description.
     212     *
     213     * @since    1.0.0
     214     */
     215    public function edit_admin_footer_version( $content ) {
     216        global $typenow;
     217        if ('visody_viewer' !== $typenow && 'visody_template' !== $typenow && 'visody_viewer_note' !== $typenow) {
     218            return;
     219        }
     220       
     221        if ( $content ) {
     222            return __( 'Visody ', 'visody') . $this->version;
     223        }
     224    }
    187225}
  • visody-3d-product-viewer/trunk/admin/class-visody-woocommerce.php

    r3055366 r3111694  
    8080                'label'         => __('Inline viewer', 'visody'),
    8181                'description'   => __('Show product viewer inline in WooCommerce gallery', 'visody'),
     82                'default'       => '0',
     83            ));
     84
     85            woocommerce_wp_checkbox(array(
     86                'id'            => 'visody_inline_shortcode_viewer',
     87                'wrapper_class' => '',
     88                'label'         => __('Shortcode display', 'visody'),
     89                'description'   => __('Show product viewer inline at shortcode location instead of WooCommerce Gallery', 'visody'),
    8290                'default'       => '0',
    8391            ));
     
    205213        update_post_meta($post_id, 'visody_inline_viewer', esc_attr($inline));
    206214
     215        $shortcode = isset($_POST['visody_inline_shortcode_viewer']) ? 'yes' : 'no';
     216        update_post_meta($post_id, 'visody_inline_shortcode_viewer', esc_attr($shortcode));
     217
    207218        $show_poster = isset($_POST['visody_viewer_show_poster']) ? 'yes' : 'no';
    208219        update_post_meta($post_id, 'visody_viewer_show_poster', esc_attr($show_poster));
  • visody-3d-product-viewer/trunk/freemius/assets/css/admin/dialog-boxes.css

    r3088679 r3111694  
    1 .fs-modal{background:rgba(0,0,0,.6);display:none;height:100%;overflow:auto;position:fixed;top:0;width:100%;z-index:100000}@media(min-width:961px){.fs-modal{padding-left:160px}.rtl .fs-modal{padding-left:0;padding-right:160px}}.fs-modal .dashicons{vertical-align:middle}.fs-modal .fs-modal-dialog{background:transparent;left:50%;margin-left:-298px;padding-bottom:30px;position:absolute;top:-100%;width:596px;z-index:100001}@media(max-width:650px){.fs-modal .fs-modal-dialog{box-sizing:border-box;margin-left:-50%;padding-left:10px;padding-right:10px;width:100%}.fs-modal .fs-modal-dialog .fs-modal-panel>h3>strong{font-size:1.3em}}.fs-modal.active,.fs-modal.active:before{display:block}.fs-modal.active .fs-modal-dialog{top:10%}.fs-modal.fs-success .fs-modal-header{border-bottom-color:#46b450}.fs-modal.fs-success .fs-modal-body{background-color:#f7fff7}.fs-modal.fs-warn .fs-modal-header{border-bottom-color:#ffb900}.fs-modal.fs-warn .fs-modal-body{background-color:#fff8e5}.fs-modal.fs-error .fs-modal-header{border-bottom-color:#dc3232}.fs-modal.fs-error .fs-modal-body{background-color:#ffeaea}.fs-modal .fs-modal-body,.fs-modal .fs-modal-footer{background:#fefefe;border:0;padding:20px}.fs-modal .fs-modal-header{background:#fbfbfb;border-bottom:1px solid #eee;margin-bottom:-10px;padding:15px 20px;position:relative}.fs-modal .fs-modal-header h4{color:#cacaca;font-size:1.2em;font-weight:700;letter-spacing:.6px;margin:0;padding:0;text-shadow:1px 1px 1px #fff;text-transform:uppercase;-webkit-font-smoothing:antialiased}.fs-modal .fs-modal-header .fs-close{border-radius:20px;color:#bbb;cursor:pointer;padding:3px;position:absolute;right:10px;top:12px;transition:all .2s ease-in-out}.fs-modal .fs-modal-header .fs-close:hover{background:#aaa;color:#fff}.fs-modal .fs-modal-header .fs-close .dashicons,.fs-modal .fs-modal-header .fs-close:hover .dashicons{text-decoration:none}.fs-modal .fs-modal-body{border-bottom:0}.fs-modal .fs-modal-body p{font-size:14px}.fs-modal .fs-modal-body h2{font-size:20px;line-height:1.5em}.fs-modal .fs-modal-body>div{margin-top:10px}.fs-modal .fs-modal-body>div h2{font-size:20px;font-weight:700;margin-top:0}.fs-modal .fs-modal-footer{border-top:1px solid #eee;text-align:right}.fs-modal .fs-modal-footer>.button{margin:0 7px}.fs-modal .fs-modal-footer>.button:last-of-type{margin:0}.fs-modal .fs-modal-panel>.notice.inline{display:none;margin:0}.fs-modal .fs-modal-panel:not(.active){display:none}.rtl .fs-modal .fs-modal-header .fs-close{left:20px;right:auto}.rtl .fs-modal .fs-modal-footer{text-align:left}body.has-fs-modal{overflow:hidden}.fs-modal.fs-modal-deactivation-feedback .internal-message,.fs-modal.fs-modal-deactivation-feedback .reason-input{margin:3px 0 3px 22px}.fs-modal.fs-modal-deactivation-feedback .internal-message input,.fs-modal.fs-modal-deactivation-feedback .internal-message textarea,.fs-modal.fs-modal-deactivation-feedback .reason-input input,.fs-modal.fs-modal-deactivation-feedback .reason-input textarea{width:100%}.fs-modal.fs-modal-deactivation-feedback li.reason.has-internal-message .internal-message{border:1px solid #ccc;display:none;padding:7px}@media(max-width:650px){.fs-modal.fs-modal-deactivation-feedback li.reason li.reason{margin-bottom:10px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .internal-message,.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .reason-input{margin-left:29px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label{display:table}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label>span{display:table-cell;font-size:1.3em}}.fs-modal.fs-modal-deactivation-feedback .anonymous-feedback-label,.fs-modal.fs-modal-deactivation-feedback .feedback-from-snooze-label{float:left;line-height:30px}.rtl .fs-modal.fs-modal-deactivation-feedback .anonymous-feedback-label,.rtl .fs-modal.fs-modal-deactivation-feedback .feedback-from-snooze-label{float:right}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel{margin-top:0!important}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel h3{line-height:1.5em;margin-top:0}#the-list .deactivate>.fs-slug{display:none}.fs-modal.fs-modal-subscription-cancellation .fs-price-increase-warning{color:red;font-weight:700;margin-bottom:0;padding:0 25px}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:left;position:relative;top:5px}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:right}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{display:block;margin-left:24px}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{margin-left:0;margin-right:24px}.fs-license-options-container table,.fs-license-options-container table .fs-available-license-key,.fs-license-options-container table select,.fs-modal.fs-modal-license-activation .fs-modal-body input.fs-license-key{width:100%}.fs-license-options-container table td:first-child{width:1%}.fs-license-options-container table .fs-other-license-key-container label{float:left;margin-right:5px;position:relative;top:6px}.fs-license-options-container table .fs-other-license-key-container div{display:block;height:30px;overflow:hidden;position:relative;top:2px;width:auto}.fs-license-options-container table .fs-other-license-key-container div input{margin:0}.fs-sites-list-container td{cursor:pointer}.fs-modal.fs-modal-user-change .fs-modal-body input#fs_other_email_address{width:100%}.fs-user-change-options-container table{border-collapse:collapse;width:100%}.fs-user-change-options-container table tr{display:block;margin-bottom:2px}.fs-user-change-options-container table .fs-email-address-container td{display:inline-block}.fs-user-change-options-container table .fs-email-address-container input[type=radio]{margin-bottom:0;margin-top:0}.fs-user-change-options-container table .fs-other-email-address-container{width:100%}.fs-user-change-options-container table .fs-other-email-address-container>div{display:table;width:100%}.fs-user-change-options-container table .fs-other-email-address-container>div label,.fs-user-change-options-container table .fs-other-email-address-container>div>div{display:table-cell}.fs-user-change-options-container table .fs-other-email-address-container>div label{padding-left:3px;padding-right:3px;width:1%}.fs-user-change-options-container table .fs-other-email-address-container>div>div{width:auto}.fs-modal.fs-modal-developer-license-debug-mode .fs-modal-body input.fs-license-or-user-key,.fs-user-change-options-container table .fs-other-email-address-container>div>div input{width:100%}.fs-multisite-options-container{border:1px solid #ccc;margin-top:20px;padding:5px}.fs-multisite-options-container a{text-decoration:none}.fs-multisite-options-container a:focus{box-shadow:none}.fs-multisite-options-container a.selected{font-weight:700}.fs-multisite-options-container.fs-apply-on-all-sites{border:0;padding:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options{border-spacing:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options td:not(:first-child){display:none}.fs-multisite-options-container .fs-sites-list-container{display:none;overflow:auto}.fs-multisite-options-container .fs-sites-list-container table td{border-top:1px solid #ccc;padding:4px 2px}.fs-modal.fs-modal-license-key-resend .email-address-container{overflow:hidden;padding-right:2px}.fs-modal.fs-modal-license-key-resend.fs-freemium input.email-address{width:300px}.fs-modal.fs-modal-license-key-resend.fs-freemium label{display:block;margin-bottom:10px}.fs-modal.fs-modal-license-key-resend.fs-premium input.email-address{width:100%}.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{float:right;margin-left:7px}@media(max-width:650px){.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{margin-top:2px}}.rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .input-container>.email-address-container{padding-left:2px;padding-right:0}.rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{float:left;margin-left:0;margin-right:7px}a.show-license-resend-modal{display:inline-block;margin-top:4px}.fs-modal.fs-modal-email-address-update .fs-modal-body input[type=text]{width:100%}.fs-modal.fs-modal-email-address-update p{margin-bottom:0}.fs-modal.fs-modal-email-address-update ul{margin:1em .5em}.fs-modal.fs-modal-email-address-update ul li label span{float:left;margin-top:0}.fs-modal.fs-modal-email-address-update ul li label span:last-child{display:block;float:none;margin-left:20px}.fs-ajax-loader{height:20px;margin:auto;position:relative;width:170px}.fs-ajax-loader .fs-ajax-loader-bar{animation-direction:normal;animation-duration:1.5s;animation-iteration-count:infinite;-o-animation-iteration-count:infinite;-ms-animation-iteration-count:infinite;-webkit-animation-iteration-count:infinite;-moz-animation-iteration-count:infinite;animation-name:bounce_ajaxLoader;background-color:#0074a3;height:20px;position:absolute;top:0;transform:.3;width:20px}.fs-ajax-loader .fs-ajax-loader-bar-1{animation-delay:.6s;-o-animation-delay:.6s;-ms-animation-delay:.6s;-webkit-animation-delay:.6s;-moz-animation-delay:.6s;left:0}.fs-ajax-loader .fs-ajax-loader-bar-2{animation-delay:.75s;-o-animation-delay:.75s;-ms-animation-delay:.75s;-webkit-animation-delay:.75s;-moz-animation-delay:.75s;left:19px}.fs-ajax-loader .fs-ajax-loader-bar-3{animation-delay:.9s;-o-animation-delay:.9s;-ms-animation-delay:.9s;-webkit-animation-delay:.9s;-moz-animation-delay:.9s;left:38px}.fs-ajax-loader .fs-ajax-loader-bar-4{animation-delay:1.05s;-o-animation-delay:1.05s;-ms-animation-delay:1.05s;-webkit-animation-delay:1.05s;-moz-animation-delay:1.05s;left:57px}.fs-ajax-loader .fs-ajax-loader-bar-5{animation-delay:1.2s;-o-animation-delay:1.2s;-ms-animation-delay:1.2s;-webkit-animation-delay:1.2s;-moz-animation-delay:1.2s;left:76px}.fs-ajax-loader .fs-ajax-loader-bar-6{animation-delay:1.35s;-o-animation-delay:1.35s;-ms-animation-delay:1.35s;-webkit-animation-delay:1.35s;-moz-animation-delay:1.35s;left:95px}.fs-ajax-loader .fs-ajax-loader-bar-7{animation-delay:1.5s;-o-animation-delay:1.5s;-ms-animation-delay:1.5s;-webkit-animation-delay:1.5s;-moz-animation-delay:1.5s;left:114px}.fs-ajax-loader .fs-ajax-loader-bar-8{animation-delay:1.65s;-o-animation-delay:1.65s;-ms-animation-delay:1.65s;-webkit-animation-delay:1.65s;-moz-animation-delay:1.65s;left:133px}@keyframes bounce_ajaxLoader{0%{background-color:#0074a3;transform:scale(1)}to{background-color:#fff;transform:scale(.3)}}.fs-modal-auto-install #request-filesystem-credentials-form .request-filesystem-credentials-action-buttons,.fs-modal-auto-install #request-filesystem-credentials-form h2{display:none}.fs-modal-auto-install #request-filesystem-credentials-form input[type=email],.fs-modal-auto-install #request-filesystem-credentials-form input[type=password],.fs-modal-auto-install #request-filesystem-credentials-form input[type=text]{-webkit-appearance:none;max-width:100%;padding:10px 10px 5px;width:300px}.fs-modal-auto-install #request-filesystem-credentials-form fieldset,.fs-modal-auto-install #request-filesystem-credentials-form label,.fs-modal-auto-install #request-filesystem-credentials-form>div{display:block;margin:0 auto;max-width:100%;width:300px}.button-primary.warn{background:#f56a48;border-color:#ec6544 #d2593c #d2593c;box-shadow:0 1px 0 #d2593c;text-shadow:0 -1px 1px #d2593c,1px 0 1px #d2593c,0 1px 1px #d2593c,-1px 0 1px #d2593c}.button-primary.warn:hover{background:#fd6d4a;border-color:#d2593c}.button-primary.warn:focus{box-shadow:0 1px 0 #dd6041,0 0 2px 1px #e4a796}.button-primary.warn:active{background:#dd6041;border-color:#d2593c;box-shadow:inset 0 2px 0 #d2593c}.button-primary.warn.disabled{background:#e76444!important;border-color:#d85e40!important;color:#f5b3a1!important;text-shadow:0 -1px 0 rgba(0,0,0,.1)!important}
     1.fs-modal{background:rgba(0,0,0,.6);display:none;height:100%;overflow:auto;position:fixed;top:0;width:100%;z-index:100000}@media(min-width:961px){.fs-modal{padding-left:160px}.rtl .fs-modal{padding-left:0;padding-right:160px}}.fs-modal .dashicons{vertical-align:middle}.fs-modal .fs-modal-dialog{background:transparent;left:50%;margin-left:-298px;padding-bottom:30px;position:absolute;top:-100%;width:596px;z-index:100001}@media(max-width:650px){.fs-modal .fs-modal-dialog{box-sizing:border-box;margin-left:-50%;padding-left:10px;padding-right:10px;width:100%}.fs-modal .fs-modal-dialog .fs-modal-panel>h3>strong{font-size:1.3em}}.fs-modal.active,.fs-modal.active:before{display:block}.fs-modal.active .fs-modal-dialog{top:10%}.fs-modal.fs-success .fs-modal-header{border-bottom-color:#46b450}.fs-modal.fs-success .fs-modal-body{background-color:#f7fff7}.fs-modal.fs-warn .fs-modal-header{border-bottom-color:#ffb900}.fs-modal.fs-warn .fs-modal-body{background-color:#fff8e5}.fs-modal.fs-error .fs-modal-header{border-bottom-color:#dc3232}.fs-modal.fs-error .fs-modal-body{background-color:#ffeaea}.fs-modal .fs-modal-body,.fs-modal .fs-modal-footer{background:#fefefe;border:0;padding:20px}.fs-modal .fs-modal-header{background:#fbfbfb;border-bottom:1px solid #eee;margin-bottom:-10px;padding:15px 20px;position:relative}.fs-modal .fs-modal-header h4{color:#cacaca;font-size:1.2em;font-weight:700;letter-spacing:.6px;margin:0;padding:0;text-shadow:1px 1px 1px #fff;text-transform:uppercase;-webkit-font-smoothing:antialiased}.fs-modal .fs-modal-header .fs-close{border-radius:20px;color:#bbb;cursor:pointer;padding:3px;position:absolute;right:10px;top:12px;transition:all .2s ease-in-out}.fs-modal .fs-modal-header .fs-close:hover{background:#aaa;color:#fff}.fs-modal .fs-modal-header .fs-close .dashicons,.fs-modal .fs-modal-header .fs-close:hover .dashicons{text-decoration:none}.fs-modal .fs-modal-body{border-bottom:0}.fs-modal .fs-modal-body p{font-size:14px}.fs-modal .fs-modal-body h2{font-size:20px;line-height:1.5em}.fs-modal .fs-modal-body>div{margin-top:10px}.fs-modal .fs-modal-body>div h2{font-size:20px;font-weight:700;margin-top:0}.fs-modal .fs-modal-footer{border-top:1px solid #eee;text-align:right}.fs-modal .fs-modal-footer>.button{margin:0 7px}.fs-modal .fs-modal-footer>.button:last-of-type{margin:0}.fs-modal .fs-modal-panel>.notice.inline{display:none;margin:0}.fs-modal .fs-modal-panel:not(.active){display:none}.rtl .fs-modal .fs-modal-header .fs-close{left:20px;right:auto}.rtl .fs-modal .fs-modal-footer{text-align:left}body.has-fs-modal{overflow:hidden}.fs-modal.fs-modal-deactivation-feedback .internal-message,.fs-modal.fs-modal-deactivation-feedback .reason-input{margin:3px 0 3px 22px}.fs-modal.fs-modal-deactivation-feedback .internal-message input,.fs-modal.fs-modal-deactivation-feedback .internal-message textarea,.fs-modal.fs-modal-deactivation-feedback .reason-input input,.fs-modal.fs-modal-deactivation-feedback .reason-input textarea{width:100%}.fs-modal.fs-modal-deactivation-feedback li.reason.has-internal-message .internal-message{border:1px solid #ccc;display:none;padding:7px}@media(max-width:650px){.fs-modal.fs-modal-deactivation-feedback li.reason li.reason{margin-bottom:10px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .internal-message,.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .reason-input{margin-left:29px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label{display:table}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label>span{display:table-cell;font-size:1.3em}}.fs-modal.fs-modal-deactivation-feedback .anonymous-feedback-label,.fs-modal.fs-modal-deactivation-feedback .feedback-from-snooze-label{float:left;line-height:30px}.rtl .fs-modal.fs-modal-deactivation-feedback .anonymous-feedback-label,.rtl .fs-modal.fs-modal-deactivation-feedback .feedback-from-snooze-label{float:right}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel{margin-top:0!important}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel h3{font-size:16px;line-height:1.5em;margin-bottom:0;margin-top:10px}#the-list .deactivate>.fs-slug{display:none}.fs-modal.fs-modal-subscription-cancellation .fs-price-increase-warning{color:red;font-weight:700;margin-bottom:0;padding:0 25px}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:left;position:relative;top:5px}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:right}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{display:block;margin-left:24px}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{margin-left:0;margin-right:24px}.fs-license-options-container table,.fs-license-options-container table .fs-available-license-key,.fs-license-options-container table select,.fs-modal.fs-modal-license-activation .fs-modal-body input.fs-license-key{width:100%}.fs-license-options-container table td:first-child{width:1%}.fs-license-options-container table .fs-other-license-key-container label{float:left;margin-right:5px;position:relative;top:6px}.fs-license-options-container table .fs-other-license-key-container div{display:block;height:30px;overflow:hidden;position:relative;top:2px;width:auto}.fs-license-options-container table .fs-other-license-key-container div input{margin:0}.fs-sites-list-container td{cursor:pointer}.fs-modal.fs-modal-user-change .fs-modal-body input#fs_other_email_address{width:100%}.fs-user-change-options-container table{border-collapse:collapse;width:100%}.fs-user-change-options-container table tr{display:block;margin-bottom:2px}.fs-user-change-options-container table .fs-email-address-container td{display:inline-block}.fs-user-change-options-container table .fs-email-address-container input[type=radio]{margin-bottom:0;margin-top:0}.fs-user-change-options-container table .fs-other-email-address-container{width:100%}.fs-user-change-options-container table .fs-other-email-address-container>div{display:table;width:100%}.fs-user-change-options-container table .fs-other-email-address-container>div label,.fs-user-change-options-container table .fs-other-email-address-container>div>div{display:table-cell}.fs-user-change-options-container table .fs-other-email-address-container>div label{padding-left:3px;padding-right:3px;width:1%}.fs-user-change-options-container table .fs-other-email-address-container>div>div{width:auto}.fs-modal.fs-modal-developer-license-debug-mode .fs-modal-body input.fs-license-or-user-key,.fs-user-change-options-container table .fs-other-email-address-container>div>div input{width:100%}.fs-multisite-options-container{border:1px solid #ccc;margin-top:20px;padding:5px}.fs-multisite-options-container a{text-decoration:none}.fs-multisite-options-container a:focus{box-shadow:none}.fs-multisite-options-container a.selected{font-weight:700}.fs-multisite-options-container.fs-apply-on-all-sites{border:0;padding:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options{border-spacing:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options td:not(:first-child){display:none}.fs-multisite-options-container .fs-sites-list-container{display:none;overflow:auto}.fs-multisite-options-container .fs-sites-list-container table td{border-top:1px solid #ccc;padding:4px 2px}.fs-modal.fs-modal-license-key-resend .email-address-container{overflow:hidden;padding-right:2px}.fs-modal.fs-modal-license-key-resend.fs-freemium input.email-address{width:300px}.fs-modal.fs-modal-license-key-resend.fs-freemium label{display:block;margin-bottom:10px}.fs-modal.fs-modal-license-key-resend.fs-premium input.email-address{width:100%}.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{float:right;margin-left:7px}@media(max-width:650px){.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{margin-top:2px}}.rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .input-container>.email-address-container{padding-left:2px;padding-right:0}.rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{float:left;margin-left:0;margin-right:7px}a.show-license-resend-modal{display:inline-block;margin-top:4px}.fs-modal.fs-modal-email-address-update .fs-modal-body input[type=text]{width:100%}.fs-modal.fs-modal-email-address-update p{margin-bottom:0}.fs-modal.fs-modal-email-address-update ul{margin:1em .5em}.fs-modal.fs-modal-email-address-update ul li label span{float:left;margin-top:0}.fs-modal.fs-modal-email-address-update ul li label span:last-child{display:block;float:none;margin-left:20px}.fs-ajax-loader{height:20px;margin:auto;position:relative;width:170px}.fs-ajax-loader .fs-ajax-loader-bar{animation-direction:normal;animation-duration:1.5s;animation-iteration-count:infinite;-o-animation-iteration-count:infinite;-ms-animation-iteration-count:infinite;-webkit-animation-iteration-count:infinite;-moz-animation-iteration-count:infinite;animation-name:bounce_ajaxLoader;background-color:#0074a3;height:20px;position:absolute;top:0;transform:.3;width:20px}.fs-ajax-loader .fs-ajax-loader-bar-1{animation-delay:.6s;-o-animation-delay:.6s;-ms-animation-delay:.6s;-webkit-animation-delay:.6s;-moz-animation-delay:.6s;left:0}.fs-ajax-loader .fs-ajax-loader-bar-2{animation-delay:.75s;-o-animation-delay:.75s;-ms-animation-delay:.75s;-webkit-animation-delay:.75s;-moz-animation-delay:.75s;left:19px}.fs-ajax-loader .fs-ajax-loader-bar-3{animation-delay:.9s;-o-animation-delay:.9s;-ms-animation-delay:.9s;-webkit-animation-delay:.9s;-moz-animation-delay:.9s;left:38px}.fs-ajax-loader .fs-ajax-loader-bar-4{animation-delay:1.05s;-o-animation-delay:1.05s;-ms-animation-delay:1.05s;-webkit-animation-delay:1.05s;-moz-animation-delay:1.05s;left:57px}.fs-ajax-loader .fs-ajax-loader-bar-5{animation-delay:1.2s;-o-animation-delay:1.2s;-ms-animation-delay:1.2s;-webkit-animation-delay:1.2s;-moz-animation-delay:1.2s;left:76px}.fs-ajax-loader .fs-ajax-loader-bar-6{animation-delay:1.35s;-o-animation-delay:1.35s;-ms-animation-delay:1.35s;-webkit-animation-delay:1.35s;-moz-animation-delay:1.35s;left:95px}.fs-ajax-loader .fs-ajax-loader-bar-7{animation-delay:1.5s;-o-animation-delay:1.5s;-ms-animation-delay:1.5s;-webkit-animation-delay:1.5s;-moz-animation-delay:1.5s;left:114px}.fs-ajax-loader .fs-ajax-loader-bar-8{animation-delay:1.65s;-o-animation-delay:1.65s;-ms-animation-delay:1.65s;-webkit-animation-delay:1.65s;-moz-animation-delay:1.65s;left:133px}@keyframes bounce_ajaxLoader{0%{background-color:#0074a3;transform:scale(1)}to{background-color:#fff;transform:scale(.3)}}.fs-modal-auto-install #request-filesystem-credentials-form .request-filesystem-credentials-action-buttons,.fs-modal-auto-install #request-filesystem-credentials-form h2{display:none}.fs-modal-auto-install #request-filesystem-credentials-form input[type=email],.fs-modal-auto-install #request-filesystem-credentials-form input[type=password],.fs-modal-auto-install #request-filesystem-credentials-form input[type=text]{-webkit-appearance:none;max-width:100%;padding:10px 10px 5px;width:300px}.fs-modal-auto-install #request-filesystem-credentials-form fieldset,.fs-modal-auto-install #request-filesystem-credentials-form label,.fs-modal-auto-install #request-filesystem-credentials-form>div{display:block;margin:0 auto;max-width:100%;width:300px}.button-primary.warn{background:#f56a48;border-color:#ec6544 #d2593c #d2593c;box-shadow:0 1px 0 #d2593c;text-shadow:0 -1px 1px #d2593c,1px 0 1px #d2593c,0 1px 1px #d2593c,-1px 0 1px #d2593c}.button-primary.warn:hover{background:#fd6d4a;border-color:#d2593c}.button-primary.warn:focus{box-shadow:0 1px 0 #dd6041,0 0 2px 1px #e4a796}.button-primary.warn:active{background:#dd6041;border-color:#d2593c;box-shadow:inset 0 2px 0 #d2593c}.button-primary.warn.disabled{background:#e76444!important;border-color:#d85e40!important;color:#f5b3a1!important;text-shadow:0 -1px 0 rgba(0,0,0,.1)!important}
  • visody-3d-product-viewer/trunk/freemius/includes/class-freemius.php

    r3088679 r3111694  
    41754175                isset( $this->_storage->connectivity_test['is_active'] )
    41764176            ) {
    4177                 $is_active = $this->_storage->connectivity_test['is_active'];
     4177                $is_connected = isset( $this->_storage->connectivity_test['is_connected'] ) ?
     4178                    $this->_storage->connectivity_test['is_connected'] :
     4179                    null;
     4180                $is_active    = ( $this->_storage->connectivity_test['is_active'] || is_object( $this->_site ) );
    41784181            } else {
    4179                 $is_active = $this->should_turn_fs_on( $this->apply_filters( 'is_plugin_update', $this->is_plugin_update() ) );
    4180 
    4181                 $this->store_connectivity_info( (object) array( 'is_active' => $is_active ), null );
    4182             }
     4182                $is_connected = null;
     4183                $is_active    = $this->should_turn_fs_on( $this->apply_filters( 'is_plugin_update', $this->is_plugin_update() ) );
     4184            }
     4185
     4186            $this->store_connectivity_info( (object) array( 'is_active' => $is_active ), $is_connected );
    41834187
    41844188            if ( $is_active ) {
     
    54855489                'bundle_id'            => $this->get_option( $plugin_info, 'bundle_id', null ),
    54865490                'bundle_public_key'    => $this->get_option( $plugin_info, 'bundle_public_key', null ),
    5487                 'opt_in_moderation'    => $this->get_option( $plugin_info, 'opt_in', null ),
     5491                'opt_in_moderation'    => $this->get_option(
     5492                    $plugin_info,
     5493                    'opt_in',
     5494                    // For backward compatibility, we support both parameter names: opt_in and opt_in_moderation.
     5495                    $this->get_option( $plugin_info, 'opt_in_moderation', null )
     5496                ),
    54885497            ) );
    54895498
  • visody-3d-product-viewer/trunk/freemius/start.php

    r3088679 r3111694  
    1616     * @var string
    1717     */
    18     $this_sdk_version = '2.7.2';
     18    $this_sdk_version = '2.7.3';
    1919
    2020    #region SDK Selection Logic --------------------------------------------------------------------
  • visody-3d-product-viewer/trunk/freemius/templates/connect.php

    r3088679 r3111694  
    162162                fs_require_once_template( 'plugin-icon.php', $vars );
    163163            ?>
    164             <!--            <img class="fs-connect-logo" width="--><?php //echo $size ?><!--" height="--><?php //echo $size ?><!--" src="//img.freemius.com/logo/connect.svg"/>-->
    165164        </div>
    166165        <div class="fs-box-container">
  • visody-3d-product-viewer/trunk/includes/visody-functions.php

    r3098022 r3111694  
    272272     * @return void
    273273     */
    274     function visody_get_viewer_attributes($viewer_id, $loop_item = false)
     274    function visody_get_viewer_attributes($template_id, $loop_item = false)
    275275    {
    276276        $viewer_attributes = '';
    277 
    278         if (!get_post_meta($viewer_id, 'disable_ar', true)) {
     277        if ( ! $template_id ) {
     278            return $viewer_attributes;
     279        }
     280
     281        if (!get_post_meta($template_id, 'disable_ar', true)) {
    279282            $viewer_attributes .= ' ar camera-controls';
    280283
    281             if (get_post_meta($viewer_id, 'ar_model_placement', true)) {
    282                 $ar_placement = get_post_meta($viewer_id, 'ar_model_placement', true);
     284            if (get_post_meta($template_id, 'ar_model_placement', true)) {
     285                $ar_placement = get_post_meta($template_id, 'ar_model_placement', true);
    283286                $viewer_attributes .= sprintf(
    284287                    ' ar-placement="%s"',
     
    287290            }
    288291           
    289             if (get_post_meta($viewer_id, 'ar_scale_fixed', true)) {
     292            if (get_post_meta($template_id, 'ar_scale_fixed', true)) {
    290293                $viewer_attributes .= ' ar-scale="fixed"';
    291294            }
     
    293296
    294297        $env_image_url = '';
    295         if (get_post_meta($viewer_id, 'environment_image', true)) {
    296             $env_image_id = get_post_meta($viewer_id, 'environment_image', true);
     298        if (get_post_meta($template_id, 'environment_image', true)) {
     299            $env_image_id = get_post_meta($template_id, 'environment_image', true);
    297300            $env_image_url = wp_get_attachment_url($env_image_id, 'full');
    298         } else if (get_post_meta($viewer_id, 'environment_image_url', true)) {
    299             $env_image_url = sanitize_url(get_post_meta($viewer_id, 'environment_image_url', true));
     301        } else if (get_post_meta($template_id, 'environment_image_url', true)) {
     302            $env_image_url = sanitize_url(get_post_meta($template_id, 'environment_image_url', true));
    300303        }
    301304
     
    306309            );
    307310
    308             if (get_post_meta($viewer_id, 'environment_is_skybox', true)) {
     311            if (get_post_meta($template_id, 'environment_is_skybox', true)) {
    309312                $viewer_attributes .= sprintf(
    310313                    ' skybox-image="%s"',
     
    313316            }
    314317
    315             $exposure = (float) get_post_meta($viewer_id, 'environment_exposure', true) ?: 1;
    316             $viewer_attributes .= sprintf(
    317                 ' exposure="%f"',
    318                 esc_html( $exposure )
    319             );
    320         }
    321 
    322         $intensity = (float) get_post_meta($viewer_id, 'shadow_intensity', true);
    323         if ($intensity) {
    324             $viewer_attributes .= ' shadow-intensity="' . esc_html( $intensity ) . '"';
    325         }
    326 
    327         $softness = (float) get_post_meta($viewer_id, 'shadow_softness', true);
    328         if ($softness) {
    329             $viewer_attributes .= ' shadow-softness="' . esc_html( $softness ) . '"';
    330         }
    331 
    332         if (get_post_meta($viewer_id, 'set_camera_target', true)) {
    333             $pos_x = (float) get_post_meta($viewer_id, 'camera_target_x', true) ?: '0';
    334             $pos_y = (float) get_post_meta($viewer_id, 'camera_target_y', true) ?: '0';
    335             $zoom  = (float) get_post_meta($viewer_id, 'camera_target_z', true) ?: '0';
     318            $exposure = ( '' !== get_post_meta($template_id, 'environment_exposure', true) ) ? get_post_meta($template_id, 'environment_exposure', true) : 1;
     319            $viewer_attributes .= sprintf(
     320                ' exposure="%s"',
     321                esc_attr( $exposure )
     322            );
     323        }
     324
     325        $intensity = get_post_meta($template_id, 'shadow_intensity', true);
     326        if ( '' !== $intensity) {
     327            $viewer_attributes .= ' shadow-intensity="' . esc_attr( $intensity ) . '"';
     328        }
     329
     330        $softness = get_post_meta($template_id, 'shadow_softness', true);
     331        if ( '' !== $softness) {
     332            $viewer_attributes .= ' shadow-softness="' . esc_attr( $softness ) . '"';
     333        }
     334
     335        if (get_post_meta($template_id, 'set_camera_target', true)) {
     336            $pos_x = get_post_meta($template_id, 'camera_target_x', true) ?: '0';
     337            $pos_y = get_post_meta($template_id, 'camera_target_y', true) ?: '0';
     338            $zoom  = get_post_meta($template_id, 'camera_target_z', true) ?: '0';
    336339
    337340            $viewer_attributes .= sprintf(
     
    343346        }
    344347
    345         $initial_pos_x = get_post_meta($viewer_id, 'camera_initial_x', true);
    346         $initial_pos_y = get_post_meta($viewer_id, 'camera_initial_y', true);
    347         if ($initial_pos_x && $initial_pos_y) {
    348             $viewer_attributes .= sprintf(
    349                 ' camera-orbit="%fdeg %fdeg auto"',
    350                 esc_attr($initial_pos_x),
    351                 esc_attr($initial_pos_y)
    352             );
    353         }
    354 
    355         if (get_post_meta($viewer_id, 'set_camera_limits', true)) {
    356             $counter_clockwise = get_post_meta($viewer_id, 'camera_x_limit', true);
    357             $clockwise = get_post_meta($viewer_id, 'camera_x_limit_clockwise', true);
    358             $topdown = get_post_meta($viewer_id, 'camera_z_limit', true);
    359             $bottomup = get_post_meta($viewer_id, 'camera_z_limit_clockwise', true);
     348        $initial_pos_x = get_post_meta($template_id, 'camera_initial_x', true);
     349        $initial_pos_y = get_post_meta($template_id, 'camera_initial_y', true);
     350        if ( '' !== $initial_pos_x && '' !== $initial_pos_y) {
     351            $viewer_attributes .= sprintf(
     352                ' camera-orbit="%s %s auto"',
     353                esc_attr($initial_pos_x . 'deg'),
     354                esc_attr($initial_pos_y . 'deg')
     355            );
     356        }
     357
     358        if (get_post_meta($template_id, 'set_camera_limits', true)) {
     359            $counter_clockwise = get_post_meta($template_id, 'camera_x_limit', true);
     360            $clockwise = get_post_meta($template_id, 'camera_x_limit_clockwise', true);
     361            $topdown = get_post_meta($template_id, 'camera_z_limit', true);
     362            $bottomup = get_post_meta($template_id, 'camera_z_limit_clockwise', true);
    360363
    361364            $minzoom = 'auto';
    362             if (get_post_meta($viewer_id, 'set_camera_min_zoom', true)) {
    363                 $minzoom = get_post_meta($viewer_id, 'camera_min_zoom', true);
    364             }
    365 
    366             if (!$counter_clockwise) {
     365            if (get_post_meta($template_id, 'set_camera_min_zoom', true)) {
     366                $minzoom = get_post_meta($template_id, 'camera_min_zoom', true);
     367            }
     368
     369            if ( '' === $counter_clockwise) {
    367370                $counter_clockwise = 'auto';
    368371            } else {
     
    370373            }
    371374
    372             if (!$topdown) {
     375            if ('' === $topdown) {
    373376                $topdown = 'auto';
    374377            } else {
     
    376379            }
    377380
    378             if (!$clockwise) {
     381            if ('' === $clockwise) {
    379382                $clockwise = 'auto';
    380383            } else {
     
    382385            }
    383386
    384             if (!$bottomup) {
     387            if ('' === $bottomup) {
    385388                $bottomup = 'auto';
    386389            } else {
     
    400403                esc_attr( $bottomup )
    401404            );
    402         } else if (get_post_meta($viewer_id, 'set_camera_min_zoom', true)) {
     405        } else if (get_post_meta($template_id, 'set_camera_min_zoom', true)) {
    403406            $minzoom = 'auto';
    404             if (get_post_meta( $viewer_id, 'set_camera_min_zoom', true ) ) {
    405                 $minzoom = get_post_meta($viewer_id, 'camera_min_zoom', true);
     407            if (get_post_meta( $template_id, 'set_camera_min_zoom', true ) ) {
     408                $minzoom = get_post_meta($template_id, 'camera_min_zoom', true);
    406409            }
    407410
     
    412415        }
    413416
    414         if (get_post_meta($viewer_id, 'camera_autorotate', true)) {
     417        if (get_post_meta($template_id, 'camera_autorotate', true)) {
    415418            $viewer_attributes .= ' auto-rotate';
    416419        }
    417420
    418421        if ( ! $loop_item || get_option('visody_show_item_animations') ) { 
    419             if (get_post_meta($viewer_id, 'animation_name', true)) {
    420                 $animation_name = sanitize_text_field(get_post_meta($viewer_id, 'animation_name', true));
     422            if (get_post_meta($template_id, 'animation_name', true)) {
     423                $animation_name = sanitize_text_field(get_post_meta($template_id, 'animation_name', true));
    421424                $viewer_attributes .= sprintf(
    422425                    ' animation-name="%s"',
     
    425428            }
    426429   
    427             if (get_post_meta($viewer_id, 'animation_autoplay', true)) {
     430            if (get_post_meta($template_id, 'animation_autoplay', true)) {
    428431                $viewer_attributes .= ' autoplay';
    429432            }
    430433        }
    431434
    432         if ( get_post_meta( $viewer_id, 'camera_interpolation', true ) ) {
    433             $interpolation = sanitize_text_field( get_post_meta( $viewer_id, 'camera_interpolation', true ) );
     435        if ( get_post_meta( $template_id, 'camera_interpolation', true ) ) {
     436            $interpolation = sanitize_text_field( get_post_meta( $template_id, 'camera_interpolation', true ) );
    434437            $viewer_attributes .= sprintf(
    435438                ' interpolation-decay="%s"',
  • visody-3d-product-viewer/trunk/public/class-visody-public.php

    r3098022 r3111694  
    277277            return $html;
    278278        }
    279 
    280279        if ('no' === get_post_meta(get_the_ID(), 'visody_inline_viewer', true)) {
     280            return $html;
     281        }
     282        if ('yes' === get_post_meta(get_the_ID(), 'visody_inline_shortcode_viewer', true)) {
    281283            return $html;
    282284        }
     
    349351    {
    350352        if (!get_post_meta(get_the_ID(), 'visody_enable_viewer', true) || 'no' === get_post_meta(get_the_ID(), 'visody_enable_viewer', true)) {
     353            return;
     354        }
     355        if ('yes' === get_post_meta(get_the_ID(), 'visody_inline_shortcode_viewer', true)) {
    351356            return;
    352357        }
     
    469474            return;
    470475        }
     476        if ('yes' === get_post_meta( get_the_ID(), 'visody_inline_shortcode_viewer', true)) {
     477            return;
     478        }
    471479
    472480        $threed_button = visody_get_button_html('3d', array(
     
    529537    public function visody_load_shortcode_3d_model_viewer($attributes)
    530538    {
     539        $viewer_id = false;
    531540        if (isset($attributes['id'])) {
    532 
    533             do_action( 'visody_output_scripts' );
    534 
    535541            $viewer_id = esc_attr(sanitize_key($attributes['id']));
    536             $poster_id = '';
    537             if ('yes' === get_post_meta($viewer_id, 'visody_viewer_show_poster', true)) {
    538                 $poster_id = get_post_meta($viewer_id, 'visody_viewer_poster', true);
    539             }
    540 
    541             $model_html = visody_get_viewer_html($viewer_id, $poster_id);
    542             $panel_html = '';
    543             if (function_exists('visody_get_qrcode_panel_html')) {
    544                 $panel_html = visody_get_qrcode_panel_html($viewer_id);
    545             }
    546 
    547             $template_id = get_post_meta($viewer_id, 'visody_template', true);
    548             if ($template_id && get_post_meta($template_id, 'disable_ar', true)) {
    549                 $panel_html = '';
    550             }
    551 
    552             $viewer_classes = '';
    553             if (get_option('visody_inside_float_button_position')) {
    554                 $viewer_classes .= sprintf( ' vsd-button-float-%s', esc_attr( get_option('visody_inside_float_button_position') ) );
    555             } else {
    556                 $viewer_classes .= ' vsd-button-float-bottom-right'; // default.
    557             }
    558 
    559             if (get_option('visody_control_button_position')) {
    560                 $viewer_classes .= sprintf( ' vsd-button-align-%s', esc_attr( get_option('visody_control_button_position') ) );
    561             } else {
    562                 $viewer_classes .= ' vsd-button-align-right'; // default.
    563             }
    564 
    565             if ('list' == get_post_meta($template_id, 'annotation_display', true) && get_post_meta($viewer_id, 'visody_viewer_notes', true)) {
    566                 $viewer_classes .= ' vsd-model-viewer-control-bar';
    567             }
    568 
    569             $frame_class = '';
    570             if (get_post_meta($viewer_id, 'visody_viewer_frame_ratio', true)) {
    571                 $frame_class = sprintf( ' ratio-%s', esc_attr( get_post_meta($viewer_id, 'visody_viewer_frame_ratio', true) ) );
    572             }
    573             if (get_post_meta($viewer_id, 'visody_viewer_frame_ratio_mobile', true)) {
    574                 $frame_class .= sprintf( ' ratio-mobile-%s', esc_attr( get_post_meta($viewer_id, 'visody_viewer_frame_ratio_mobile', true) ) );
    575             }
    576 
    577             $panel_inside_html = '';
    578             $panel_underneath_html = '';
    579             if ('underneath' !== get_option('visody_float_button_position')) {
    580                 $panel_inside_html = $panel_html;
    581             } else {
    582                 $panel_underneath_html = sprintf(
    583                     '<div id="vsd-model-viewer-control-buttons-%s" class="vsd-model-viewer-control-buttons" data-viewer-id="vsd-model-viewer-%s"></div>',
    584                     esc_attr( $viewer_id ),
    585                     esc_attr( $viewer_id ),
    586                     $panel_html
    587                 );
    588             }
    589 
    590             $shortcode_html = sprintf(
    591                 '<div class="vsd-model-viewer-wrapper">
    592                     <div class="vsd-model-viewer-frame %s">
    593                         <div id="vsd-model-viewer-%s" class="vsd-model-viewer vsd-model-viewer-inline %s">
    594                         %s
    595                         %s
    596                         </div>
    597                     </div>
    598                     %s
    599                 </div>',
    600                 esc_attr( $frame_class ),
    601                 esc_attr( $viewer_id ),
    602                 esc_attr( $viewer_classes ),
    603                 $model_html,
    604                 $panel_inside_html,
    605                 $panel_underneath_html
    606             );
    607 
    608             $shortcode_html = apply_filters('visody_shortcode_viewer_html', $shortcode_html, $viewer_id);
    609 
    610             return $shortcode_html;
    611         } else {
     542        } else if ( 'product' === get_post_type() ) {
     543            $viewer_id = get_the_ID();
     544            if ('yes' !== get_post_meta($viewer_id, 'visody_inline_shortcode_viewer', true)) {
     545                if (is_user_logged_in()) {
     546                    return __('Viewer shortcode setting is not active. Please check option in your product to display viewer here.', 'visody');
     547                }
     548                return;
     549            }
     550        }
     551
     552        if ( ! $viewer_id ) {
    612553            if (is_user_logged_in()) {
    613554                return __('Viewer ID is not set or invalid', 'visody');
    614555            }
    615         }
     556            return;
     557        }
     558
     559        do_action( 'visody_output_scripts' );
     560
     561        $poster_id = '';
     562        if ('yes' === get_post_meta($viewer_id, 'visody_viewer_show_poster', true)) {
     563            $poster_id = get_post_meta($viewer_id, 'visody_viewer_poster', true);
     564        }
     565
     566        $model_html = visody_get_viewer_html($viewer_id, $poster_id);
     567        $panel_html = '';
     568        if (function_exists('visody_get_qrcode_panel_html')) {
     569            $panel_html = visody_get_qrcode_panel_html($viewer_id);
     570        }
     571
     572        $template_id = get_post_meta($viewer_id, 'visody_template', true);
     573        if ($template_id && get_post_meta($template_id, 'disable_ar', true)) {
     574            $panel_html = '';
     575        }
     576
     577        $viewer_classes = '';
     578        if (get_option('visody_inside_float_button_position')) {
     579            $viewer_classes .= sprintf( ' vsd-button-float-%s', esc_attr( get_option('visody_inside_float_button_position') ) );
     580        } else {
     581            $viewer_classes .= ' vsd-button-float-bottom-right'; // default.
     582        }
     583
     584        if (get_option('visody_control_button_position')) {
     585            $viewer_classes .= sprintf( ' vsd-button-align-%s', esc_attr( get_option('visody_control_button_position') ) );
     586        } else {
     587            $viewer_classes .= ' vsd-button-align-right'; // default.
     588        }
     589
     590        if ('list' == get_post_meta($template_id, 'annotation_display', true) && get_post_meta($viewer_id, 'visody_viewer_notes', true)) {
     591            $viewer_classes .= ' vsd-model-viewer-control-bar';
     592        }
     593
     594        $frame_class = '';
     595        if (get_post_meta($viewer_id, 'visody_viewer_frame_ratio', true)) {
     596            $frame_class = sprintf( ' ratio-%s', esc_attr( get_post_meta($viewer_id, 'visody_viewer_frame_ratio', true) ) );
     597        }
     598        if (get_post_meta($viewer_id, 'visody_viewer_frame_ratio_mobile', true)) {
     599            $frame_class .= sprintf( ' ratio-mobile-%s', esc_attr( get_post_meta($viewer_id, 'visody_viewer_frame_ratio_mobile', true) ) );
     600        }
     601
     602        $panel_inside_html = '';
     603        $panel_underneath_html = '';
     604        if ('underneath' !== get_option('visody_float_button_position')) {
     605            $panel_inside_html = $panel_html;
     606        } else {
     607            $panel_underneath_html = sprintf(
     608                '<div id="vsd-model-viewer-control-buttons-%s" class="vsd-model-viewer-control-buttons" data-viewer-id="vsd-model-viewer-%s"></div>',
     609                esc_attr( $viewer_id ),
     610                esc_attr( $viewer_id ),
     611                $panel_html
     612            );
     613        }
     614
     615        $shortcode_html = sprintf(
     616            '<div class="vsd-model-viewer-wrapper">
     617                <div class="vsd-model-viewer-frame %s">
     618                    <div id="vsd-model-viewer-%s" class="vsd-model-viewer vsd-model-viewer-inline %s">
     619                    %s
     620                    %s
     621                    </div>
     622                </div>
     623                %s
     624            </div>',
     625            esc_attr( $frame_class ),
     626            esc_attr( $viewer_id ),
     627            esc_attr( $viewer_classes ),
     628            $model_html,
     629            $panel_inside_html,
     630            $panel_underneath_html
     631        );
     632
     633        $shortcode_html = apply_filters('visody_shortcode_viewer_html', $shortcode_html, $viewer_id);
     634
     635        return $shortcode_html;
    616636    }
    617637}
  • visody-3d-product-viewer/trunk/visody.php

    r3098022 r3111694  
    1616 * Plugin Name:       3D viewer by Visody
    1717 * Description:       Easily display interactive 3D viewers to your WooCommerce product gallery and your website pages. Increase user engagement and customer satisfaction.
    18  * Version:           1.0.3
     18 * Version:           1.0.4
    1919 * Author:            Visody
    2020 * Author URI:        https://visody.com/
     
    7373     * Rename this for your plugin and update it as you release new versions.
    7474     */
    75     define( 'VISODY_VERSION', '1.0.2' );
     75    define( 'VISODY_VERSION', '1.0.4' );
    7676    define( 'VISODY_BASE', plugin_dir_path( __FILE__ ) );
    7777    define( 'VISODY_BASE_URL', plugin_dir_url( __FILE__ ) );
Note: See TracChangeset for help on using the changeset viewer.