Plugin Directory

Changeset 1956511


Ignore:
Timestamp:
10/14/2018 02:09:54 PM (7 years ago)
Author:
resermy
Message:

Add freemius

Location:
devices
Files:
440 added
2 edited

Legend:

Unmodified
Added
Removed
  • devices/tags/1.0.0/devices.php

    r1956317 r1956511  
    3939    exit;
    4040}
     41
     42// Create a helper function for easy SDK access.
     43function devices() {
     44    global $devices;
     45    if ( ! isset( $devices ) ) {
     46        // Include Freemius SDK.
     47        require_once dirname( __FILE__ ) . '/freemius/start.php';
     48        $devices = fs_dynamic_init( array(
     49            'id'             => '2707',
     50            'slug'           => 'devices',
     51            'type'           => 'plugin',
     52            'public_key'     => 'pk_789b66d92f2a507d9adefcf9d17c8',
     53            'is_premium'     => false,
     54            'has_addons'     => false,
     55            'has_paid_plans' => false,
     56            'menu'           => array(
     57                'first-path' => 'plugins.php',
     58                'account'    => false,
     59                'contact'    => false,
     60                'support'    => false,
     61            ),
     62        ) );
     63    }
     64
     65    return $devices;
     66}
     67
     68// Init Freemius.
     69devices();
     70// Signal that SDK was initiated.
     71do_action( 'devices_loaded' );
     72
    4173
    4274/* Inject vars when enqueueing script*/
  • devices/trunk/devices.php

    r1956317 r1956511  
    3939    exit;
    4040}
     41
     42// Create a helper function for easy SDK access.
     43function devices() {
     44    global $devices;
     45    if ( ! isset( $devices ) ) {
     46        // Include Freemius SDK.
     47        require_once dirname( __FILE__ ) . '/freemius/start.php';
     48        $devices = fs_dynamic_init( array(
     49            'id'             => '2707',
     50            'slug'           => 'devices',
     51            'type'           => 'plugin',
     52            'public_key'     => 'pk_789b66d92f2a507d9adefcf9d17c8',
     53            'is_premium'     => false,
     54            'has_addons'     => false,
     55            'has_paid_plans' => false,
     56            'menu'           => array(
     57                'first-path' => 'plugins.php',
     58                'account'    => false,
     59                'contact'    => false,
     60                'support'    => false,
     61            ),
     62        ) );
     63    }
     64
     65    return $devices;
     66}
     67
     68// Init Freemius.
     69devices();
     70// Signal that SDK was initiated.
     71do_action( 'devices_loaded' );
     72
    4173
    4274/* Inject vars when enqueueing script*/
Note: See TracChangeset for help on using the changeset viewer.