set_basename( false, __FILE__ ); return; } define( 'BIRCHTOAD_VERSION', '0.1.3' ); define( 'BIRCHTOAD_FILE', __FILE__ ); define( 'BIRCHTOAD_DIR', plugin_dir_path( __FILE__ ) ); define( 'BIRCHTOAD_URL', plugin_dir_url( __FILE__ ) ); define( 'BIRCHTOAD_BASENAME', plugin_basename( __FILE__ ) ); if ( ! defined( 'BIRCHTOAD_EDITION' ) ) { define( 'BIRCHTOAD_EDITION', 'wordpress' ); } if ( ! function_exists( 'birchtoad_fs' ) ) { /** * The Freemius accessor. * * Named with the full slug on purpose. The WordPress.org prefix scan rejects short * accessors such as bt_fs(), and Freemius's own documentation suggests exactly that short * form. Do not shorten it. * * @return Freemius */ function birchtoad_fs() { global $birchtoad_fs; if ( ! isset( $birchtoad_fs ) ) { require_once BIRCHTOAD_DIR . 'vendor/freemius/start.php'; $birchtoad_fs = fs_dynamic_init( array( 'id' => '41217', 'slug' => 'birchtoad', 'premium_slug' => 'birchtoad-premium', 'type' => 'plugin', 'public_key' => 'pk_64e90af099b36c7fda9c5114e5830', 'is_premium' => false, 'premium_suffix' => 'Pro', 'has_addons' => false, 'has_paid_plans' => true, 'is_org_compliant' => true, 'trial' => array( 'days' => 14, 'is_require_payment' => false, ), 'menu' => array( 'slug' => 'birchtoad', 'support' => false, ), ) ); } return $birchtoad_fs; } birchtoad_fs(); do_action( 'birchtoad_fs_loaded' ); /** * The icon on the Freemius opt-in, license and account screens. * * Without this the SDK globs `vendor/freemius/assets/img/.*`, finds nothing, and falls back to * its own generic grey plug. The auto-fetch branch in `get_local_icon_url()` only runs on * localhost, so a live site never recovers on its own. * * Registered under both slugs: the premium build identifies itself as `birchtoad-premium`. */ add_filter( 'fs_plugin_icon_birchtoad', 'birchtoad_fs_icon_path' ); add_filter( 'fs_plugin_icon_birchtoad-premium', 'birchtoad_fs_icon_path' ); } if ( ! function_exists( 'birchtoad_fs_icon_path' ) ) { /** * Absolute path to the square icon Freemius shows on its own screens. * * @return string|false */ function birchtoad_fs_icon_path() { $icon = BIRCHTOAD_DIR . 'assets/img/plugin-icon.png'; return file_exists( $icon ) ? $icon : false; } } require_once BIRCHTOAD_DIR . 'includes/class-birchtoad-features.php'; require_once BIRCHTOAD_DIR . 'includes/class-birchtoad-settings.php'; require_once BIRCHTOAD_DIR . 'includes/class-birchtoad-widget.php'; require_once BIRCHTOAD_DIR . 'includes/class-birchtoad-statement.php'; require_once BIRCHTOAD_DIR . 'includes/class-birchtoad-shortcodes.php'; require_once BIRCHTOAD_DIR . 'includes/class-birchtoad-admin.php'; require_once BIRCHTOAD_DIR . 'includes/class-birchtoad-uninstall.php'; require_once BIRCHTOAD_DIR . 'includes/class-birchtoad-plugin.php'; BirchToad_Plugin::instance(); /** * Whether the paid feature set may run. * * Core never calls this to decide whether to load. Pro code registers itself on core filters, * so the free build has nothing to unlock and a reviewer cannot read it as trialware. * * The marketplace edition has no licensing layer at all, so the build replaces the body with a * plain true and there is no accessor left anywhere in that package. * * @return bool */ function birchtoad_is_pro() { return birchtoad_fs()->can_use_premium_code(); }