| @@ -1,61 +1,58 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * Plugin Name: StreamCast |
| 5 | - * Plugin URI: https://wordpress.org/plugins/streamcasthttps://wordpress.org/ | |
| 5 | + * Plugin URI: https://wordpress.org/plugins/streamcast | |
| 6 | 6 | * Description: Play iceCast, Shoutcast, Radioco, Radionomy Live stream in Wordpress. |
| 7 | - * Version: 2.3.3 | |
| 7 | + * Version: 2.4.0 | |
| 8 | 8 | * Author: bPlugins |
| 9 | 9 | * Author URI: http://bPlugins.com |
| 10 | 10 | * License: GPLv2 |
| 11 | + * License URI: https://www.gnu.org/licenses/gpl-2.0.html | |
| 12 | + * Requires at least: 6.2 | |
| 13 | + * Tested up to: 6.9 | |
| 11 | 14 | * Text Domain: streamcast |
| 12 | 15 | * Domain Path: /languages |
| 13 | 16 | */ |
| 17 | + | |
| 14 | 18 | // ABS PATH |
| 15 | -if ( !defined( 'ABSPATH' ) ) { | |
| 19 | +if (!defined('ABSPATH')) | |
| 16 | 20 | exit; |
| 17 | -} | |
| 18 | -if ( function_exists( 'str_fs' ) ) { | |
| 19 | - str_fs()->set_basename( false, __FILE__ ); | |
| 21 | + | |
| 22 | + | |
| 23 | +if (function_exists('str_fs')) { | |
| 24 | + str_fs()->set_basename(false, __FILE__); | |
| 20 | 25 | } else { |
| 21 | 26 | // Some Setup |
| 22 | - define( 'STP_PLUGIN_DIR', plugin_dir_url( __FILE__ ) ); | |
| 23 | - define( 'STP_PLUGIN_PATH', plugin_dir_path( __FILE__ ) ); | |
| 24 | - define( 'STP_PLUGIN_VERSION', '2.3.3' ); | |
| 25 | - define( 'STP_HAS_FREE', 'streamcast/streamcast.php' === plugin_basename( __FILE__ ) ); | |
| 26 | - define( 'STP_HAS_PRO', 'streamcast-premium/streamcast.php' === plugin_basename( __FILE__ ) ); | |
| 27 | - if ( !function_exists( 'str_fs' ) ) { | |
| 28 | - function str_fs() { | |
| 27 | + define('STP_PLUGIN_DIR', plugin_dir_url(__FILE__)); | |
| 28 | + define('STP_PLUGIN_PATH', plugin_dir_path(__FILE__)); | |
| 29 | + define('STP_PLUGIN_VERSION', '2.4.0'); | |
| 30 | + define('STP_PLUGIN_FILE', __FILE__); | |
| 31 | + define('STP_HAS_PRO', 'streamcast-premium/streamcast.php' === plugin_basename(__FILE__)); | |
| 32 | + | |
| 33 | + if (!function_exists('str_fs')) { | |
| 34 | + function str_fs() | |
| 35 | + { | |
| 29 | 36 | global $str_fs; |
| 30 | - if ( !isset( $str_fs ) ) { | |
| 31 | - // Activate multisite network integration. | |
| 32 | - if ( !defined( 'WP_FS__PRODUCT_6433_MULTISITE' ) ) { | |
| 33 | - define( 'WP_FS__PRODUCT_6433_MULTISITE', true ); | |
| 34 | - } | |
| 37 | + if (!isset($str_fs)) { | |
| 38 | + | |
| 35 | 39 | // Include Freemius SDK. |
| 36 | - require_once dirname( __FILE__ ) . '/freemius/start.php'; | |
| 37 | - $str_fs = fs_dynamic_init( array( | |
| 38 | - 'id' => '6433', | |
| 39 | - 'slug' => 'streamcast', | |
| 40 | - 'type' => 'plugin', | |
| 41 | - 'public_key' => 'pk_a19d159db561c020210345da466f1', | |
| 42 | - 'is_premium' => false, | |
| 43 | - 'has_addons' => false, | |
| 44 | - 'has_paid_plans' => true, | |
| 45 | - 'trial' => array( | |
| 46 | - 'days' => 7, | |
| 47 | - 'is_require_payment' => true, | |
| 48 | - ), | |
| 49 | - 'has_affiliation' => 'selected', | |
| 50 | - 'menu' => array( | |
| 51 | - 'slug' => 'edit.php?post_type=streamcast', | |
| 52 | - 'first-path' => 'edit.php?post_type=streamcast&page=streamcast#/dashboard', | |
| 53 | - 'support' => false, | |
| 40 | + require_once dirname(__FILE__) . '/vendor/freemius/start.php'; | |
| 41 | + $str_fs = fs_dynamic_init(array( | |
| 42 | + 'id' => '6433', | |
| 43 | + 'slug' => 'streamcast', | |
| 44 | + 'type' => 'plugin', | |
| 45 | + 'public_key' => 'pk_a19d159db561c020210345da466f1', | |
| 46 | + 'is_premium' => false, | |
| 47 | + 'menu' => array( | |
| 48 | + 'slug' => 'edit.php?post_type=streamcast', | |
| 49 | + 'first-path' => 'edit.php?post_type=streamcast&page=streamcast#/dashboard', | |
| 50 | + 'support' => false, | |
| 54 | 51 | 'affiliation' => false, |
| 55 | 52 | ), |
| 56 | - 'is_live' => true, | |
| 57 | - ) ); | |
| 53 | + 'is_live' => true, | |
| 54 | + )); | |
| 58 | 55 | } |
| 59 | 56 | return $str_fs; |
| 60 | 57 | } |
| 61 | 58 | |
| @@ -61,16 +58,15 @@ | ||
| 61 | 58 | |
| 62 | 59 | // Init Freemius. |
| 63 | 60 | str_fs(); |
| 64 | 61 | // Signal that SDK was initiated. |
| 65 | - do_action( 'str_fs_loaded' ); | |
| 62 | + do_action('str_fs_loaded'); | |
| 66 | 63 | } |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | 67 | // Load main plugin class |
| 68 | - require_once plugin_dir_path( __FILE__ ) . 'inc/class-streamcast.php'; | |
| 68 | + require_once plugin_dir_path(__FILE__) . 'inc/class-stp-main.php'; | |
| 69 | 69 | // Initialize |
| 70 | - StreamCast::instance(); | |
| 71 | - // Activation Redirect | |
| 72 | - // if ('streamcast/streamcast.php' === plugin_basename(__FILE__)) { | |
| 73 | - // register_activation_hook(__FILE__, ['StreamCast', 'activation_redirect']); | |
| 74 | - // add_action('admin_init', ['StreamCast', 'do_redirect_to_dashboard']); | |
| 75 | - // } | |
| 70 | + new \STP\STP_Main(); | |
| 71 | + | |
| 76 | 72 | } |