Version Description
- Fix for loading inline CSS from SiteOrigin Page Builder version 2.5 or later. Props @alexgso for the pull request!
Download this release
Release Info
Developer | figureone |
Plugin | Insert Pages |
Version | 3.2.3 |
Comparing to | |
See all releases |
Code changes from version 3.2.2 to 3.2.3
- insert-pages.php +25 -11
- readme.txt +3 -0
insert-pages.php
CHANGED
@@ -9,7 +9,7 @@ Author URI: http://www.linkedin.com/in/paulrryan
|
|
9 |
Text Domain: insert-pages
|
10 |
Domain Path: /languages
|
11 |
License: GPL2
|
12 |
-
Version: 3.2.
|
13 |
*/
|
14 |
|
15 |
/* Copyright 2011 Paul Ryan (email: prar@hawaii.edu)
|
@@ -224,13 +224,13 @@ if ( !class_exists( 'InsertPagesPlugin' ) ) {
|
|
224 |
// Start output buffering so we can save the output to a string.
|
225 |
ob_start();
|
226 |
|
227 |
-
// If Beaver Builder
|
228 |
// Note: Temporarily set the global $post->ID to the inserted page ID,
|
229 |
-
// since
|
230 |
-
if ( class_exists( 'FLBuilder' ) ) {
|
231 |
// If we're not in The Loop (i.e., global $post isn't assigned),
|
232 |
// temporarily populate it with the post to be inserted so we can
|
233 |
-
// retrieve
|
234 |
// after we're done.
|
235 |
if ( is_null( $post ) ) {
|
236 |
$old_post_id = null;
|
@@ -240,7 +240,14 @@ if ( !class_exists( 'InsertPagesPlugin' ) ) {
|
|
240 |
$post->ID = $inserted_page->ID;
|
241 |
}
|
242 |
|
243 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
244 |
|
245 |
if ( is_null( $old_post_id ) ) {
|
246 |
$post = null;
|
@@ -379,13 +386,13 @@ if ( !class_exists( 'InsertPagesPlugin' ) ) {
|
|
379 |
// Start output buffering so we can save the output to string
|
380 |
ob_start();
|
381 |
|
382 |
-
// If Beaver Builder
|
383 |
// Note: Temporarily set the global $post->ID to the inserted page ID,
|
384 |
-
// since
|
385 |
-
if ( class_exists( 'FLBuilder' ) ) {
|
386 |
// If we're not in The Loop (i.e., global $post isn't assigned),
|
387 |
// temporarily populate it with the post to be inserted so we can
|
388 |
-
// retrieve
|
389 |
// after we're done.
|
390 |
if ( is_null( $post ) ) {
|
391 |
$old_post_id = null;
|
@@ -395,7 +402,14 @@ if ( !class_exists( 'InsertPagesPlugin' ) ) {
|
|
395 |
$post->ID = $inserted_page->ID;
|
396 |
}
|
397 |
|
398 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
399 |
|
400 |
if ( is_null( $old_post_id ) ) {
|
401 |
$post = null;
|
9 |
Text Domain: insert-pages
|
10 |
Domain Path: /languages
|
11 |
License: GPL2
|
12 |
+
Version: 3.2.3
|
13 |
*/
|
14 |
|
15 |
/* Copyright 2011 Paul Ryan (email: prar@hawaii.edu)
|
224 |
// Start output buffering so we can save the output to a string.
|
225 |
ob_start();
|
226 |
|
227 |
+
// If Beaver Builder or SiteOrigin Page Builder are enabled, load any cached styles associated with the inserted page.
|
228 |
// Note: Temporarily set the global $post->ID to the inserted page ID,
|
229 |
+
// since both builders rely on the id to load the appropriate styles.
|
230 |
+
if ( class_exists( 'FLBuilder' ) || class_exists( 'SiteOrigin_Panels' ) ) {
|
231 |
// If we're not in The Loop (i.e., global $post isn't assigned),
|
232 |
// temporarily populate it with the post to be inserted so we can
|
233 |
+
// retrieve generated styles for that post. Reset $post to null
|
234 |
// after we're done.
|
235 |
if ( is_null( $post ) ) {
|
236 |
$old_post_id = null;
|
240 |
$post->ID = $inserted_page->ID;
|
241 |
}
|
242 |
|
243 |
+
if ( class_exists( 'FLBuilder' ) ) {
|
244 |
+
FLBuilder::enqueue_layout_styles_scripts( $inserted_page->ID );
|
245 |
+
}
|
246 |
+
|
247 |
+
if ( class_exists( 'SiteOrigin_Panels' ) ) {
|
248 |
+
$renderer = SiteOrigin_Panels::renderer();
|
249 |
+
$renderer->add_inline_css( $inserted_page->ID, $renderer->generate_css( $inserted_page->ID ) );
|
250 |
+
}
|
251 |
|
252 |
if ( is_null( $old_post_id ) ) {
|
253 |
$post = null;
|
386 |
// Start output buffering so we can save the output to string
|
387 |
ob_start();
|
388 |
|
389 |
+
// If Beaver Builder or SiteOrigin Page Builder are enabled, load any cached styles associated with the inserted page.
|
390 |
// Note: Temporarily set the global $post->ID to the inserted page ID,
|
391 |
+
// since both builders rely on the id to load the appropriate styles.
|
392 |
+
if ( class_exists( 'FLBuilder' ) || class_exists( 'SiteOrigin_Panels' ) ) {
|
393 |
// If we're not in The Loop (i.e., global $post isn't assigned),
|
394 |
// temporarily populate it with the post to be inserted so we can
|
395 |
+
// retrieve generated styles for that post. Reset $post to null
|
396 |
// after we're done.
|
397 |
if ( is_null( $post ) ) {
|
398 |
$old_post_id = null;
|
402 |
$post->ID = $inserted_page->ID;
|
403 |
}
|
404 |
|
405 |
+
if ( class_exists( 'FLBuilder' ) ) {
|
406 |
+
FLBuilder::enqueue_layout_styles_scripts( $inserted_page->ID );
|
407 |
+
}
|
408 |
+
|
409 |
+
if ( class_exists( 'SiteOrigin_Panels' ) ) {
|
410 |
+
$renderer = SiteOrigin_Panels::renderer();
|
411 |
+
$renderer->add_inline_css( $inserted_page->ID, $renderer->generate_css( $inserted_page->ID ) );
|
412 |
+
}
|
413 |
|
414 |
if ( is_null( $old_post_id ) ) {
|
415 |
$post = null;
|
readme.txt
CHANGED
@@ -86,6 +86,9 @@ Just one! The plugin prevents you from embedding a page in itself, but you can t
|
|
86 |
|
87 |
== Changelog ==
|
88 |
|
|
|
|
|
|
|
89 |
= 3.2.2 =
|
90 |
* Revert TinyMCE filter hook to 3.1.9 method due to continued Divi theme compatibility issues.
|
91 |
* Add configurable option to load TinyMCE filter in a different location to support SiteOrigin PageBuilder users.
|
86 |
|
87 |
== Changelog ==
|
88 |
|
89 |
+
= 3.2.3 =
|
90 |
+
* Fix for loading inline CSS from SiteOrigin Page Builder version 2.5 or later. Props @alexgso for the pull request!
|
91 |
+
|
92 |
= 3.2.2 =
|
93 |
* Revert TinyMCE filter hook to 3.1.9 method due to continued Divi theme compatibility issues.
|
94 |
* Add configurable option to load TinyMCE filter in a different location to support SiteOrigin PageBuilder users.
|