plugins_loaded(); } ); add_action( 'init', 'generatecloud_updater' ); /** * Check for and receive updates. * * @since 1.0.0 */ function generatecloud_updater() { /** * From EDD example plugin. * * To support auto-updates, this needs to run during the wp_version_check cron job for privileged users. */ $doing_cron = defined( 'DOING_CRON' ) && DOING_CRON; if ( ! current_user_can( 'manage_options' ) && ! $doing_cron ) { return; } $license_settings = get_option( 'generatecloud_licensing', [] ); $license_key = trim( $license_settings['key'] ?? '' ); $edd_updater = new EDD_Updater( 'https://generatepress.com', __FILE__, array( 'version' => GENERATECLOUD_VERSION, 'license' => esc_attr( $license_key ), 'item_id' => 2883156, 'author' => 'GeneratePress', 'beta' => $license_settings['beta'] ?? false, ) ); } add_action( 'init', 'generatecloud_text_domain' ); /** * Load the text domain. * * @since 1.0.0 */ function generatecloud_text_domain() { load_plugin_textdomain( GENERATECLOUD_SLUG ); }