Server IP : 104.21.14.103 / Your IP : 3.144.86.233 Web Server : LiteSpeed System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : giankuin ( 1871) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/giankuin/public_html/wp-content/plugins/font-awesome/includes/ |
Upload File : |
<?php namespace FortAwesome; require_once trailingslashit( dirname( __FILE__ ) ) . '../defines.php'; require_once trailingslashit( dirname( __FILE__ ) ) . 'class-fontawesome.php'; /** * Plugin activation logic. * * Client code that depends upon this plugin should use {@see FontAwesome_Loader::initialize()}. * * @since 4.0.0 */ class FontAwesome_Activator { /** * Initializes plugin options only if they are empty. * * @since 4.0.0 * @throws ApiRequestException * @throws ApiResponseException * @throws ReleaseProviderStorageException */ public static function activate() { self::initialize(); } /** * Initializes plugin options with defaults only if they are empty. * * Internal use only, not part of this plugin's public API. * * Otherwise, it leaves alone options that are already present. * * Sets default user options. Will attempt to get the latest available version, * which requires access to the Font Awesome API server. Throws an exception * if that request fails. * * @param bool $force if true, overwrite any existing options with defaults * * @ignore * @internal * @throws ApiRequestException * @throws ApiResponseException * @throws ReleaseProviderStorageException */ public static function initialize( $force = false ) { if ( $force || ! get_option( FontAwesome::OPTIONS_KEY ) ) { self::initialize_user_options(); } if ( $force || ! get_option( FontAwesome::CONFLICT_DETECTION_OPTIONS_KEY ) ) { self::initialize_conflict_detection_options(); } } /** * Internal use only. * * @ignore * @internal * @throws ApiRequestException * @throws ApiResponseException * @throws ReleaseProviderStorageException */ private static function initialize_user_options() { fa()->refresh_releases(); $version = fa()->latest_version(); $options = array_merge( FontAwesome::DEFAULT_USER_OPTIONS, [ 'version' => $version ] ); update_option( FontAwesome::OPTIONS_KEY, $options ); } private static function initialize_conflict_detection_options() { update_option( FontAwesome::CONFLICT_DETECTION_OPTIONS_KEY, FontAwesome::DEFAULT_CONFLICT_DETECTION_OPTIONS ); } }