=' ) ) { $notice = sprintf( '%1$s requires WordPress version %2$s or greater. Please update your WordPress to the latest version.', 'Radio Player', '5.0' ); add_action( 'admin_notices', function () use($notice) { ?>

set_basename( true, __FILE__ ); } else { // DO NOT REMOVE THIS IF, IT IS ESSENTIAL FOR THE `function_exists` CALL ABOVE TO PROPERLY WORK. if ( !function_exists( 'rp_fs' ) ) { // Create a helper function for easy SDK access. function rp_fs() { global $rp_fs; if ( !isset( $rp_fs ) ) { // Include Freemius SDK. require_once dirname( __FILE__ ) . '/freemius/start.php'; $rp_fs = fs_dynamic_init( array( 'id' => '8684', 'slug' => 'radio-player', 'type' => 'plugin', 'public_key' => 'pk_6175576896c0d8c125d31e42287ab', 'is_premium' => true, 'premium_suffix' => 'PRO', 'has_addons' => true, 'has_paid_plans' => true, 'trial' => array( 'days' => 3, 'is_require_payment' => true, ), 'menu' => array( 'slug' => 'radio-player', 'first-path' => 'admin.php?page=radio-player-getting-started', 'contact' => false, 'support' => false, ), 'is_live' => true, ) ); } return $rp_fs; } // Init Freemius. rp_fs(); // Signal that SDK was initiated. do_action( 'rp_fs_loaded' ); } // ... Your plugin's main file logic ... /** define constants */ define( 'RADIO_PLAYER_VERSION', '2.0.78' ); define( 'RADIO_PLAYER_FILE', __FILE__ ); define( 'RADIO_PLAYER_PATH', dirname( RADIO_PLAYER_FILE ) ); define( 'RADIO_PLAYER_INCLUDES', RADIO_PLAYER_PATH . '/includes' ); define( 'RADIO_PLAYER_URL', plugins_url( '', RADIO_PLAYER_FILE ) ); define( 'RADIO_PLAYER_ASSETS', RADIO_PLAYER_URL . '/assets' ); define( 'RADIO_PLAYER_TEMPLATES', RADIO_PLAYER_PATH . '/templates' ); // Show Radio Player Ads Addon Update Notice if ( get_option( 'radio_player_ads_notice', false ) ) { add_action( 'admin_notices', function () { $notice = sprintf( esc_html__( '"%1$s" - addon is deactivated. Please update your %1$s addon plugin to the latest version (v%2$s)', 'radio-player' ), 'Radio Player Ads', '' . esc_html__( '1.0.1', 'radio-player' ) . '' ); ?>