Freemius
Description Description
Source Source
File: includes/pum-sdk/freemius/includes/class-freemius.php
Expand full source code Collapse full source code View on Trac
Methods Methods
- __construct — Main singleton instance.
- _account_page_load — Account page resources load.
- _account_page_render — Render account page.
- _activate_account — Tries to activate account based on POST params. — deprecated
- _activate_addon_account — Tries to activate add-on account based on parent plugin info.
- _activate_license
- _activate_license_ajax_action
- _activate_plugin_event_hook — Plugin activated hook.
- _activate_theme_event_hook — Saves the slug of the previous theme if it still exists so that it can be used by the logic in the opt-in form that decides whether to add a close button to the opt-in dialog or not. So after a premium-only theme is activated, the close button will appear and will reactivate the previous theme if clicked. If the previous theme doesn't exist, then there will be no close button.
- _add_affiliate_program_notice — Lets users/customers know that the product has an affiliate program.
- _add_auto_installation_dialog_box — Displays module activation dialog box after a successful upgrade where the user explicitly requested to auto download and install the premium version.
- _add_connect_pointer_script — Add connect / opt-in pointer.
- _add_connectivity_issue_message — Generate API connectivity issue message.
- _add_deactivation_feedback_dialog_box — Displays a confirmation and feedback dialog box when the user clicks on the "Deactivate" link on the plugins page.
- _add_debug_section
- _add_default_submenu_items — Displays the Support Forum link when enabled.
- _add_firewall_issues_javascript
- _add_freemius_tabs — Add in-page JavaScript to inject the Freemius tabs into the module's setting tabs section.
- _add_fs_theme_activation_dialog
- _add_gdpr_optin_js
- _add_license_action_link — Adds "Activate License" or "Change License" link to the main Plugins page link actions collection.
- _add_license_activation — Prepare page to include all required UI and logic for the license activation dialog.
- _add_license_activation_dialog_box — Displays a license activation dialog box when the user clicks on the "Activate License" or "Change License" link on the plugins page.
- _add_optout_dialog — Displays the opt-out dialog box when the user clicks on the "Opt Out" link on the "Plugins" page.
- _add_pending_activation_notice — Show a notice that activation is currently pending.
- _add_premium_version_upgrade_selection
- _add_premium_version_upgrade_selection_action
- _add_premium_version_upgrade_selection_dialog_box
- _add_tabs_after_content — Add the tabs closing HTML after the setting's page content.
- _add_tabs_before_content — Add the tabs HTML before the setting's page content and enqueue any required stylesheets.
- _add_tracking_links — Adds "Opt in" or "Opt out" link to the main "Plugins" page link actions collection.
- _add_trial_notice — Show trial promotional notice (if any trial exist).
- _add_upgrade_action_link — Adds Upgrade and Add-Ons links to the main Plugins page link actions collection.
- _addons_page_load — Load required resources before add-ons page render.
- _addons_page_render — Render add-ons page.
- _admin_init_action — NOTE: admin_menu action executed before admin_init.
- _affiliation_page_render — Renders the "Affiliation" page.
- _after_code_type_change — Triggered after code type has changed.
- _after_new_blog_callback
- _after_site_deactivated_callback — Executed after site deactivation, archive, or flag as spam.
- _after_site_deleted_callback — Executed after site deletion.
- _after_site_reactivated_callback — Executed after site re-activation.
- _after_version_update
- _allow_tracking_callback
- _can_download_premium — Check if user eligible to download premium version updates.
- _cancel_trial — Cancel site trial.
- _check_for_trial_plans — Show trial promotional notice (if any trial exist).
- _clean_admin_content_section — Attach to admin_head hook to hide all admin notices.
- _clean_admin_content_section_hook
- _connect_page_render — Render account connect page.
- _contact_page_render — Render contact-us page.
- _customizer_register
- _deactivate_license
- _deactivate_plugin_hook — Plugin deactivation hook.
- _debug_page_actions
- _debug_page_render
- _decrypt
- _delete_account_addons — Delete plugin's associated add-ons.
- _delete_licenses — Delete all plugin licenses.
- _delete_plans — Delete plugin's plans information.
- _delete_site — Delete site install from Database.
- _delete_site_by_slug — Delete site install from Database.
- _delete_theme_update_data_action
- _downgrade_site — Site plan downgrade.
- _email_about_firewall_issue — Handle user request to resolve connectivity issue.
- _encrypt
- _encrypt_entity
- _enqueue_common_css
- _enqueue_connect_essentials — Enqueue connect requires scripts and styles.
- _enrich_ajax_url — Add special parameter to WP admin AJAX calls so when we process AJAX calls we can identify its source properly.
- _fetch_billing
- _fetch_is_marketing_required_flag_value_ajax_action
- _fetch_latest_version
- _fetch_licenses
- _fetch_newer_version
- _fetch_payments
- _fetch_plugin_plans
- _fetch_site_license_subscription
- _fetch_site_plan
- _find_caller_plugin_file — Leverage backtrace to find caller plugin file path.
- _fix_start_trial_menu_item_url — During trial promotion the "upgrade" submenu item turns to "start trial" to encourage the trial. Since we want to keep the same menu item handler and there's no robust way to add new arguments to the menu item link's querystring, use JavaScript to find the menu item and update the href of the link.
- _gdpr_optin_ajax_action
- _get_admin_page_url — Construct plugin's settings page URL.
- _get_available_premium_license
- _get_current_wp_user
- _get_db_option
- _get_debug_log
- _get_invoice_api_url — Get payment invoice URL.
- _get_latest_download_local_url — Get latest plugin download local URL.
- _get_latest_version_endpoint
- _get_license
- _get_license_by_id
- _get_plan_by_id
- _get_subscription
- _get_sync_license_url — Plugin's account page + sync license URL.
- _get_uninstall_reasons
- _get_user_by_email
- _get_user_by_id
- _handle_account_edits — Handle account page updates / edits / actions.
- _handle_account_user_sync — Sync user's information.
- _has_premium_license
- _hide_admin_notices — Hide all admin notices to prevent distractions.
- _hook_action_links_and_register_account_hooks
- _install_premium_version_ajax_action — After upgrade callback to install and auto activate a plugin.
- _install_with_current_user — Install plugin with current logged WP user info.
- _install_with_new_user — Install plugin with new user information after approval.
- _is_addon_id
- _is_plugin_page — Check if the current page is the plugin's main admin settings page.
- _load_account
- _load_required_static — Load static resources.
- _load_textdomain — Load framework's text domain.
- _maybe_add_gdpr_optin_ajax_handler
- _maybe_add_subscription_cancellation_dialog_box — Displays a subscription cancellation dialog box when the user clicks on the "Deactivate License" link on the "Account" page or deactivates a plugin and there's an active subscription that is either associated with a non-lifetime single-site license or non-lifetime multisite license that is only activated on a single production site.
- _maybe_show_gdpr_admin_notice
- _modify_plugin_action_links_hook — Modify plugin's page action links collection.
- _network_activate_ajax_action
- _open_license_activation_dialog_box — Include the required JS at the footer of the admin to trigger the license activation dialog box.
- _open_support_forum_in_new_page — Opens the support forum subemenu item in a new browser page.
- _plugin_code_type_changed — Handles plugin's code type change (free premium).
- _plugins_loaded — This action is connected to the 'plugins_loaded' hook and helps to determine if this is a new plugin installation or a plugin update.
- _prepare_admin_menu
- _prepend_fs_allow_updater_and_dialog_flag_url_param — Prepends the `fs_allow_updater_and_dialog` param to the plugin information URLs to tell the SDK to handle the information that is shown on the plugin details dialog that is shown when the relevant link is clicked.
- _pricing_page_render — Render pricing page.
- _redirect_on_activation_hook — Forward page to activation page.
- _redirect_on_clicked_menu_link
- _register_account_hooks
- _register_hooks
- _remove_fs_updates_from_plugin_install_page — Makes Freemius-related updates unavailable on the "Add Plugins" admin page (/plugin-install.php) so that they won't interfere with the .org plugins' functionalities on that page (e.g. updating of a .org plugin).
- _resend_license_key_ajax_action
- _retry_connectivity_test — Handle connectivity test retry approved by the user.
- _run_sync_install
- _sdk_version_update
- _set_account
- _set_db_option
- _show_theme_activation_optin_dialog
- _start_trial_ajax_action — Trial start for anonymous users (AJAX callback).
- _stop_tracking_callback
- _store_account — Store account params in the Database.
- _store_account_addons — Update account add-ons list.
- _store_addons — Update new updates information.
- _store_licenses — Update user's plugin licenses.
- _store_plans — Update plugin's plans information.
- _store_site — Update site information.
- _store_tabs_ajax_action — Cache theme's tabs HTML for a week. The cache will also be set as expired after version and type (free/premium) changes, in addition to the week period.
- _store_tabs_styles — Cache theme's settings page custom styles. The cache will also be set as expired after version and type (free/premium) changes, in addition to the week period.
- _store_update — Update new updates information.
- _store_user — Update user information.
- _style_premium_theme — If the theme has a paid version, add some custom styling to the theme's premium version (if exists) to highlight that it's the premium version of the same theme, making it easier for identification after the user upgrades and upload it to the site.
- _submit_affiliate_application
- _submit_uninstall_reason_action — Called after the user has submitted his reason for deactivating the plugin.
- _sync_addon_license — Sync plugin's add-on license.
- _sync_cron — Data sync cron job. Replaces the background sync non blocking HTTP request that doesn't halt page loading.
- _sync_cron_method — The actual data sync cron logic.
- _sync_install_cron_method — The actual install(s) sync cron logic.
- _sync_license — Sync site's plan.
- _sync_licenses — Sync local licenses with remote server.
- _sync_plans — Sync local plugin plans with remote server.
- _sync_plugin_license — Sync site's plugin plan.
- _sync_site_subscription — Sync site's subscription.
- _tabs_capture — Inject a JavaScript logic to capture the theme tabs HTML.
- _toggle_debug_mode
- _uninstall_plugin_event — Plugin uninstall hook.
- _uninstall_plugin_hook — Uninstall plugin hook. Called only when connected his account with Freemius for active sites tracking.
- _update_billing_ajax_action — Billing update AJAX callback.
- _update_licenses
- _update_site_license — Sync site's license with user licenses.
- _version_updates_handler
- activate_license_on_many_installs — Activate a given license on a collection of installs.
- activate_license_on_many_sites — Activate a given license on a collection of blogs/sites that are not yet opted-in.
- activate_parent_account — Tries to activate parent account based on add-on's info.
- activate_previous_theme
- add_action — Add action, specific for the current context plugin.
- add_admin_message — Adds admin message.
- add_ajax_action — Add AJAX action, specific for the current context plugin.
- add_ajax_action_static — Add AJAX action.
- add_filter — Add filter, specific for the current context plugin.
- add_gdpr_optin_ajax_handler_and_style
- add_menu_action — Admin dashboard menu items modifications.
- add_network_menu_when_missing — If a plugin was network activated and connected but don't have a network level settings, then add an artificial menu item for the Account and other Freemius settings.
- add_plugin_action_link — Add plugin action link.
- add_show_pending — If running with a secret key, assume it's the developer and show pending plans as well.
- add_sticky_admin_message — Adds sticky admin message.
- add_sticky_optin_admin_notice
- add_submenu_item
- add_submenu_items — Add default Freemius menu items.
- add_submenu_link_item
- addon_checkout_url — Add-on checkout URL.
- addon_url — Add-on direct info URL.
- admin_url
- allow_network_tracking — Opt-in network back into usage tracking.
- allow_site_tracking — Opt-in back into usage tracking.
- allow_tracking — Opt-in back into usage tracking.
- apply_filters — Apply filter, specific for the current context plugin.
- can_activate_license_on_network — Checks if the given license can be activated on the whole network.
- can_activate_previous_theme
- can_use_premium_code — Check if user is a trial or have feature enabled license.
- cancel_subscription_or_trial
- cancel_subscription_or_trial_ajax_action
- check_ajax_referer
- check_updates
- checkout_url — Checkout page URL.
- clear_cron
- clear_cron_data
- clear_install_sync_cron
- clear_module_main_file_cache
- clear_sync_cron
- complete_change_owner — Handle install ownership change.
- connect_again — Clears the anonymous mode and redirects to the opt-in screen.
- consolidate_licenses
- contact_url — Plugin's account URL.
- create_installs_with_user — Initiate an API request to create a collection of installs.
- cron_last_execution — Unix timestamp for previous cron execution or false if never executed.
- current_page_url — Return current page's URL.
- deactivate_premium_only_addon_without_license — Deactivate add-on if it's premium only and the user does't have a valid license.
- decrypt_entity
- delegate_connection — Delegate activation for the given sites in the network (or all sites if `null`) to site admins.
- delegate_site_connection — Delegate specific network site conncetion to the site admin.
- delete_account_event — Delete account.
- delete_network_account_event — Delete network level account.
- delete_unused_subscriptions
- delete_user — Delete user.
- disable_opt_in_notice_and_lock_user — Prevents the GDPR opt-in admin notice from being added if the user has already chosen to allow or not allow marketing.
- do_action — Do action, specific for the current context plugin.
- download_latest_directly — Download latest plugin version, based on plan.
- dynamic_init — Dynamic initiator, originally created to support initiation with parent_id for add-ons.
- embed_submenu_items — Moved the actual submenu item additions to a separated function, in order to support sub-submenu items when the plugin's settings only have a submenu and not top-level menu item.
- enable_anonymous — Check if plugin can work in anonymous mode. — deprecated
- enqueue_gdpr_optin_notice_style
- enrich_request_for_debug
- esc_html_inline
- execute_cron — Consolidated cron execution for performance optimization. The max number of API requests is based on the number of unique opted-in users.
- fetch_affiliate_and_custom_terms
- fetch_affiliate_and_terms
- fetch_affiliate_terms
- fetch_and_store_current_user_gdpr_anonymously
- fetch_license_by_key
- fetch_module_info — Fetch module's extended info.
- fetch_plan_by_id
- fetch_remote_icon_url — Fetch module's remote icon URL.
- fetch_user_by_install — Special user recovery mechanism.
- fetch_user_marketing_flag_status_by_plugins — This method is called for opted-in users to fetch the is_marketing_allowed flag of the user for all the plugins and themes they've opted in to.
- find_first_install
- find_slug_by_basename — Find plugin's slug by plugin's basename.
- get_absolute_path
- get_account_addons
- get_account_option
- get_account_tab_url
- get_account_url — Plugin's account URL.
- get_action_tag
- get_action_tag_static
- get_activation_url
- get_active_plugins — Get collection of all active plugins. Including network activated plugins.
- get_active_plugins_basenames — Get the basenames of all active plugins for specific blog. Including network activated plugins.
- get_addon — Get add-on by ID (from local data).
- get_addon_basename — Get add-on basename.
- get_addon_by_slug — Get add-on by slug (from local data).
- get_addon_instance
- get_addons — Get plugin add-ons.
- get_address_to_blog_map — Get a mapping between the site addresses to their blog IDs.
- get_affiliate
- get_affiliate_application_data
- get_affiliate_terms
- get_after_activation_url — Get the URL of the page that should be loaded after the user connect or skip in the opt-in screen.
- get_after_plugin_activation_redirect_url — Get the URL of the page that should be loaded right after the plugin activation.
- get_ajax_action
- get_ajax_action_static
- get_ajax_security
- get_all_account_addons
- get_all_addons
- get_all_licenses
- get_all_licenses_by_module_type
- get_all_plans
- get_all_plugins — Get collection of all plugins with their activation status for a specified blog.
- get_all_sites
- get_all_updates
- get_all_users
- get_anonymous_id — Anonymous and unique site identifier (Hash).
- get_api_plugin_scope — Get plugin public API scope.
- get_api_site_or_plugin_scope — Get site API scope object (fallback to public plugin scope when not registered).
- get_api_site_scope
- get_api_user_scope
- get_api_user_scope_by_user
- get_available_premium_licenses
- get_blog_install_map — Get a mapping between the site addresses to their blog IDs.
- get_bool_option
- get_caller_main_file_and_type — Identifies the caller type: plugin or theme.
- get_complete_upgrade_instructions — Helper function that returns the final steps for the upgrade completion.
- get_cron_blog_id — Get the cron's executing blog ID.
- get_cron_data
- get_cron_target_blog_id — WP Cron is executed on a site level. When running in a multisite network environment with the network integration activated, for optimization reasons, we are consolidating the installs data sync cron to be executed only from a single site.
- get_current_or_network_install — Returns the current context install or the network's main install.
- get_current_or_network_user — Returns the current context user or the network's main user.
- get_current_or_network_user_api_scope
- get_current_page — Get current page or the referer if executing a WP AJAX request.
- get_current_wp_user_id
- get_email_sections — Generates the data for the sections of the email content.
- get_gdpr_admin_notice_string
- get_id
- get_install_by_blog_id — Load the module's install based on the blog ID.
- get_install_data_for_api — Get site data for API install request.
- get_install_diff_for_api — Compare site actual data to the stored install data and return the differences for an API data sync.
- get_install_sync_cron_blog_id — Get the sync cron's executing blog ID.
- get_installed_addons — Get installed add-ons instances.
- get_installs_data_for_api — Update installs details.
- get_instance_by_file
- get_instance_by_id
- get_latest_download_api_url — Get latest plugin FS API download URL.
- get_latest_download_link — Get latest plugin download link.
- get_license_by_id — Get license by ID. Unlike _get_license_by_id(), this method only checks the local storage and return any license, whether it's associated with the current context user/install or not.
- get_license_ids_associated_with_installs — Get a collection of unique license IDs that are associated with any installs in the network.
- get_license_network_activation_notice — This method is used to enrich the after upgrade notice instructions when the upgraded license cannot be activated network wide (license quota isn't large enough).
- get_local_icon_url — This method will return the absolute URL of the module's local icon.
- get_logger
- get_menu_items
- get_menu_slug
- get_module_id
- get_module_label
- get_module_root_dir_path
- get_module_type
- get_module_unique_affix — Returns a string that can be used to generate a unique action name, option name, HTML element ID, or HTML element class.
- get_network_install — Returns the main install associated with the network.
- get_network_install_blog_id — Returns the blog ID that is associated with the main install.
- get_network_plugins — Get collection of all plugins and if they are network level activated.
- get_network_user — Returns the main user associated with the network.
- get_next_scheduled_cron — Unix timestamp for next cron execution or false if not scheduled.
- get_numeric_option
- get_opt_in_params
- get_option
- get_options_manager — Note: This method is used externally so don't delete it.
- get_parent_id
- get_parent_instance
- get_plan
- get_plan_by_name
- get_plan_id — Get site's plan ID.
- get_plan_name — Get site's plan name.
- get_plan_title — Get site's plan title.
- get_plans_ids_associated_with_installs — Get a collection of unique plan IDs that are associated with any installs in the network.
- get_plugin
- get_plugin_basename
- get_plugin_data — Return plugin data.
- get_plugin_folder_name
- get_plugin_main_file_path
- get_plugin_name
- get_plugin_slug — Helper function to get specified plugin's slug.
- get_plugin_title
- get_plugin_version
- get_plugins_data_for_api — Return a list of modified plugins since the last sync.
- get_plugins_thumbprint — Generate an MD5 signature of a plugins collection.
- get_premium_slug
- get_previous_theme_activation_url
- get_previous_theme_slug
- get_pricing_cta_label
- get_public_key
- get_reconnect_url
- get_relative_path
- get_sdk_version
- get_secret_key — Will be available only on sandbox mode.
- get_site
- get_site_active_plugins — Get collection of all site active plugins for a specified blog.
- get_site_blog_id
- get_site_info
- get_sites
- get_slug
- get_support_forum_url — Helper method to return the module's support forum URL.
- get_sync_cron_blog_id — Get the sync cron's executing blog ID.
- get_tabs_html — Get module's settings page HTML content, starting from the beginning of the element, until the tabs HTML (including).
- get_target_folder_name — Retrieve the desired folder name for the product.
- get_text
- get_text_inline
- get_text_x_inline
- get_themes_data_for_api — Return a list of modified themes since the last sync.
- get_top_level_menu_capability
- get_top_level_menu_slug
- get_trial_plan — Get trial plan information (if in trial).
- get_trial_url
- get_unique_affix — Returns a string that can be used to generate a unique action name, option name, HTML element ID, or HTML element class.
- get_update
- get_upgrade_url — Alias to pricing_url().
- get_user
- get_user_id_license_ids_map
- get_user_licenses — Get all user's available licenses for the current module.
- get_user_linked_license_ids — Get a collection of the user's linked license IDs.
- get_user_opted_in_module_ids_map — Gets a map of module IDs that the given user has opted-in to.
- get_versions — Get a sanitized array with the WordPress version, SDK version, and PHP version.
- handle_license_deactivation_result
- has_account_addons — Check if user has any
- has_active_license — Check if site assigned with active license. — deprecated
- has_active_valid_license — Check if site assigned with active & valid (not expired) license.
- has_addons — Check if plugin has any add-ons.
- has_affiliate_program
- has_any_active_valid_license — Checks if there's any site that is associated with an active & valid license.
- has_any_license — Check if user has any licenses associated with the plugin (including expired or blocking).
- has_api_connectivity — Check if there's any connectivity issue to Freemius API.
- has_features_enabled_license — Check if site assigned with license with enabled features.
- has_filter — Check if has filter.
- has_free_plan — Check if plugin has any free plan, or is it premium only.
- has_installed_addons — Check if any add-ons of the plugin are installed.
- has_instance
- has_paid_plan — Check if plugin has any paid plans.
- has_premium_version — Check if module has a premium code version.
- has_purchased_before — Check if current user purchased any other plugins before.
- has_secret_key
- has_settings_menu — Checks whether this module has a settings menu.
- has_tabs — Check if module's original settings page has any tabs.
- has_trial_plan — Check if plugin has any plan with a trail.
- hook_callback_to_install_sync — Add the actual install sync function to the cron job hook.
- hook_callback_to_sync_cron — Add the actual sync function to the cron job hook.
- hook_plugin_action_links — Hook to plugin action links filter.
- init — Init plugin's Freemius instance.
- init_addon — Tell Freemius that the current plugin is an add-on.
- init_change_owner — Start install ownership change.
- init_sandbox — Set Freemius into sandbox mode for debugging.
- install_many_pending_with_user — Install plugin with user.
- install_many_with_new_user — Multi-site install with a new user.
- install_with_current_user
- install_with_new_user — Install plugin with new user.
- install_with_user
- instance — Main singleton instance.
- is_activation_mode — Is plugin in activation mode.
- is_activation_page — Check if current page is the opt-in/pending-activation page.
- is_active_for_site — Check if the current module is active for the site.
- is_active_valid_license — Check if a given license is active & valid (not expired).
- is_addon
- is_addon_activated — Check if add-on installed and activated on site.
- is_addon_connected — Check if add-on was connected to install
- is_addon_installed — Determines if add-on installed.
- is_admin_page — Check if currently in a specified admin page.
- is_agency — Check if current user classified as an agency.
- is_ajax
- is_ajax_action — Check if it's an AJAX call targeted for the current module.
- is_ajax_action_static — Check if it's an AJAX call targeted for current request.
- is_anonymous — Check if the user skipped connecting the account with Freemius.
- is_anonymous_site — Check if the user skipped the connection of a specified site.
- is_api_error
- is_api_result_entity — Checks if given API result is a non-empty entity object with non-empty ID.
- is_api_result_object — Checks if given API result is a non-empty and not an error object.
- is_array_instanceof — Make sure a given argument is an array of a specific type.
- is_business — Check if current user classified as a business.
- is_cron
- is_cron_executed — Check if cron was executed in the last $period of seconds.
- is_cron_on
- is_customizer — Check if a real user is in the customizer view.
- is_delegated_connection — Check if delegated the connection. When running within the the network admin, and haven't specified the blog ID, checks if network level delegated. If running within a site admin or specified a blog ID, check if delegated the connection for the current context site.
- is_developer — Check if current user classified as a developer.
- is_enable_anonymous — Check if plugin can work in anonymous mode.
- is_feature_supported — Check if feature supported with current site's plan.
- is_first_freemius_powered_version — Check if it's the first plugin release that is running Freemius.
- is_free_plan
- is_free_wp_org_theme — Check if the context module is free wp.org theme.
- is_in_trial_promotion — Check if module is currently in a trial promotion mode.
- is_install_sync_scheduled
- is_installed_on_site — Check if module is installed on a specified site.
- is_license_network_active — Checks if the context license is network activated except on the given blog ID.
- is_live — Check if running test vs. live plugin.
- is_matching_url — Check if URL path's are matching and that all querystring arguments of the $sub_url exist in the $url with the same values.
- is_network_activation_mode — Checks if the SDK in network activation mode.
- is_network_active
- is_network_anonymous — Check if super-admin skipped connection for all sites in the network.
- is_network_connected — Check if super-admin opted-in for all sites in the network.
- is_network_delegated_connection — Check if super-admin delegated the connection of ALL sites to the site admins.
- is_network_level_action — Check if executing an action from the network level admin.
- is_network_level_site_specific_action — Check if executing a site level action from the network level admin.
- is_network_registered — Check if super-admin connected at least one site via the network opt-in.
- is_network_upgrade_mode — Will return true after upgrading to the SDK with the network level integration, when the super-admin involvement is required regarding the rest of the sites.
- is_on — Check if Freemius should be turned on for the current plugin install.
- is_only_premium — Check if plugin is premium only (no free plans).
- is_org_repo_compliant — Check if plugin must be WordPress.org compliant.
- is_page_visible — Check if a Freemius page should be accessible via the UI.
- is_paid_trial — Check if currently in a trial with payment method (credit card or paypal).
- is_parent_in_activation — Check if add-on parent plugin in activation mode.
- is_parent_plugin_installed
- is_paying — Check if the user has an activate, non-expired license on current plugin's install.
- is_payments_sandbox — Check if running payments in sandbox mode.
- is_pending_activation — Check if user connected his account and install pending email activation.
- is_permission_requested — Check if specific permission requested.
- is_plan
- is_plugin — Checks if the plugin's type is "plugin". The other type is "theme".
- is_plugin_activation — Check if currently in plugin activation.
- is_plugin_install_page
- is_plugin_new_install — Check if Freemius was added on new plugin installation.
- is_plugin_upgrade_mode — Check if plugin upgrade mode.
- is_plugins_page — Helper method to check if user in the plugins page.
- is_premium — Check if running premium plugin code.
- is_premium_version_installed — Check if the paid version of the module is installed.
- is_pricing_page_visible
- is_registered — Check if user has connected his account (opted-in).
- is_sdk_upgrade_mode — Check if Freemius in SDK upgrade mode.
- is_single_plan — Check if module has only one plan.
- is_site_activation_mode — Is plugin in activation mode.
- is_site_active — Checks if a given blog is active.
- is_site_delegated_connection
- is_ssl
- is_ssl_and_plan — Check if running in HTTPS and if site's plan matching the specified plan.
- is_submenu_item_visible — Checks whether this a submenu item is visible.
- is_super_admin — Checks if a Freemius user_id is associated with a super-admin.
- is_sync_cron_on
- is_sync_cron_scheduled
- is_sync_executed — Check if sync was executed in the last $period of seconds.
- is_theme_settings_page — Check if currently on the theme's setting page or on any of the Freemius added pages (via tabs).
- is_themes_page — Helper method to check if user in the themes page.
- is_tracking_allowed — Returns TRUE if the user opted-in and didn't disconnect (opt-out).
- is_trial
- is_trial_plan — Check if plan based on trial. If not in trial mode, should return false.
- is_trial_utilized — Check if trial already utilized.
- is_updates_page
- is_user_admin — Checks if the current user can activate plugins or switch themes. Note that this method should only be used after the `init` action is triggered because it is using `current_user_can()` which is only functional after the context user is authenticated.
- is_user_in_admin — Check if a real user is visiting the admin dashboard.
- is_valid_email
- last_install_sync — Unix timestamp for previous install sync cron execution or false if never executed.
- last_sync_cron — Unix timestamp for previous sync cron execution or false if never executed.
- link_license_2_user — Link a specified license ID to a given user.
- main_menu_url — Get module's main admin setting page URL.
- maybe_set_slug_and_network_menu_exists_flag — This is used to ensure that before redirecting to the opt-in page after resetting the anonymous mode or deleting the account in the network level, the URL of the page to redirect to is correct.
- migrate_accounts_to_network — A special migration logic for the $_accounts, executed for all the plugins in the system: - Moves some data to the network level storage.
- migrate_install_plan_to_plan_id
- migrate_options_to_network
- migrate_to_subscriptions_collection
- network_upgrade_mode_completed — Clear flag after the upgrade mode completion.
- next_install_sync — Unix timestamp for next install sync cron execution or false if not scheduled.
- next_sync_cron — Unix timestamp for next sync cron execution or false if not scheduled.
- opt_in — 1. If successful opt-in or pending activation returns the next page that the user should be redirected to.
- order_sub_submenu_items — Re-order the submenu items so all Freemius added new submenu items are added right after the plugin's settings submenu item.
- override_i18n — Override default i18n text phrases.
- override_plugin_menu_with_activation — Remove plugin's all admin menu items & pages, and replace with activation page.
- parse_settings — Parse plugin's settings (as defined by the plugin dev).
- ping
- premium_plugin_basename
- pricing_url — Plugin's pricing URL.
- reconnect_locally — If user opted-in and later disabled usage-tracking, re-allow tracking for licensing and updates.
- remove_invalid_paths — Remove invalid paths.
- remove_sdk_reference
- require_pluggable_essentials — Load WordPress core pluggable.php module.
- require_plugin_essentials — Load WordPress core plugin.php essential module.
- reset_anonymous_mode
- restore_current_blog — Restore the blog context to the blog that originally loaded the module.
- run_manual_sync
- safe_remote_post
- schedule_cron
- schedule_install_sync — Instead of running blocking install sync event, execute non blocking scheduled wp-cron.
- schedule_sync_cron
- send_email — Generates and sends an HTML email with customizable sections.
- send_install_update — Update install only if changed.
- send_installs_update — Update installs only if changed.
- set_account_option
- set_account_option_by_module
- set_anonymous_mode
- set_basename — Set the basename of the current product and hook _activate_plugin_event_hook() to the activation action.
- set_cron_data
- set_cron_execution_timestamp — Set cron execution time to now.
- set_keepalive_timestamp — Sets the keepalive time to now.
- set_name — Calculates and stores the product's name. This helper function was created specifically for get_plugin_name() just to make the code clearer.
- set_network_upgrade_mode — Set a module into network upgrade mode.
- set_pending_confirmation
- set_plugin_upgrade_complete — Turn plugin upgrade mode off.
- set_sdk_upgrade_complete — Turn SDK upgrade mode off.
- set_user_linked_license_ids — Override the user's linked license IDs with a new IDs collection.
- setup_account — Set user and site identities.
- setup_network_account — Set user and site identities.
- setup_user
- shoot_ajax_failure — Send a JSON response back to an Ajax request, indicating failure.
- shoot_ajax_response — Send a JSON response back to an Ajax request.
- shoot_ajax_success — Send a JSON response back to an Ajax request, indicating success.
- should_add_sticky_optin_notice
- should_handle_gdpr_admin_notice — Checks if the GDPR admin notice should be handled. By default, this logic is off, unless the integrator adds the special 'handle_gdpr_admin_notice' filter.
- should_page_include_tabs — Check if page should include tabs.
- should_run_connectivity_test
- should_send_keepalive_update
- should_stop_execution — Gate keeper.
- should_use_freemius_updater_and_dialog
- skip_connection — Skip account connect, and set anonymous mode.
- skip_site_connection — Skip connection for specific site in the network.
- start_trial
- stop_network_tracking — Opt-out network from usage tracking.
- stop_site_tracking — Opt-out from usage tracking.
- stop_tracking — Opt-out from usage tracking.
- store_connectivity_info
- store_file_slug_map — Store the map between the plugin's basename to the slug.
- store_id_slug_type_path_map
- store_subscription
- store_user_id_license_ids_map
- switch_to_blog — Switches the Freemius site level context to a specified blog.
- sync_addons
- sync_install — Update install only if changed.
- sync_installs — Update install only if changed.
- sync_license_if_not_exist — Check if specified license exists locally. If not, fetch it and store it.
- sync_plan_if_not_exist — Check if specified plan exists locally. If not, fetch it and store it.
- sync_site_license — Synchronize the site's context license by fetching the license form the API and updating the local data with it.
- track_event — Track install's custom event.
- track_event_once — Track install's custom event only once, but it still triggers the API call.
- try_activate_license_on_network — Checks if license can be activated on all the network sites (opted-in or skipped) that are not yet associated with a license. If possible, try to make the activation, if not return false.
- turn_on — Force turning Freemius on.
- unregister_uninstall_hook — Keeping the uninstall hook registered for free or premium plugin version may result to a fatal error that could happen when a user tries to uninstall either version while one of them is still active. Uninstalling a plugin will trigger inclusion of the free or premium version and if one of them is active during the uninstallation, a fatal error may occur in case the plugin's class or functions are already defined.
- update_email — Handle user email update.
- update_multisite_data_after_site_deactivation — Needs to be executed after site deactivation, archive, deletion, or flag as spam.
- update_plugin_version_event — Plugin version update hook.
- update_user_name — Handle user name update.
- verify_email — Verify user email.
- version_upgrade_checkout_link
- wp_cookie_constants — Define cookie constants which are required by Freemius::_get_current_wp_user() since it uses wp_get_current_user() which needs the cookie constants set. When a plugin is network activated the cookie constants are only configured after the network plugins activation, therefore, if we don't define those constants WP will throw PHP warnings/notices.