This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( 'PHP.wasm' === $_SERVER['SERVER_SOFTWARE'] && 'playground.wordpress.net' === $_SERVER['HTTP_HOST'] ) { | |
// inside playground.wordpress.net | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Blocksy; | |
/* | |
*/ | |
class Capabilities { | |
private $accounts_cache = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# forked from http://forge.mysql.com/tools/tool.php?id=137 | |
[client] | |
#password = [your_password] | |
port = 3306 | |
socket = /tmp/mysqld.sock | |
# *** Application-specific options follow here *** | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Functions that you'll need | |
function get_free_version() { /* ... */ } | |
function get_premium_version() { /* ... */ } | |
function is_free_plugin($plugin_basename) { /* ... */ } | |
// Filter the value of the transient where WordPress stores pending updates | |
add_filter('site_transient_update_plugins', function ($value) { | |
// Only proceed if the transient has responses from update servers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('add_meta_boxes', function(){ | |
add_meta_box('sp_edd_fs_metabox', 'Freemius data', 'sp_edd_fs_metabox', 'download', 'side', 'default' ); | |
}); | |
function sp_edd_fs_metabox( $post ){ | |
$plugin_id = get_post_meta( $post->ID, '_sp_edd_fs_plugin_id', true ); | |
$coupon = get_post_meta( $post->ID, '_sp_edd_fs_coupon', true ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FS_API_SCOPE="developer" | |
FS_API_DEV_ID=000 | |
FS_API_PUBLIC_KEY="" | |
FS_API_SECRET_KEY="" | |
TICKSY_SECRET_KEY="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Freemius | |
API_HOST = 'api.freemius.com' | |
SANDBOX_HOST = 'sandbox-api.freemius.com' | |
class Base | |
# Options taken from http://docs.freemius.apiary.io/#introduction/the-authentication-header | |
# * host Default is api.freemius.com | |
# * api_version Default is v1 | |
# * scope_entity Default is 'plugin'. Could also be 'developer', 'install', 'site', 'user' | |
# * scope_entity_id Required. |