PluginProbe
WpStream – Live Streaming, Video on Demand, Pay Per View / 4.14.1
WpStream – Live Streaming, Video on Demand, Pay Per View v4.14.1
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
wpstream / includes / Helpers / wpstream-presentation.php

wpstream-presentation.php in WpStream – Live Streaming, Video on Demand, Pay Per View 4.14.1, at includes/Helpers/wpstream-presentation.php

44 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Viewer-facing presentation strings shared by the player, the public JS
4 * config and the bundled theme framework.
5 *
6 * One accessor per string keeps the filter in a single place, so every
7 * surface that shows the message agrees with what a theme decided.
8 *
9 * @package Wpstream
10 */
11
12 if ( ! defined( 'ABSPATH' ) ) {
13 exit;
14 }
15
16 if ( ! function_exists( 'wpstream_not_live_message' ) ) {
17 /**
18 * The "we are not live" message shown while a channel is offline.
19 *
20 * Reads the configurable option and passes it through one filter. The
21 * return is plain text — callers escape it for their context.
22 *
23 * @since 4.14.0
24 *
25 * @param int $channel_id Channel post ID, or 0 when the message is not tied
26 * to one channel (the player's shared JS config).
27 * @return string Plain-text message.
28 */
29 function wpstream_not_live_message( $channel_id = 0 ) {
30 // The option holds a site-wide custom message; the literal is the translated default.
31 $message = (string) get_option( 'wpstream_you_are_not_live', __( 'We are not live at this moment', 'wpstream' ) );
32
33 /**
34 * Filter the "we are not live" message.
35 *
36 * @since 4.14.0
37 *
38 * @param string $message Plain-text message (not yet escaped).
39 * @param int $channel_id Channel post ID, or 0 for the shared player config.
40 */
41 return (string) apply_filters( 'wpstream_not_live_message', $message, intval( $channel_id ) );
42 }
43 }
44