Insert Pages - Version 3.5.4

Version Description

  • Support custom scripts and styles in inserted pages created with Visual Composer version 26.0.
Download this release

Release Info

Developer figureone
Plugin Icon wp plugin Insert Pages
Version 3.5.4
Comparing to
See all releases

Code changes from version 3.5.3.2 to 3.5.4

Files changed (2) hide show
  1. insert-pages.php +21 -1
  2. readme.txt +3 -0
insert-pages.php CHANGED
@@ -7,7 +7,7 @@
7
  * Text Domain: insert-pages
8
  * Domain Path: /languages
9
  * License: GPL2
10
- * Version: 3.5.3.2
11
  *
12
  * @package insert-pages
13
  */
@@ -490,6 +490,16 @@ if ( ! class_exists( 'InsertPagesPlugin' ) ) {
490
  } elseif ( defined( 'VCV_TF_ASSETS_IN_UPLOADS' ) && constant( 'VCV_TF_ASSETS_IN_UPLOADS' ) ) {
491
  $upload_dir = wp_upload_dir();
492
  $bundle_url = set_url_scheme( $upload_dir['baseurl'] . '/' . VCV_PLUGIN_ASSETS_DIRNAME . '/' . ltrim( $bundle_url, '/\\' ) );
 
 
 
 
 
 
 
 
 
 
493
  } else {
494
  $bundle_url = content_url() . '/' . VCV_PLUGIN_ASSETS_DIRNAME . '/' . ltrim( $bundle_url, '/\\' );
495
  }
@@ -769,6 +779,16 @@ if ( ! class_exists( 'InsertPagesPlugin' ) ) {
769
  } elseif ( defined( 'VCV_TF_ASSETS_IN_UPLOADS' ) && constant( 'VCV_TF_ASSETS_IN_UPLOADS' ) ) {
770
  $upload_dir = wp_upload_dir();
771
  $bundle_url = set_url_scheme( $upload_dir['baseurl'] . '/' . VCV_PLUGIN_ASSETS_DIRNAME . '/' . ltrim( $bundle_url, '/\\' ) );
 
 
 
 
 
 
 
 
 
 
772
  } else {
773
  $bundle_url = content_url() . '/' . VCV_PLUGIN_ASSETS_DIRNAME . '/' . ltrim( $bundle_url, '/\\' );
774
  }
7
  * Text Domain: insert-pages
8
  * Domain Path: /languages
9
  * License: GPL2
10
+ * Version: 3.5.4
11
  *
12
  * @package insert-pages
13
  */
490
  } elseif ( defined( 'VCV_TF_ASSETS_IN_UPLOADS' ) && constant( 'VCV_TF_ASSETS_IN_UPLOADS' ) ) {
491
  $upload_dir = wp_upload_dir();
492
  $bundle_url = set_url_scheme( $upload_dir['baseurl'] . '/' . VCV_PLUGIN_ASSETS_DIRNAME . '/' . ltrim( $bundle_url, '/\\' ) );
493
+ } elseif ( class_exists( 'VisualComposer\Helpers\AssetsEnqueue' ) ) {
494
+ // These methods should work for Visual Composer 26.0.
495
+ // Enqueue custom css/js stored in vcvSourceAssetsFiles postmeta.
496
+ $vc = new \VisualComposer\Helpers\AssetsEnqueue;
497
+ if ( method_exists( $vc, 'enqueueAssets' ) ) {
498
+ $vc->enqueueAssets($inserted_page->ID);
499
+ }
500
+ // Enqueue custom CSS stored in vcvSourceCssFileUrl postmeta.
501
+ $upload_dir = wp_upload_dir();
502
+ $bundle_url = set_url_scheme( $upload_dir['baseurl'] . '/' . VCV_PLUGIN_ASSETS_DIRNAME . '/' . ltrim( $bundle_url, '/\\' ) );
503
  } else {
504
  $bundle_url = content_url() . '/' . VCV_PLUGIN_ASSETS_DIRNAME . '/' . ltrim( $bundle_url, '/\\' );
505
  }
779
  } elseif ( defined( 'VCV_TF_ASSETS_IN_UPLOADS' ) && constant( 'VCV_TF_ASSETS_IN_UPLOADS' ) ) {
780
  $upload_dir = wp_upload_dir();
781
  $bundle_url = set_url_scheme( $upload_dir['baseurl'] . '/' . VCV_PLUGIN_ASSETS_DIRNAME . '/' . ltrim( $bundle_url, '/\\' ) );
782
+ } elseif ( class_exists( 'VisualComposer\Helpers\AssetsEnqueue' ) ) {
783
+ // These methods should work for Visual Composer 26.0.
784
+ // Enqueue custom css/js stored in vcvSourceAssetsFiles postmeta.
785
+ $vc = new \VisualComposer\Helpers\AssetsEnqueue;
786
+ if ( method_exists( $vc, 'enqueueAssets' ) ) {
787
+ $vc->enqueueAssets($inserted_page->ID);
788
+ }
789
+ // Enqueue custom CSS stored in vcvSourceCssFileUrl postmeta.
790
+ $upload_dir = wp_upload_dir();
791
+ $bundle_url = set_url_scheme( $upload_dir['baseurl'] . '/' . VCV_PLUGIN_ASSETS_DIRNAME . '/' . ltrim( $bundle_url, '/\\' ) );
792
  } else {
793
  $bundle_url = content_url() . '/' . VCV_PLUGIN_ASSETS_DIRNAME . '/' . ltrim( $bundle_url, '/\\' );
794
  }
readme.txt CHANGED
@@ -111,6 +111,9 @@ Just one! The plugin prevents you from embedding a page in itself, but you can t
111
 
112
  == Changelog ==
113
 
 
 
 
114
  = 3.5.3.2 =
115
  * Fix for loop detection: we had accidentally prevented pages from inserting another page multiple times (not in a loop).
116
 
111
 
112
  == Changelog ==
113
 
114
+ = 3.5.4 =
115
+ * Support custom scripts and styles in inserted pages created with Visual Composer version 26.0.
116
+
117
  = 3.5.3.2 =
118
  * Fix for loop detection: we had accidentally prevented pages from inserting another page multiple times (not in a loop).
119