PluginProbe
WebberZone Top 10 — Popular Posts / 4.5.2
WebberZone Top 10 — Popular Posts v4.5.2
4.5.2 4.5.1 4.5.0 4.4.3 4.4.2 4.4.1 4.4.0 4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 trunk 1.0 1.0.1 1.1 1.2 1.3 1.4 1.4.1 1.5 1.5.1 1.5.2 1.5.3 1.6 All 118 releases
← All changes | load-freemius.php +12 -4 4.3.2 → 4.5.2 View file →
@@ -1,7 +1,7 @@
1 1 <?php
2 2 /**
3 - * Autoloads classes from the WebberZone\Top_Ten namespace.
3 + * Initializes Freemius SDK for Top 10 Pro.
4 4 *
5 5 * @package WebberZone\Top_Ten
6 6 */
7 7
@@ -9,8 +9,14 @@
9 9
10 10 if ( ! defined( 'ABSPATH' ) ) {
11 11 exit;
12 12 }
13 +if ( ! function_exists( 'fs_dynamic_init' ) ) {
14 + $fs_start = __DIR__ . '/vendor/freemius/wordpress-sdk/start.php';
15 + if ( file_exists( $fs_start ) ) {
16 + require $fs_start;
17 + }
18 +}
13 19 if ( ! function_exists( __NAMESPACE__ . '\\tptn_freemius' ) ) {
14 20 /**
15 21 * Initialize Freemius SDK.
16 22 */
@@ -20,10 +26,8 @@
20 26 // Activate multisite network integration.
21 27 if ( ! defined( 'WP_FS__PRODUCT_16384_MULTISITE' ) ) {
22 28 define( 'WP_FS__PRODUCT_16384_MULTISITE', true );
23 29 }
24 - // Include Freemius SDK.
25 - require_once __DIR__ . '/vendor/freemius/start.php';
26 30 $tptn_freemius = \fs_dynamic_init(
27 31 array(
28 32 'id' => '16384',
29 33 'slug' => 'top-10',
@@ -68,7 +72,11 @@
68 72 }
69 73
70 74 // Init Freemius.
71 75 tptn_freemius();
72 - // Signal that SDK was initiated.
76 + /**
77 + * Fires after the Freemius SDK has been initialized.
78 + *
79 + * @since 4.0.0
80 + */
73 81 do_action( 'tptn_freemius_loaded' );
74 82 }