PluginProbe
BlockSpare – Gutenberg Blocks for News, Magazine, Blog & Business Websites / 3.1.1
BlockSpare – Gutenberg Blocks for News, Magazine, Blog & Business Websites v3.1.1
4.1.0 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.1.0 1.1.1 1.1.2 1.2.0 1.2.1 1.2.2 1.2.3 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 2.1.2 2.5.0 2.5.3 2.6.1 All 38 releases
← All changes | freemius/start.php +36 -4 1.3.23.1.1 View file →
@@ -14,9 +14,9 @@
14 14 * Freemius SDK Version.
15 15 *
16 16 * @var string
17 17 */
18 - $this_sdk_version = '2.4.1';
18 + $this_sdk_version = '2.6.2';
19 19
20 20 #region SDK Selection Logic --------------------------------------------------------------------
21 21
22 22 /**
@@ -45,8 +45,36 @@
45 45 * @since 1.2.2.6
46 46 */
47 47 $file_path = fs_normalize_path( __FILE__ );
48 48 $fs_root_path = dirname( $file_path );
49 +
50 + // @todo: Remove this code after a few months when WP 6.3 usage is low enough.
51 + global $wp_version;
52 +
53 + if (
54 + ! function_exists( 'wp_get_current_user' ) &&
55 + /**
56 + * `get_stylesheet()` will rely on `wp_get_current_user()` when it is being filtered by `theme-previews.php`. That happens only when the site editor is loaded or when the site editor is sending REST requests.
57 + * @see theme-previews.php:wp_get_theme_preview_path()
58 + *
59 + * @todo This behavior is already fixed in the core (WP 6.3.2+), and this code can be removed after a few months when WP 6.3 usage is low enough.
60 + * @since WP 6.3.0
61 + */
62 + version_compare( $wp_version, '6.3', '>=' ) &&
63 + version_compare( $wp_version, '6.3.1', '<=' ) &&
64 + (
65 + 'site-editor.php' === basename( $_SERVER['SCRIPT_FILENAME'] ) ||
66 + (
67 + function_exists( 'wp_is_json_request' ) &&
68 + wp_is_json_request() &&
69 + ! empty( $_GET['wp_theme_preview'] )
70 + )
71 + )
72 + ) {
73 + // Requiring this file since the call to get_stylesheet() below can trigger a call to wp_get_current_user() when previewing a theme.
74 + require_once ABSPATH . 'wp-includes/pluggable.php';
75 + }
76 +
49 77 /**
50 78 * Get the themes directory where the active theme is located (not passing the stylesheet will make WordPress
51 79 * assume that the themes directory is inside `wp-content`.
52 80 *
@@ -67,10 +95,14 @@
67 95 }
68 96
69 97 if ( ! isset( $fs_active_plugins ) ) {
70 98 // Load all Freemius powered active plugins.
71 - $fs_active_plugins = get_option( 'fs_active_plugins', new stdClass() );
99 + $fs_active_plugins = get_option( 'fs_active_plugins' );
72 100
101 + if ( ! is_object( $fs_active_plugins ) ) {
102 + $fs_active_plugins = new stdClass();
103 + }
104 +
73 105 if ( ! isset( $fs_active_plugins->plugins ) ) {
74 106 $fs_active_plugins->plugins = array();
75 107 }
76 108 }
@@ -511,9 +543,9 @@
511 543 return $fs;
512 544 }
513 545
514 546 /**
515 - * @param array <string,string> $module Plugin or Theme details.
547 + * @param array <string,string|bool|array> $module Plugin or Theme details.
516 548 *
517 549 * @return Freemius
518 550 * @throws Freemius_Exception
519 551 */
@@ -526,5 +558,5 @@
526 558
527 559 function fs_dump_log() {
528 560 FS_Logger::dump();
529 561 }
530 - }
562 + }