PluginProbe
WebberZone Top 10 — Popular Posts / 4.4.3
WebberZone Top 10 — Popular Posts v4.4.3
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 1.6.1 All 117 releases
top-10 / load-freemius.php

load-freemius.php in WebberZone Top 10 — Popular Posts 4.4.3, at load-freemius.php

75 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Autoloads classes from the WebberZone\Top_Ten namespace.
4 *
5 * @package WebberZone\Top_Ten
6 */
7
8 namespace WebberZone\Top_Ten;
9
10 if ( ! defined( 'ABSPATH' ) ) {
11 exit;
12 }
13 if ( ! function_exists( __NAMESPACE__ . '\\tptn_freemius' ) ) {
14 /**
15 * Initialize Freemius SDK.
16 */
17 function tptn_freemius() {
18 global $tptn_freemius;
19 if ( ! isset( $tptn_freemius ) ) {
20 // Activate multisite network integration.
21 if ( ! defined( 'WP_FS__PRODUCT_16384_MULTISITE' ) ) {
22 define( 'WP_FS__PRODUCT_16384_MULTISITE', true );
23 }
24 // Include Freemius SDK.
25 require_once __DIR__ . '/vendor/freemius/start.php';
26 $tptn_freemius = \fs_dynamic_init(
27 array(
28 'id' => '16384',
29 'slug' => 'top-10',
30 'premium_slug' => 'top-10-pro',
31 'type' => 'plugin',
32 'public_key' => 'pk_bc8489856ce399cf3cc8fd49fc9d3',
33 'is_premium' => false,
34 'premium_suffix' => 'Pro',
35 'has_addons' => false,
36 'has_paid_plans' => true,
37 'menu' => array(
38 'slug' => 'tptn_dashboard',
39 'first-path' => ( is_multisite() && is_network_admin() ? '' : 'admin.php?page=tptn_wizard' ),
40 'contact' => false,
41 'support' => false,
42 'network' => true,
43 ),
44 'is_live' => true,
45 'is_org_compliant' => true,
46 )
47 );
48 }
49 $tptn_freemius->add_filter( 'plugin_icon', __NAMESPACE__ . '\\tptn_freemius_get_plugin_icon' );
50 $tptn_freemius->add_filter( 'after_uninstall', __NAMESPACE__ . '\\tptn_freemius_uninstall' );
51 return $tptn_freemius;
52 }
53
54 /**
55 * Get the plugin icon.
56 *
57 * @return string
58 */
59 function tptn_freemius_get_plugin_icon() {
60 return __DIR__ . '/includes/admin/images/tptn-icon.png';
61 }
62
63 /**
64 * Uninstall the plugin.
65 */
66 function tptn_freemius_uninstall() {
67 require_once __DIR__ . '/uninstaller.php';
68 }
69
70 // Init Freemius.
71 tptn_freemius();
72 // Signal that SDK was initiated.
73 do_action( 'tptn_freemius_loaded' );
74 }
75