PluginProbe
WpStream – Live Streaming, Video on Demand, Pay Per View / 4.4.10
WpStream – Live Streaming, Video on Demand, Pay Per View v4.4.10
4.14.1 4.14.0 4.13.2 4.13.1 4.13 4.12.5 4.12.4 4.12.3 4.12.2 4.12.1 4.12 4.4.4 4.4.5 4.4.6 4.4.7 4.4.8 4.4.9 4.5 4.5.1 4.5.11 4.5.11.1 4.5.11.2 4.5.11.4 4.5.11.5 4.5.11.6 All 181 releases
← All changes | wpstream.php +7 -194 4.124.4.10 View file →
@@ -2,13 +2,13 @@
2 2 /**
3 3 * Plugin Name: WpStream - Live Streaming, Video on Demand, Pay Per View
4 4 * Plugin URI: http://wpstream.net
5 5 * Description: WpStream is a platform that allows you to live stream, create Video-on-Demand, and offer Pay-Per-View videos. We provide an affordable and user-friendly way for businesses, non-profits, and public institutions to broadcast their content and monetize their work.
6 - * Version: 4.12
6 + * Version: 4.4.10
7 7 * Author: wpstream
8 8 * Author URI: http://wpstream.net
9 9 * Text Domain: wpstream
10 - * Domain Path: /languages/
10 + * Domain Path: /languages
11 11 */
12 12
13 13 // If this file is called directly, abort.
14 14 if ( ! defined( 'WPINC' ) ) {
@@ -13,9 +13,9 @@
13 13 // If this file is called directly, abort.
14 14 if ( ! defined( 'WPINC' ) ) {
15 15 die;
16 16 }
17 -define('WPSTREAM_PLUGIN_VERSION', '4.12');
17 +define('WPSTREAM_PLUGIN_VERSION', '4.4.10');
18 18 define('WPSTREAM_CLUBLINK', 'wpstream.net');
19 19 define('WPSTREAM_CLUBLINKSSL', 'https');
20 20 define('WPSTREAM_PLUGIN_URL', plugins_url() );
21 21 define('WPSTREAM_PLUGIN_DIR_URL', plugin_dir_url(__FILE__) );
@@ -20,27 +20,14 @@
20 20 define('WPSTREAM_PLUGIN_URL', plugins_url() );
21 21 define('WPSTREAM_PLUGIN_DIR_URL', plugin_dir_url(__FILE__) );
22 22 define('WPSTREAM_PLUGIN_PATH', plugin_dir_path(__FILE__) );
23 23 define('WPSTREAM_PLUGIN_BASE', plugin_basename(__FILE__) );
24 -if( !defined('WPSTREAM_API' ) ) {
25 - define('WPSTREAM_API', 'https://baker.wpstream.net');
26 -}
27 -if ( !defined( 'WPSTREAM_CLICK' ) ) {
28 - define( 'WPSTREAM_CLICK', 'https://click.wpstream.net' );
29 -}
30 -if ( !defined( 'WPSTREAM_PLAYER') ) {
31 - define ( 'WPSTREAM_PLAYER', 'https://player.wpstream.net' );
32 -}
24 +define('WPSTREAM_API', 'https://baker.wpstream.net');
33 25
34 26
35 -define('WPSTREAM_TIMEOUT_CONST', 20); // in seconds
36 27
37 -function wpstream_cleanup_logs_handler() {
38 - $logger = new WpStream_Logger();
39 - $logger->clear_old_logs();
40 -}
41 -add_action('wpstream_log_cleanup', 'wpstream_cleanup_logs_handler');
42 28
29 +
43 30 /**
44 31 * The code that runs during plugin activation.
45 32 * This action is documented in includes/class-wpstream-activator.php
46 33 */
@@ -46,12 +33,8 @@
46 33 */
47 34 function activate_wpstream() {
48 35 require_once plugin_dir_path( __FILE__ ) . 'includes/class-wpstream-activator.php';
49 36 Wpstream_Activator::activate();
50 -
51 - if( !wp_next_scheduled( 'wpstream_log_cleanup' ) ) {
52 - wp_schedule_event( time(), 'daily', 'wpstream_log_cleanup' );
53 - }
54 37 }
55 38
56 39 /**
57 40 * The code that runs during plugin deactivation.
@@ -59,10 +42,8 @@
59 42 */
60 43 function deactivate_wpstream() {
61 44 require_once plugin_dir_path( __FILE__ ) . 'includes/class-wpstream-deactivator.php';
62 45 Wpstream_Deactivator::deactivate();
63 -
64 - wp_clear_scheduled_hook( 'wpstream_log_cleanup' );
65 46 }
66 47
67 48 register_activation_hook( __FILE__, 'activate_wpstream' );
68 49 register_deactivation_hook( __FILE__, 'deactivate_wpstream' );
@@ -67,100 +48,17 @@
67 48 register_activation_hook( __FILE__, 'activate_wpstream' );
68 49 register_deactivation_hook( __FILE__, 'deactivate_wpstream' );
69 50
70 51 /**
71 - * Wrapper function for wpstream_dashboard_save_channel_data to be called from theme
72 - * This provides backward compatibility for the theme
73 - */
74 -function wpstream_dashboard_save_channel_data_plugin() {
75 - global $wpstream_plugin;
76 - if (isset($wpstream_plugin) && isset($wpstream_plugin->wpstream_ajax)) {
77 - $wpstream_plugin->wpstream_ajax->wpstream_dashboard_save_channel_data();
78 - }
79 -}
80 -
81 -/**
82 52 * The core plugin class that is used to define internationalization,
83 53 * admin-specific hooks, and public-facing site hooks.
84 54 */
85 55 require plugin_dir_path( __FILE__ ) . 'includes/class-wpstream.php';
86 56 require plugin_dir_path( __FILE__ ) . 'wpstream-elementor.php';
87 -require plugin_dir_path( __FILE__ ) . 'streamify/streamify.php';
88 57
89 -require plugin_dir_path( __FILE__ ) . 'integrations/integrations.php';
58 +
90 59
91 -function wpstream_load_theme_functionality() {
92 - define ('WPSTREAM_FRAMEWORK_BASE', plugin_dir_path(__FILE__) . 'hello-wpstream' );
93 -
94 - $core_files = array(
95 - '/framework/metaboxes.php',
96 - '/framework/query-functions.php',
97 - '/framework/wpstream-video-functions.php',
98 - '/framework/ajax-functions.php',
99 - '/framework/dashboard-functions.php',
100 - '/framework/wpstream-help-functions.php',
101 - '/framework/video-pages-functions.php',
102 - '/framework/comments-functions.php',
103 - '/framework/gallery-functions.php',
104 - '/framework/shortcodes-functions.php',
105 - '/framework/post-types/main.php',
106 - '/framework/woocommerce-functions.php',
107 - '/framework/ajax-upload.php',
108 - '/framework/email-functions.php',
109 - '/framework/widgets/class-wpstream-widget-manager.php',
110 - '/framework/classes/class-wpstream-login-register.php',
111 - '/framework/classes/class-wpstream_theme-social-login.php',
112 - );
113 -
114 - // Load core files
115 - foreach ( $core_files as $file ) {
116 - $file_path = WPSTREAM_FRAMEWORK_BASE . $file;
117 - if ( file_exists( $file_path ) ) {
118 - require_once $file_path;
119 - } else {
120 - error_log( 'Missing required file: ' . $file_path );
121 - }
122 - }
123 -
124 - // Load Elementor integration if the plugin is active
125 - if ( defined( 'ELEMENTOR_VERSION' ) ) {
126 -
127 - $elementor_files = array(
128 - '/elementor/functions/blog_functions.php',
129 - '/elementor/wpstream-elementor.php'
130 - );
131 -
132 - foreach ( $elementor_files as $file ) {
133 - $file_path = WPSTREAM_FRAMEWORK_BASE . $file;
134 - if ( file_exists( $file_path ) ) {
135 - require_once $file_path;
136 - } else {
137 - error_log( 'Missing required file: ' . $file_path );
138 - }
139 - }
140 - }
141 -}
142 -
143 -add_action( 'after_setup_theme', 'wpstream_load_theme_functionality' );
144 -
145 60 /**
146 - * Load js for players
147 - *
148 - * @return void
149 - */
150 -if ( ! function_exists( 'wpstream_load_player_js_on_demand' ) ) {
151 - function wpstream_load_player_js_on_demand()
152 - {
153 - $wpstream_unit_card_use_video = get_theme_mod('wpstream_unit_card_use_video');
154 - if ($wpstream_unit_card_use_video) {
155 - wp_enqueue_script('video.min');
156 - wp_enqueue_script('wpstream-player');
157 - }
158 -
159 - }
160 -}
161 -
162 -/**
163 61 * Begins execution of the plugin.
164 62 *
165 63 * Since everything within the plugin is registered via hooks,
166 64 * then kicking off the plugin from this point in the file does
@@ -220,26 +118,10 @@
220 118
221 119
222 120 }
223 121
224 -
225 122 /*
226 123 *
227 -* Check integrations
228 -*
229 -*/
230 -require_once plugin_dir_path(__FILE__) . 'integrations/hello-wpstream/theme-import.php';
231 -add_filter('pt-ocdi/import_files', 'ocdi_import_files');
232 -add_action('pt-ocdi/after_import', 'ocdi_after_import_setup');
233 -add_filter('pt-ocdi/plugin_intro_text', 'ocdi_plugin_intro_text');
234 -add_action('ocdi/before_content_import', 'wpstream_track_ocdi_import_attempt', 10, 1);
235 -
236 -
237 -add_action( 'plugins_loaded', 'wpstream_check_integrations' );
238 -
239 -
240 -/*
241 -*
242 124 * Redirect on plugin activation
243 125 *
244 126 */
245 127
@@ -247,74 +129,5 @@
247 129 if( $plugin == plugin_basename( __FILE__ ) ) {
248 130 exit( wp_redirect( admin_url( 'admin.php?page=wpstream_onboard' ) ) );
249 131 }
250 132 }
251 -add_action( 'activated_plugin', 'wpstream_activation_redirect' );
252 -
253 -
254 -
255 -/*
256 -*
257 -* remove the style selectWoo for the theme
258 -*
259 -*/
260 -if ( function_exists( 'wpstream_get_author_id' ) ) {
261 - // only if wpstream-theme is activated
262 -
263 - remove_filter( 'pre_user_description', 'wp_filter_kses' ); // Removes the filter that applies KSES filtering for user descriptions
264 - remove_filter( 'term_description', 'wp_kses_data' ); // Removes the filter that applies KSES data filtering for term descriptions
265 -
266 - if ( ! function_exists( 'wsis_dequeue_stylesandscripts_select2' ) ) {
267 - add_action( 'wp_enqueue_scripts', 'wsis_dequeue_stylesandscripts_select2', 100 );
268 - /**
269 - * Remove CSS and/or JS for Select2 used by WooCommerce
270 - */
271 - function wsis_dequeue_stylesandscripts_select2() {
272 - if ( class_exists( 'woocommerce' ) ) {
273 - wp_dequeue_style( 'selectWoo' );
274 - wp_deregister_style( 'selectWoo' );
275 -
276 - wp_dequeue_script( 'selectWoo' );
277 - wp_deregister_script( 'selectWoo' );
278 - }
279 - }
280 - }
281 -}
282 -
283 -/**
284 - * Register broadcaster page endpoint
285 - */
286 -function wpstream_register_broadcaster_endpoint() {
287 - add_rewrite_tag('%broadcaster_page%', '([0-1]{1})');
288 - add_rewrite_tag('%channel_id%', '([0-9]+)');
289 -
290 - $rewrite_rules = get_option('rewrite_rules');
291 - $rule_pattern = 'broadcaster-page/([0-9]+)/?$';
292 - $rule_target = 'index.php?broadcaster_page=1&channel_id=$matches[1]';
293 -
294 - add_rewrite_rule($rule_pattern, $rule_target, 'top');
295 - if ( !is_array($rewrite_rules) || !key_exists( $rule_pattern, $rewrite_rules ) ) {
296 - flush_rewrite_rules();
297 - }
298 -}
299 -add_action('init', 'wpstream_register_broadcaster_endpoint');
300 -
301 -/**
302 - * Load broadcaster template when the custom endpoint is accessed
303 - */
304 -function wpstream_load_broadcaster_template($template) {
305 - if (get_query_var('broadcaster_page') == 1) {
306 - // Return the path to our broadcaster template
307 - return plugin_dir_path(__FILE__) . 'templates/broadcaster-template.php';
308 - }
309 - return $template;
310 -}
311 -add_filter('template_include', 'wpstream_load_broadcaster_template');
312 -
313 -/**
314 - * Flush rewrite rules on plugin activation to ensure our endpoint works
315 - */
316 -function wpstream_flush_rewrite_rules() {
317 - wpstream_register_broadcaster_endpoint();
318 - flush_rewrite_rules();
319 -}
320 -register_activation_hook(__FILE__, 'wpstream_flush_rewrite_rules');
133 +add_action( 'activated_plugin', 'wpstream_activation_redirect' );