can_use_premium_code__premium_only() && file_exists( STP_PLUGIN_PATH . 'premium-files/metabox-pro.php' ) ) { require_once STP_PLUGIN_PATH . 'premium-files/metabox-pro.php'; } if ( str_fs()->is_free_plan() && file_exists( STP_PLUGIN_PATH . 'admin/inc/metabox-free.php' ) ) { require_once STP_PLUGIN_PATH . 'admin/inc/metabox-free.php'; } } public function plugins_loaded() { self::load_dependencies(); } private static function load_dependencies() { require_once STP_PLUGIN_PATH . 'mimes/enable-mime-type.php'; require_once STP_PLUGIN_PATH . 'inc/Streamcast_Admin.php'; require_once STP_PLUGIN_PATH . 'inc/functions.php'; // For All Nessesary Functions require_once STP_PLUGIN_PATH . 'streamcast-block.php'; if ( str_fs()->is_free_plan() ) { require_once STP_PLUGIN_PATH . 'public/shortcode-free.php'; } if ( str_fs()->can_use_premium_code__premium_only() && !file_exists( STP_PLUGIN_PATH . 'premium-files/shortcode-pro.php' ) ) { require_once STP_PLUGIN_PATH . 'public/shortcode-free.php'; } } public static function load_textdomain() { load_plugin_textdomain( 'streamcast', false, dirname( __FILE__ ) . "/../languages" ); } public static function enqueue_admin_assets( $hook ) { global $typenow; if ( 'streamcast' === $typenow ) { wp_enqueue_script( 'stp-admin-post-js', STP_PLUGIN_DIR . 'build/admin-post.js', [], STP_PLUGIN_VERSION, true ); wp_enqueue_style( 'stp-admin-post-css', STP_PLUGIN_DIR . 'build/admin-post.css', [], STP_PLUGIN_VERSION ); } if ( 'streamcast_page_help' === $hook ) { wp_enqueue_style( 'stp-admin', STP_PLUGIN_DIR . 'admin/css/admin.css', [], STP_PLUGIN_VERSION ); } elseif ( 'streamcast_page_streamcast' === $hook ) { wp_enqueue_script( 'stp-dashboard-js', STP_PLUGIN_DIR . 'build/admin-help.js', ['react', 'react-dom'], STP_PLUGIN_VERSION, true ); wp_enqueue_script( 'stp-fs-js', STP_PLUGIN_DIR . 'public/js/fs.js', [], STP_PLUGIN_VERSION, true ); wp_enqueue_style( 'tlgb-dashboard-css', STP_PLUGIN_DIR . 'build/admin-help.css', [], STP_PLUGIN_VERSION ); } } public static function add_help_pages() { add_submenu_page( 'edit.php?post_type=streamcast', 'Demo & Help', 'Demo & Help', 'manage_options', 'streamcast', [__CLASS__, 'render_dashboard'] ); } public static function render_dashboard() { ?>
StreamCast Radio Player plugin, please leave us a ★★★★★ rating.', 'streamcast' ), $url ); } return $text; } public static function stream_shortcode( $atts ) { extract( shortcode_atts( [ 'url' => null, 'background' => null, ], $atts ) ); ob_start(); ?>