PluginProbe
WpStream – Live Streaming, Video on Demand, Pay Per View / 4.0.1
WpStream – Live Streaming, Video on Demand, Pay Per View v4.0.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 4.5.12 All 180 releases
wpstream / wpstream.php

wpstream.php in WpStream – Live Streaming, Video on Demand, Pay Per View 4.0.1, at wpstream.php

104 lines 3.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: WpStream
4 * Plugin URI: http://wpstream.net
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.0.1
7 * Author: wpstream
8 * Author URI: http://wpstream.net
9 * Text Domain: wpstream
10 * Domain Path: /languages
11 */
12
13 // If this file is called directly, abort.
14 if ( ! defined( 'WPINC' ) ) {
15 die;
16 }
17 define('WPSTREAM_PLUGIN_VERSION', '4.0.1');
18 define('WPSTREAM_CLUBLINK', 'wpstream.net');
19 define('WPSTREAM_CLUBLINKSSL', 'https');
20 define('WPSTREAM_PLUGIN_URL', plugins_url() );
21 define('WPSTREAM_PLUGIN_DIR_URL', plugin_dir_url(__FILE__) );
22 define('WPSTREAM_PLUGIN_PATH', plugin_dir_path(__FILE__) );
23 define('WPSTREAM_PLUGIN_BASE', plugin_basename(__FILE__) );
24
25
26 define('WPSTREAM_API', 'https://baker.wpstream.net');
27
28
29
30 /**
31 * The code that runs during plugin activation.
32 * This action is documented in includes/class-wpstream-activator.php
33 */
34 function activate_wpstream() {
35 require_once plugin_dir_path( __FILE__ ) . 'includes/class-wpstream-activator.php';
36 Wpstream_Activator::activate();
37 }
38
39 /**
40 * The code that runs during plugin deactivation.
41 * This action is documented in includes/class-wpstream-deactivator.php
42 */
43 function deactivate_wpstream() {
44 require_once plugin_dir_path( __FILE__ ) . 'includes/class-wpstream-deactivator.php';
45 Wpstream_Deactivator::deactivate();
46 }
47
48 register_activation_hook( __FILE__, 'activate_wpstream' );
49 register_deactivation_hook( __FILE__, 'deactivate_wpstream' );
50
51 /**
52 * The core plugin class that is used to define internationalization,
53 * admin-specific hooks, and public-facing site hooks.
54 */
55 require plugin_dir_path( __FILE__ ) . 'includes/class-wpstream.php';
56 require plugin_dir_path( __FILE__ ) . 'wpstream-elementor.php';
57
58
59
60 /**
61 * Begins execution of the plugin.
62 *
63 * Since everything within the plugin is registered via hooks,
64 * then kicking off the plugin from this point in the file does
65 * not affect the page life cycle.
66 *
67 * @since 3.0.1
68 */
69
70 global $wpstream_plugin;
71 $wpstream_plugin = new Wpstream();
72 $wpstream_plugin->run();
73
74 add_action( 'upgrader_process_complete', 'wpstrea_my_upgrate_function',10, 2);
75
76 function wpstrea_my_upgrate_function( $upgrader_object, $options ) {
77 delete_transient('wpstream_token_request');
78 }
79
80
81
82 add_action('wp_head', 'wpestate_add_custom_meta_to_header');
83
84 function wpestate_add_custom_meta_to_header(){
85 global $post;
86
87
88 if ( is_singular('product') || is_singular('wpstream_product') ){
89 $image_id = get_post_thumbnail_id();
90 $share_img = wp_get_attachment_image_src( $image_id, 'full');
91 $the_post = get_post($post->ID); ?>
92
93 <meta property='og:title' content="<?php print esc_html(get_the_title($post->ID)); ?>"/>
94 <?php if(isset($share_img[0])){ ?>
95 <meta property="og:image" content="<?php print esc_url($share_img[0]); ?>"/>
96 <meta property="og:image:secure_url" content="<?php print esc_url($share_img[0]); ?>" />
97 <?php }?>
98
99 <meta property="og:description" content=" <?php print wp_strip_all_tags( $the_post->post_content);?>" />
100 <?php }
101
102
103 }
104