PluginProbe
WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress / 9.1.2
WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress v9.1.2
9.1.2 9.1.1 9.1.0 9.0.3 9.0.2 9.0.1 9.0.0 8.5.79 8.5.78 8.5.77 8.5.76 8.5.75 8.5.74 8.5.73 8.5.72 8.5.71 8.5.70 8.5.69 8.5.68 8.5.35 8.5.36 8.5.37 8.5.38 8.5.39 8.5.4 All 221 releases
← All changes | src/Admin/Admin.php +24 -12 9.1.19.1.2 View file →
@@ -216,21 +216,33 @@
216 216 if ( class_exists( 'Wpvr_fontawesome_icons' ) ) {
217 217 $fa_icons = ( new \Wpvr_fontawesome_icons() )->icon;
218 218 }
219 219
220 + $is_embed_addon_active = apply_filters( 'is_wpvr_embed_addon_premium', false );
221 + if ( $is_embed_addon_active ) {
222 + if ( wp_script_is( 'custom-qrcode', 'registered' ) ) {
223 + wp_enqueue_script( 'custom-qrcode' );
224 + } elseif ( defined( 'WPVR_PRO_PLUGIN_DIR_URL' ) ) {
225 + wp_enqueue_script( 'custom-qrcode', trailingslashit( WPVR_PRO_PLUGIN_DIR_URL ) . 'admin/lib/qr-code/custom-qrcode.js', [ 'jquery' ], null, true );
226 + }
227 + }
228 +
220 229 wp_localize_script( 'wpvr-tour-editor', 'wpvrTourEditor', [
221 - 'tourId' => $tour_id_cfg ?: null,
222 - 'tourStatus' => $tour_status,
223 - 'nonce' => wp_create_nonce( 'wp_rest' ),
224 - 'apiBase' => rest_url( 'wpvr/v1' ),
225 - 'mediaUrl' => rest_url( 'wp/v2/media' ),
226 - 'isPro' => wpvr_is_pro_active(),
227 - 'pluginUrl' => $plugin_url,
228 - 'listUrl' => admin_url( 'edit.php?post_type=' . self::POST_TYPE ),
229 - 'postEditUrl' => admin_url( 'post.php' ),
230 - 'faIcons' => $fa_icons,
231 - 'ajaxUrl' => admin_url( 'admin-ajax.php' ),
232 - 'exportNonce' => wp_create_nonce( 'wpvr_export_tour' ),
230 + 'tourId' => $tour_id_cfg ?: null,
231 + 'tourStatus' => $tour_status,
232 + 'tourTitle' => $tour_id_cfg ? get_the_title( $tour_id_cfg ) : '',
233 + 'homeUrl' => home_url( '/' ),
234 + 'isEmbedAddonActive' => $is_embed_addon_active,
235 + 'nonce' => wp_create_nonce( 'wp_rest' ),
236 + 'apiBase' => rest_url( 'wpvr/v1' ),
237 + 'mediaUrl' => rest_url( 'wp/v2/media' ),
238 + 'isPro' => wpvr_is_pro_active(),
239 + 'pluginUrl' => $plugin_url,
240 + 'listUrl' => admin_url( 'edit.php?post_type=' . self::POST_TYPE ),
241 + 'postEditUrl' => admin_url( 'post.php' ),
242 + 'faIcons' => $fa_icons,
243 + 'ajaxUrl' => admin_url( 'admin-ajax.php' ),
244 + 'exportNonce' => wp_create_nonce( 'wpvr_export_tour' ),
233 245 'imageResizeWarning' => [
234 246 'ajaxNonce' => wp_create_nonce( 'wpvr' ),
235 247 'canManageSettings' => current_user_can( 'manage_options' ),
236 248 'settingEnabled' => get_option( 'high_res_image' ) === 'true',