Static Push: ' . esc_html( 'Another copy of Static Push is active. Deactivate the other copy on the Plugins screen. To remove it, delete its folder with a file manager rather than the Delete link if you want to keep your settings.' ) . '

'; } } ); return; } define( 'CFSP_VERSION', '2.16.8' ); define( 'CFSP_PLUGIN_URL', 'https://quintaphon.com/wordpress/staticpush/' ); define( 'CFSP_DOCS_URL', 'https://quintaphon.com/docs/wordpress/staticpush/' ); define( 'CFSP_DONATE_URL', 'https://buymeacoffee.com/quintaphon' ); define( 'CFSP_FILE', __FILE__ ); define( 'CFSP_DIR', plugin_dir_path( __FILE__ ) ); define( 'CFSP_URL', plugin_dir_url( __FILE__ ) ); /* * Client ID of the GitHub OAuth App behind the "Connect GitHub" button (Device Flow). * It is public: no client secret is needed or stored. Register the app once at * https://github.com/settings/applications/new, tick "Enable Device Flow", and paste its Client ID here * (or define CFSP_GITHUB_CLIENT_ID in wp-config.php to override it). */ if ( ! defined( 'CFSP_GITHUB_CLIENT_ID' ) ) { define( 'CFSP_GITHUB_CLIENT_ID', 'Ov23liCmylkUOqzuch3I' ); } require_once CFSP_DIR . 'includes/class-cfsp-paths.php'; require_once CFSP_DIR . 'includes/class-cfsp-settings.php'; require_once CFSP_DIR . 'includes/class-cfsp-logger.php'; require_once CFSP_DIR . 'includes/class-cfsp-exporter.php'; require_once CFSP_DIR . 'includes/class-cfsp-urls.php'; require_once CFSP_DIR . 'includes/class-cfsp-cloudflare.php'; require_once CFSP_DIR . 'includes/class-cfsp-cleanup.php'; require_once CFSP_DIR . 'includes/class-cfsp-search.php'; require_once CFSP_DIR . 'includes/class-cfsp-llms.php'; require_once CFSP_DIR . 'includes/class-cfsp-moved.php'; require_once CFSP_DIR . 'includes/class-cfsp-related.php'; require_once CFSP_DIR . 'includes/class-cfsp-feeds.php'; require_once CFSP_DIR . 'includes/class-cfsp-private.php'; require_once CFSP_DIR . 'includes/class-cfsp-integrations.php'; require_once CFSP_DIR . 'includes/class-cfsp-diagnostics.php'; require_once CFSP_DIR . 'includes/class-cfsp-ui.php'; require_once CFSP_DIR . 'includes/class-cfsp-github.php'; require_once CFSP_DIR . 'includes/class-cfsp-github-auth.php'; require_once CFSP_DIR . 'includes/class-cfsp-r2.php'; require_once CFSP_DIR . 'includes/class-cfsp-media.php'; require_once CFSP_DIR . 'includes/class-cfsp-deployer.php'; require_once CFSP_DIR . 'includes/class-cfsp-deploy-github.php'; require_once CFSP_DIR . 'includes/class-cfsp-deploy-cloudflare.php'; require_once CFSP_DIR . 'includes/class-cfsp-job.php'; require_once CFSP_DIR . 'includes/class-cfsp-auto-push.php'; require_once CFSP_DIR . 'includes/class-cfsp-admin.php'; // Registered at load time (not on plugins_loaded) so it also exists during activation. add_filter( 'cron_schedules', function ( $schedules ) { $schedules['cfsp_minute'] = array( 'interval' => 60, 'display' => 'Every minute (Static Push)', ); return $schedules; } ); CFSP_Settings::init(); add_action( 'plugins_loaded', function () { CFSP_Job::init(); if ( is_admin() || wp_doing_cron() ) { CFSP_Settings::migrate_dirs(); } CFSP_Media::init(); CFSP_Related::init(); CFSP_Moved::init(); CFSP_Feeds::init(); CFSP_Private::init(); add_action( 'http_api_curl', array( 'CFSP_Exporter', 'pin_curl' ), 10, 3 ); // WP-Cron's own call to wp-cron.php stays on this server too, like the plugin's background workers. add_filter( 'cron_request', function ( $request ) { if ( isset( $request['args'] ) && is_array( $request['args'] ) ) { $request['args'] = CFSP_Exporter::loopback_args( $request['args'] ); } return $request; } ); CFSP_Auto_Push::init(); CFSP_Admin::init_toolbar(); if ( is_admin() ) { CFSP_Admin::init(); } if ( defined( 'WP_CLI' ) && WP_CLI ) { require_once CFSP_DIR . 'includes/class-cfsp-cli.php'; WP_CLI::add_command( 'static-push', 'CFSP_CLI' ); } } ); register_activation_hook( __FILE__, function () { if ( ! get_option( 'cfsp_worker_key' ) ) { update_option( 'cfsp_worker_key', wp_generate_password( 32, false ), false ); } if ( ! wp_next_scheduled( 'cfsp_watchdog' ) ) { wp_schedule_event( time() + 60, 'cfsp_minute', 'cfsp_watchdog' ); } wp_mkdir_p( CFSP_Settings::export_dir() ); CFSP_Job::reschedule(); CFSP_Media::install(); CFSP_Media::reschedule(); } ); register_deactivation_hook( __FILE__, function () { wp_clear_scheduled_hook( 'cfsp_watchdog' ); wp_clear_scheduled_hook( 'cfsp_run_pending' ); wp_clear_scheduled_hook( 'cfsp_process' ); wp_clear_scheduled_hook( 'cfsp_scheduled_full' ); wp_clear_scheduled_hook( 'cfsp_media_resync' ); } );