set_basename( true, __FILE__ ); return; } if ( ! function_exists( 'als_fs' ) ) { // Create a helper function for easy SDK access. function als_fs() { global $als_fs; if ( ! isset( $als_fs ) ) { // Include Freemius SDK. require_once dirname(__FILE__) . '/freemius/start.php'; $als_fs = fs_dynamic_init( array( 'id' => '3371', 'slug' => 'ajax-live-search', 'premium_slug' => 'ajax-live-search-pro', 'type' => 'plugin', 'public_key' => 'pk_cd26ca3f4a321ce2adee38d9ffdc2', 'is_premium' => false, // If your plugin is a serviceware, set this option to false. 'has_premium_version' => true, 'has_addons' => false, 'has_paid_plans' => true, 'has_affiliation' => 'selected', 'menu' => array( 'slug' => 'als-admin-page', 'first-path' => 'admin.php?page=als-settings', ), ) ); } return $als_fs; } // Init Freemius. als_fs(); // Signal that SDK was initiated. do_action( 'als_fs_loaded' ); } //Only load if the pro version is not activated function ajax_live_search_lite(){ if(!class_exists( 'ajaxLiveSearchPro' )){ require plugin_dir_path( __FILE__ ) . 'includes/load.php'; } } add_action('plugins_loaded', 'ajax_live_search_lite'); //The following runs before a plugin is activated/deactivated register_activation_hook( __FILE__, 'activate_als' ); function activate_als(){ require_once plugin_dir_path( __FILE__ ) . 'includes/class-als-activator.php'; Als_Activator::activate(); } function als_fs_custom_connect_message_on_update( $message, $user_first_name, $plugin_title, $user_login, $site_link, $freemius_link ) { return sprintf( /* translators: Username */ esc_html__( 'Hey %1$s', 'ajax-live-search' ) . ',
' . /* translators: 1: Plugin name. 2: Freemius link. */ esc_html__( 'Please help us improve %2$s! If you opt-in, some non-sensitive data about your usage of %2$s will be sent to %5$s, a diagnostic tracking service we use. If you skip this, that\'s okay! %2$s will still work just fine.', 'ajax-live-search' ) . '

' . esc_html__( 'Note: ', 'ajax-live-search' ) . '' . esc_html__( 'NO SEARCH ACTIVITY & DATA IS SENT BACK TO OUR SERVERS.', 'ajax-live-search' ), $user_first_name, '' . $plugin_title . '', '' . $user_login . '', $site_link, $freemius_link ); } als_fs()->add_filter('connect_message_on_update', 'als_fs_custom_connect_message_on_update', 10, 6); function als_fs_custom_connect_message( $message, $user_first_name, $plugin_title, $user_login, $site_link, $freemius_link ) { return sprintf( /* translators: Username */ esc_html__( 'Hey %1$s', 'ajax-live-search' ) . ',
' . esc_html__( 'Never miss an important update! Opt-in to our security and feature updates notifications, and non-sensitive diagnostic tracking with freemius.com.', 'ajax-live-search' ) . '

' . esc_html__( 'Note: ', 'ajax-live-search' ) . '' . esc_html__( 'It will help us improve your plugin experience.', 'ajax-live-search' ), $user_first_name, '' . $plugin_title . '', '' . $user_login . '', $site_link, $freemius_link ); } als_fs()->add_filter('connect_message', 'als_fs_custom_connect_message_on_update', 10, 6);