PluginProbe
PowerPress Podcasting plugin by Blubrry / 11.17.2
PowerPress Podcasting plugin by Blubrry v11.17.2
11.17.9 11.17.8 11.17.7 11.17.6 11.17.4 11.17.3 11.17.2 11.17.1 11.17 11.16.11 11.16.10 11.16.9 11.16.8 11.16.7 11.16.6 11.16.5 11.16.4 11.16.3 11.16.2 11.16.1 11.9.13 11.9.14 11.9.15 11.9.16 11.9.17 All 383 releases
powerpress / shortcodes / Application.php

Application.php in PowerPress Podcasting plugin by Blubrry 11.17.2, at shortcodes/Application.php

41 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 class PowerPressNetworkApplication extends PowerPressNetworkShortCode
4 {
5 function __construct()
6 {
7 parent::__construct('ppn-application');
8 }
9
10 function ppn_shortcode($attr, $contents)
11 {
12 require_once(WP_PLUGIN_DIR . '/powerpress/powerpressadmin.php');
13
14 $ctx = $this->getNetworkContext();
15 if (is_string($ctx)) return $ctx;
16
17 $props = [];
18
19 if (!empty($attr['auto-active'])) {
20 $props['auto-active'] = true;
21 }
22
23 // read tos url from db, allow shortcode attribute as override
24 $tosFromDb = $ctx['networkInfo']['tos_url'] ?? '';
25 $props['tos_url'] = !empty($attr['terms-url']) ? (string) $attr['terms-url'] : $tosFromDb;
26
27 if (isset($attr['default-list'])) {
28 $props['default-list'] = (int) $attr['default-list'];
29 }
30
31 $props['network_general'] = $ctx['general'];
32 $props['powerpress_network'] = $ctx['networkInfo'];
33 $props['post'] = false;
34
35 return PowerPressNetwork::getHTML('forms.php', $props, null, null);
36 }
37 }
38
39 $GLOBALS['ppn_application'] = new PowerPressNetworkApplication();
40
41