PluginProbe
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions / 260917
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions v260917
260917 260913 260909 260829 260814 260805 110710 110731 110812 110815 110912 110913 110915 110926 110927 111002 111003 111011 111017 111029 111105 111206 111216 111220 120213 All 189 releases
s2member / src / includes / classes / menu-pages-rs.inc.php

menu-pages-rs.inc.php in s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions 260917, at src/includes/classes/menu-pages-rs.inc.php

100 lines 4.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // @codingStandardsIgnoreFile
3 /**
4 * Right-side for Menu Pages.
5 *
6 * Copyright: © 2009-2011
7 * {@link http://websharks-inc.com/ WebSharks, Inc.}
8 * (coded in the USA)
9 *
10 * Released under the terms of the GNU General Public License.
11 * You should have received a copy of the GNU General Public License,
12 * along with this software. In the main directory, see: /licensing/
13 * If not, see: {@link http://www.gnu.org/licenses/}.
14 *
15 * @package s2Member\Menu_Pages
16 * @since 110531
17 */
18 if(!defined('WPINC')) // MUST have WordPress.
19 exit("Do not access this file directly.");
20
21 if (!class_exists ("c_ws_plugin__s2member_menu_pages_rs"))
22 {
23 /**
24 * Right-side for Menu Pages.
25 *
26 * @package s2Member\Menu_Pages
27 * @since 110531
28 */
29 class c_ws_plugin__s2member_menu_pages_rs
30 {
31 /**
32 * Right-side for Menu Pages.
33 *
34 * @package s2Member\Menu_Pages
35 * @since 110531
36 *
37 * @return null
38 */
39 public static function display ()
40 {
41 do_action("ws_plugin__s2member_during_menu_pages_before_right_sections", get_defined_vars ());
42
43 ob_start(); // output buffer these so we can display a toggler conditionally.
44
45 if (!is_ssl() && $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["menu_pages"]["updates"])
46 {
47 echo '<div class="ws-menu-page-updates">' . "\n";
48 include_once dirname (dirname (__FILE__)) . "/menu-pages/updates.inc.php";
49 echo '</div>' . "\n";
50 }
51 if ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["menu_pages"]["upsell-pro"])
52 {
53 echo '<div class="ws-menu-page-others">' . "\n";
54 echo '<a href="http://s2member.com/prices/" target="_blank"><img src="' . esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/src/images/brand-upsell-pro.png" alt="." /></a>' . "\n";
55 echo '</div>' . "\n";
56 }
57 if ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["menu_pages"]["tools"])
58 {
59 echo '<div class="ws-menu-page-tools">' . "\n";
60 echo '<img src="' . esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/src/images/brand-tools.png" alt="." />' . "\n";
61 echo '</div>' . "\n";
62 }
63 if ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["menu_pages"]["kb"])
64 {
65 echo '<div class="ws-menu-page-kb">' . "\n";
66 echo '<a href="' . esc_attr (c_ws_plugin__s2member_readmes::parse_readme_value ("Knowledge Base")) . '" target="_blank"><img src="' . esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/src/images/brand-kb.png" alt="." /></a>' . "\n";
67 echo '</div>' . "\n";
68 }
69 if ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["menu_pages"]["videos"])
70 {
71 echo '<div class="ws-menu-page-videos">' . "\n";
72 echo '<a href="' . esc_attr (c_ws_plugin__s2member_readmes::parse_readme_value ("Video Tutorials")) . '" target="_blank"><img src="' . esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/src/images/brand-videos.png" alt="." /></a>' . "\n";
73 echo '</div>' . "\n";
74 }
75 if ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["menu_pages"]["support"])
76 {
77 echo '<div class="ws-menu-page-support">' . "\n";
78 echo '<a href="' . esc_attr (c_ws_plugin__s2member_readmes::parse_readme_value ("Forum URI")) . '" target="_blank"><img src="' . esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/src/images/brand-support.png" alt="." /></a>' . "\n";
79 echo '</div>' . "\n";
80 }
81 if ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["menu_pages"]["donations"])
82 {
83 echo '<div class="ws-menu-page-donations">' . "\n";
84 echo '<a href="' . esc_attr (c_ws_plugin__s2member_readmes::parse_readme_value ("Donate link")) . '" target="_blank"><img src="' . esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/src/images/brand-donations.png" alt="." /></a>' . "\n";
85 echo '</div>' . "\n";
86 }
87 if (($rs = ob_get_clean()))
88 {
89 $rs = '<div class="wrapper">'.$rs.'</div>';
90 $rs = '<div class="toggler" title="toggle sidebar"'.
91 ((!empty($_GET['page']) && preg_match('/\-(?:start|info)$/', $_GET['page'])) ? ' default-state="open"' : '').'></div>' . "\n".$rs;
92 echo $rs; // output content now; w/ possible toggler.
93 }
94 do_action("ws_plugin__s2member_during_menu_pages_after_right_sections", get_defined_vars ());
95
96 return /* return for uniformity. */;
97 }
98 }
99 }
100