PluginProbe
WebberZone Top 10 — Popular Posts / 4.5.1
WebberZone Top 10 — Popular Posts v4.5.1
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.5.1, at load-freemius.php

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